Repository: evernote/evernote-cloud-sdk-php
Branch: master
Commit: b9e83d40cfd0
Files: 161
Total size: 1.5 MB
Directory structure:
gitextract_y1n92rby/
├── .gitignore
├── .travis.yml
├── APACHE-LICENSE-2.0.txt
├── LICENSE
├── NOTICE
├── README.md
├── composer.json
├── documentation/
│ ├── ApiIndex.md
│ ├── Evernote-Client.md
│ ├── Getting_Started.md
│ └── Migration.md
├── phpunit.xml.dist
├── sample/
│ ├── client/
│ │ ├── add_resource.php
│ │ ├── create_note.php
│ │ ├── delete_note.php
│ │ ├── find_notes.php
│ │ ├── list_notebooks.php
│ │ ├── move_note.php
│ │ ├── reminders.php
│ │ ├── replace_note.php
│ │ └── share_note.php
│ └── oauth/
│ └── index.php
├── src/
│ ├── EDAM/
│ │ ├── Error/
│ │ │ └── Types.php
│ │ ├── Limits/
│ │ │ └── Types.php
│ │ ├── NoteStore/
│ │ │ ├── NoteStore.php
│ │ │ └── Types.php
│ │ ├── Types/
│ │ │ └── Types.php
│ │ └── UserStore/
│ │ ├── Types.php
│ │ └── UserStore.php
│ ├── Evernote/
│ │ ├── AdvancedClient.php
│ │ ├── Auth/
│ │ │ └── OauthHandler.php
│ │ ├── Client.php
│ │ ├── Enml/
│ │ │ ├── CSSInliner/
│ │ │ │ ├── CssInlinerInterface.php
│ │ │ │ └── CssToInlineStyles.php
│ │ │ ├── Converter/
│ │ │ │ ├── EnmlConverterInterface.php
│ │ │ │ ├── EnmlToHtmlConverter.php
│ │ │ │ ├── HtmlConverterInterface.php
│ │ │ │ ├── HtmlToEnmlConverter.php
│ │ │ │ ├── PlainTextToEnmlConverter.php
│ │ │ │ ├── enml2html.xslt
│ │ │ │ └── html2enml.xslt
│ │ │ └── HtmlCleaner/
│ │ │ ├── HtmlCleanerInterface.php
│ │ │ └── HtmlPurifier.php
│ │ ├── Exception/
│ │ │ ├── AuthExpiredException.php
│ │ │ ├── AuthorizationDeniedException.php
│ │ │ ├── BadDataFormatException.php
│ │ │ ├── DataConflictException.php
│ │ │ ├── DataRequiredException.php
│ │ │ ├── EnmlValidationException.php
│ │ │ ├── ExceptionFactory.php
│ │ │ ├── InternalErrorException.php
│ │ │ ├── InvalidAuthException.php
│ │ │ ├── LengthTooLongException.php
│ │ │ ├── LengthTooShortException.php
│ │ │ ├── LimitReachedException.php
│ │ │ ├── NotFoundNoteException.php
│ │ │ ├── NotFoundNotebookException.php
│ │ │ ├── NotFoundSharedNotebookException.php
│ │ │ ├── PermissionDeniedException.php
│ │ │ ├── QuotaReachedException.php
│ │ │ ├── RateLimitReachedException.php
│ │ │ ├── ShardUnavailableException.php
│ │ │ ├── TakenDownException.php
│ │ │ ├── TooFewException.php
│ │ │ ├── TooManyException.php
│ │ │ ├── UnknownException.php
│ │ │ └── UnsupportedOperationException.php
│ │ ├── Factory/
│ │ │ └── ThriftClientFactory.php
│ │ ├── File/
│ │ │ ├── File.php
│ │ │ └── FileInterface.php
│ │ ├── Model/
│ │ │ ├── EnmlNoteContent.php
│ │ │ ├── HtmlNoteContent.php
│ │ │ ├── Note.php
│ │ │ ├── NoteContent.php
│ │ │ ├── NoteContentInterface.php
│ │ │ ├── Notebook.php
│ │ │ ├── PlainTextNoteContent.php
│ │ │ ├── Resource.php
│ │ │ ├── Search.php
│ │ │ └── SearchResult.php
│ │ └── Store/
│ │ └── Store.php
│ ├── Thrift/
│ │ ├── Base/
│ │ │ └── TBase.php
│ │ ├── ClassLoader/
│ │ │ └── ThriftClassLoader.php
│ │ ├── Exception/
│ │ │ ├── TApplicationException.php
│ │ │ ├── TException.php
│ │ │ ├── TProtocolException.php
│ │ │ └── TTransportException.php
│ │ ├── Factory/
│ │ │ ├── TBinaryProtocolFactory.php
│ │ │ ├── TCompactProtocolFactory.php
│ │ │ ├── TJSONProtocolFactory.php
│ │ │ ├── TProtocolFactory.php
│ │ │ ├── TStringFuncFactory.php
│ │ │ └── TTransportFactory.php
│ │ ├── Protocol/
│ │ │ ├── JSON/
│ │ │ │ ├── BaseContext.php
│ │ │ │ ├── ListContext.php
│ │ │ │ ├── LookaheadReader.php
│ │ │ │ └── PairContext.php
│ │ │ ├── TBinaryProtocol.php
│ │ │ ├── TBinaryProtocolAccelerated.php
│ │ │ ├── TCompactProtocol.php
│ │ │ ├── TJSONProtocol.php
│ │ │ └── TProtocol.php
│ │ ├── Serializer/
│ │ │ └── TBinarySerializer.php
│ │ ├── Server/
│ │ │ ├── TForkingServer.php
│ │ │ ├── TServer.php
│ │ │ ├── TServerSocket.php
│ │ │ ├── TServerTransport.php
│ │ │ └── TSimpleServer.php
│ │ ├── StringFunc/
│ │ │ ├── Core.php
│ │ │ ├── Mbstring.php
│ │ │ └── TStringFunc.php
│ │ ├── Transport/
│ │ │ ├── TBufferedTransport.php
│ │ │ ├── TFramedTransport.php
│ │ │ ├── THttpClient.php
│ │ │ ├── TMemoryBuffer.php
│ │ │ ├── TNullTransport.php
│ │ │ ├── TPhpStream.php
│ │ │ ├── TSocket.php
│ │ │ ├── TSocketPool.php
│ │ │ └── TTransport.php
│ │ └── Type/
│ │ ├── TConstant.php
│ │ ├── TMessageType.php
│ │ └── TType.php
│ └── autoload.php
└── tests/
├── Evernote/
│ └── Tests/
│ ├── ClientTest.php
│ └── Factory/
│ └── ThriftClientFactoryMock.php
├── bootstrap.php
└── fixtures/
├── note/
│ ├── authenticateToSharedNotebook_BUSINESS_ADMIN_TOKEN_1d9fc47121ec77f859917916d8d773c44190b332
│ ├── authenticateToSharedNotebook_BUSINESS_ADMIN_TOKEN_4308453c30010f6fddcfcbf282b8cd29e44af0a1
│ ├── authenticateToSharedNotebook_BUSINESS_ADMIN_TOKEN_73b11960aeaa2ba866b406c2a93ed03f16db36d9
│ ├── authenticateToSharedNotebook_BUSINESS_ADMIN_TOKEN_8d241b577460159e730d3b82088ce127583e2bec
│ ├── authenticateToSharedNotebook_BUSINESS_ADMIN_TOKEN_9577897cad7bf1e37f2606087f3f693f47506bd3
│ ├── authenticateToSharedNotebook_BUSINESS_ADMIN_TOKEN_a99bcc7351d22c34ea3a721ee456bd94de037d8c
│ ├── authenticateToSharedNotebook_BUSINESS_ADMIN_TOKEN_c20b1b0b4a29805231df016645ecd8d10df5f482
│ ├── authenticateToSharedNotebook_BUSINESS_USER_TOKEN_3e6b2af694337e2953fccfd591ac7a23ac9cc541
│ ├── authenticateToSharedNotebook_BUSINESS_USER_TOKEN_530966c9d987f0a33eb4aae4795088981d09de2d
│ ├── authenticateToSharedNotebook_BUSINESS_USER_TOKEN_98109d118517ebeb7ada77c9db5ab71341f7590f
│ ├── authenticateToSharedNotebook_BUSINESS_USER_TOKEN_9cf7cf916a80d10d4e4eeb62398dd60ce497d607
│ ├── authenticateToSharedNotebook_BUSINESS_USER_TOKEN_d1901257919570d4c4cc1f2fc47fc1a97327fd92
│ ├── authenticateToSharedNotebook_BUSINESS_USER_TOKEN_dda1101e9822fbd8d1a1dbeb09df9045e2cd7a6a
│ ├── authenticateToSharedNotebook_REGULAR_USER_TOKEN_ab05ad6f7147221284dae09f8170c8e57ec73287
│ ├── getSharedNotebookByAuth_BUSINESS_ADMIN_TOKEN_66e99a38209989ca7ee128dce8bea5e7dbb0d7e1
│ ├── getSharedNotebookByAuth_BUSINESS_USER_TOKEN_5da9c2159827f263c2b24e42047718b6607b17b3
│ ├── getSharedNotebookByAuth_REGULAR_USER_TOKEN_eebddce8d5725a83279021a0b711490bc4b4d2e1
│ ├── listLinkedNotebooks_BUSINESS_ADMIN_TOKEN_66e99a38209989ca7ee128dce8bea5e7dbb0d7e1
│ ├── listLinkedNotebooks_BUSINESS_USER_TOKEN_5da9c2159827f263c2b24e42047718b6607b17b3
│ ├── listLinkedNotebooks_REGULAR_USER_TOKEN_eebddce8d5725a83279021a0b711490bc4b4d2e1
│ ├── listNotebooks_BUSINESS_ADMIN_TOKEN_66e99a38209989ca7ee128dce8bea5e7dbb0d7e1
│ ├── listNotebooks_BUSINESS_USER_TOKEN_5da9c2159827f263c2b24e42047718b6607b17b3
│ ├── listNotebooks_REGULAR_USER_TOKEN_eebddce8d5725a83279021a0b711490bc4b4d2e1
│ ├── listSharedNotebooks_BUSINESS_ADMIN_TOKEN_66e99a38209989ca7ee128dce8bea5e7dbb0d7e1
│ ├── listSharedNotebooks_BUSINESS_USER_TOKEN_5da9c2159827f263c2b24e42047718b6607b17b3
│ └── listSharedNotebooks_REGULAR_USER_TOKEN_eebddce8d5725a83279021a0b711490bc4b4d2e1
└── user/
├── authenticateToBusiness_BUSINESS_ADMIN_TOKEN_66e99a38209989ca7ee128dce8bea5e7dbb0d7e1
├── authenticateToBusiness_BUSINESS_USER_TOKEN_5da9c2159827f263c2b24e42047718b6607b17b3
├── getNoteStoreUrl_BUSINESS_ADMIN_TOKEN_66e99a38209989ca7ee128dce8bea5e7dbb0d7e1
├── getNoteStoreUrl_BUSINESS_USER_TOKEN_5da9c2159827f263c2b24e42047718b6607b17b3
├── getNoteStoreUrl_REGULAR_USER_TOKEN_eebddce8d5725a83279021a0b711490bc4b4d2e1
├── getUser_BUSINESS_ADMIN_TOKEN_66e99a38209989ca7ee128dce8bea5e7dbb0d7e1
├── getUser_BUSINESS_USER_TOKEN_5da9c2159827f263c2b24e42047718b6607b17b3
└── getUser_REGULAR_USER_TOKEN_eebddce8d5725a83279021a0b711490bc4b4d2e1
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
.idea
.swp
/vendor/
/composer.phar
/composer.lock
.DS_Store
phpunit.xml
================================================
FILE: .travis.yml
================================================
language: php
php:
- 5.3
before_script:
- composer self-update
- composer install --dev --prefer-dist --no-interaction
script: phpunit --coverage-text -c phpunit.xml.dist
================================================
FILE: APACHE-LICENSE-2.0.txt
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
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.
================================================
FILE: LICENSE
================================================
/*
* Copyright (c) 2007-2015 by Evernote Corporation, All rights reserved.
*
* Use of the source code and binary libraries included in this package
* is permitted under the following terms:
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
================================================
FILE: NOTICE
================================================
Apache Thrift
Copyright 2006-2015 The Apache Software Foundation.
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
================================================
FILE: README.md
================================================
Evernote Cloud SDK PHP v2.0.2
=====================================
A newly-redesigned, simple, workflow-oriented library built on the Evernote Cloud API. It's designed to drop into your web app easily and make most common Evernote integrations very simple to accomplish. (And even the more complex integrations easier than they used to be.)
Installation
------------
The recommended way to install the SDK is through composer.
Just run these two commands to install it:
``` bash
$ curl -sS https://getcomposer.org/installer | php
$ php composer.phar require evernote/evernote-cloud-sdk-php
```
Now you can add the autoloader, and you will have access to the library:
``` php
=5.3",
"ezyang/htmlpurifier": "^4.6.0",
"tijsverkoyen/css-to-inline-styles": "~2.2",
"psr/log": "~1.0"
},
"autoload": {
"psr-0": { "Evernote": "src/", "Thrift": "src/"},
"classmap": ["src/EDAM"]
}
}
================================================
FILE: documentation/ApiIndex.md
================================================
API Index
=========
* Evernote
* [Client](Evernote-Client.md)
================================================
FILE: documentation/Evernote-Client.md
================================================
Evernote\Client
===============
* Class name: Client
* Namespace: Evernote
Constants
----------
### PERSONAL_SCOPE
const PERSONAL_SCOPE = 1
### LINKED_SCOPE
const LINKED_SCOPE = 2
### SEARCH_SCOPE_NONE
const SEARCH_SCOPE_NONE = 0
### SEARCH_SCOPE_PERSONAL
const SEARCH_SCOPE_PERSONAL = 1
### SEARCH_SCOPE_PERSONAL_LINKED
const SEARCH_SCOPE_PERSONAL_LINKED = 2
### SEARCH_SCOPE_BUSINESS
const SEARCH_SCOPE_BUSINESS = 4
### SEARCH_SCOPE_APP_NOTEBOOK
const SEARCH_SCOPE_APP_NOTEBOOK = 8
### SEARCH_SCOPE_DEFAULT
const SEARCH_SCOPE_DEFAULT = 1
### SEARCH_SCOPE_ALL
const SEARCH_SCOPE_ALL = 7
### SORT_ORDER_TITLE
const SORT_ORDER_TITLE = 1
### SORT_ORDER_RECENTLY_CREATED
const SORT_ORDER_RECENTLY_CREATED = 2
### SORT_ORDER_RECENTLY_UPDATED
const SORT_ORDER_RECENTLY_UPDATED = 4
### SORT_ORDER_RELEVANCE
const SORT_ORDER_RELEVANCE = 8
### SORT_ORDER_NORMAL
const SORT_ORDER_NORMAL = 0
### SORT_ORDER_REVERSE
const SORT_ORDER_REVERSE = 65536
### BUSINESS_NOTE
const BUSINESS_NOTE = 0
### PERSONAL_NOTE
const PERSONAL_NOTE = 1
### SHARED_NOTE
const SHARED_NOTE = 2
Properties
----------
### $advancedClient
protected \Evernote\AdvancedClient $advancedClient
* Visibility: **protected**
### $token
protected string $token
* Visibility: **protected**
### $sandbox
protected boolean $sandbox
* Visibility: **protected**
### $china
protected boolean $china
* Visibility: **protected**
### $userNoteStore
protected \EDAM\NoteStore\NoteStoreClient $userNoteStore
* Visibility: **protected**
### $businessNoteStore
protected \EDAM\NoteStore\NoteStoreClient $businessNoteStore
* Visibility: **protected**
### $businessToken
protected string $businessToken
* Visibility: **protected**
### $user
protected \EDAM\Types\User $user
* Visibility: **protected**
### $businessAuth
protected \EDAM\UserStore\AuthenticationResult $businessAuth
* Visibility: **protected**
Methods
-------
### __construct
mixed Evernote\Client::__construct(string|null $token, boolean $sandbox, \Evernote\AdvancedClient|null $advancedClient, \Psr\Log\LoggerInterface|null $logger, boolean $china)
* Visibility: **public**
#### Arguments
* $token **string|null**
* $sandbox **boolean**
* $advancedClient **Evernote\AdvancedClient|null**
* $logger **Psr\Log\LoggerInterface|null**
* $china **boolean**
### getUser
\EDAM\Types\User Evernote\Client::getUser()
Returns the User corresponding to the provided authentication token
* Visibility: **public**
### isBusinessUser
boolean Evernote\Client::isBusinessUser()
Returns a boolean indicating if the user has a business account
* Visibility: **public**
### getBusinessToken
string Evernote\Client::getBusinessToken()
Returns the token used to access the business notestore
* Visibility: **public**
### getBusinessNoteStore
\EDAM\NoteStore\NoteStoreClient|mixed Evernote\Client::getBusinessNoteStore()
Returns the business notestore
* Visibility: **public**
### getBusinessSharedNotebooks
null Evernote\Client::getBusinessSharedNotebooks()
Returns the list of notebooks shared by the user with her business account
* Visibility: **public**
### getBusinessLinkedNotebooks
array Evernote\Client::getBusinessLinkedNotebooks()
Returns the list of notebooks shared to the user through the business account
* Visibility: **public**
### listNotebooks
array Evernote\Client::listNotebooks()
Returns the list of notebooks
* Visibility: **public**
### listPersonalNotebooks
array Evernote\Client::listPersonalNotebooks()
Returns the list of personal notebooks
* Visibility: **public**
### listSharedNotebooks
array Evernote\Client::listSharedNotebooks()
Returns the list of notebooks shared by the user
* Visibility: **public**
### listLinkedNotebooks
array Evernote\Client::listLinkedNotebooks()
Returns the list of notebooks shared to the user
* Visibility: **public**
### getUserNotestore
\EDAM\NoteStore\NoteStoreClient|mixed Evernote\Client::getUserNotestore()
Returns the personal notestore of the user
* Visibility: **public**
### replaceNote
\Evernote\Model\Note Evernote\Client::replaceNote(\Evernote\Model\Note $noteToReplace, \Evernote\Model\Note $note)
Replaces an existing note by another one (new or existing)
* Visibility: **public**
#### Arguments
* $noteToReplace **Evernote\Model\Note**
* $note **Evernote\Model\Note**
### uploadNote
\Evernote\Model\Note Evernote\Client::uploadNote(\Evernote\Model\Note $note, \Evernote\Model\Notebook $notebook)
Sends a new Note to the API
* Visibility: **public**
#### Arguments
* $note **Evernote\Model\Note**
* $notebook **Evernote\Model\Notebook**
### deleteNote
boolean Evernote\Client::deleteNote(\Evernote\Model\Note $note)
Deletes a note
* Visibility: **public**
#### Arguments
* $note **Evernote\Model\Note**
### shareNote
null|string Evernote\Client::shareNote(\Evernote\Model\Note $note)
Shares a note and returns the share url
* Visibility: **public**
#### Arguments
* $note **Evernote\Model\Note**
### moveNote
\Evernote\Model\Note Evernote\Client::moveNote(\Evernote\Model\Note $note, \Evernote\Model\Notebook $notebook)
Moves a note to another notebook
* Visibility: **public**
#### Arguments
* $note **Evernote\Model\Note**
* $notebook **Evernote\Model\Notebook**
### getNote
\Evernote\Model\Note|null Evernote\Client::getNote($guid, null $scope)
Retrieves an existing note
* Visibility: **public**
#### Arguments
* $guid **mixed**
* $scope **null**
### isAppNotebookToken
boolean Evernote\Client::isAppNotebookToken($token)
Checks if the token is an "app notebook" one
* Visibility: **public**
#### Arguments
* $token **mixed**
### getNotebook
\Evernote\Model\Notebook|null Evernote\Client::getNotebook($notebook_guid, null $scope)
Retrieves a notebook
* Visibility: **public**
#### Arguments
* $notebook_guid **mixed**
* $scope **null**
### findNotesWithSearch
array|boolean Evernote\Client::findNotesWithSearch($noteSearch, \Evernote\Model\Notebook $notebook, integer $scope, integer $sortOrder, integer $maxResults)
Searches for notes
* Visibility: **public**
#### Arguments
* $noteSearch **mixed**
* $notebook **Evernote\Model\Notebook**
* $scope **integer**
* $sortOrder **integer**
* $maxResults **integer**
### setAdvancedClient
mixed Evernote\Client::setAdvancedClient(\Evernote\AdvancedClient $advancedClient)
Sets the advancedClient
* Visibility: **public**
#### Arguments
* $advancedClient **Evernote\AdvancedClient**
### getAdvancedClient
\Evernote\AdvancedClient Evernote\Client::getAdvancedClient()
Returns the advancedClient
* Visibility: **public**
### setSandbox
mixed Evernote\Client::setSandbox(boolean $sandbox)
Sets the sandbox flag to true or false
* Visibility: **public**
#### Arguments
* $sandbox **boolean**
### getSandbox
boolean Evernote\Client::getSandbox()
Gets the current sandbox flag
* Visibility: **public**
### setChina
mixed Evernote\Client::setChina(boolean $china)
Sets the china flag to true or false
* Visibility: **public**
#### Arguments
* $china **boolean**
### getChina
boolean Evernote\Client::getChina()
Gets the current china flag
* Visibility: **public**
### setToken
mixed Evernote\Client::setToken(string $token)
Sets the authentication token
* Visibility: **public**
#### Arguments
* $token **string**
### getToken
string Evernote\Client::getToken()
Returns the current authentication token
* Visibility: **public**
### getNoteStore
mixed Evernote\Client::getNoteStore($noteStoreUrl)
* Visibility: **protected**
#### Arguments
* $noteStoreUrl **mixed**
### getShareUrl
mixed Evernote\Client::getShareUrl($guid, $shardId, $shareKey, $serviceHost)
* Visibility: **protected**
#### Arguments
* $guid **mixed**
* $shardId **mixed**
* $shareKey **mixed**
* $serviceHost **mixed**
### getSharedNotebookAuthResult
mixed Evernote\Client::getSharedNotebookAuthResult(\EDAM\Types\LinkedNotebook $linkedNotebook)
* Visibility: **protected**
#### Arguments
* $linkedNotebook **EDAM\Types\LinkedNotebook**
### getNoteBookByLinkedNotebook
mixed Evernote\Client::getNoteBookByLinkedNotebook(\EDAM\Types\LinkedNotebook $linkedNotebook)
* Visibility: **protected**
#### Arguments
* $linkedNotebook **EDAM\Types\LinkedNotebook**
### getBusinessAuth
\EDAM\UserStore\AuthenticationResult Evernote\Client::getBusinessAuth()
* Visibility: **protected**
### getNoteInstance
mixed Evernote\Client::getNoteInstance(\EDAM\Types\Note $edamNote, $noteStore, $token)
* Visibility: **protected**
#### Arguments
* $edamNote **EDAM\Types\Note**
* $noteStore **mixed**
* $token **mixed**
### getShardIdFromToken
mixed Evernote\Client::getShardIdFromToken($token)
* Visibility: **protected**
#### Arguments
* $token **mixed**
### isFlagSet
mixed Evernote\Client::isFlagSet($flags, $flag)
* Visibility: **protected**
#### Arguments
* $flags **mixed**
* $flag **mixed**
### findNotes_listNotebooksWithContext
mixed Evernote\Client::findNotes_listNotebooksWithContext($context)
* Visibility: **protected**
#### Arguments
* $context **mixed**
### findNotes_findInPersonalScopeWithContext
mixed Evernote\Client::findNotes_findInPersonalScopeWithContext($context)
* Visibility: **protected**
#### Arguments
* $context **mixed**
### findNotes_findInBusinessScopeWithContext
mixed Evernote\Client::findNotes_findInBusinessScopeWithContext($context)
* Visibility: **protected**
#### Arguments
* $context **mixed**
### findNotes_findInLinkedScopeWithContext
mixed Evernote\Client::findNotes_findInLinkedScopeWithContext($context)
* Visibility: **protected**
#### Arguments
* $context **mixed**
### findNotes_nextFindInLinkedScopeWithContext
mixed Evernote\Client::findNotes_nextFindInLinkedScopeWithContext($context)
* Visibility: **protected**
#### Arguments
* $context **mixed**
### compareByTitle
mixed Evernote\Client::compareByTitle($obj1, $obj2)
* Visibility: **protected**
#### Arguments
* $obj1 **mixed**
* $obj2 **mixed**
### compareByCreated
mixed Evernote\Client::compareByCreated($obj1, $obj2)
* Visibility: **protected**
#### Arguments
* $obj1 **mixed**
* $obj2 **mixed**
### compareByUpdated
mixed Evernote\Client::compareByUpdated($obj1, $obj2)
* Visibility: **protected**
#### Arguments
* $obj1 **mixed**
* $obj2 **mixed**
### findNotes_processResultsWithContext
mixed Evernote\Client::findNotes_processResultsWithContext($context)
* Visibility: **protected**
#### Arguments
* $context **mixed**
================================================
FILE: documentation/Getting_Started.md
================================================
Installation
------------
The recommended way to install the SDK is through composer.
Just run these two commands to install it:
``` bash
$ curl -sS https://getcomposer.org/installer | php
$ php composer.phar require evernote/evernote-cloud-sdk-php dev-master
```
Now you can add the autoloader, and you will have access to the library:
``` php
authorize($key, $secret, $callback);
echo "\nOauth Token : " . $oauth_data['oauth_token'];
```
You can then instantiate the client and call the api with this token.
Getting the "simple" client
---------------------------
The "simple" client is a high-level wrapper on top of the "advanced" client (see below).
It provides helper methods that hide complex stuff such as dealing with business accounts, app notebooks, etc.
All API calls are made with the \Evernote\Client.
Instantiate a new client object with a token and you're done.
The token can be an oauth token or a dev token.
``` php
getNote('the-note-guid');
$advancedClient = $client->getAdvancedClient();
```
Once you have a instance of the advanced client you can, for example, call the getUser() method:
``` php
// First, get the right Store
$userStore = $advancedClient->getUserStore();
// Then do the call
$user = $userStore->getUser();
```
You may notice that we don't pass the token to the getUser() method. It's the same with all the methods that require a token. Just omit it as it is already set on the client object.
Using the "simple" client
-------------
[Create a note](../sample/client/create_note.php)
[Delete a note](../sample/client/delete_note.php)
[Move a note](../sample/client/move_note.php)
[Share a note](../sample/client/share_note.php)
[Replace a note](../sample/client/replace_note.php)
[Add resources to a note](../sample/client/add_resource.php)
[Find notes](../sample/client/find_notes.php)
[Manage reminders](../sample/client/reminders.php)
Going further
-------------
The 'sample' folder contains a few code samples to help you get started with basic features.
================================================
FILE: documentation/Migration.md
================================================
Migrating from Evernote SDK for PHP 1.x
=======================================
Oauth
-----
The OAuth process has been entirely rewritten in order to remove the dependency on the php-oauth extension.
However you'll still need the curl extension and sessions enabled in order to make it work.
Both are installed and configured by default on most server hosts.
The code to get an oauth token is pretty straightforward :
```php
authorize($key, $secret, $callback);
$oauth_token = $oauth_data['oauth_token'];
```
Client
------
The "advanced" client is mostly the same as the client of the old SDK.
The only difference is the constructor which now takes 2 params : the token and a boolean that indicates the environment you want to work on.
``` php
./tests/
./src/Evernote/
================================================
FILE: sample/client/add_resource.php
================================================
SANDBOX.EVERNOTE.COM
* - Create a sample Evernote account at https://sandbox.evernote.com
*
* The Evernote API 'Production' Environment -> WWW.EVERNOTE.COM
* - Activate your Sandboxed API key for production access at https://dev.evernote.com/support/
*
* The Evernote API 'CHINA' Environment -> APP.YINXIANG.COM
* - Activate your Sandboxed API key for Evernote China service access at https://dev.evernote.com/support/
* or https://dev.yinxiang.com/support/. For more information about Evernote China service, please refer
* to https://dev.evernote.com/doc/articles/bootstrap.php
*
* For testing, set $sandbox to true; for production, set $sandbox to false and $china to false;
* for china service, set $sandbox to false and $china to true.
*
*/
$sandbox = true;
$china = false;
$client = new \Evernote\Client($token, $sandbox, null, null, $china);
// Create the resource
$resource = new \Evernote\Model\Resource('enlogo.png', 'image/png', 100, 100);
// Get a preformatted enml media tag (something like '')
$enml_media_tag = $resource->getEnmlMediaTag();
// Create the note
$note = new \Evernote\Model\Note();
$note->addResource($resource);
$note->title = 'Test note';
$note->content = new \Evernote\Model\EnmlNoteContent(
<<
$enml_media_tag
ENML
);
// Upload the note
$client->uploadNote($note);
================================================
FILE: sample/client/create_note.php
================================================
SANDBOX.EVERNOTE.COM
* - Create a sample Evernote account at https://sandbox.evernote.com
*
* The Evernote API 'Production' Environment -> WWW.EVERNOTE.COM
* - Activate your Sandboxed API key for production access at https://dev.evernote.com/support/
*
* The Evernote API 'CHINA' Environment -> APP.YINXIANG.COM
* - Activate your Sandboxed API key for Evernote China service access at https://dev.evernote.com/support/
* or https://dev.yinxiang.com/support/. For more information about Evernote China service, please refer
* to https://dev.evernote.com/doc/articles/bootstrap.php
*
* For testing, set $sandbox to true; for production, set $sandbox to false and $china to false;
* for china service, set $sandbox to false and $china to true.
*
*/
$sandbox = true;
$china = false;
$client = new \Evernote\Client($token, $sandbox, null, null, $china);
$note = new \Evernote\Model\Note();
$note->title = 'Test note';
$note->content = new \Evernote\Model\PlainTextNoteContent('Some plain text content.');
$note->tagNames = array('tag1', 'tag2');
/**
* The second parameter $notebook is optionnal.
* If left blank or set as null, the note will be created in the default notebook
* Or in the App Notebook if applicable.
*
* Otherwise, you need to pass a \Evernote\Model\Notebook object
* There are 2 options :
*
* If you already have a Notebook object (from the listNotebooks method for example)
* just pass it as is to the method.
*
* If you only have a notebookGuid, instantiate an empty notebook and set the guid :
*
* $notebook = new \Evernote\Model\Notebook();
* $notebook->guid = $notebook_guid;
*
* The notebook will be automatically retrieved if necessary
*/
$notebook = null;
$client->uploadNote($note, $notebook);
================================================
FILE: sample/client/delete_note.php
================================================
SANDBOX.EVERNOTE.COM
* - Create a sample Evernote account at https://sandbox.evernote.com
*
* The Evernote API 'Production' Environment -> WWW.EVERNOTE.COM
* - Activate your Sandboxed API key for production access at https://dev.evernote.com/support/
*
* The Evernote API 'CHINA' Environment -> APP.YINXIANG.COM
* - Activate your Sandboxed API key for Evernote China service access at https://dev.evernote.com/support/
* or https://dev.yinxiang.com/support/. For more information about Evernote China service, please refer
* to https://dev.evernote.com/doc/articles/bootstrap.php
*
* For testing, set $sandbox to true; for production, set $sandbox to false and $china to false;
* for china service, set $sandbox to false and $china to true.
*
*/
$sandbox = true;
$china = false;
$client = new \Evernote\Client($token, $sandbox, null, null, $china);
/**
* You need to pass a \Evernote\Model\Note object
* There are 2 options :
*
* If you already have a Note object (from the getNote method for example)
* just pass it as is to the method.
*
* If you only have a note guid, instantiate an empty note and set the guid :
*
* $note = new \Evernote\Model\Note();
* $note->guid = 'GUID';
*
*/
$note = new \Evernote\Model\Note();
$note->guid = 'GUID';
$client->deleteNote($note);
================================================
FILE: sample/client/find_notes.php
================================================
SANDBOX.EVERNOTE.COM
* - Create a sample Evernote account at https://sandbox.evernote.com
*
* The Evernote API 'Production' Environment -> WWW.EVERNOTE.COM
* - Activate your Sandboxed API key for production access at https://dev.evernote.com/support/
*
* The Evernote API 'CHINA' Environment -> APP.YINXIANG.COM
* - Activate your Sandboxed API key for Evernote China service access at https://dev.evernote.com/support/
* or https://dev.yinxiang.com/support/. For more information about Evernote China service, please refer
* to https://dev.evernote.com/doc/articles/bootstrap.php
*
* For testing, set $sandbox to true; for production, set $sandbox to false and $china to false;
* for china service, set $sandbox to false and $china to true.
*
*/
$sandbox = true;
$china = false;
$client = new \Evernote\Client($token, $sandbox, null, null, $china);
/**
* The search string
*/
$search = new \Evernote\Model\Search('test');
/**
* The notebook to search in
*/
$notebook = null;
/**
* The scope of the search
*/
$scope = \Evernote\Client::SEARCH_SCOPE_BUSINESS;
/**
* The order of the sort
*/
$order = \Evernote\Client::SORT_ORDER_REVERSE | \Evernote\Client::SORT_ORDER_RECENTLY_CREATED;
/**
* The number of results
*/
$maxResult = 5;
$results = $client->findNotesWithSearch($search, $notebook, $scope, $order, $maxResult);
foreach ($results as $result) {
$noteGuid = $result->guid;
$noteType = $result->type;
$noteTitle = $result->title;
$noteCreated = $result->created;
$noteUpdated = $result->updated;
}
================================================
FILE: sample/client/list_notebooks.php
================================================
SANDBOX.EVERNOTE.COM
* - Create a sample Evernote account at https://sandbox.evernote.com
*
* The Evernote API 'Production' Environment -> WWW.EVERNOTE.COM
* - Activate your Sandboxed API key for production access at https://dev.evernote.com/support/
*
* The Evernote API 'CHINA' Environment -> APP.YINXIANG.COM
* - Activate your Sandboxed API key for Evernote China service access at https://dev.evernote.com/support/
* or https://dev.yinxiang.com/support/. For more information about Evernote China service, please refer
* to https://dev.evernote.com/doc/articles/bootstrap.php
*
* For testing, set $sandbox to true; for production, set $sandbox to false and $china to false;
* for china service, set $sandbox to false and $china to true.
*
*/
$sandbox = true;
$china = false;
$client = new \Evernote\Client($token, $sandbox, null, null, $china);
$notebooks = array();
$notebooks = $client->listNotebooks();
foreach ($notebooks as $notebook) {
echo "\n\nName : " . $notebook->name;
echo "\nGuid : " . $notebook->guid;
echo "\nIs Business : ";
echo $notebook->isBusinessNotebook()?"Y":"N";
echo "\nIs Default : ";
echo $notebook->isDefaultNotebook()?"Y":"N";
echo "\nIs Linked : ";
echo $notebook->isLinkedNotebook()?"Y":"N";
}
================================================
FILE: sample/client/move_note.php
================================================
SANDBOX.EVERNOTE.COM
* - Create a sample Evernote account at https://sandbox.evernote.com
*
* The Evernote API 'Production' Environment -> WWW.EVERNOTE.COM
* - Activate your Sandboxed API key for production access at https://dev.evernote.com/support/
*
* The Evernote API 'CHINA' Environment -> APP.YINXIANG.COM
* - Activate your Sandboxed API key for Evernote China service access at https://dev.evernote.com/support/
* or https://dev.yinxiang.com/support/. For more information about Evernote China service, please refer
* to https://dev.evernote.com/doc/articles/bootstrap.php
*
* For testing, set $sandbox to true; for production, set $sandbox to false and $china to false;
* for china service, set $sandbox to false and $china to true.
*
*/
$sandbox = true;
$china = false;
$client = new \Evernote\Client($token, $sandbox, null, null, $china);
$note = new \Evernote\Model\Note();
$note->title = 'Move a note';
$note->content = new \Evernote\Model\PlainTextNoteContent('Some plain text content.');
$notebook = null;
$uploaded_note = $client->uploadNote($note, $notebook);
echo "\nFirst guid : " . $uploaded_note->guid;
/**
* The second parameter $notebook is - of course - mandatory.
*
* You need to pass a \Evernote\Model\Notebook object
* There are 2 options :
*
* If you already have a Notebook object (from the listNotebooks method for example)
* just pass it as is to the method.
*
* If you only have a notebookGuid, instantiate an empty notebook and set the guid :
*
* $notebook = new \Evernote\Model\Notebook();
* $notebook->guid = $notebook_guid;
*
* The notebook will be automatically retrieved if necessary
*/
$notebook = new \Evernote\Model\Notebook();
$notebook->guid = '%notebook_guid%';
/**
* Be aware that calling this method can change the guid of the note
* if you're moving the note from one notestore to another.
* There is no way to update a note between different notestores, so the process
* is to create a copy of the note is the destination notebook and delete the original note.
* This will put the note in the trash.
*/
$moved_note = $client->moveNote($uploaded_note, $notebook);
/**
* Get the guid of the moved note as it could have changed if the destination notebook is not in the same notestore
*/
echo "\nNew guid : " . $new_guid = $moved_note->guid;
================================================
FILE: sample/client/reminders.php
================================================
SANDBOX.EVERNOTE.COM
* - Create a sample Evernote account at https://sandbox.evernote.com
*
* The Evernote API 'Production' Environment -> WWW.EVERNOTE.COM
* - Activate your Sandboxed API key for production access at https://dev.evernote.com/support/
*
* The Evernote API 'CHINA' Environment -> APP.YINXIANG.COM
* - Activate your Sandboxed API key for Evernote China service access at https://dev.evernote.com/support/
* or https://dev.yinxiang.com/support/. For more information about Evernote China service, please refer
* to https://dev.evernote.com/doc/articles/bootstrap.php
*
* For testing, set $sandbox to true; for production, set $sandbox to false and $china to false;
* for china service, set $sandbox to false and $china to true.
*
*/
$sandbox = true;
$china = false;
$client = new \Evernote\Client($token, $sandbox, null, null, $china);
$note = new \Evernote\Model\Note();
$note->title = 'Test note';
$note->content = new \Evernote\Model\PlainTextNoteContent('Some plain text content.');
$uploaded_note = $client->uploadNote($note);
$datetime = new \DateTime('tomorrow');
// Check if the note "is" a reminder
var_dump($uploaded_note->isReminder());
// Set a reminder. The parameter is a timestamp in seconds.
$uploaded_note->setReminder($datetime->getTimestamp());
$client->uploadNote($uploaded_note);
var_dump($uploaded_note->isReminder());
var_dump($uploaded_note->getReminderTime());
// Check if the reminder has been set as done.
var_dump($uploaded_note->isDone());
$uploaded_note->setAsDone();
$client->uploadNote($uploaded_note);
var_dump($uploaded_note->isReminder());
var_dump($uploaded_note->getReminderDoneTime());
var_dump($uploaded_note->isDone());
// Clean the note of any reminder attributes
$uploaded_note->clearReminder();
$client->uploadNote($uploaded_note);
var_dump($uploaded_note->isReminder());
var_dump($uploaded_note->isDone());
================================================
FILE: sample/client/replace_note.php
================================================
SANDBOX.EVERNOTE.COM
* - Create a sample Evernote account at https://sandbox.evernote.com
*
* The Evernote API 'Production' Environment -> WWW.EVERNOTE.COM
* - Activate your Sandboxed API key for production access at https://dev.evernote.com/support/
*
* The Evernote API 'CHINA' Environment -> APP.YINXIANG.COM
* - Activate your Sandboxed API key for Evernote China service access at https://dev.evernote.com/support/
* or https://dev.yinxiang.com/support/. For more information about Evernote China service, please refer
* to https://dev.evernote.com/doc/articles/bootstrap.php
*
* For testing, set $sandbox to true; for production, set $sandbox to false and $china to false;
* for china service, set $sandbox to false and $china to true.
*
*/
$sandbox = true;
$china = false;
$client = new \Evernote\Client($token, $sandbox, null, null, $china);
$note = new \Evernote\Model\Note();
$note->title = 'Test note';
$note->content = new \Evernote\Model\PlainTextNoteContent('Some plain text content.');
$uploaded_note = $client->uploadNote($note);
$new_note = new \Evernote\Model\Note();
$new_note->title = 'New note';
$new_note->content = new \Evernote\Model\PlainTextNoteContent('Some new plain text content.');
$client->replaceNote($uploaded_note, $new_note);
================================================
FILE: sample/client/share_note.php
================================================
SANDBOX.EVERNOTE.COM
* - Create a sample Evernote account at https://sandbox.evernote.com
*
* The Evernote API 'Production' Environment -> WWW.EVERNOTE.COM
* - Activate your Sandboxed API key for production access at https://dev.evernote.com/support/
*
* The Evernote API 'CHINA' Environment -> APP.YINXIANG.COM
* - Activate your Sandboxed API key for Evernote China service access at https://dev.evernote.com/support/
* or https://dev.yinxiang.com/support/. For more information about Evernote China service, please refer
* to https://dev.evernote.com/doc/articles/bootstrap.php
*
* For testing, set $sandbox to true; for production, set $sandbox to false and $china to false;
* for china service, set $sandbox to false and $china to true.
*
*/
$sandbox = true;
$china = false;
$client = new \Evernote\Client($token, $sandbox, null, null, $china);
$note = new \Evernote\Model\Note();
$note->title = 'Share a note';
$note->content = new \Evernote\Model\PlainTextNoteContent('Some plain text content.');
$uploaded_note = $client->uploadNote($note);
echo "\nPublic link : " . $client->shareNote($uploaded_note);
================================================
FILE: sample/oauth/index.php
================================================
SANDBOX.EVERNOTE.COM
* - Create a sample Evernote account at https://sandbox.evernote.com
*
* The Evernote API 'Production' Environment -> WWW.EVERNOTE.COM
* - Activate your Sandboxed API key for production access at https://dev.evernote.com/support/
*
* The Evernote API 'CHINA' Environment -> APP.YINXIANG.COM
* - Activate your Sandboxed API key for Evernote China service access at https://dev.evernote.com/support/
* or https://dev.yinxiang.com/support/. For more information about Evernote China service, please refer
* to https://dev.evernote.com/doc/articles/bootstrap.php
*
* For testing, set $sandbox to true; for production, set $sandbox to false and $china to false;
* for china service, set $sandbox to false and $china to true.
*
*/
$sandbox = true;
$china = false;
$oauth_handler = new \Evernote\Auth\OauthHandler($sandbox, false, $china);
$key = '%key%';
$secret = '%secret%';
$callback = 'http://host/pathto/evernote-cloud-sdk-php/sample/oauth/index.php';
try {
$oauth_data = $oauth_handler->authorize($key, $secret, $callback);
echo "\nOauth Token : " . $oauth_data['oauth_token'];
// Now you can use this token to call the api
$client = new \Evernote\Client($oauth_data['oauth_token']);
} catch (Evernote\Exception\AuthorizationDeniedException $e) {
//If the user decline the authorization, an exception is thrown.
echo "Declined";
}
================================================
FILE: src/EDAM/Error/Types.php
================================================
'UNKNOWN',
2 => 'BAD_DATA_FORMAT',
3 => 'PERMISSION_DENIED',
4 => 'INTERNAL_ERROR',
5 => 'DATA_REQUIRED',
6 => 'LIMIT_REACHED',
7 => 'QUOTA_REACHED',
8 => 'INVALID_AUTH',
9 => 'AUTH_EXPIRED',
10 => 'DATA_CONFLICT',
11 => 'ENML_VALIDATION',
12 => 'SHARD_UNAVAILABLE',
13 => 'LEN_TOO_SHORT',
14 => 'LEN_TOO_LONG',
15 => 'TOO_FEW',
16 => 'TOO_MANY',
17 => 'UNSUPPORTED_OPERATION',
18 => 'TAKEN_DOWN',
19 => 'RATE_LIMIT_REACHED',
);
}
class EDAMUserException extends TException {
static $_TSPEC;
public $errorCode = null;
public $parameter = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'errorCode',
'type' => TType::I32,
),
2 => array(
'var' => 'parameter',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['errorCode'])) {
$this->errorCode = $vals['errorCode'];
}
if (isset($vals['parameter'])) {
$this->parameter = $vals['parameter'];
}
}
}
public function getName() {
return 'EDAMUserException';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->errorCode);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->parameter);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('EDAMUserException');
if ($this->errorCode !== null) {
$xfer += $output->writeFieldBegin('errorCode', TType::I32, 1);
$xfer += $output->writeI32($this->errorCode);
$xfer += $output->writeFieldEnd();
}
if ($this->parameter !== null) {
$xfer += $output->writeFieldBegin('parameter', TType::STRING, 2);
$xfer += $output->writeString($this->parameter);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class EDAMSystemException extends TException {
static $_TSPEC;
public $errorCode = null;
public $message = null;
public $rateLimitDuration = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'errorCode',
'type' => TType::I32,
),
2 => array(
'var' => 'message',
'type' => TType::STRING,
),
3 => array(
'var' => 'rateLimitDuration',
'type' => TType::I32,
),
);
}
if (is_array($vals)) {
if (isset($vals['errorCode'])) {
$this->errorCode = $vals['errorCode'];
}
if (isset($vals['message'])) {
$this->message = $vals['message'];
}
if (isset($vals['rateLimitDuration'])) {
$this->rateLimitDuration = $vals['rateLimitDuration'];
}
}
}
public function getName() {
return 'EDAMSystemException';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->errorCode);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->message);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->rateLimitDuration);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('EDAMSystemException');
if ($this->errorCode !== null) {
$xfer += $output->writeFieldBegin('errorCode', TType::I32, 1);
$xfer += $output->writeI32($this->errorCode);
$xfer += $output->writeFieldEnd();
}
if ($this->message !== null) {
$xfer += $output->writeFieldBegin('message', TType::STRING, 2);
$xfer += $output->writeString($this->message);
$xfer += $output->writeFieldEnd();
}
if ($this->rateLimitDuration !== null) {
$xfer += $output->writeFieldBegin('rateLimitDuration', TType::I32, 3);
$xfer += $output->writeI32($this->rateLimitDuration);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class EDAMNotFoundException extends TException {
static $_TSPEC;
public $identifier = null;
public $key = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'identifier',
'type' => TType::STRING,
),
2 => array(
'var' => 'key',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['identifier'])) {
$this->identifier = $vals['identifier'];
}
if (isset($vals['key'])) {
$this->key = $vals['key'];
}
}
}
public function getName() {
return 'EDAMNotFoundException';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->identifier);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->key);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('EDAMNotFoundException');
if ($this->identifier !== null) {
$xfer += $output->writeFieldBegin('identifier', TType::STRING, 1);
$xfer += $output->writeString($this->identifier);
$xfer += $output->writeFieldEnd();
}
if ($this->key !== null) {
$xfer += $output->writeFieldBegin('key', TType::STRING, 2);
$xfer += $output->writeString($this->key);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
================================================
FILE: src/EDAM/Limits/Types.php
================================================
true,
"image/jpeg" => true,
"image/png" => true,
"audio/wav" => true,
"audio/mpeg" => true,
"audio/amr" => true,
"application/vnd.evernote.ink" => true,
"application/pdf" => true,
"video/mp4" => true,
"audio/aac" => true,
"audio/mp4" => true,
);
}
static protected function init_EDAM_INDEXABLE_RESOURCE_MIME_TYPES() {
return array(
"application/msword" => true,
"application/mspowerpoint" => true,
"application/excel" => true,
"application/vnd.ms-word" => true,
"application/vnd.ms-powerpoint" => true,
"application/vnd.ms-excel" => true,
"application/vnd.openxmlformats-officedocument.wordprocessingml.document" => true,
"application/vnd.openxmlformats-officedocument.presentationml.presentation" => true,
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" => true,
"application/vnd.apple.pages" => true,
"application/vnd.apple.numbers" => true,
"application/vnd.apple.keynote" => true,
"application/x-iwork-pages-sffpages" => true,
"application/x-iwork-numbers-sffnumbers" => true,
"application/x-iwork-keynote-sffkey" => true,
);
}
static protected function init_EDAM_SEARCH_QUERY_LEN_MIN() {
return 0;
}
static protected function init_EDAM_SEARCH_QUERY_LEN_MAX() {
return 1024;
}
static protected function init_EDAM_SEARCH_QUERY_REGEX() {
return "^[^\\p{Cc}\\p{Zl}\\p{Zp}]{0,1024}\$";
}
static protected function init_EDAM_HASH_LEN() {
return 16;
}
static protected function init_EDAM_USER_USERNAME_LEN_MIN() {
return 1;
}
static protected function init_EDAM_USER_USERNAME_LEN_MAX() {
return 64;
}
static protected function init_EDAM_USER_USERNAME_REGEX() {
return "^[a-z0-9]([a-z0-9_-]{0,62}[a-z0-9])?\$";
}
static protected function init_EDAM_USER_NAME_LEN_MIN() {
return 1;
}
static protected function init_EDAM_USER_NAME_LEN_MAX() {
return 255;
}
static protected function init_EDAM_USER_NAME_REGEX() {
return "^[^\\p{Cc}\\p{Zl}\\p{Zp}]{1,255}\$";
}
static protected function init_EDAM_TAG_NAME_LEN_MIN() {
return 1;
}
static protected function init_EDAM_TAG_NAME_LEN_MAX() {
return 100;
}
static protected function init_EDAM_TAG_NAME_REGEX() {
return "^[^,\\p{Cc}\\p{Z}]([^,\\p{Cc}\\p{Zl}\\p{Zp}]{0,98}[^,\\p{Cc}\\p{Z}])?\$";
}
static protected function init_EDAM_NOTE_TITLE_LEN_MIN() {
return 1;
}
static protected function init_EDAM_NOTE_TITLE_LEN_MAX() {
return 255;
}
static protected function init_EDAM_NOTE_TITLE_REGEX() {
return "^[^\\p{Cc}\\p{Z}]([^\\p{Cc}\\p{Zl}\\p{Zp}]{0,253}[^\\p{Cc}\\p{Z}])?\$";
}
static protected function init_EDAM_NOTE_CONTENT_LEN_MIN() {
return 0;
}
static protected function init_EDAM_NOTE_CONTENT_LEN_MAX() {
return 5242880;
}
static protected function init_EDAM_APPLICATIONDATA_NAME_LEN_MIN() {
return 3;
}
static protected function init_EDAM_APPLICATIONDATA_NAME_LEN_MAX() {
return 32;
}
static protected function init_EDAM_APPLICATIONDATA_VALUE_LEN_MIN() {
return 0;
}
static protected function init_EDAM_APPLICATIONDATA_VALUE_LEN_MAX() {
return 4092;
}
static protected function init_EDAM_APPLICATIONDATA_ENTRY_LEN_MAX() {
return 4095;
}
static protected function init_EDAM_APPLICATIONDATA_NAME_REGEX() {
return "^[A-Za-z0-9_.-]{3,32}\$";
}
static protected function init_EDAM_APPLICATIONDATA_VALUE_REGEX() {
return "^[^\\p{Cc}]{0,4092}\$";
}
static protected function init_EDAM_NOTEBOOK_NAME_LEN_MIN() {
return 1;
}
static protected function init_EDAM_NOTEBOOK_NAME_LEN_MAX() {
return 100;
}
static protected function init_EDAM_NOTEBOOK_NAME_REGEX() {
return "^[^\\p{Cc}\\p{Z}]([^\\p{Cc}\\p{Zl}\\p{Zp}]{0,98}[^\\p{Cc}\\p{Z}])?\$";
}
static protected function init_EDAM_NOTEBOOK_STACK_LEN_MIN() {
return 1;
}
static protected function init_EDAM_NOTEBOOK_STACK_LEN_MAX() {
return 100;
}
static protected function init_EDAM_NOTEBOOK_STACK_REGEX() {
return "^[^\\p{Cc}\\p{Z}]([^\\p{Cc}\\p{Zl}\\p{Zp}]{0,98}[^\\p{Cc}\\p{Z}])?\$";
}
static protected function init_EDAM_PUBLISHING_URI_LEN_MIN() {
return 1;
}
static protected function init_EDAM_PUBLISHING_URI_LEN_MAX() {
return 255;
}
static protected function init_EDAM_PUBLISHING_URI_REGEX() {
return "^[a-zA-Z0-9.~_+-]{1,255}\$";
}
static protected function init_EDAM_PUBLISHING_URI_PROHIBITED() {
return array(
".." => true,
);
}
static protected function init_EDAM_PUBLISHING_DESCRIPTION_LEN_MIN() {
return 1;
}
static protected function init_EDAM_PUBLISHING_DESCRIPTION_LEN_MAX() {
return 200;
}
static protected function init_EDAM_PUBLISHING_DESCRIPTION_REGEX() {
return "^[^\\p{Cc}\\p{Z}]([^\\p{Cc}\\p{Zl}\\p{Zp}]{0,198}[^\\p{Cc}\\p{Z}])?\$";
}
static protected function init_EDAM_SAVED_SEARCH_NAME_LEN_MIN() {
return 1;
}
static protected function init_EDAM_SAVED_SEARCH_NAME_LEN_MAX() {
return 100;
}
static protected function init_EDAM_SAVED_SEARCH_NAME_REGEX() {
return "^[^\\p{Cc}\\p{Z}]([^\\p{Cc}\\p{Zl}\\p{Zp}]{0,98}[^\\p{Cc}\\p{Z}])?\$";
}
static protected function init_EDAM_USER_PASSWORD_LEN_MIN() {
return 6;
}
static protected function init_EDAM_USER_PASSWORD_LEN_MAX() {
return 64;
}
static protected function init_EDAM_USER_PASSWORD_REGEX() {
return "^[A-Za-z0-9!#\$%&'()*+,./:;<=>?@^_`{|}~\\[\\]\\\\-]{6,64}\$";
}
static protected function init_EDAM_BUSINESS_URI_LEN_MAX() {
return 32;
}
static protected function init_EDAM_NOTE_TAGS_MAX() {
return 100;
}
static protected function init_EDAM_NOTE_RESOURCES_MAX() {
return 1000;
}
static protected function init_EDAM_USER_TAGS_MAX() {
return 100000;
}
static protected function init_EDAM_BUSINESS_TAGS_MAX() {
return 100000;
}
static protected function init_EDAM_USER_SAVED_SEARCHES_MAX() {
return 100;
}
static protected function init_EDAM_USER_NOTES_MAX() {
return 100000;
}
static protected function init_EDAM_BUSINESS_NOTES_MAX() {
return 500000;
}
static protected function init_EDAM_USER_NOTEBOOKS_MAX() {
return 250;
}
static protected function init_EDAM_BUSINESS_NOTEBOOKS_MAX() {
return 5000;
}
static protected function init_EDAM_USER_RECENT_MAILED_ADDRESSES_MAX() {
return 10;
}
static protected function init_EDAM_USER_MAIL_LIMIT_DAILY_FREE() {
return 50;
}
static protected function init_EDAM_USER_MAIL_LIMIT_DAILY_PREMIUM() {
return 200;
}
static protected function init_EDAM_USER_UPLOAD_LIMIT_FREE() {
return 62914560;
}
static protected function init_EDAM_USER_UPLOAD_LIMIT_PREMIUM() {
return 1073741824;
}
static protected function init_EDAM_USER_UPLOAD_LIMIT_BUSINESS() {
return 2147483647;
}
static protected function init_EDAM_NOTE_SIZE_MAX_FREE() {
return 26214400;
}
static protected function init_EDAM_NOTE_SIZE_MAX_PREMIUM() {
return 104857600;
}
static protected function init_EDAM_RESOURCE_SIZE_MAX_FREE() {
return 26214400;
}
static protected function init_EDAM_RESOURCE_SIZE_MAX_PREMIUM() {
return 104857600;
}
static protected function init_EDAM_USER_LINKED_NOTEBOOK_MAX() {
return 100;
}
static protected function init_EDAM_USER_LINKED_NOTEBOOK_MAX_PREMIUM() {
return 250;
}
static protected function init_EDAM_NOTEBOOK_SHARED_NOTEBOOK_MAX() {
return 250;
}
static protected function init_EDAM_NOTE_CONTENT_CLASS_LEN_MIN() {
return 3;
}
static protected function init_EDAM_NOTE_CONTENT_CLASS_LEN_MAX() {
return 32;
}
static protected function init_EDAM_NOTE_CONTENT_CLASS_REGEX() {
return "^[A-Za-z0-9_.-]{3,32}\$";
}
static protected function init_EDAM_HELLO_APP_CONTENT_CLASS_PREFIX() {
return "evernote.hello.";
}
static protected function init_EDAM_FOOD_APP_CONTENT_CLASS_PREFIX() {
return "evernote.food.";
}
static protected function init_EDAM_CONTENT_CLASS_HELLO_ENCOUNTER() {
return "evernote.hello.encounter";
}
static protected function init_EDAM_CONTENT_CLASS_HELLO_PROFILE() {
return "evernote.hello.profile";
}
static protected function init_EDAM_CONTENT_CLASS_FOOD_MEAL() {
return "evernote.food.meal";
}
static protected function init_EDAM_CONTENT_CLASS_SKITCH_PREFIX() {
return "evernote.skitch";
}
static protected function init_EDAM_CONTENT_CLASS_SKITCH() {
return "evernote.skitch";
}
static protected function init_EDAM_CONTENT_CLASS_SKITCH_PDF() {
return "evernote.skitch.pdf";
}
static protected function init_EDAM_CONTENT_CLASS_PENULTIMATE_PREFIX() {
return "evernote.penultimate.";
}
static protected function init_EDAM_CONTENT_CLASS_PENULTIMATE_NOTEBOOK() {
return "evernote.penultimate.notebook";
}
static protected function init_EDAM_RELATED_PLAINTEXT_LEN_MIN() {
return 1;
}
static protected function init_EDAM_RELATED_PLAINTEXT_LEN_MAX() {
return 131072;
}
static protected function init_EDAM_RELATED_MAX_NOTES() {
return 25;
}
static protected function init_EDAM_RELATED_MAX_NOTEBOOKS() {
return 1;
}
static protected function init_EDAM_RELATED_MAX_TAGS() {
return 25;
}
static protected function init_EDAM_BUSINESS_NOTEBOOK_DESCRIPTION_LEN_MIN() {
return 1;
}
static protected function init_EDAM_BUSINESS_NOTEBOOK_DESCRIPTION_LEN_MAX() {
return 200;
}
static protected function init_EDAM_BUSINESS_NOTEBOOK_DESCRIPTION_REGEX() {
return "^[^\\p{Cc}\\p{Z}]([^\\p{Cc}\\p{Zl}\\p{Zp}]{0,198}[^\\p{Cc}\\p{Z}])?\$";
}
static protected function init_EDAM_BUSINESS_PHONE_NUMBER_LEN_MAX() {
return 20;
}
static protected function init_EDAM_PREFERENCE_NAME_LEN_MIN() {
return 3;
}
static protected function init_EDAM_PREFERENCE_NAME_LEN_MAX() {
return 32;
}
static protected function init_EDAM_PREFERENCE_VALUE_LEN_MIN() {
return 1;
}
static protected function init_EDAM_PREFERENCE_VALUE_LEN_MAX() {
return 1024;
}
static protected function init_EDAM_MAX_PREFERENCES() {
return 100;
}
static protected function init_EDAM_MAX_VALUES_PER_PREFERENCE() {
return 256;
}
static protected function init_EDAM_PREFERENCE_NAME_REGEX() {
return "^[A-Za-z0-9_.-]{3,32}\$";
}
static protected function init_EDAM_PREFERENCE_VALUE_REGEX() {
return "^[^\\p{Cc}]{1,1024}\$";
}
static protected function init_EDAM_PREFERENCE_SHORTCUTS() {
return "evernote.shortcuts";
}
static protected function init_EDAM_PREFERENCE_SHORTCUTS_MAX_VALUES() {
return 250;
}
static protected function init_EDAM_DEVICE_ID_LEN_MAX() {
return 32;
}
static protected function init_EDAM_DEVICE_ID_REGEX() {
return "^[^\\p{Cc}]{1,32}\$";
}
static protected function init_EDAM_DEVICE_DESCRIPTION_LEN_MAX() {
return 64;
}
static protected function init_EDAM_DEVICE_DESCRIPTION_REGEX() {
return "^[^\\p{Cc}]{1,64}\$";
}
static protected function init_EDAM_SEARCH_SUGGESTIONS_MAX() {
return 10;
}
static protected function init_EDAM_SEARCH_SUGGESTIONS_PREFIX_LEN_MAX() {
return 1024;
}
static protected function init_EDAM_SEARCH_SUGGESTIONS_PREFIX_LEN_MIN() {
return 2;
}
}
================================================
FILE: src/EDAM/NoteStore/NoteStore.php
================================================
input_ = $input;
$this->output_ = $output ? $output : $input;
}
public function getSyncState($authenticationToken)
{
$this->send_getSyncState($authenticationToken);
return $this->recv_getSyncState();
}
public function send_getSyncState($authenticationToken)
{
$args = new \EDAM\NoteStore\NoteStore_getSyncState_args();
$args->authenticationToken = $authenticationToken;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'getSyncState', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('getSyncState', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_getSyncState()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_getSyncState_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_getSyncState_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
throw new \Exception("getSyncState failed: unknown result");
}
public function getSyncStateWithMetrics($authenticationToken, \EDAM\NoteStore\ClientUsageMetrics $clientMetrics)
{
$this->send_getSyncStateWithMetrics($authenticationToken, $clientMetrics);
return $this->recv_getSyncStateWithMetrics();
}
public function send_getSyncStateWithMetrics($authenticationToken, \EDAM\NoteStore\ClientUsageMetrics $clientMetrics)
{
$args = new \EDAM\NoteStore\NoteStore_getSyncStateWithMetrics_args();
$args->authenticationToken = $authenticationToken;
$args->clientMetrics = $clientMetrics;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'getSyncStateWithMetrics', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('getSyncStateWithMetrics', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_getSyncStateWithMetrics()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_getSyncStateWithMetrics_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_getSyncStateWithMetrics_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
throw new \Exception("getSyncStateWithMetrics failed: unknown result");
}
public function getSyncChunk($authenticationToken, $afterUSN, $maxEntries, $fullSyncOnly)
{
$this->send_getSyncChunk($authenticationToken, $afterUSN, $maxEntries, $fullSyncOnly);
return $this->recv_getSyncChunk();
}
public function send_getSyncChunk($authenticationToken, $afterUSN, $maxEntries, $fullSyncOnly)
{
$args = new \EDAM\NoteStore\NoteStore_getSyncChunk_args();
$args->authenticationToken = $authenticationToken;
$args->afterUSN = $afterUSN;
$args->maxEntries = $maxEntries;
$args->fullSyncOnly = $fullSyncOnly;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'getSyncChunk', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('getSyncChunk', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_getSyncChunk()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_getSyncChunk_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_getSyncChunk_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
throw new \Exception("getSyncChunk failed: unknown result");
}
public function getFilteredSyncChunk($authenticationToken, $afterUSN, $maxEntries, \EDAM\NoteStore\SyncChunkFilter $filter)
{
$this->send_getFilteredSyncChunk($authenticationToken, $afterUSN, $maxEntries, $filter);
return $this->recv_getFilteredSyncChunk();
}
public function send_getFilteredSyncChunk($authenticationToken, $afterUSN, $maxEntries, \EDAM\NoteStore\SyncChunkFilter $filter)
{
$args = new \EDAM\NoteStore\NoteStore_getFilteredSyncChunk_args();
$args->authenticationToken = $authenticationToken;
$args->afterUSN = $afterUSN;
$args->maxEntries = $maxEntries;
$args->filter = $filter;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'getFilteredSyncChunk', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('getFilteredSyncChunk', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_getFilteredSyncChunk()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_getFilteredSyncChunk_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_getFilteredSyncChunk_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
throw new \Exception("getFilteredSyncChunk failed: unknown result");
}
public function getLinkedNotebookSyncState($authenticationToken, \EDAM\Types\LinkedNotebook $linkedNotebook)
{
$this->send_getLinkedNotebookSyncState($authenticationToken, $linkedNotebook);
return $this->recv_getLinkedNotebookSyncState();
}
public function send_getLinkedNotebookSyncState($authenticationToken, \EDAM\Types\LinkedNotebook $linkedNotebook)
{
$args = new \EDAM\NoteStore\NoteStore_getLinkedNotebookSyncState_args();
$args->authenticationToken = $authenticationToken;
$args->linkedNotebook = $linkedNotebook;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'getLinkedNotebookSyncState', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('getLinkedNotebookSyncState', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_getLinkedNotebookSyncState()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_getLinkedNotebookSyncState_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_getLinkedNotebookSyncState_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
throw new \Exception("getLinkedNotebookSyncState failed: unknown result");
}
public function getLinkedNotebookSyncChunk($authenticationToken, \EDAM\Types\LinkedNotebook $linkedNotebook, $afterUSN, $maxEntries, $fullSyncOnly)
{
$this->send_getLinkedNotebookSyncChunk($authenticationToken, $linkedNotebook, $afterUSN, $maxEntries, $fullSyncOnly);
return $this->recv_getLinkedNotebookSyncChunk();
}
public function send_getLinkedNotebookSyncChunk($authenticationToken, \EDAM\Types\LinkedNotebook $linkedNotebook, $afterUSN, $maxEntries, $fullSyncOnly)
{
$args = new \EDAM\NoteStore\NoteStore_getLinkedNotebookSyncChunk_args();
$args->authenticationToken = $authenticationToken;
$args->linkedNotebook = $linkedNotebook;
$args->afterUSN = $afterUSN;
$args->maxEntries = $maxEntries;
$args->fullSyncOnly = $fullSyncOnly;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'getLinkedNotebookSyncChunk', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('getLinkedNotebookSyncChunk', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_getLinkedNotebookSyncChunk()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_getLinkedNotebookSyncChunk_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_getLinkedNotebookSyncChunk_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
throw new \Exception("getLinkedNotebookSyncChunk failed: unknown result");
}
public function listNotebooks($authenticationToken)
{
$this->send_listNotebooks($authenticationToken);
return $this->recv_listNotebooks();
}
public function send_listNotebooks($authenticationToken)
{
$args = new \EDAM\NoteStore\NoteStore_listNotebooks_args();
$args->authenticationToken = $authenticationToken;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'listNotebooks', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('listNotebooks', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_listNotebooks()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_listNotebooks_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_listNotebooks_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
throw new \Exception("listNotebooks failed: unknown result");
}
public function getNotebook($authenticationToken, $guid)
{
$this->send_getNotebook($authenticationToken, $guid);
return $this->recv_getNotebook();
}
public function send_getNotebook($authenticationToken, $guid)
{
$args = new \EDAM\NoteStore\NoteStore_getNotebook_args();
$args->authenticationToken = $authenticationToken;
$args->guid = $guid;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'getNotebook', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('getNotebook', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_getNotebook()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_getNotebook_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_getNotebook_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
throw new \Exception("getNotebook failed: unknown result");
}
public function getDefaultNotebook($authenticationToken)
{
$this->send_getDefaultNotebook($authenticationToken);
return $this->recv_getDefaultNotebook();
}
public function send_getDefaultNotebook($authenticationToken)
{
$args = new \EDAM\NoteStore\NoteStore_getDefaultNotebook_args();
$args->authenticationToken = $authenticationToken;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'getDefaultNotebook', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('getDefaultNotebook', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_getDefaultNotebook()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_getDefaultNotebook_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_getDefaultNotebook_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
throw new \Exception("getDefaultNotebook failed: unknown result");
}
public function createNotebook($authenticationToken, \EDAM\Types\Notebook $notebook)
{
$this->send_createNotebook($authenticationToken, $notebook);
return $this->recv_createNotebook();
}
public function send_createNotebook($authenticationToken, \EDAM\Types\Notebook $notebook)
{
$args = new \EDAM\NoteStore\NoteStore_createNotebook_args();
$args->authenticationToken = $authenticationToken;
$args->notebook = $notebook;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'createNotebook', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('createNotebook', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_createNotebook()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_createNotebook_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_createNotebook_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
throw new \Exception("createNotebook failed: unknown result");
}
public function updateNotebook($authenticationToken, \EDAM\Types\Notebook $notebook)
{
$this->send_updateNotebook($authenticationToken, $notebook);
return $this->recv_updateNotebook();
}
public function send_updateNotebook($authenticationToken, \EDAM\Types\Notebook $notebook)
{
$args = new \EDAM\NoteStore\NoteStore_updateNotebook_args();
$args->authenticationToken = $authenticationToken;
$args->notebook = $notebook;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'updateNotebook', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('updateNotebook', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_updateNotebook()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_updateNotebook_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_updateNotebook_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
throw new \Exception("updateNotebook failed: unknown result");
}
public function expungeNotebook($authenticationToken, $guid)
{
$this->send_expungeNotebook($authenticationToken, $guid);
return $this->recv_expungeNotebook();
}
public function send_expungeNotebook($authenticationToken, $guid)
{
$args = new \EDAM\NoteStore\NoteStore_expungeNotebook_args();
$args->authenticationToken = $authenticationToken;
$args->guid = $guid;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'expungeNotebook', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('expungeNotebook', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_expungeNotebook()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_expungeNotebook_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_expungeNotebook_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
throw new \Exception("expungeNotebook failed: unknown result");
}
public function listTags($authenticationToken)
{
$this->send_listTags($authenticationToken);
return $this->recv_listTags();
}
public function send_listTags($authenticationToken)
{
$args = new \EDAM\NoteStore\NoteStore_listTags_args();
$args->authenticationToken = $authenticationToken;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'listTags', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('listTags', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_listTags()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_listTags_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_listTags_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
throw new \Exception("listTags failed: unknown result");
}
public function listTagsByNotebook($authenticationToken, $notebookGuid)
{
$this->send_listTagsByNotebook($authenticationToken, $notebookGuid);
return $this->recv_listTagsByNotebook();
}
public function send_listTagsByNotebook($authenticationToken, $notebookGuid)
{
$args = new \EDAM\NoteStore\NoteStore_listTagsByNotebook_args();
$args->authenticationToken = $authenticationToken;
$args->notebookGuid = $notebookGuid;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'listTagsByNotebook', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('listTagsByNotebook', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_listTagsByNotebook()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_listTagsByNotebook_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_listTagsByNotebook_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
throw new \Exception("listTagsByNotebook failed: unknown result");
}
public function getTag($authenticationToken, $guid)
{
$this->send_getTag($authenticationToken, $guid);
return $this->recv_getTag();
}
public function send_getTag($authenticationToken, $guid)
{
$args = new \EDAM\NoteStore\NoteStore_getTag_args();
$args->authenticationToken = $authenticationToken;
$args->guid = $guid;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'getTag', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('getTag', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_getTag()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_getTag_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_getTag_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
throw new \Exception("getTag failed: unknown result");
}
public function createTag($authenticationToken, \EDAM\Types\Tag $tag)
{
$this->send_createTag($authenticationToken, $tag);
return $this->recv_createTag();
}
public function send_createTag($authenticationToken, \EDAM\Types\Tag $tag)
{
$args = new \EDAM\NoteStore\NoteStore_createTag_args();
$args->authenticationToken = $authenticationToken;
$args->tag = $tag;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'createTag', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('createTag', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_createTag()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_createTag_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_createTag_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
throw new \Exception("createTag failed: unknown result");
}
public function updateTag($authenticationToken, \EDAM\Types\Tag $tag)
{
$this->send_updateTag($authenticationToken, $tag);
return $this->recv_updateTag();
}
public function send_updateTag($authenticationToken, \EDAM\Types\Tag $tag)
{
$args = new \EDAM\NoteStore\NoteStore_updateTag_args();
$args->authenticationToken = $authenticationToken;
$args->tag = $tag;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'updateTag', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('updateTag', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_updateTag()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_updateTag_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_updateTag_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
throw new \Exception("updateTag failed: unknown result");
}
public function untagAll($authenticationToken, $guid)
{
$this->send_untagAll($authenticationToken, $guid);
$this->recv_untagAll();
}
public function send_untagAll($authenticationToken, $guid)
{
$args = new \EDAM\NoteStore\NoteStore_untagAll_args();
$args->authenticationToken = $authenticationToken;
$args->guid = $guid;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'untagAll', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('untagAll', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_untagAll()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_untagAll_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_untagAll_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
return;
}
public function expungeTag($authenticationToken, $guid)
{
$this->send_expungeTag($authenticationToken, $guid);
return $this->recv_expungeTag();
}
public function send_expungeTag($authenticationToken, $guid)
{
$args = new \EDAM\NoteStore\NoteStore_expungeTag_args();
$args->authenticationToken = $authenticationToken;
$args->guid = $guid;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'expungeTag', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('expungeTag', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_expungeTag()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_expungeTag_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_expungeTag_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
throw new \Exception("expungeTag failed: unknown result");
}
public function listSearches($authenticationToken)
{
$this->send_listSearches($authenticationToken);
return $this->recv_listSearches();
}
public function send_listSearches($authenticationToken)
{
$args = new \EDAM\NoteStore\NoteStore_listSearches_args();
$args->authenticationToken = $authenticationToken;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'listSearches', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('listSearches', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_listSearches()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_listSearches_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_listSearches_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
throw new \Exception("listSearches failed: unknown result");
}
public function getSearch($authenticationToken, $guid)
{
$this->send_getSearch($authenticationToken, $guid);
return $this->recv_getSearch();
}
public function send_getSearch($authenticationToken, $guid)
{
$args = new \EDAM\NoteStore\NoteStore_getSearch_args();
$args->authenticationToken = $authenticationToken;
$args->guid = $guid;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'getSearch', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('getSearch', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_getSearch()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_getSearch_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_getSearch_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
throw new \Exception("getSearch failed: unknown result");
}
public function createSearch($authenticationToken, \EDAM\Types\SavedSearch $search)
{
$this->send_createSearch($authenticationToken, $search);
return $this->recv_createSearch();
}
public function send_createSearch($authenticationToken, \EDAM\Types\SavedSearch $search)
{
$args = new \EDAM\NoteStore\NoteStore_createSearch_args();
$args->authenticationToken = $authenticationToken;
$args->search = $search;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'createSearch', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('createSearch', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_createSearch()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_createSearch_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_createSearch_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
throw new \Exception("createSearch failed: unknown result");
}
public function updateSearch($authenticationToken, \EDAM\Types\SavedSearch $search)
{
$this->send_updateSearch($authenticationToken, $search);
return $this->recv_updateSearch();
}
public function send_updateSearch($authenticationToken, \EDAM\Types\SavedSearch $search)
{
$args = new \EDAM\NoteStore\NoteStore_updateSearch_args();
$args->authenticationToken = $authenticationToken;
$args->search = $search;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'updateSearch', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('updateSearch', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_updateSearch()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_updateSearch_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_updateSearch_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
throw new \Exception("updateSearch failed: unknown result");
}
public function expungeSearch($authenticationToken, $guid)
{
$this->send_expungeSearch($authenticationToken, $guid);
return $this->recv_expungeSearch();
}
public function send_expungeSearch($authenticationToken, $guid)
{
$args = new \EDAM\NoteStore\NoteStore_expungeSearch_args();
$args->authenticationToken = $authenticationToken;
$args->guid = $guid;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'expungeSearch', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('expungeSearch', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_expungeSearch()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_expungeSearch_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_expungeSearch_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
throw new \Exception("expungeSearch failed: unknown result");
}
public function findNotes($authenticationToken, \EDAM\NoteStore\NoteFilter $filter, $offset, $maxNotes)
{
$this->send_findNotes($authenticationToken, $filter, $offset, $maxNotes);
return $this->recv_findNotes();
}
public function send_findNotes($authenticationToken, \EDAM\NoteStore\NoteFilter $filter, $offset, $maxNotes)
{
$args = new \EDAM\NoteStore\NoteStore_findNotes_args();
$args->authenticationToken = $authenticationToken;
$args->filter = $filter;
$args->offset = $offset;
$args->maxNotes = $maxNotes;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'findNotes', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('findNotes', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_findNotes()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_findNotes_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_findNotes_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
throw new \Exception("findNotes failed: unknown result");
}
public function findNoteOffset($authenticationToken, \EDAM\NoteStore\NoteFilter $filter, $guid)
{
$this->send_findNoteOffset($authenticationToken, $filter, $guid);
return $this->recv_findNoteOffset();
}
public function send_findNoteOffset($authenticationToken, \EDAM\NoteStore\NoteFilter $filter, $guid)
{
$args = new \EDAM\NoteStore\NoteStore_findNoteOffset_args();
$args->authenticationToken = $authenticationToken;
$args->filter = $filter;
$args->guid = $guid;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'findNoteOffset', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('findNoteOffset', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_findNoteOffset()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_findNoteOffset_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_findNoteOffset_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
throw new \Exception("findNoteOffset failed: unknown result");
}
public function findNotesMetadata($authenticationToken, \EDAM\NoteStore\NoteFilter $filter, $offset, $maxNotes, \EDAM\NoteStore\NotesMetadataResultSpec $resultSpec)
{
$this->send_findNotesMetadata($authenticationToken, $filter, $offset, $maxNotes, $resultSpec);
return $this->recv_findNotesMetadata();
}
public function send_findNotesMetadata($authenticationToken, \EDAM\NoteStore\NoteFilter $filter, $offset, $maxNotes, \EDAM\NoteStore\NotesMetadataResultSpec $resultSpec)
{
$args = new \EDAM\NoteStore\NoteStore_findNotesMetadata_args();
$args->authenticationToken = $authenticationToken;
$args->filter = $filter;
$args->offset = $offset;
$args->maxNotes = $maxNotes;
$args->resultSpec = $resultSpec;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'findNotesMetadata', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('findNotesMetadata', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_findNotesMetadata()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_findNotesMetadata_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_findNotesMetadata_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
throw new \Exception("findNotesMetadata failed: unknown result");
}
public function findNoteCounts($authenticationToken, \EDAM\NoteStore\NoteFilter $filter, $withTrash)
{
$this->send_findNoteCounts($authenticationToken, $filter, $withTrash);
return $this->recv_findNoteCounts();
}
public function send_findNoteCounts($authenticationToken, \EDAM\NoteStore\NoteFilter $filter, $withTrash)
{
$args = new \EDAM\NoteStore\NoteStore_findNoteCounts_args();
$args->authenticationToken = $authenticationToken;
$args->filter = $filter;
$args->withTrash = $withTrash;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'findNoteCounts', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('findNoteCounts', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_findNoteCounts()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_findNoteCounts_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_findNoteCounts_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
throw new \Exception("findNoteCounts failed: unknown result");
}
public function getNote($authenticationToken, $guid, $withContent, $withResourcesData, $withResourcesRecognition, $withResourcesAlternateData)
{
$this->send_getNote($authenticationToken, $guid, $withContent, $withResourcesData, $withResourcesRecognition, $withResourcesAlternateData);
return $this->recv_getNote();
}
public function send_getNote($authenticationToken, $guid, $withContent, $withResourcesData, $withResourcesRecognition, $withResourcesAlternateData)
{
$args = new \EDAM\NoteStore\NoteStore_getNote_args();
$args->authenticationToken = $authenticationToken;
$args->guid = $guid;
$args->withContent = $withContent;
$args->withResourcesData = $withResourcesData;
$args->withResourcesRecognition = $withResourcesRecognition;
$args->withResourcesAlternateData = $withResourcesAlternateData;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'getNote', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('getNote', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_getNote()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_getNote_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_getNote_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
throw new \Exception("getNote failed: unknown result");
}
public function getNoteApplicationData($authenticationToken, $guid)
{
$this->send_getNoteApplicationData($authenticationToken, $guid);
return $this->recv_getNoteApplicationData();
}
public function send_getNoteApplicationData($authenticationToken, $guid)
{
$args = new \EDAM\NoteStore\NoteStore_getNoteApplicationData_args();
$args->authenticationToken = $authenticationToken;
$args->guid = $guid;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'getNoteApplicationData', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('getNoteApplicationData', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_getNoteApplicationData()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_getNoteApplicationData_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_getNoteApplicationData_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
throw new \Exception("getNoteApplicationData failed: unknown result");
}
public function getNoteApplicationDataEntry($authenticationToken, $guid, $key)
{
$this->send_getNoteApplicationDataEntry($authenticationToken, $guid, $key);
return $this->recv_getNoteApplicationDataEntry();
}
public function send_getNoteApplicationDataEntry($authenticationToken, $guid, $key)
{
$args = new \EDAM\NoteStore\NoteStore_getNoteApplicationDataEntry_args();
$args->authenticationToken = $authenticationToken;
$args->guid = $guid;
$args->key = $key;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'getNoteApplicationDataEntry', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('getNoteApplicationDataEntry', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_getNoteApplicationDataEntry()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_getNoteApplicationDataEntry_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_getNoteApplicationDataEntry_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
throw new \Exception("getNoteApplicationDataEntry failed: unknown result");
}
public function setNoteApplicationDataEntry($authenticationToken, $guid, $key, $value)
{
$this->send_setNoteApplicationDataEntry($authenticationToken, $guid, $key, $value);
return $this->recv_setNoteApplicationDataEntry();
}
public function send_setNoteApplicationDataEntry($authenticationToken, $guid, $key, $value)
{
$args = new \EDAM\NoteStore\NoteStore_setNoteApplicationDataEntry_args();
$args->authenticationToken = $authenticationToken;
$args->guid = $guid;
$args->key = $key;
$args->value = $value;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'setNoteApplicationDataEntry', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('setNoteApplicationDataEntry', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_setNoteApplicationDataEntry()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_setNoteApplicationDataEntry_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_setNoteApplicationDataEntry_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
throw new \Exception("setNoteApplicationDataEntry failed: unknown result");
}
public function unsetNoteApplicationDataEntry($authenticationToken, $guid, $key)
{
$this->send_unsetNoteApplicationDataEntry($authenticationToken, $guid, $key);
return $this->recv_unsetNoteApplicationDataEntry();
}
public function send_unsetNoteApplicationDataEntry($authenticationToken, $guid, $key)
{
$args = new \EDAM\NoteStore\NoteStore_unsetNoteApplicationDataEntry_args();
$args->authenticationToken = $authenticationToken;
$args->guid = $guid;
$args->key = $key;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'unsetNoteApplicationDataEntry', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('unsetNoteApplicationDataEntry', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_unsetNoteApplicationDataEntry()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_unsetNoteApplicationDataEntry_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_unsetNoteApplicationDataEntry_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
throw new \Exception("unsetNoteApplicationDataEntry failed: unknown result");
}
public function getNoteContent($authenticationToken, $guid)
{
$this->send_getNoteContent($authenticationToken, $guid);
return $this->recv_getNoteContent();
}
public function send_getNoteContent($authenticationToken, $guid)
{
$args = new \EDAM\NoteStore\NoteStore_getNoteContent_args();
$args->authenticationToken = $authenticationToken;
$args->guid = $guid;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'getNoteContent', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('getNoteContent', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_getNoteContent()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_getNoteContent_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_getNoteContent_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
throw new \Exception("getNoteContent failed: unknown result");
}
public function getNoteSearchText($authenticationToken, $guid, $noteOnly, $tokenizeForIndexing)
{
$this->send_getNoteSearchText($authenticationToken, $guid, $noteOnly, $tokenizeForIndexing);
return $this->recv_getNoteSearchText();
}
public function send_getNoteSearchText($authenticationToken, $guid, $noteOnly, $tokenizeForIndexing)
{
$args = new \EDAM\NoteStore\NoteStore_getNoteSearchText_args();
$args->authenticationToken = $authenticationToken;
$args->guid = $guid;
$args->noteOnly = $noteOnly;
$args->tokenizeForIndexing = $tokenizeForIndexing;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'getNoteSearchText', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('getNoteSearchText', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_getNoteSearchText()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_getNoteSearchText_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_getNoteSearchText_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
throw new \Exception("getNoteSearchText failed: unknown result");
}
public function getResourceSearchText($authenticationToken, $guid)
{
$this->send_getResourceSearchText($authenticationToken, $guid);
return $this->recv_getResourceSearchText();
}
public function send_getResourceSearchText($authenticationToken, $guid)
{
$args = new \EDAM\NoteStore\NoteStore_getResourceSearchText_args();
$args->authenticationToken = $authenticationToken;
$args->guid = $guid;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'getResourceSearchText', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('getResourceSearchText', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_getResourceSearchText()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_getResourceSearchText_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_getResourceSearchText_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
throw new \Exception("getResourceSearchText failed: unknown result");
}
public function getNoteTagNames($authenticationToken, $guid)
{
$this->send_getNoteTagNames($authenticationToken, $guid);
return $this->recv_getNoteTagNames();
}
public function send_getNoteTagNames($authenticationToken, $guid)
{
$args = new \EDAM\NoteStore\NoteStore_getNoteTagNames_args();
$args->authenticationToken = $authenticationToken;
$args->guid = $guid;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'getNoteTagNames', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('getNoteTagNames', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_getNoteTagNames()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_getNoteTagNames_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_getNoteTagNames_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
throw new \Exception("getNoteTagNames failed: unknown result");
}
public function createNote($authenticationToken, \EDAM\Types\Note $note)
{
$this->send_createNote($authenticationToken, $note);
return $this->recv_createNote();
}
public function send_createNote($authenticationToken, \EDAM\Types\Note $note)
{
$args = new \EDAM\NoteStore\NoteStore_createNote_args();
$args->authenticationToken = $authenticationToken;
$args->note = $note;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'createNote', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('createNote', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_createNote()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_createNote_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_createNote_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
throw new \Exception("createNote failed: unknown result");
}
public function updateNote($authenticationToken, \EDAM\Types\Note $note)
{
$this->send_updateNote($authenticationToken, $note);
return $this->recv_updateNote();
}
public function send_updateNote($authenticationToken, \EDAM\Types\Note $note)
{
$args = new \EDAM\NoteStore\NoteStore_updateNote_args();
$args->authenticationToken = $authenticationToken;
$args->note = $note;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'updateNote', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('updateNote', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_updateNote()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_updateNote_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_updateNote_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
throw new \Exception("updateNote failed: unknown result");
}
public function deleteNote($authenticationToken, $guid)
{
$this->send_deleteNote($authenticationToken, $guid);
return $this->recv_deleteNote();
}
public function send_deleteNote($authenticationToken, $guid)
{
$args = new \EDAM\NoteStore\NoteStore_deleteNote_args();
$args->authenticationToken = $authenticationToken;
$args->guid = $guid;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'deleteNote', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('deleteNote', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_deleteNote()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_deleteNote_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_deleteNote_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
throw new \Exception("deleteNote failed: unknown result");
}
public function expungeNote($authenticationToken, $guid)
{
$this->send_expungeNote($authenticationToken, $guid);
return $this->recv_expungeNote();
}
public function send_expungeNote($authenticationToken, $guid)
{
$args = new \EDAM\NoteStore\NoteStore_expungeNote_args();
$args->authenticationToken = $authenticationToken;
$args->guid = $guid;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'expungeNote', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('expungeNote', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_expungeNote()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_expungeNote_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_expungeNote_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
throw new \Exception("expungeNote failed: unknown result");
}
public function expungeNotes($authenticationToken, $noteGuids)
{
$this->send_expungeNotes($authenticationToken, $noteGuids);
return $this->recv_expungeNotes();
}
public function send_expungeNotes($authenticationToken, $noteGuids)
{
$args = new \EDAM\NoteStore\NoteStore_expungeNotes_args();
$args->authenticationToken = $authenticationToken;
$args->noteGuids = $noteGuids;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'expungeNotes', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('expungeNotes', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_expungeNotes()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_expungeNotes_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_expungeNotes_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
throw new \Exception("expungeNotes failed: unknown result");
}
public function expungeInactiveNotes($authenticationToken)
{
$this->send_expungeInactiveNotes($authenticationToken);
return $this->recv_expungeInactiveNotes();
}
public function send_expungeInactiveNotes($authenticationToken)
{
$args = new \EDAM\NoteStore\NoteStore_expungeInactiveNotes_args();
$args->authenticationToken = $authenticationToken;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'expungeInactiveNotes', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('expungeInactiveNotes', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_expungeInactiveNotes()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_expungeInactiveNotes_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_expungeInactiveNotes_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
throw new \Exception("expungeInactiveNotes failed: unknown result");
}
public function copyNote($authenticationToken, $noteGuid, $toNotebookGuid)
{
$this->send_copyNote($authenticationToken, $noteGuid, $toNotebookGuid);
return $this->recv_copyNote();
}
public function send_copyNote($authenticationToken, $noteGuid, $toNotebookGuid)
{
$args = new \EDAM\NoteStore\NoteStore_copyNote_args();
$args->authenticationToken = $authenticationToken;
$args->noteGuid = $noteGuid;
$args->toNotebookGuid = $toNotebookGuid;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'copyNote', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('copyNote', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_copyNote()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_copyNote_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_copyNote_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
throw new \Exception("copyNote failed: unknown result");
}
public function listNoteVersions($authenticationToken, $noteGuid)
{
$this->send_listNoteVersions($authenticationToken, $noteGuid);
return $this->recv_listNoteVersions();
}
public function send_listNoteVersions($authenticationToken, $noteGuid)
{
$args = new \EDAM\NoteStore\NoteStore_listNoteVersions_args();
$args->authenticationToken = $authenticationToken;
$args->noteGuid = $noteGuid;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'listNoteVersions', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('listNoteVersions', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_listNoteVersions()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_listNoteVersions_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_listNoteVersions_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
throw new \Exception("listNoteVersions failed: unknown result");
}
public function getNoteVersion($authenticationToken, $noteGuid, $updateSequenceNum, $withResourcesData, $withResourcesRecognition, $withResourcesAlternateData)
{
$this->send_getNoteVersion($authenticationToken, $noteGuid, $updateSequenceNum, $withResourcesData, $withResourcesRecognition, $withResourcesAlternateData);
return $this->recv_getNoteVersion();
}
public function send_getNoteVersion($authenticationToken, $noteGuid, $updateSequenceNum, $withResourcesData, $withResourcesRecognition, $withResourcesAlternateData)
{
$args = new \EDAM\NoteStore\NoteStore_getNoteVersion_args();
$args->authenticationToken = $authenticationToken;
$args->noteGuid = $noteGuid;
$args->updateSequenceNum = $updateSequenceNum;
$args->withResourcesData = $withResourcesData;
$args->withResourcesRecognition = $withResourcesRecognition;
$args->withResourcesAlternateData = $withResourcesAlternateData;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'getNoteVersion', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('getNoteVersion', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_getNoteVersion()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_getNoteVersion_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_getNoteVersion_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
throw new \Exception("getNoteVersion failed: unknown result");
}
public function getResource($authenticationToken, $guid, $withData, $withRecognition, $withAttributes, $withAlternateData)
{
$this->send_getResource($authenticationToken, $guid, $withData, $withRecognition, $withAttributes, $withAlternateData);
return $this->recv_getResource();
}
public function send_getResource($authenticationToken, $guid, $withData, $withRecognition, $withAttributes, $withAlternateData)
{
$args = new \EDAM\NoteStore\NoteStore_getResource_args();
$args->authenticationToken = $authenticationToken;
$args->guid = $guid;
$args->withData = $withData;
$args->withRecognition = $withRecognition;
$args->withAttributes = $withAttributes;
$args->withAlternateData = $withAlternateData;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'getResource', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('getResource', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_getResource()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_getResource_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_getResource_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
throw new \Exception("getResource failed: unknown result");
}
public function getResourceApplicationData($authenticationToken, $guid)
{
$this->send_getResourceApplicationData($authenticationToken, $guid);
return $this->recv_getResourceApplicationData();
}
public function send_getResourceApplicationData($authenticationToken, $guid)
{
$args = new \EDAM\NoteStore\NoteStore_getResourceApplicationData_args();
$args->authenticationToken = $authenticationToken;
$args->guid = $guid;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'getResourceApplicationData', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('getResourceApplicationData', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_getResourceApplicationData()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_getResourceApplicationData_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_getResourceApplicationData_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
throw new \Exception("getResourceApplicationData failed: unknown result");
}
public function getResourceApplicationDataEntry($authenticationToken, $guid, $key)
{
$this->send_getResourceApplicationDataEntry($authenticationToken, $guid, $key);
return $this->recv_getResourceApplicationDataEntry();
}
public function send_getResourceApplicationDataEntry($authenticationToken, $guid, $key)
{
$args = new \EDAM\NoteStore\NoteStore_getResourceApplicationDataEntry_args();
$args->authenticationToken = $authenticationToken;
$args->guid = $guid;
$args->key = $key;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'getResourceApplicationDataEntry', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('getResourceApplicationDataEntry', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_getResourceApplicationDataEntry()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_getResourceApplicationDataEntry_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_getResourceApplicationDataEntry_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
throw new \Exception("getResourceApplicationDataEntry failed: unknown result");
}
public function setResourceApplicationDataEntry($authenticationToken, $guid, $key, $value)
{
$this->send_setResourceApplicationDataEntry($authenticationToken, $guid, $key, $value);
return $this->recv_setResourceApplicationDataEntry();
}
public function send_setResourceApplicationDataEntry($authenticationToken, $guid, $key, $value)
{
$args = new \EDAM\NoteStore\NoteStore_setResourceApplicationDataEntry_args();
$args->authenticationToken = $authenticationToken;
$args->guid = $guid;
$args->key = $key;
$args->value = $value;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'setResourceApplicationDataEntry', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('setResourceApplicationDataEntry', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_setResourceApplicationDataEntry()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_setResourceApplicationDataEntry_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_setResourceApplicationDataEntry_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
throw new \Exception("setResourceApplicationDataEntry failed: unknown result");
}
public function unsetResourceApplicationDataEntry($authenticationToken, $guid, $key)
{
$this->send_unsetResourceApplicationDataEntry($authenticationToken, $guid, $key);
return $this->recv_unsetResourceApplicationDataEntry();
}
public function send_unsetResourceApplicationDataEntry($authenticationToken, $guid, $key)
{
$args = new \EDAM\NoteStore\NoteStore_unsetResourceApplicationDataEntry_args();
$args->authenticationToken = $authenticationToken;
$args->guid = $guid;
$args->key = $key;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'unsetResourceApplicationDataEntry', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('unsetResourceApplicationDataEntry', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_unsetResourceApplicationDataEntry()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_unsetResourceApplicationDataEntry_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_unsetResourceApplicationDataEntry_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
throw new \Exception("unsetResourceApplicationDataEntry failed: unknown result");
}
public function updateResource($authenticationToken, \EDAM\Types\Resource $resource)
{
$this->send_updateResource($authenticationToken, $resource);
return $this->recv_updateResource();
}
public function send_updateResource($authenticationToken, \EDAM\Types\Resource $resource)
{
$args = new \EDAM\NoteStore\NoteStore_updateResource_args();
$args->authenticationToken = $authenticationToken;
$args->resource = $resource;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'updateResource', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('updateResource', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_updateResource()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_updateResource_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_updateResource_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
throw new \Exception("updateResource failed: unknown result");
}
public function getResourceData($authenticationToken, $guid)
{
$this->send_getResourceData($authenticationToken, $guid);
return $this->recv_getResourceData();
}
public function send_getResourceData($authenticationToken, $guid)
{
$args = new \EDAM\NoteStore\NoteStore_getResourceData_args();
$args->authenticationToken = $authenticationToken;
$args->guid = $guid;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'getResourceData', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('getResourceData', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_getResourceData()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_getResourceData_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_getResourceData_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
throw new \Exception("getResourceData failed: unknown result");
}
public function getResourceByHash($authenticationToken, $noteGuid, $contentHash, $withData, $withRecognition, $withAlternateData)
{
$this->send_getResourceByHash($authenticationToken, $noteGuid, $contentHash, $withData, $withRecognition, $withAlternateData);
return $this->recv_getResourceByHash();
}
public function send_getResourceByHash($authenticationToken, $noteGuid, $contentHash, $withData, $withRecognition, $withAlternateData)
{
$args = new \EDAM\NoteStore\NoteStore_getResourceByHash_args();
$args->authenticationToken = $authenticationToken;
$args->noteGuid = $noteGuid;
$args->contentHash = $contentHash;
$args->withData = $withData;
$args->withRecognition = $withRecognition;
$args->withAlternateData = $withAlternateData;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'getResourceByHash', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('getResourceByHash', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_getResourceByHash()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_getResourceByHash_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_getResourceByHash_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
throw new \Exception("getResourceByHash failed: unknown result");
}
public function getResourceRecognition($authenticationToken, $guid)
{
$this->send_getResourceRecognition($authenticationToken, $guid);
return $this->recv_getResourceRecognition();
}
public function send_getResourceRecognition($authenticationToken, $guid)
{
$args = new \EDAM\NoteStore\NoteStore_getResourceRecognition_args();
$args->authenticationToken = $authenticationToken;
$args->guid = $guid;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'getResourceRecognition', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('getResourceRecognition', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_getResourceRecognition()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_getResourceRecognition_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_getResourceRecognition_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
throw new \Exception("getResourceRecognition failed: unknown result");
}
public function getResourceAlternateData($authenticationToken, $guid)
{
$this->send_getResourceAlternateData($authenticationToken, $guid);
return $this->recv_getResourceAlternateData();
}
public function send_getResourceAlternateData($authenticationToken, $guid)
{
$args = new \EDAM\NoteStore\NoteStore_getResourceAlternateData_args();
$args->authenticationToken = $authenticationToken;
$args->guid = $guid;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'getResourceAlternateData', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('getResourceAlternateData', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_getResourceAlternateData()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_getResourceAlternateData_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_getResourceAlternateData_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
throw new \Exception("getResourceAlternateData failed: unknown result");
}
public function getResourceAttributes($authenticationToken, $guid)
{
$this->send_getResourceAttributes($authenticationToken, $guid);
return $this->recv_getResourceAttributes();
}
public function send_getResourceAttributes($authenticationToken, $guid)
{
$args = new \EDAM\NoteStore\NoteStore_getResourceAttributes_args();
$args->authenticationToken = $authenticationToken;
$args->guid = $guid;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'getResourceAttributes', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('getResourceAttributes', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_getResourceAttributes()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_getResourceAttributes_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_getResourceAttributes_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
throw new \Exception("getResourceAttributes failed: unknown result");
}
public function getPublicNotebook($userId, $publicUri)
{
$this->send_getPublicNotebook($userId, $publicUri);
return $this->recv_getPublicNotebook();
}
public function send_getPublicNotebook($userId, $publicUri)
{
$args = new \EDAM\NoteStore\NoteStore_getPublicNotebook_args();
$args->userId = $userId;
$args->publicUri = $publicUri;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'getPublicNotebook', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('getPublicNotebook', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_getPublicNotebook()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_getPublicNotebook_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_getPublicNotebook_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
throw new \Exception("getPublicNotebook failed: unknown result");
}
public function createSharedNotebook($authenticationToken, \EDAM\Types\SharedNotebook $sharedNotebook)
{
$this->send_createSharedNotebook($authenticationToken, $sharedNotebook);
return $this->recv_createSharedNotebook();
}
public function send_createSharedNotebook($authenticationToken, \EDAM\Types\SharedNotebook $sharedNotebook)
{
$args = new \EDAM\NoteStore\NoteStore_createSharedNotebook_args();
$args->authenticationToken = $authenticationToken;
$args->sharedNotebook = $sharedNotebook;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'createSharedNotebook', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('createSharedNotebook', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_createSharedNotebook()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_createSharedNotebook_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_createSharedNotebook_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
throw new \Exception("createSharedNotebook failed: unknown result");
}
public function updateSharedNotebook($authenticationToken, \EDAM\Types\SharedNotebook $sharedNotebook)
{
$this->send_updateSharedNotebook($authenticationToken, $sharedNotebook);
return $this->recv_updateSharedNotebook();
}
public function send_updateSharedNotebook($authenticationToken, \EDAM\Types\SharedNotebook $sharedNotebook)
{
$args = new \EDAM\NoteStore\NoteStore_updateSharedNotebook_args();
$args->authenticationToken = $authenticationToken;
$args->sharedNotebook = $sharedNotebook;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'updateSharedNotebook', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('updateSharedNotebook', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_updateSharedNotebook()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_updateSharedNotebook_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_updateSharedNotebook_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
throw new \Exception("updateSharedNotebook failed: unknown result");
}
public function setSharedNotebookRecipientSettings($authenticationToken, $sharedNotebookId, \EDAM\Types\SharedNotebookRecipientSettings $recipientSettings)
{
$this->send_setSharedNotebookRecipientSettings($authenticationToken, $sharedNotebookId, $recipientSettings);
return $this->recv_setSharedNotebookRecipientSettings();
}
public function send_setSharedNotebookRecipientSettings($authenticationToken, $sharedNotebookId, \EDAM\Types\SharedNotebookRecipientSettings $recipientSettings)
{
$args = new \EDAM\NoteStore\NoteStore_setSharedNotebookRecipientSettings_args();
$args->authenticationToken = $authenticationToken;
$args->sharedNotebookId = $sharedNotebookId;
$args->recipientSettings = $recipientSettings;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'setSharedNotebookRecipientSettings', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('setSharedNotebookRecipientSettings', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_setSharedNotebookRecipientSettings()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_setSharedNotebookRecipientSettings_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_setSharedNotebookRecipientSettings_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
throw new \Exception("setSharedNotebookRecipientSettings failed: unknown result");
}
public function sendMessageToSharedNotebookMembers($authenticationToken, $notebookGuid, $messageText, $recipients)
{
$this->send_sendMessageToSharedNotebookMembers($authenticationToken, $notebookGuid, $messageText, $recipients);
return $this->recv_sendMessageToSharedNotebookMembers();
}
public function send_sendMessageToSharedNotebookMembers($authenticationToken, $notebookGuid, $messageText, $recipients)
{
$args = new \EDAM\NoteStore\NoteStore_sendMessageToSharedNotebookMembers_args();
$args->authenticationToken = $authenticationToken;
$args->notebookGuid = $notebookGuid;
$args->messageText = $messageText;
$args->recipients = $recipients;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'sendMessageToSharedNotebookMembers', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('sendMessageToSharedNotebookMembers', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_sendMessageToSharedNotebookMembers()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_sendMessageToSharedNotebookMembers_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_sendMessageToSharedNotebookMembers_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
throw new \Exception("sendMessageToSharedNotebookMembers failed: unknown result");
}
public function listSharedNotebooks($authenticationToken)
{
$this->send_listSharedNotebooks($authenticationToken);
return $this->recv_listSharedNotebooks();
}
public function send_listSharedNotebooks($authenticationToken)
{
$args = new \EDAM\NoteStore\NoteStore_listSharedNotebooks_args();
$args->authenticationToken = $authenticationToken;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'listSharedNotebooks', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('listSharedNotebooks', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_listSharedNotebooks()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_listSharedNotebooks_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_listSharedNotebooks_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
throw new \Exception("listSharedNotebooks failed: unknown result");
}
public function expungeSharedNotebooks($authenticationToken, $sharedNotebookIds)
{
$this->send_expungeSharedNotebooks($authenticationToken, $sharedNotebookIds);
return $this->recv_expungeSharedNotebooks();
}
public function send_expungeSharedNotebooks($authenticationToken, $sharedNotebookIds)
{
$args = new \EDAM\NoteStore\NoteStore_expungeSharedNotebooks_args();
$args->authenticationToken = $authenticationToken;
$args->sharedNotebookIds = $sharedNotebookIds;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'expungeSharedNotebooks', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('expungeSharedNotebooks', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_expungeSharedNotebooks()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_expungeSharedNotebooks_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_expungeSharedNotebooks_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
throw new \Exception("expungeSharedNotebooks failed: unknown result");
}
public function createLinkedNotebook($authenticationToken, \EDAM\Types\LinkedNotebook $linkedNotebook)
{
$this->send_createLinkedNotebook($authenticationToken, $linkedNotebook);
return $this->recv_createLinkedNotebook();
}
public function send_createLinkedNotebook($authenticationToken, \EDAM\Types\LinkedNotebook $linkedNotebook)
{
$args = new \EDAM\NoteStore\NoteStore_createLinkedNotebook_args();
$args->authenticationToken = $authenticationToken;
$args->linkedNotebook = $linkedNotebook;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'createLinkedNotebook', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('createLinkedNotebook', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_createLinkedNotebook()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_createLinkedNotebook_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_createLinkedNotebook_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
throw new \Exception("createLinkedNotebook failed: unknown result");
}
public function updateLinkedNotebook($authenticationToken, \EDAM\Types\LinkedNotebook $linkedNotebook)
{
$this->send_updateLinkedNotebook($authenticationToken, $linkedNotebook);
return $this->recv_updateLinkedNotebook();
}
public function send_updateLinkedNotebook($authenticationToken, \EDAM\Types\LinkedNotebook $linkedNotebook)
{
$args = new \EDAM\NoteStore\NoteStore_updateLinkedNotebook_args();
$args->authenticationToken = $authenticationToken;
$args->linkedNotebook = $linkedNotebook;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'updateLinkedNotebook', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('updateLinkedNotebook', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_updateLinkedNotebook()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_updateLinkedNotebook_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_updateLinkedNotebook_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
throw new \Exception("updateLinkedNotebook failed: unknown result");
}
public function listLinkedNotebooks($authenticationToken)
{
$this->send_listLinkedNotebooks($authenticationToken);
return $this->recv_listLinkedNotebooks();
}
public function send_listLinkedNotebooks($authenticationToken)
{
$args = new \EDAM\NoteStore\NoteStore_listLinkedNotebooks_args();
$args->authenticationToken = $authenticationToken;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'listLinkedNotebooks', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('listLinkedNotebooks', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_listLinkedNotebooks()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_listLinkedNotebooks_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_listLinkedNotebooks_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
throw new \Exception("listLinkedNotebooks failed: unknown result");
}
public function expungeLinkedNotebook($authenticationToken, $guid)
{
$this->send_expungeLinkedNotebook($authenticationToken, $guid);
return $this->recv_expungeLinkedNotebook();
}
public function send_expungeLinkedNotebook($authenticationToken, $guid)
{
$args = new \EDAM\NoteStore\NoteStore_expungeLinkedNotebook_args();
$args->authenticationToken = $authenticationToken;
$args->guid = $guid;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'expungeLinkedNotebook', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('expungeLinkedNotebook', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_expungeLinkedNotebook()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_expungeLinkedNotebook_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_expungeLinkedNotebook_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
throw new \Exception("expungeLinkedNotebook failed: unknown result");
}
public function authenticateToSharedNotebook($shareKey, $authenticationToken)
{
$this->send_authenticateToSharedNotebook($shareKey, $authenticationToken);
return $this->recv_authenticateToSharedNotebook();
}
public function send_authenticateToSharedNotebook($shareKey, $authenticationToken)
{
$args = new \EDAM\NoteStore\NoteStore_authenticateToSharedNotebook_args();
$args->shareKey = $shareKey;
$args->authenticationToken = $authenticationToken;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'authenticateToSharedNotebook', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('authenticateToSharedNotebook', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_authenticateToSharedNotebook()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_authenticateToSharedNotebook_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_authenticateToSharedNotebook_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
throw new \Exception("authenticateToSharedNotebook failed: unknown result");
}
public function getSharedNotebookByAuth($authenticationToken)
{
$this->send_getSharedNotebookByAuth($authenticationToken);
return $this->recv_getSharedNotebookByAuth();
}
public function send_getSharedNotebookByAuth($authenticationToken)
{
$args = new \EDAM\NoteStore\NoteStore_getSharedNotebookByAuth_args();
$args->authenticationToken = $authenticationToken;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'getSharedNotebookByAuth', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('getSharedNotebookByAuth', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_getSharedNotebookByAuth()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_getSharedNotebookByAuth_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_getSharedNotebookByAuth_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
throw new \Exception("getSharedNotebookByAuth failed: unknown result");
}
public function emailNote($authenticationToken, \EDAM\NoteStore\NoteEmailParameters $parameters)
{
$this->send_emailNote($authenticationToken, $parameters);
$this->recv_emailNote();
}
public function send_emailNote($authenticationToken, \EDAM\NoteStore\NoteEmailParameters $parameters)
{
$args = new \EDAM\NoteStore\NoteStore_emailNote_args();
$args->authenticationToken = $authenticationToken;
$args->parameters = $parameters;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'emailNote', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('emailNote', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_emailNote()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_emailNote_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_emailNote_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
return;
}
public function shareNote($authenticationToken, $guid)
{
$this->send_shareNote($authenticationToken, $guid);
return $this->recv_shareNote();
}
public function send_shareNote($authenticationToken, $guid)
{
$args = new \EDAM\NoteStore\NoteStore_shareNote_args();
$args->authenticationToken = $authenticationToken;
$args->guid = $guid;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'shareNote', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('shareNote', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_shareNote()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_shareNote_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_shareNote_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
throw new \Exception("shareNote failed: unknown result");
}
public function stopSharingNote($authenticationToken, $guid)
{
$this->send_stopSharingNote($authenticationToken, $guid);
$this->recv_stopSharingNote();
}
public function send_stopSharingNote($authenticationToken, $guid)
{
$args = new \EDAM\NoteStore\NoteStore_stopSharingNote_args();
$args->authenticationToken = $authenticationToken;
$args->guid = $guid;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'stopSharingNote', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('stopSharingNote', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_stopSharingNote()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_stopSharingNote_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_stopSharingNote_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
return;
}
public function authenticateToSharedNote($guid, $noteKey, $authenticationToken)
{
$this->send_authenticateToSharedNote($guid, $noteKey, $authenticationToken);
return $this->recv_authenticateToSharedNote();
}
public function send_authenticateToSharedNote($guid, $noteKey, $authenticationToken)
{
$args = new \EDAM\NoteStore\NoteStore_authenticateToSharedNote_args();
$args->guid = $guid;
$args->noteKey = $noteKey;
$args->authenticationToken = $authenticationToken;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'authenticateToSharedNote', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('authenticateToSharedNote', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_authenticateToSharedNote()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_authenticateToSharedNote_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_authenticateToSharedNote_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
throw new \Exception("authenticateToSharedNote failed: unknown result");
}
public function findRelated($authenticationToken, \EDAM\NoteStore\RelatedQuery $query, \EDAM\NoteStore\RelatedResultSpec $resultSpec)
{
$this->send_findRelated($authenticationToken, $query, $resultSpec);
return $this->recv_findRelated();
}
public function send_findRelated($authenticationToken, \EDAM\NoteStore\RelatedQuery $query, \EDAM\NoteStore\RelatedResultSpec $resultSpec)
{
$args = new \EDAM\NoteStore\NoteStore_findRelated_args();
$args->authenticationToken = $authenticationToken;
$args->query = $query;
$args->resultSpec = $resultSpec;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'findRelated', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('findRelated', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_findRelated()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\NoteStore\NoteStore_findRelated_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\NoteStore\NoteStore_findRelated_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
throw new \Exception("findRelated failed: unknown result");
}
}
// HELPER FUNCTIONS AND STRUCTURES
class NoteStore_getSyncState_args {
static $_TSPEC;
public $authenticationToken = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
}
}
public function getName() {
return 'NoteStore_getSyncState_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_getSyncState_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_getSyncState_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::STRUCT,
'class' => '\EDAM\NoteStore\SyncState',
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
}
}
public function getName() {
return 'NoteStore_getSyncState_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::STRUCT) {
$this->success = new \EDAM\NoteStore\SyncState();
$xfer += $this->success->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_getSyncState_result');
if ($this->success !== null) {
if (!is_object($this->success)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
$xfer += $this->success->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_getSyncStateWithMetrics_args {
static $_TSPEC;
public $authenticationToken = null;
public $clientMetrics = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'clientMetrics',
'type' => TType::STRUCT,
'class' => '\EDAM\NoteStore\ClientUsageMetrics',
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['clientMetrics'])) {
$this->clientMetrics = $vals['clientMetrics'];
}
}
}
public function getName() {
return 'NoteStore_getSyncStateWithMetrics_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->clientMetrics = new \EDAM\NoteStore\ClientUsageMetrics();
$xfer += $this->clientMetrics->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_getSyncStateWithMetrics_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->clientMetrics !== null) {
if (!is_object($this->clientMetrics)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('clientMetrics', TType::STRUCT, 2);
$xfer += $this->clientMetrics->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_getSyncStateWithMetrics_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::STRUCT,
'class' => '\EDAM\NoteStore\SyncState',
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
}
}
public function getName() {
return 'NoteStore_getSyncStateWithMetrics_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::STRUCT) {
$this->success = new \EDAM\NoteStore\SyncState();
$xfer += $this->success->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_getSyncStateWithMetrics_result');
if ($this->success !== null) {
if (!is_object($this->success)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
$xfer += $this->success->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_getSyncChunk_args {
static $_TSPEC;
public $authenticationToken = null;
public $afterUSN = null;
public $maxEntries = null;
public $fullSyncOnly = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'afterUSN',
'type' => TType::I32,
),
3 => array(
'var' => 'maxEntries',
'type' => TType::I32,
),
4 => array(
'var' => 'fullSyncOnly',
'type' => TType::BOOL,
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['afterUSN'])) {
$this->afterUSN = $vals['afterUSN'];
}
if (isset($vals['maxEntries'])) {
$this->maxEntries = $vals['maxEntries'];
}
if (isset($vals['fullSyncOnly'])) {
$this->fullSyncOnly = $vals['fullSyncOnly'];
}
}
}
public function getName() {
return 'NoteStore_getSyncChunk_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->afterUSN);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->maxEntries);
} else {
$xfer += $input->skip($ftype);
}
break;
case 4:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->fullSyncOnly);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_getSyncChunk_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->afterUSN !== null) {
$xfer += $output->writeFieldBegin('afterUSN', TType::I32, 2);
$xfer += $output->writeI32($this->afterUSN);
$xfer += $output->writeFieldEnd();
}
if ($this->maxEntries !== null) {
$xfer += $output->writeFieldBegin('maxEntries', TType::I32, 3);
$xfer += $output->writeI32($this->maxEntries);
$xfer += $output->writeFieldEnd();
}
if ($this->fullSyncOnly !== null) {
$xfer += $output->writeFieldBegin('fullSyncOnly', TType::BOOL, 4);
$xfer += $output->writeBool($this->fullSyncOnly);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_getSyncChunk_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::STRUCT,
'class' => '\EDAM\NoteStore\SyncChunk',
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
}
}
public function getName() {
return 'NoteStore_getSyncChunk_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::STRUCT) {
$this->success = new \EDAM\NoteStore\SyncChunk();
$xfer += $this->success->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_getSyncChunk_result');
if ($this->success !== null) {
if (!is_object($this->success)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
$xfer += $this->success->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_getFilteredSyncChunk_args {
static $_TSPEC;
public $authenticationToken = null;
public $afterUSN = null;
public $maxEntries = null;
public $filter = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'afterUSN',
'type' => TType::I32,
),
3 => array(
'var' => 'maxEntries',
'type' => TType::I32,
),
4 => array(
'var' => 'filter',
'type' => TType::STRUCT,
'class' => '\EDAM\NoteStore\SyncChunkFilter',
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['afterUSN'])) {
$this->afterUSN = $vals['afterUSN'];
}
if (isset($vals['maxEntries'])) {
$this->maxEntries = $vals['maxEntries'];
}
if (isset($vals['filter'])) {
$this->filter = $vals['filter'];
}
}
}
public function getName() {
return 'NoteStore_getFilteredSyncChunk_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->afterUSN);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->maxEntries);
} else {
$xfer += $input->skip($ftype);
}
break;
case 4:
if ($ftype == TType::STRUCT) {
$this->filter = new \EDAM\NoteStore\SyncChunkFilter();
$xfer += $this->filter->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_getFilteredSyncChunk_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->afterUSN !== null) {
$xfer += $output->writeFieldBegin('afterUSN', TType::I32, 2);
$xfer += $output->writeI32($this->afterUSN);
$xfer += $output->writeFieldEnd();
}
if ($this->maxEntries !== null) {
$xfer += $output->writeFieldBegin('maxEntries', TType::I32, 3);
$xfer += $output->writeI32($this->maxEntries);
$xfer += $output->writeFieldEnd();
}
if ($this->filter !== null) {
if (!is_object($this->filter)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('filter', TType::STRUCT, 4);
$xfer += $this->filter->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_getFilteredSyncChunk_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::STRUCT,
'class' => '\EDAM\NoteStore\SyncChunk',
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
}
}
public function getName() {
return 'NoteStore_getFilteredSyncChunk_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::STRUCT) {
$this->success = new \EDAM\NoteStore\SyncChunk();
$xfer += $this->success->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_getFilteredSyncChunk_result');
if ($this->success !== null) {
if (!is_object($this->success)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
$xfer += $this->success->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_getLinkedNotebookSyncState_args {
static $_TSPEC;
public $authenticationToken = null;
public $linkedNotebook = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'linkedNotebook',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\LinkedNotebook',
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['linkedNotebook'])) {
$this->linkedNotebook = $vals['linkedNotebook'];
}
}
}
public function getName() {
return 'NoteStore_getLinkedNotebookSyncState_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->linkedNotebook = new \EDAM\Types\LinkedNotebook();
$xfer += $this->linkedNotebook->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_getLinkedNotebookSyncState_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->linkedNotebook !== null) {
if (!is_object($this->linkedNotebook)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('linkedNotebook', TType::STRUCT, 2);
$xfer += $this->linkedNotebook->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_getLinkedNotebookSyncState_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public $notFoundException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::STRUCT,
'class' => '\EDAM\NoteStore\SyncState',
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
3 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
}
}
public function getName() {
return 'NoteStore_getLinkedNotebookSyncState_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::STRUCT) {
$this->success = new \EDAM\NoteStore\SyncState();
$xfer += $this->success->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_getLinkedNotebookSyncState_result');
if ($this->success !== null) {
if (!is_object($this->success)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
$xfer += $this->success->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 3);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_getLinkedNotebookSyncChunk_args {
static $_TSPEC;
public $authenticationToken = null;
public $linkedNotebook = null;
public $afterUSN = null;
public $maxEntries = null;
public $fullSyncOnly = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'linkedNotebook',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\LinkedNotebook',
),
3 => array(
'var' => 'afterUSN',
'type' => TType::I32,
),
4 => array(
'var' => 'maxEntries',
'type' => TType::I32,
),
5 => array(
'var' => 'fullSyncOnly',
'type' => TType::BOOL,
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['linkedNotebook'])) {
$this->linkedNotebook = $vals['linkedNotebook'];
}
if (isset($vals['afterUSN'])) {
$this->afterUSN = $vals['afterUSN'];
}
if (isset($vals['maxEntries'])) {
$this->maxEntries = $vals['maxEntries'];
}
if (isset($vals['fullSyncOnly'])) {
$this->fullSyncOnly = $vals['fullSyncOnly'];
}
}
}
public function getName() {
return 'NoteStore_getLinkedNotebookSyncChunk_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->linkedNotebook = new \EDAM\Types\LinkedNotebook();
$xfer += $this->linkedNotebook->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->afterUSN);
} else {
$xfer += $input->skip($ftype);
}
break;
case 4:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->maxEntries);
} else {
$xfer += $input->skip($ftype);
}
break;
case 5:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->fullSyncOnly);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_getLinkedNotebookSyncChunk_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->linkedNotebook !== null) {
if (!is_object($this->linkedNotebook)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('linkedNotebook', TType::STRUCT, 2);
$xfer += $this->linkedNotebook->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->afterUSN !== null) {
$xfer += $output->writeFieldBegin('afterUSN', TType::I32, 3);
$xfer += $output->writeI32($this->afterUSN);
$xfer += $output->writeFieldEnd();
}
if ($this->maxEntries !== null) {
$xfer += $output->writeFieldBegin('maxEntries', TType::I32, 4);
$xfer += $output->writeI32($this->maxEntries);
$xfer += $output->writeFieldEnd();
}
if ($this->fullSyncOnly !== null) {
$xfer += $output->writeFieldBegin('fullSyncOnly', TType::BOOL, 5);
$xfer += $output->writeBool($this->fullSyncOnly);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_getLinkedNotebookSyncChunk_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public $notFoundException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::STRUCT,
'class' => '\EDAM\NoteStore\SyncChunk',
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
3 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
}
}
public function getName() {
return 'NoteStore_getLinkedNotebookSyncChunk_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::STRUCT) {
$this->success = new \EDAM\NoteStore\SyncChunk();
$xfer += $this->success->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_getLinkedNotebookSyncChunk_result');
if ($this->success !== null) {
if (!is_object($this->success)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
$xfer += $this->success->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 3);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_listNotebooks_args {
static $_TSPEC;
public $authenticationToken = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
}
}
public function getName() {
return 'NoteStore_listNotebooks_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_listNotebooks_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_listNotebooks_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::LST,
'etype' => TType::STRUCT,
'elem' => array(
'type' => TType::STRUCT,
'class' => '\EDAM\Types\Notebook',
),
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
}
}
public function getName() {
return 'NoteStore_listNotebooks_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::LST) {
$this->success = array();
$_size193 = 0;
$_etype196 = 0;
$xfer += $input->readListBegin($_etype196, $_size193);
for ($_i197 = 0; $_i197 < $_size193; ++$_i197)
{
$elem198 = null;
$elem198 = new \EDAM\Types\Notebook();
$xfer += $elem198->read($input);
$this->success []= $elem198;
}
$xfer += $input->readListEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_listNotebooks_result');
if ($this->success !== null) {
if (!is_array($this->success)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('success', TType::LST, 0);
{
$output->writeListBegin(TType::STRUCT, count($this->success));
{
foreach ($this->success as $iter199)
{
$xfer += $iter199->write($output);
}
}
$output->writeListEnd();
}
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_getNotebook_args {
static $_TSPEC;
public $authenticationToken = null;
public $guid = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'guid',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['guid'])) {
$this->guid = $vals['guid'];
}
}
}
public function getName() {
return 'NoteStore_getNotebook_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->guid);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_getNotebook_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->guid !== null) {
$xfer += $output->writeFieldBegin('guid', TType::STRING, 2);
$xfer += $output->writeString($this->guid);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_getNotebook_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public $notFoundException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\Notebook',
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
3 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
}
}
public function getName() {
return 'NoteStore_getNotebook_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::STRUCT) {
$this->success = new \EDAM\Types\Notebook();
$xfer += $this->success->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_getNotebook_result');
if ($this->success !== null) {
if (!is_object($this->success)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
$xfer += $this->success->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 3);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_getDefaultNotebook_args {
static $_TSPEC;
public $authenticationToken = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
}
}
public function getName() {
return 'NoteStore_getDefaultNotebook_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_getDefaultNotebook_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_getDefaultNotebook_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\Notebook',
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
}
}
public function getName() {
return 'NoteStore_getDefaultNotebook_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::STRUCT) {
$this->success = new \EDAM\Types\Notebook();
$xfer += $this->success->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_getDefaultNotebook_result');
if ($this->success !== null) {
if (!is_object($this->success)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
$xfer += $this->success->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_createNotebook_args {
static $_TSPEC;
public $authenticationToken = null;
public $notebook = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'notebook',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\Notebook',
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['notebook'])) {
$this->notebook = $vals['notebook'];
}
}
}
public function getName() {
return 'NoteStore_createNotebook_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->notebook = new \EDAM\Types\Notebook();
$xfer += $this->notebook->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_createNotebook_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->notebook !== null) {
if (!is_object($this->notebook)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('notebook', TType::STRUCT, 2);
$xfer += $this->notebook->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_createNotebook_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\Notebook',
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
}
}
public function getName() {
return 'NoteStore_createNotebook_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::STRUCT) {
$this->success = new \EDAM\Types\Notebook();
$xfer += $this->success->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_createNotebook_result');
if ($this->success !== null) {
if (!is_object($this->success)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
$xfer += $this->success->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_updateNotebook_args {
static $_TSPEC;
public $authenticationToken = null;
public $notebook = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'notebook',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\Notebook',
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['notebook'])) {
$this->notebook = $vals['notebook'];
}
}
}
public function getName() {
return 'NoteStore_updateNotebook_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->notebook = new \EDAM\Types\Notebook();
$xfer += $this->notebook->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_updateNotebook_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->notebook !== null) {
if (!is_object($this->notebook)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('notebook', TType::STRUCT, 2);
$xfer += $this->notebook->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_updateNotebook_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public $notFoundException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::I32,
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
3 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
}
}
public function getName() {
return 'NoteStore_updateNotebook_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->success);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_updateNotebook_result');
if ($this->success !== null) {
$xfer += $output->writeFieldBegin('success', TType::I32, 0);
$xfer += $output->writeI32($this->success);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 3);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_expungeNotebook_args {
static $_TSPEC;
public $authenticationToken = null;
public $guid = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'guid',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['guid'])) {
$this->guid = $vals['guid'];
}
}
}
public function getName() {
return 'NoteStore_expungeNotebook_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->guid);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_expungeNotebook_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->guid !== null) {
$xfer += $output->writeFieldBegin('guid', TType::STRING, 2);
$xfer += $output->writeString($this->guid);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_expungeNotebook_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public $notFoundException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::I32,
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
3 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
}
}
public function getName() {
return 'NoteStore_expungeNotebook_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->success);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_expungeNotebook_result');
if ($this->success !== null) {
$xfer += $output->writeFieldBegin('success', TType::I32, 0);
$xfer += $output->writeI32($this->success);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 3);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_listTags_args {
static $_TSPEC;
public $authenticationToken = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
}
}
public function getName() {
return 'NoteStore_listTags_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_listTags_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_listTags_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::LST,
'etype' => TType::STRUCT,
'elem' => array(
'type' => TType::STRUCT,
'class' => '\EDAM\Types\Tag',
),
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
}
}
public function getName() {
return 'NoteStore_listTags_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::LST) {
$this->success = array();
$_size200 = 0;
$_etype203 = 0;
$xfer += $input->readListBegin($_etype203, $_size200);
for ($_i204 = 0; $_i204 < $_size200; ++$_i204)
{
$elem205 = null;
$elem205 = new \EDAM\Types\Tag();
$xfer += $elem205->read($input);
$this->success []= $elem205;
}
$xfer += $input->readListEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_listTags_result');
if ($this->success !== null) {
if (!is_array($this->success)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('success', TType::LST, 0);
{
$output->writeListBegin(TType::STRUCT, count($this->success));
{
foreach ($this->success as $iter206)
{
$xfer += $iter206->write($output);
}
}
$output->writeListEnd();
}
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_listTagsByNotebook_args {
static $_TSPEC;
public $authenticationToken = null;
public $notebookGuid = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'notebookGuid',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['notebookGuid'])) {
$this->notebookGuid = $vals['notebookGuid'];
}
}
}
public function getName() {
return 'NoteStore_listTagsByNotebook_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->notebookGuid);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_listTagsByNotebook_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->notebookGuid !== null) {
$xfer += $output->writeFieldBegin('notebookGuid', TType::STRING, 2);
$xfer += $output->writeString($this->notebookGuid);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_listTagsByNotebook_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public $notFoundException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::LST,
'etype' => TType::STRUCT,
'elem' => array(
'type' => TType::STRUCT,
'class' => '\EDAM\Types\Tag',
),
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
3 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
}
}
public function getName() {
return 'NoteStore_listTagsByNotebook_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::LST) {
$this->success = array();
$_size207 = 0;
$_etype210 = 0;
$xfer += $input->readListBegin($_etype210, $_size207);
for ($_i211 = 0; $_i211 < $_size207; ++$_i211)
{
$elem212 = null;
$elem212 = new \EDAM\Types\Tag();
$xfer += $elem212->read($input);
$this->success []= $elem212;
}
$xfer += $input->readListEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_listTagsByNotebook_result');
if ($this->success !== null) {
if (!is_array($this->success)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('success', TType::LST, 0);
{
$output->writeListBegin(TType::STRUCT, count($this->success));
{
foreach ($this->success as $iter213)
{
$xfer += $iter213->write($output);
}
}
$output->writeListEnd();
}
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 3);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_getTag_args {
static $_TSPEC;
public $authenticationToken = null;
public $guid = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'guid',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['guid'])) {
$this->guid = $vals['guid'];
}
}
}
public function getName() {
return 'NoteStore_getTag_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->guid);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_getTag_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->guid !== null) {
$xfer += $output->writeFieldBegin('guid', TType::STRING, 2);
$xfer += $output->writeString($this->guid);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_getTag_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public $notFoundException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\Tag',
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
3 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
}
}
public function getName() {
return 'NoteStore_getTag_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::STRUCT) {
$this->success = new \EDAM\Types\Tag();
$xfer += $this->success->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_getTag_result');
if ($this->success !== null) {
if (!is_object($this->success)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
$xfer += $this->success->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 3);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_createTag_args {
static $_TSPEC;
public $authenticationToken = null;
public $tag = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'tag',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\Tag',
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['tag'])) {
$this->tag = $vals['tag'];
}
}
}
public function getName() {
return 'NoteStore_createTag_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->tag = new \EDAM\Types\Tag();
$xfer += $this->tag->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_createTag_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->tag !== null) {
if (!is_object($this->tag)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('tag', TType::STRUCT, 2);
$xfer += $this->tag->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_createTag_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public $notFoundException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\Tag',
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
3 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
}
}
public function getName() {
return 'NoteStore_createTag_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::STRUCT) {
$this->success = new \EDAM\Types\Tag();
$xfer += $this->success->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_createTag_result');
if ($this->success !== null) {
if (!is_object($this->success)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
$xfer += $this->success->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 3);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_updateTag_args {
static $_TSPEC;
public $authenticationToken = null;
public $tag = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'tag',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\Tag',
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['tag'])) {
$this->tag = $vals['tag'];
}
}
}
public function getName() {
return 'NoteStore_updateTag_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->tag = new \EDAM\Types\Tag();
$xfer += $this->tag->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_updateTag_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->tag !== null) {
if (!is_object($this->tag)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('tag', TType::STRUCT, 2);
$xfer += $this->tag->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_updateTag_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public $notFoundException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::I32,
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
3 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
}
}
public function getName() {
return 'NoteStore_updateTag_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->success);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_updateTag_result');
if ($this->success !== null) {
$xfer += $output->writeFieldBegin('success', TType::I32, 0);
$xfer += $output->writeI32($this->success);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 3);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_untagAll_args {
static $_TSPEC;
public $authenticationToken = null;
public $guid = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'guid',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['guid'])) {
$this->guid = $vals['guid'];
}
}
}
public function getName() {
return 'NoteStore_untagAll_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->guid);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_untagAll_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->guid !== null) {
$xfer += $output->writeFieldBegin('guid', TType::STRING, 2);
$xfer += $output->writeString($this->guid);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_untagAll_result {
static $_TSPEC;
public $userException = null;
public $systemException = null;
public $notFoundException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
3 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
);
}
if (is_array($vals)) {
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
}
}
public function getName() {
return 'NoteStore_untagAll_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_untagAll_result');
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 3);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_expungeTag_args {
static $_TSPEC;
public $authenticationToken = null;
public $guid = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'guid',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['guid'])) {
$this->guid = $vals['guid'];
}
}
}
public function getName() {
return 'NoteStore_expungeTag_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->guid);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_expungeTag_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->guid !== null) {
$xfer += $output->writeFieldBegin('guid', TType::STRING, 2);
$xfer += $output->writeString($this->guid);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_expungeTag_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public $notFoundException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::I32,
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
3 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
}
}
public function getName() {
return 'NoteStore_expungeTag_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->success);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_expungeTag_result');
if ($this->success !== null) {
$xfer += $output->writeFieldBegin('success', TType::I32, 0);
$xfer += $output->writeI32($this->success);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 3);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_listSearches_args {
static $_TSPEC;
public $authenticationToken = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
}
}
public function getName() {
return 'NoteStore_listSearches_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_listSearches_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_listSearches_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::LST,
'etype' => TType::STRUCT,
'elem' => array(
'type' => TType::STRUCT,
'class' => '\EDAM\Types\SavedSearch',
),
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
}
}
public function getName() {
return 'NoteStore_listSearches_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::LST) {
$this->success = array();
$_size214 = 0;
$_etype217 = 0;
$xfer += $input->readListBegin($_etype217, $_size214);
for ($_i218 = 0; $_i218 < $_size214; ++$_i218)
{
$elem219 = null;
$elem219 = new \EDAM\Types\SavedSearch();
$xfer += $elem219->read($input);
$this->success []= $elem219;
}
$xfer += $input->readListEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_listSearches_result');
if ($this->success !== null) {
if (!is_array($this->success)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('success', TType::LST, 0);
{
$output->writeListBegin(TType::STRUCT, count($this->success));
{
foreach ($this->success as $iter220)
{
$xfer += $iter220->write($output);
}
}
$output->writeListEnd();
}
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_getSearch_args {
static $_TSPEC;
public $authenticationToken = null;
public $guid = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'guid',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['guid'])) {
$this->guid = $vals['guid'];
}
}
}
public function getName() {
return 'NoteStore_getSearch_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->guid);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_getSearch_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->guid !== null) {
$xfer += $output->writeFieldBegin('guid', TType::STRING, 2);
$xfer += $output->writeString($this->guid);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_getSearch_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public $notFoundException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\SavedSearch',
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
3 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
}
}
public function getName() {
return 'NoteStore_getSearch_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::STRUCT) {
$this->success = new \EDAM\Types\SavedSearch();
$xfer += $this->success->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_getSearch_result');
if ($this->success !== null) {
if (!is_object($this->success)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
$xfer += $this->success->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 3);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_createSearch_args {
static $_TSPEC;
public $authenticationToken = null;
public $search = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'search',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\SavedSearch',
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['search'])) {
$this->search = $vals['search'];
}
}
}
public function getName() {
return 'NoteStore_createSearch_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->search = new \EDAM\Types\SavedSearch();
$xfer += $this->search->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_createSearch_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->search !== null) {
if (!is_object($this->search)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('search', TType::STRUCT, 2);
$xfer += $this->search->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_createSearch_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\SavedSearch',
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
}
}
public function getName() {
return 'NoteStore_createSearch_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::STRUCT) {
$this->success = new \EDAM\Types\SavedSearch();
$xfer += $this->success->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_createSearch_result');
if ($this->success !== null) {
if (!is_object($this->success)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
$xfer += $this->success->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_updateSearch_args {
static $_TSPEC;
public $authenticationToken = null;
public $search = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'search',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\SavedSearch',
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['search'])) {
$this->search = $vals['search'];
}
}
}
public function getName() {
return 'NoteStore_updateSearch_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->search = new \EDAM\Types\SavedSearch();
$xfer += $this->search->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_updateSearch_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->search !== null) {
if (!is_object($this->search)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('search', TType::STRUCT, 2);
$xfer += $this->search->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_updateSearch_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public $notFoundException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::I32,
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
3 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
}
}
public function getName() {
return 'NoteStore_updateSearch_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->success);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_updateSearch_result');
if ($this->success !== null) {
$xfer += $output->writeFieldBegin('success', TType::I32, 0);
$xfer += $output->writeI32($this->success);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 3);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_expungeSearch_args {
static $_TSPEC;
public $authenticationToken = null;
public $guid = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'guid',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['guid'])) {
$this->guid = $vals['guid'];
}
}
}
public function getName() {
return 'NoteStore_expungeSearch_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->guid);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_expungeSearch_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->guid !== null) {
$xfer += $output->writeFieldBegin('guid', TType::STRING, 2);
$xfer += $output->writeString($this->guid);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_expungeSearch_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public $notFoundException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::I32,
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
3 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
}
}
public function getName() {
return 'NoteStore_expungeSearch_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->success);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_expungeSearch_result');
if ($this->success !== null) {
$xfer += $output->writeFieldBegin('success', TType::I32, 0);
$xfer += $output->writeI32($this->success);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 3);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_findNotes_args {
static $_TSPEC;
public $authenticationToken = null;
public $filter = null;
public $offset = null;
public $maxNotes = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'filter',
'type' => TType::STRUCT,
'class' => '\EDAM\NoteStore\NoteFilter',
),
3 => array(
'var' => 'offset',
'type' => TType::I32,
),
4 => array(
'var' => 'maxNotes',
'type' => TType::I32,
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['filter'])) {
$this->filter = $vals['filter'];
}
if (isset($vals['offset'])) {
$this->offset = $vals['offset'];
}
if (isset($vals['maxNotes'])) {
$this->maxNotes = $vals['maxNotes'];
}
}
}
public function getName() {
return 'NoteStore_findNotes_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->filter = new \EDAM\NoteStore\NoteFilter();
$xfer += $this->filter->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->offset);
} else {
$xfer += $input->skip($ftype);
}
break;
case 4:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->maxNotes);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_findNotes_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->filter !== null) {
if (!is_object($this->filter)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('filter', TType::STRUCT, 2);
$xfer += $this->filter->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->offset !== null) {
$xfer += $output->writeFieldBegin('offset', TType::I32, 3);
$xfer += $output->writeI32($this->offset);
$xfer += $output->writeFieldEnd();
}
if ($this->maxNotes !== null) {
$xfer += $output->writeFieldBegin('maxNotes', TType::I32, 4);
$xfer += $output->writeI32($this->maxNotes);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_findNotes_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public $notFoundException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::STRUCT,
'class' => '\EDAM\NoteStore\NoteList',
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
3 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
}
}
public function getName() {
return 'NoteStore_findNotes_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::STRUCT) {
$this->success = new \EDAM\NoteStore\NoteList();
$xfer += $this->success->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_findNotes_result');
if ($this->success !== null) {
if (!is_object($this->success)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
$xfer += $this->success->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 3);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_findNoteOffset_args {
static $_TSPEC;
public $authenticationToken = null;
public $filter = null;
public $guid = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'filter',
'type' => TType::STRUCT,
'class' => '\EDAM\NoteStore\NoteFilter',
),
3 => array(
'var' => 'guid',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['filter'])) {
$this->filter = $vals['filter'];
}
if (isset($vals['guid'])) {
$this->guid = $vals['guid'];
}
}
}
public function getName() {
return 'NoteStore_findNoteOffset_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->filter = new \EDAM\NoteStore\NoteFilter();
$xfer += $this->filter->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->guid);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_findNoteOffset_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->filter !== null) {
if (!is_object($this->filter)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('filter', TType::STRUCT, 2);
$xfer += $this->filter->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->guid !== null) {
$xfer += $output->writeFieldBegin('guid', TType::STRING, 3);
$xfer += $output->writeString($this->guid);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_findNoteOffset_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public $notFoundException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::I32,
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
3 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
}
}
public function getName() {
return 'NoteStore_findNoteOffset_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->success);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_findNoteOffset_result');
if ($this->success !== null) {
$xfer += $output->writeFieldBegin('success', TType::I32, 0);
$xfer += $output->writeI32($this->success);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 3);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_findNotesMetadata_args {
static $_TSPEC;
public $authenticationToken = null;
public $filter = null;
public $offset = null;
public $maxNotes = null;
public $resultSpec = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'filter',
'type' => TType::STRUCT,
'class' => '\EDAM\NoteStore\NoteFilter',
),
3 => array(
'var' => 'offset',
'type' => TType::I32,
),
4 => array(
'var' => 'maxNotes',
'type' => TType::I32,
),
5 => array(
'var' => 'resultSpec',
'type' => TType::STRUCT,
'class' => '\EDAM\NoteStore\NotesMetadataResultSpec',
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['filter'])) {
$this->filter = $vals['filter'];
}
if (isset($vals['offset'])) {
$this->offset = $vals['offset'];
}
if (isset($vals['maxNotes'])) {
$this->maxNotes = $vals['maxNotes'];
}
if (isset($vals['resultSpec'])) {
$this->resultSpec = $vals['resultSpec'];
}
}
}
public function getName() {
return 'NoteStore_findNotesMetadata_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->filter = new \EDAM\NoteStore\NoteFilter();
$xfer += $this->filter->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->offset);
} else {
$xfer += $input->skip($ftype);
}
break;
case 4:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->maxNotes);
} else {
$xfer += $input->skip($ftype);
}
break;
case 5:
if ($ftype == TType::STRUCT) {
$this->resultSpec = new \EDAM\NoteStore\NotesMetadataResultSpec();
$xfer += $this->resultSpec->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_findNotesMetadata_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->filter !== null) {
if (!is_object($this->filter)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('filter', TType::STRUCT, 2);
$xfer += $this->filter->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->offset !== null) {
$xfer += $output->writeFieldBegin('offset', TType::I32, 3);
$xfer += $output->writeI32($this->offset);
$xfer += $output->writeFieldEnd();
}
if ($this->maxNotes !== null) {
$xfer += $output->writeFieldBegin('maxNotes', TType::I32, 4);
$xfer += $output->writeI32($this->maxNotes);
$xfer += $output->writeFieldEnd();
}
if ($this->resultSpec !== null) {
if (!is_object($this->resultSpec)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('resultSpec', TType::STRUCT, 5);
$xfer += $this->resultSpec->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_findNotesMetadata_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public $notFoundException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::STRUCT,
'class' => '\EDAM\NoteStore\NotesMetadataList',
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
3 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
}
}
public function getName() {
return 'NoteStore_findNotesMetadata_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::STRUCT) {
$this->success = new \EDAM\NoteStore\NotesMetadataList();
$xfer += $this->success->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_findNotesMetadata_result');
if ($this->success !== null) {
if (!is_object($this->success)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
$xfer += $this->success->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 3);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_findNoteCounts_args {
static $_TSPEC;
public $authenticationToken = null;
public $filter = null;
public $withTrash = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'filter',
'type' => TType::STRUCT,
'class' => '\EDAM\NoteStore\NoteFilter',
),
3 => array(
'var' => 'withTrash',
'type' => TType::BOOL,
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['filter'])) {
$this->filter = $vals['filter'];
}
if (isset($vals['withTrash'])) {
$this->withTrash = $vals['withTrash'];
}
}
}
public function getName() {
return 'NoteStore_findNoteCounts_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->filter = new \EDAM\NoteStore\NoteFilter();
$xfer += $this->filter->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->withTrash);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_findNoteCounts_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->filter !== null) {
if (!is_object($this->filter)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('filter', TType::STRUCT, 2);
$xfer += $this->filter->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->withTrash !== null) {
$xfer += $output->writeFieldBegin('withTrash', TType::BOOL, 3);
$xfer += $output->writeBool($this->withTrash);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_findNoteCounts_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public $notFoundException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::STRUCT,
'class' => '\EDAM\NoteStore\NoteCollectionCounts',
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
3 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
}
}
public function getName() {
return 'NoteStore_findNoteCounts_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::STRUCT) {
$this->success = new \EDAM\NoteStore\NoteCollectionCounts();
$xfer += $this->success->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_findNoteCounts_result');
if ($this->success !== null) {
if (!is_object($this->success)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
$xfer += $this->success->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 3);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_getNote_args {
static $_TSPEC;
public $authenticationToken = null;
public $guid = null;
public $withContent = null;
public $withResourcesData = null;
public $withResourcesRecognition = null;
public $withResourcesAlternateData = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'guid',
'type' => TType::STRING,
),
3 => array(
'var' => 'withContent',
'type' => TType::BOOL,
),
4 => array(
'var' => 'withResourcesData',
'type' => TType::BOOL,
),
5 => array(
'var' => 'withResourcesRecognition',
'type' => TType::BOOL,
),
6 => array(
'var' => 'withResourcesAlternateData',
'type' => TType::BOOL,
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['guid'])) {
$this->guid = $vals['guid'];
}
if (isset($vals['withContent'])) {
$this->withContent = $vals['withContent'];
}
if (isset($vals['withResourcesData'])) {
$this->withResourcesData = $vals['withResourcesData'];
}
if (isset($vals['withResourcesRecognition'])) {
$this->withResourcesRecognition = $vals['withResourcesRecognition'];
}
if (isset($vals['withResourcesAlternateData'])) {
$this->withResourcesAlternateData = $vals['withResourcesAlternateData'];
}
}
}
public function getName() {
return 'NoteStore_getNote_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->guid);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->withContent);
} else {
$xfer += $input->skip($ftype);
}
break;
case 4:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->withResourcesData);
} else {
$xfer += $input->skip($ftype);
}
break;
case 5:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->withResourcesRecognition);
} else {
$xfer += $input->skip($ftype);
}
break;
case 6:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->withResourcesAlternateData);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_getNote_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->guid !== null) {
$xfer += $output->writeFieldBegin('guid', TType::STRING, 2);
$xfer += $output->writeString($this->guid);
$xfer += $output->writeFieldEnd();
}
if ($this->withContent !== null) {
$xfer += $output->writeFieldBegin('withContent', TType::BOOL, 3);
$xfer += $output->writeBool($this->withContent);
$xfer += $output->writeFieldEnd();
}
if ($this->withResourcesData !== null) {
$xfer += $output->writeFieldBegin('withResourcesData', TType::BOOL, 4);
$xfer += $output->writeBool($this->withResourcesData);
$xfer += $output->writeFieldEnd();
}
if ($this->withResourcesRecognition !== null) {
$xfer += $output->writeFieldBegin('withResourcesRecognition', TType::BOOL, 5);
$xfer += $output->writeBool($this->withResourcesRecognition);
$xfer += $output->writeFieldEnd();
}
if ($this->withResourcesAlternateData !== null) {
$xfer += $output->writeFieldBegin('withResourcesAlternateData', TType::BOOL, 6);
$xfer += $output->writeBool($this->withResourcesAlternateData);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_getNote_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public $notFoundException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\Note',
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
3 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
}
}
public function getName() {
return 'NoteStore_getNote_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::STRUCT) {
$this->success = new \EDAM\Types\Note();
$xfer += $this->success->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_getNote_result');
if ($this->success !== null) {
if (!is_object($this->success)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
$xfer += $this->success->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 3);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_getNoteApplicationData_args {
static $_TSPEC;
public $authenticationToken = null;
public $guid = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'guid',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['guid'])) {
$this->guid = $vals['guid'];
}
}
}
public function getName() {
return 'NoteStore_getNoteApplicationData_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->guid);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_getNoteApplicationData_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->guid !== null) {
$xfer += $output->writeFieldBegin('guid', TType::STRING, 2);
$xfer += $output->writeString($this->guid);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_getNoteApplicationData_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public $notFoundException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\LazyMap',
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
3 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
}
}
public function getName() {
return 'NoteStore_getNoteApplicationData_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::STRUCT) {
$this->success = new \EDAM\Types\LazyMap();
$xfer += $this->success->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_getNoteApplicationData_result');
if ($this->success !== null) {
if (!is_object($this->success)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
$xfer += $this->success->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 3);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_getNoteApplicationDataEntry_args {
static $_TSPEC;
public $authenticationToken = null;
public $guid = null;
public $key = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'guid',
'type' => TType::STRING,
),
3 => array(
'var' => 'key',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['guid'])) {
$this->guid = $vals['guid'];
}
if (isset($vals['key'])) {
$this->key = $vals['key'];
}
}
}
public function getName() {
return 'NoteStore_getNoteApplicationDataEntry_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->guid);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->key);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_getNoteApplicationDataEntry_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->guid !== null) {
$xfer += $output->writeFieldBegin('guid', TType::STRING, 2);
$xfer += $output->writeString($this->guid);
$xfer += $output->writeFieldEnd();
}
if ($this->key !== null) {
$xfer += $output->writeFieldBegin('key', TType::STRING, 3);
$xfer += $output->writeString($this->key);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_getNoteApplicationDataEntry_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public $notFoundException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::STRING,
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
3 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
}
}
public function getName() {
return 'NoteStore_getNoteApplicationDataEntry_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->success);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_getNoteApplicationDataEntry_result');
if ($this->success !== null) {
$xfer += $output->writeFieldBegin('success', TType::STRING, 0);
$xfer += $output->writeString($this->success);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 3);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_setNoteApplicationDataEntry_args {
static $_TSPEC;
public $authenticationToken = null;
public $guid = null;
public $key = null;
public $value = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'guid',
'type' => TType::STRING,
),
3 => array(
'var' => 'key',
'type' => TType::STRING,
),
4 => array(
'var' => 'value',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['guid'])) {
$this->guid = $vals['guid'];
}
if (isset($vals['key'])) {
$this->key = $vals['key'];
}
if (isset($vals['value'])) {
$this->value = $vals['value'];
}
}
}
public function getName() {
return 'NoteStore_setNoteApplicationDataEntry_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->guid);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->key);
} else {
$xfer += $input->skip($ftype);
}
break;
case 4:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->value);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_setNoteApplicationDataEntry_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->guid !== null) {
$xfer += $output->writeFieldBegin('guid', TType::STRING, 2);
$xfer += $output->writeString($this->guid);
$xfer += $output->writeFieldEnd();
}
if ($this->key !== null) {
$xfer += $output->writeFieldBegin('key', TType::STRING, 3);
$xfer += $output->writeString($this->key);
$xfer += $output->writeFieldEnd();
}
if ($this->value !== null) {
$xfer += $output->writeFieldBegin('value', TType::STRING, 4);
$xfer += $output->writeString($this->value);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_setNoteApplicationDataEntry_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public $notFoundException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::I32,
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
3 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
}
}
public function getName() {
return 'NoteStore_setNoteApplicationDataEntry_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->success);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_setNoteApplicationDataEntry_result');
if ($this->success !== null) {
$xfer += $output->writeFieldBegin('success', TType::I32, 0);
$xfer += $output->writeI32($this->success);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 3);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_unsetNoteApplicationDataEntry_args {
static $_TSPEC;
public $authenticationToken = null;
public $guid = null;
public $key = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'guid',
'type' => TType::STRING,
),
3 => array(
'var' => 'key',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['guid'])) {
$this->guid = $vals['guid'];
}
if (isset($vals['key'])) {
$this->key = $vals['key'];
}
}
}
public function getName() {
return 'NoteStore_unsetNoteApplicationDataEntry_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->guid);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->key);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_unsetNoteApplicationDataEntry_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->guid !== null) {
$xfer += $output->writeFieldBegin('guid', TType::STRING, 2);
$xfer += $output->writeString($this->guid);
$xfer += $output->writeFieldEnd();
}
if ($this->key !== null) {
$xfer += $output->writeFieldBegin('key', TType::STRING, 3);
$xfer += $output->writeString($this->key);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_unsetNoteApplicationDataEntry_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public $notFoundException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::I32,
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
3 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
}
}
public function getName() {
return 'NoteStore_unsetNoteApplicationDataEntry_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->success);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_unsetNoteApplicationDataEntry_result');
if ($this->success !== null) {
$xfer += $output->writeFieldBegin('success', TType::I32, 0);
$xfer += $output->writeI32($this->success);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 3);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_getNoteContent_args {
static $_TSPEC;
public $authenticationToken = null;
public $guid = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'guid',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['guid'])) {
$this->guid = $vals['guid'];
}
}
}
public function getName() {
return 'NoteStore_getNoteContent_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->guid);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_getNoteContent_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->guid !== null) {
$xfer += $output->writeFieldBegin('guid', TType::STRING, 2);
$xfer += $output->writeString($this->guid);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_getNoteContent_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public $notFoundException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::STRING,
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
3 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
}
}
public function getName() {
return 'NoteStore_getNoteContent_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->success);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_getNoteContent_result');
if ($this->success !== null) {
$xfer += $output->writeFieldBegin('success', TType::STRING, 0);
$xfer += $output->writeString($this->success);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 3);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_getNoteSearchText_args {
static $_TSPEC;
public $authenticationToken = null;
public $guid = null;
public $noteOnly = null;
public $tokenizeForIndexing = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'guid',
'type' => TType::STRING,
),
3 => array(
'var' => 'noteOnly',
'type' => TType::BOOL,
),
4 => array(
'var' => 'tokenizeForIndexing',
'type' => TType::BOOL,
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['guid'])) {
$this->guid = $vals['guid'];
}
if (isset($vals['noteOnly'])) {
$this->noteOnly = $vals['noteOnly'];
}
if (isset($vals['tokenizeForIndexing'])) {
$this->tokenizeForIndexing = $vals['tokenizeForIndexing'];
}
}
}
public function getName() {
return 'NoteStore_getNoteSearchText_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->guid);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->noteOnly);
} else {
$xfer += $input->skip($ftype);
}
break;
case 4:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->tokenizeForIndexing);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_getNoteSearchText_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->guid !== null) {
$xfer += $output->writeFieldBegin('guid', TType::STRING, 2);
$xfer += $output->writeString($this->guid);
$xfer += $output->writeFieldEnd();
}
if ($this->noteOnly !== null) {
$xfer += $output->writeFieldBegin('noteOnly', TType::BOOL, 3);
$xfer += $output->writeBool($this->noteOnly);
$xfer += $output->writeFieldEnd();
}
if ($this->tokenizeForIndexing !== null) {
$xfer += $output->writeFieldBegin('tokenizeForIndexing', TType::BOOL, 4);
$xfer += $output->writeBool($this->tokenizeForIndexing);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_getNoteSearchText_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public $notFoundException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::STRING,
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
3 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
}
}
public function getName() {
return 'NoteStore_getNoteSearchText_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->success);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_getNoteSearchText_result');
if ($this->success !== null) {
$xfer += $output->writeFieldBegin('success', TType::STRING, 0);
$xfer += $output->writeString($this->success);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 3);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_getResourceSearchText_args {
static $_TSPEC;
public $authenticationToken = null;
public $guid = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'guid',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['guid'])) {
$this->guid = $vals['guid'];
}
}
}
public function getName() {
return 'NoteStore_getResourceSearchText_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->guid);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_getResourceSearchText_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->guid !== null) {
$xfer += $output->writeFieldBegin('guid', TType::STRING, 2);
$xfer += $output->writeString($this->guid);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_getResourceSearchText_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public $notFoundException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::STRING,
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
3 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
}
}
public function getName() {
return 'NoteStore_getResourceSearchText_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->success);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_getResourceSearchText_result');
if ($this->success !== null) {
$xfer += $output->writeFieldBegin('success', TType::STRING, 0);
$xfer += $output->writeString($this->success);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 3);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_getNoteTagNames_args {
static $_TSPEC;
public $authenticationToken = null;
public $guid = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'guid',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['guid'])) {
$this->guid = $vals['guid'];
}
}
}
public function getName() {
return 'NoteStore_getNoteTagNames_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->guid);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_getNoteTagNames_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->guid !== null) {
$xfer += $output->writeFieldBegin('guid', TType::STRING, 2);
$xfer += $output->writeString($this->guid);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_getNoteTagNames_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public $notFoundException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::LST,
'etype' => TType::STRING,
'elem' => array(
'type' => TType::STRING,
),
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
3 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
}
}
public function getName() {
return 'NoteStore_getNoteTagNames_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::LST) {
$this->success = array();
$_size221 = 0;
$_etype224 = 0;
$xfer += $input->readListBegin($_etype224, $_size221);
for ($_i225 = 0; $_i225 < $_size221; ++$_i225)
{
$elem226 = null;
$xfer += $input->readString($elem226);
$this->success []= $elem226;
}
$xfer += $input->readListEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_getNoteTagNames_result');
if ($this->success !== null) {
if (!is_array($this->success)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('success', TType::LST, 0);
{
$output->writeListBegin(TType::STRING, count($this->success));
{
foreach ($this->success as $iter227)
{
$xfer += $output->writeString($iter227);
}
}
$output->writeListEnd();
}
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 3);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_createNote_args {
static $_TSPEC;
public $authenticationToken = null;
public $note = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'note',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\Note',
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['note'])) {
$this->note = $vals['note'];
}
}
}
public function getName() {
return 'NoteStore_createNote_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->note = new \EDAM\Types\Note();
$xfer += $this->note->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_createNote_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->note !== null) {
if (!is_object($this->note)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('note', TType::STRUCT, 2);
$xfer += $this->note->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_createNote_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public $notFoundException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\Note',
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
3 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
}
}
public function getName() {
return 'NoteStore_createNote_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::STRUCT) {
$this->success = new \EDAM\Types\Note();
$xfer += $this->success->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_createNote_result');
if ($this->success !== null) {
if (!is_object($this->success)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
$xfer += $this->success->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 3);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_updateNote_args {
static $_TSPEC;
public $authenticationToken = null;
public $note = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'note',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\Note',
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['note'])) {
$this->note = $vals['note'];
}
}
}
public function getName() {
return 'NoteStore_updateNote_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->note = new \EDAM\Types\Note();
$xfer += $this->note->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_updateNote_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->note !== null) {
if (!is_object($this->note)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('note', TType::STRUCT, 2);
$xfer += $this->note->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_updateNote_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public $notFoundException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\Note',
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
3 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
}
}
public function getName() {
return 'NoteStore_updateNote_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::STRUCT) {
$this->success = new \EDAM\Types\Note();
$xfer += $this->success->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_updateNote_result');
if ($this->success !== null) {
if (!is_object($this->success)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
$xfer += $this->success->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 3);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_deleteNote_args {
static $_TSPEC;
public $authenticationToken = null;
public $guid = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'guid',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['guid'])) {
$this->guid = $vals['guid'];
}
}
}
public function getName() {
return 'NoteStore_deleteNote_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->guid);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_deleteNote_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->guid !== null) {
$xfer += $output->writeFieldBegin('guid', TType::STRING, 2);
$xfer += $output->writeString($this->guid);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_deleteNote_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public $notFoundException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::I32,
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
3 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
}
}
public function getName() {
return 'NoteStore_deleteNote_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->success);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_deleteNote_result');
if ($this->success !== null) {
$xfer += $output->writeFieldBegin('success', TType::I32, 0);
$xfer += $output->writeI32($this->success);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 3);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_expungeNote_args {
static $_TSPEC;
public $authenticationToken = null;
public $guid = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'guid',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['guid'])) {
$this->guid = $vals['guid'];
}
}
}
public function getName() {
return 'NoteStore_expungeNote_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->guid);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_expungeNote_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->guid !== null) {
$xfer += $output->writeFieldBegin('guid', TType::STRING, 2);
$xfer += $output->writeString($this->guid);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_expungeNote_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public $notFoundException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::I32,
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
3 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
}
}
public function getName() {
return 'NoteStore_expungeNote_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->success);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_expungeNote_result');
if ($this->success !== null) {
$xfer += $output->writeFieldBegin('success', TType::I32, 0);
$xfer += $output->writeI32($this->success);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 3);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_expungeNotes_args {
static $_TSPEC;
public $authenticationToken = null;
public $noteGuids = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'noteGuids',
'type' => TType::LST,
'etype' => TType::STRING,
'elem' => array(
'type' => TType::STRING,
),
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['noteGuids'])) {
$this->noteGuids = $vals['noteGuids'];
}
}
}
public function getName() {
return 'NoteStore_expungeNotes_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::LST) {
$this->noteGuids = array();
$_size228 = 0;
$_etype231 = 0;
$xfer += $input->readListBegin($_etype231, $_size228);
for ($_i232 = 0; $_i232 < $_size228; ++$_i232)
{
$elem233 = null;
$xfer += $input->readString($elem233);
$this->noteGuids []= $elem233;
}
$xfer += $input->readListEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_expungeNotes_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->noteGuids !== null) {
if (!is_array($this->noteGuids)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('noteGuids', TType::LST, 2);
{
$output->writeListBegin(TType::STRING, count($this->noteGuids));
{
foreach ($this->noteGuids as $iter234)
{
$xfer += $output->writeString($iter234);
}
}
$output->writeListEnd();
}
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_expungeNotes_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public $notFoundException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::I32,
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
3 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
}
}
public function getName() {
return 'NoteStore_expungeNotes_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->success);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_expungeNotes_result');
if ($this->success !== null) {
$xfer += $output->writeFieldBegin('success', TType::I32, 0);
$xfer += $output->writeI32($this->success);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 3);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_expungeInactiveNotes_args {
static $_TSPEC;
public $authenticationToken = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
}
}
public function getName() {
return 'NoteStore_expungeInactiveNotes_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_expungeInactiveNotes_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_expungeInactiveNotes_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::I32,
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
}
}
public function getName() {
return 'NoteStore_expungeInactiveNotes_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->success);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_expungeInactiveNotes_result');
if ($this->success !== null) {
$xfer += $output->writeFieldBegin('success', TType::I32, 0);
$xfer += $output->writeI32($this->success);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_copyNote_args {
static $_TSPEC;
public $authenticationToken = null;
public $noteGuid = null;
public $toNotebookGuid = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'noteGuid',
'type' => TType::STRING,
),
3 => array(
'var' => 'toNotebookGuid',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['noteGuid'])) {
$this->noteGuid = $vals['noteGuid'];
}
if (isset($vals['toNotebookGuid'])) {
$this->toNotebookGuid = $vals['toNotebookGuid'];
}
}
}
public function getName() {
return 'NoteStore_copyNote_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->noteGuid);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->toNotebookGuid);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_copyNote_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->noteGuid !== null) {
$xfer += $output->writeFieldBegin('noteGuid', TType::STRING, 2);
$xfer += $output->writeString($this->noteGuid);
$xfer += $output->writeFieldEnd();
}
if ($this->toNotebookGuid !== null) {
$xfer += $output->writeFieldBegin('toNotebookGuid', TType::STRING, 3);
$xfer += $output->writeString($this->toNotebookGuid);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_copyNote_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public $notFoundException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\Note',
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
3 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
}
}
public function getName() {
return 'NoteStore_copyNote_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::STRUCT) {
$this->success = new \EDAM\Types\Note();
$xfer += $this->success->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_copyNote_result');
if ($this->success !== null) {
if (!is_object($this->success)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
$xfer += $this->success->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 3);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_listNoteVersions_args {
static $_TSPEC;
public $authenticationToken = null;
public $noteGuid = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'noteGuid',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['noteGuid'])) {
$this->noteGuid = $vals['noteGuid'];
}
}
}
public function getName() {
return 'NoteStore_listNoteVersions_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->noteGuid);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_listNoteVersions_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->noteGuid !== null) {
$xfer += $output->writeFieldBegin('noteGuid', TType::STRING, 2);
$xfer += $output->writeString($this->noteGuid);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_listNoteVersions_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public $notFoundException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::LST,
'etype' => TType::STRUCT,
'elem' => array(
'type' => TType::STRUCT,
'class' => '\EDAM\NoteStore\NoteVersionId',
),
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
3 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
}
}
public function getName() {
return 'NoteStore_listNoteVersions_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::LST) {
$this->success = array();
$_size235 = 0;
$_etype238 = 0;
$xfer += $input->readListBegin($_etype238, $_size235);
for ($_i239 = 0; $_i239 < $_size235; ++$_i239)
{
$elem240 = null;
$elem240 = new \EDAM\NoteStore\NoteVersionId();
$xfer += $elem240->read($input);
$this->success []= $elem240;
}
$xfer += $input->readListEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_listNoteVersions_result');
if ($this->success !== null) {
if (!is_array($this->success)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('success', TType::LST, 0);
{
$output->writeListBegin(TType::STRUCT, count($this->success));
{
foreach ($this->success as $iter241)
{
$xfer += $iter241->write($output);
}
}
$output->writeListEnd();
}
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 3);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_getNoteVersion_args {
static $_TSPEC;
public $authenticationToken = null;
public $noteGuid = null;
public $updateSequenceNum = null;
public $withResourcesData = null;
public $withResourcesRecognition = null;
public $withResourcesAlternateData = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'noteGuid',
'type' => TType::STRING,
),
3 => array(
'var' => 'updateSequenceNum',
'type' => TType::I32,
),
4 => array(
'var' => 'withResourcesData',
'type' => TType::BOOL,
),
5 => array(
'var' => 'withResourcesRecognition',
'type' => TType::BOOL,
),
6 => array(
'var' => 'withResourcesAlternateData',
'type' => TType::BOOL,
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['noteGuid'])) {
$this->noteGuid = $vals['noteGuid'];
}
if (isset($vals['updateSequenceNum'])) {
$this->updateSequenceNum = $vals['updateSequenceNum'];
}
if (isset($vals['withResourcesData'])) {
$this->withResourcesData = $vals['withResourcesData'];
}
if (isset($vals['withResourcesRecognition'])) {
$this->withResourcesRecognition = $vals['withResourcesRecognition'];
}
if (isset($vals['withResourcesAlternateData'])) {
$this->withResourcesAlternateData = $vals['withResourcesAlternateData'];
}
}
}
public function getName() {
return 'NoteStore_getNoteVersion_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->noteGuid);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->updateSequenceNum);
} else {
$xfer += $input->skip($ftype);
}
break;
case 4:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->withResourcesData);
} else {
$xfer += $input->skip($ftype);
}
break;
case 5:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->withResourcesRecognition);
} else {
$xfer += $input->skip($ftype);
}
break;
case 6:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->withResourcesAlternateData);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_getNoteVersion_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->noteGuid !== null) {
$xfer += $output->writeFieldBegin('noteGuid', TType::STRING, 2);
$xfer += $output->writeString($this->noteGuid);
$xfer += $output->writeFieldEnd();
}
if ($this->updateSequenceNum !== null) {
$xfer += $output->writeFieldBegin('updateSequenceNum', TType::I32, 3);
$xfer += $output->writeI32($this->updateSequenceNum);
$xfer += $output->writeFieldEnd();
}
if ($this->withResourcesData !== null) {
$xfer += $output->writeFieldBegin('withResourcesData', TType::BOOL, 4);
$xfer += $output->writeBool($this->withResourcesData);
$xfer += $output->writeFieldEnd();
}
if ($this->withResourcesRecognition !== null) {
$xfer += $output->writeFieldBegin('withResourcesRecognition', TType::BOOL, 5);
$xfer += $output->writeBool($this->withResourcesRecognition);
$xfer += $output->writeFieldEnd();
}
if ($this->withResourcesAlternateData !== null) {
$xfer += $output->writeFieldBegin('withResourcesAlternateData', TType::BOOL, 6);
$xfer += $output->writeBool($this->withResourcesAlternateData);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_getNoteVersion_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public $notFoundException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\Note',
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
3 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
}
}
public function getName() {
return 'NoteStore_getNoteVersion_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::STRUCT) {
$this->success = new \EDAM\Types\Note();
$xfer += $this->success->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_getNoteVersion_result');
if ($this->success !== null) {
if (!is_object($this->success)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
$xfer += $this->success->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 3);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_getResource_args {
static $_TSPEC;
public $authenticationToken = null;
public $guid = null;
public $withData = null;
public $withRecognition = null;
public $withAttributes = null;
public $withAlternateData = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'guid',
'type' => TType::STRING,
),
3 => array(
'var' => 'withData',
'type' => TType::BOOL,
),
4 => array(
'var' => 'withRecognition',
'type' => TType::BOOL,
),
5 => array(
'var' => 'withAttributes',
'type' => TType::BOOL,
),
6 => array(
'var' => 'withAlternateData',
'type' => TType::BOOL,
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['guid'])) {
$this->guid = $vals['guid'];
}
if (isset($vals['withData'])) {
$this->withData = $vals['withData'];
}
if (isset($vals['withRecognition'])) {
$this->withRecognition = $vals['withRecognition'];
}
if (isset($vals['withAttributes'])) {
$this->withAttributes = $vals['withAttributes'];
}
if (isset($vals['withAlternateData'])) {
$this->withAlternateData = $vals['withAlternateData'];
}
}
}
public function getName() {
return 'NoteStore_getResource_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->guid);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->withData);
} else {
$xfer += $input->skip($ftype);
}
break;
case 4:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->withRecognition);
} else {
$xfer += $input->skip($ftype);
}
break;
case 5:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->withAttributes);
} else {
$xfer += $input->skip($ftype);
}
break;
case 6:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->withAlternateData);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_getResource_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->guid !== null) {
$xfer += $output->writeFieldBegin('guid', TType::STRING, 2);
$xfer += $output->writeString($this->guid);
$xfer += $output->writeFieldEnd();
}
if ($this->withData !== null) {
$xfer += $output->writeFieldBegin('withData', TType::BOOL, 3);
$xfer += $output->writeBool($this->withData);
$xfer += $output->writeFieldEnd();
}
if ($this->withRecognition !== null) {
$xfer += $output->writeFieldBegin('withRecognition', TType::BOOL, 4);
$xfer += $output->writeBool($this->withRecognition);
$xfer += $output->writeFieldEnd();
}
if ($this->withAttributes !== null) {
$xfer += $output->writeFieldBegin('withAttributes', TType::BOOL, 5);
$xfer += $output->writeBool($this->withAttributes);
$xfer += $output->writeFieldEnd();
}
if ($this->withAlternateData !== null) {
$xfer += $output->writeFieldBegin('withAlternateData', TType::BOOL, 6);
$xfer += $output->writeBool($this->withAlternateData);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_getResource_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public $notFoundException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\Resource',
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
3 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
}
}
public function getName() {
return 'NoteStore_getResource_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::STRUCT) {
$this->success = new \EDAM\Types\Resource();
$xfer += $this->success->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_getResource_result');
if ($this->success !== null) {
if (!is_object($this->success)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
$xfer += $this->success->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 3);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_getResourceApplicationData_args {
static $_TSPEC;
public $authenticationToken = null;
public $guid = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'guid',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['guid'])) {
$this->guid = $vals['guid'];
}
}
}
public function getName() {
return 'NoteStore_getResourceApplicationData_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->guid);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_getResourceApplicationData_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->guid !== null) {
$xfer += $output->writeFieldBegin('guid', TType::STRING, 2);
$xfer += $output->writeString($this->guid);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_getResourceApplicationData_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public $notFoundException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\LazyMap',
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
3 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
}
}
public function getName() {
return 'NoteStore_getResourceApplicationData_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::STRUCT) {
$this->success = new \EDAM\Types\LazyMap();
$xfer += $this->success->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_getResourceApplicationData_result');
if ($this->success !== null) {
if (!is_object($this->success)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
$xfer += $this->success->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 3);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_getResourceApplicationDataEntry_args {
static $_TSPEC;
public $authenticationToken = null;
public $guid = null;
public $key = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'guid',
'type' => TType::STRING,
),
3 => array(
'var' => 'key',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['guid'])) {
$this->guid = $vals['guid'];
}
if (isset($vals['key'])) {
$this->key = $vals['key'];
}
}
}
public function getName() {
return 'NoteStore_getResourceApplicationDataEntry_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->guid);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->key);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_getResourceApplicationDataEntry_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->guid !== null) {
$xfer += $output->writeFieldBegin('guid', TType::STRING, 2);
$xfer += $output->writeString($this->guid);
$xfer += $output->writeFieldEnd();
}
if ($this->key !== null) {
$xfer += $output->writeFieldBegin('key', TType::STRING, 3);
$xfer += $output->writeString($this->key);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_getResourceApplicationDataEntry_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public $notFoundException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::STRING,
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
3 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
}
}
public function getName() {
return 'NoteStore_getResourceApplicationDataEntry_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->success);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_getResourceApplicationDataEntry_result');
if ($this->success !== null) {
$xfer += $output->writeFieldBegin('success', TType::STRING, 0);
$xfer += $output->writeString($this->success);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 3);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_setResourceApplicationDataEntry_args {
static $_TSPEC;
public $authenticationToken = null;
public $guid = null;
public $key = null;
public $value = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'guid',
'type' => TType::STRING,
),
3 => array(
'var' => 'key',
'type' => TType::STRING,
),
4 => array(
'var' => 'value',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['guid'])) {
$this->guid = $vals['guid'];
}
if (isset($vals['key'])) {
$this->key = $vals['key'];
}
if (isset($vals['value'])) {
$this->value = $vals['value'];
}
}
}
public function getName() {
return 'NoteStore_setResourceApplicationDataEntry_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->guid);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->key);
} else {
$xfer += $input->skip($ftype);
}
break;
case 4:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->value);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_setResourceApplicationDataEntry_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->guid !== null) {
$xfer += $output->writeFieldBegin('guid', TType::STRING, 2);
$xfer += $output->writeString($this->guid);
$xfer += $output->writeFieldEnd();
}
if ($this->key !== null) {
$xfer += $output->writeFieldBegin('key', TType::STRING, 3);
$xfer += $output->writeString($this->key);
$xfer += $output->writeFieldEnd();
}
if ($this->value !== null) {
$xfer += $output->writeFieldBegin('value', TType::STRING, 4);
$xfer += $output->writeString($this->value);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_setResourceApplicationDataEntry_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public $notFoundException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::I32,
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
3 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
}
}
public function getName() {
return 'NoteStore_setResourceApplicationDataEntry_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->success);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_setResourceApplicationDataEntry_result');
if ($this->success !== null) {
$xfer += $output->writeFieldBegin('success', TType::I32, 0);
$xfer += $output->writeI32($this->success);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 3);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_unsetResourceApplicationDataEntry_args {
static $_TSPEC;
public $authenticationToken = null;
public $guid = null;
public $key = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'guid',
'type' => TType::STRING,
),
3 => array(
'var' => 'key',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['guid'])) {
$this->guid = $vals['guid'];
}
if (isset($vals['key'])) {
$this->key = $vals['key'];
}
}
}
public function getName() {
return 'NoteStore_unsetResourceApplicationDataEntry_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->guid);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->key);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_unsetResourceApplicationDataEntry_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->guid !== null) {
$xfer += $output->writeFieldBegin('guid', TType::STRING, 2);
$xfer += $output->writeString($this->guid);
$xfer += $output->writeFieldEnd();
}
if ($this->key !== null) {
$xfer += $output->writeFieldBegin('key', TType::STRING, 3);
$xfer += $output->writeString($this->key);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_unsetResourceApplicationDataEntry_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public $notFoundException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::I32,
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
3 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
}
}
public function getName() {
return 'NoteStore_unsetResourceApplicationDataEntry_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->success);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_unsetResourceApplicationDataEntry_result');
if ($this->success !== null) {
$xfer += $output->writeFieldBegin('success', TType::I32, 0);
$xfer += $output->writeI32($this->success);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 3);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_updateResource_args {
static $_TSPEC;
public $authenticationToken = null;
public $resource = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'resource',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\Resource',
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['resource'])) {
$this->resource = $vals['resource'];
}
}
}
public function getName() {
return 'NoteStore_updateResource_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->resource = new \EDAM\Types\Resource();
$xfer += $this->resource->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_updateResource_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->resource !== null) {
if (!is_object($this->resource)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('resource', TType::STRUCT, 2);
$xfer += $this->resource->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_updateResource_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public $notFoundException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::I32,
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
3 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
}
}
public function getName() {
return 'NoteStore_updateResource_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->success);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_updateResource_result');
if ($this->success !== null) {
$xfer += $output->writeFieldBegin('success', TType::I32, 0);
$xfer += $output->writeI32($this->success);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 3);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_getResourceData_args {
static $_TSPEC;
public $authenticationToken = null;
public $guid = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'guid',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['guid'])) {
$this->guid = $vals['guid'];
}
}
}
public function getName() {
return 'NoteStore_getResourceData_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->guid);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_getResourceData_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->guid !== null) {
$xfer += $output->writeFieldBegin('guid', TType::STRING, 2);
$xfer += $output->writeString($this->guid);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_getResourceData_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public $notFoundException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::STRING,
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
3 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
}
}
public function getName() {
return 'NoteStore_getResourceData_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->success);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_getResourceData_result');
if ($this->success !== null) {
$xfer += $output->writeFieldBegin('success', TType::STRING, 0);
$xfer += $output->writeString($this->success);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 3);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_getResourceByHash_args {
static $_TSPEC;
public $authenticationToken = null;
public $noteGuid = null;
public $contentHash = null;
public $withData = null;
public $withRecognition = null;
public $withAlternateData = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'noteGuid',
'type' => TType::STRING,
),
3 => array(
'var' => 'contentHash',
'type' => TType::STRING,
),
4 => array(
'var' => 'withData',
'type' => TType::BOOL,
),
5 => array(
'var' => 'withRecognition',
'type' => TType::BOOL,
),
6 => array(
'var' => 'withAlternateData',
'type' => TType::BOOL,
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['noteGuid'])) {
$this->noteGuid = $vals['noteGuid'];
}
if (isset($vals['contentHash'])) {
$this->contentHash = $vals['contentHash'];
}
if (isset($vals['withData'])) {
$this->withData = $vals['withData'];
}
if (isset($vals['withRecognition'])) {
$this->withRecognition = $vals['withRecognition'];
}
if (isset($vals['withAlternateData'])) {
$this->withAlternateData = $vals['withAlternateData'];
}
}
}
public function getName() {
return 'NoteStore_getResourceByHash_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->noteGuid);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->contentHash);
} else {
$xfer += $input->skip($ftype);
}
break;
case 4:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->withData);
} else {
$xfer += $input->skip($ftype);
}
break;
case 5:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->withRecognition);
} else {
$xfer += $input->skip($ftype);
}
break;
case 6:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->withAlternateData);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_getResourceByHash_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->noteGuid !== null) {
$xfer += $output->writeFieldBegin('noteGuid', TType::STRING, 2);
$xfer += $output->writeString($this->noteGuid);
$xfer += $output->writeFieldEnd();
}
if ($this->contentHash !== null) {
$xfer += $output->writeFieldBegin('contentHash', TType::STRING, 3);
$xfer += $output->writeString($this->contentHash);
$xfer += $output->writeFieldEnd();
}
if ($this->withData !== null) {
$xfer += $output->writeFieldBegin('withData', TType::BOOL, 4);
$xfer += $output->writeBool($this->withData);
$xfer += $output->writeFieldEnd();
}
if ($this->withRecognition !== null) {
$xfer += $output->writeFieldBegin('withRecognition', TType::BOOL, 5);
$xfer += $output->writeBool($this->withRecognition);
$xfer += $output->writeFieldEnd();
}
if ($this->withAlternateData !== null) {
$xfer += $output->writeFieldBegin('withAlternateData', TType::BOOL, 6);
$xfer += $output->writeBool($this->withAlternateData);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_getResourceByHash_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public $notFoundException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\Resource',
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
3 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
}
}
public function getName() {
return 'NoteStore_getResourceByHash_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::STRUCT) {
$this->success = new \EDAM\Types\Resource();
$xfer += $this->success->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_getResourceByHash_result');
if ($this->success !== null) {
if (!is_object($this->success)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
$xfer += $this->success->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 3);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_getResourceRecognition_args {
static $_TSPEC;
public $authenticationToken = null;
public $guid = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'guid',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['guid'])) {
$this->guid = $vals['guid'];
}
}
}
public function getName() {
return 'NoteStore_getResourceRecognition_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->guid);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_getResourceRecognition_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->guid !== null) {
$xfer += $output->writeFieldBegin('guid', TType::STRING, 2);
$xfer += $output->writeString($this->guid);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_getResourceRecognition_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public $notFoundException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::STRING,
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
3 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
}
}
public function getName() {
return 'NoteStore_getResourceRecognition_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->success);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_getResourceRecognition_result');
if ($this->success !== null) {
$xfer += $output->writeFieldBegin('success', TType::STRING, 0);
$xfer += $output->writeString($this->success);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 3);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_getResourceAlternateData_args {
static $_TSPEC;
public $authenticationToken = null;
public $guid = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'guid',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['guid'])) {
$this->guid = $vals['guid'];
}
}
}
public function getName() {
return 'NoteStore_getResourceAlternateData_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->guid);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_getResourceAlternateData_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->guid !== null) {
$xfer += $output->writeFieldBegin('guid', TType::STRING, 2);
$xfer += $output->writeString($this->guid);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_getResourceAlternateData_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public $notFoundException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::STRING,
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
3 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
}
}
public function getName() {
return 'NoteStore_getResourceAlternateData_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->success);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_getResourceAlternateData_result');
if ($this->success !== null) {
$xfer += $output->writeFieldBegin('success', TType::STRING, 0);
$xfer += $output->writeString($this->success);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 3);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_getResourceAttributes_args {
static $_TSPEC;
public $authenticationToken = null;
public $guid = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'guid',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['guid'])) {
$this->guid = $vals['guid'];
}
}
}
public function getName() {
return 'NoteStore_getResourceAttributes_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->guid);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_getResourceAttributes_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->guid !== null) {
$xfer += $output->writeFieldBegin('guid', TType::STRING, 2);
$xfer += $output->writeString($this->guid);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_getResourceAttributes_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public $notFoundException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\ResourceAttributes',
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
3 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
}
}
public function getName() {
return 'NoteStore_getResourceAttributes_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::STRUCT) {
$this->success = new \EDAM\Types\ResourceAttributes();
$xfer += $this->success->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_getResourceAttributes_result');
if ($this->success !== null) {
if (!is_object($this->success)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
$xfer += $this->success->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 3);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_getPublicNotebook_args {
static $_TSPEC;
public $userId = null;
public $publicUri = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'userId',
'type' => TType::I32,
),
2 => array(
'var' => 'publicUri',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['userId'])) {
$this->userId = $vals['userId'];
}
if (isset($vals['publicUri'])) {
$this->publicUri = $vals['publicUri'];
}
}
}
public function getName() {
return 'NoteStore_getPublicNotebook_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->userId);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->publicUri);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_getPublicNotebook_args');
if ($this->userId !== null) {
$xfer += $output->writeFieldBegin('userId', TType::I32, 1);
$xfer += $output->writeI32($this->userId);
$xfer += $output->writeFieldEnd();
}
if ($this->publicUri !== null) {
$xfer += $output->writeFieldBegin('publicUri', TType::STRING, 2);
$xfer += $output->writeString($this->publicUri);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_getPublicNotebook_result {
static $_TSPEC;
public $success = null;
public $systemException = null;
public $notFoundException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\Notebook',
),
1 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
2 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
}
}
public function getName() {
return 'NoteStore_getPublicNotebook_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::STRUCT) {
$this->success = new \EDAM\Types\Notebook();
$xfer += $this->success->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_getPublicNotebook_result');
if ($this->success !== null) {
if (!is_object($this->success)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
$xfer += $this->success->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 1);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 2);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_createSharedNotebook_args {
static $_TSPEC;
public $authenticationToken = null;
public $sharedNotebook = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'sharedNotebook',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\SharedNotebook',
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['sharedNotebook'])) {
$this->sharedNotebook = $vals['sharedNotebook'];
}
}
}
public function getName() {
return 'NoteStore_createSharedNotebook_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->sharedNotebook = new \EDAM\Types\SharedNotebook();
$xfer += $this->sharedNotebook->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_createSharedNotebook_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->sharedNotebook !== null) {
if (!is_object($this->sharedNotebook)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('sharedNotebook', TType::STRUCT, 2);
$xfer += $this->sharedNotebook->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_createSharedNotebook_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $notFoundException = null;
public $systemException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\SharedNotebook',
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
3 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
}
}
public function getName() {
return 'NoteStore_createSharedNotebook_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::STRUCT) {
$this->success = new \EDAM\Types\SharedNotebook();
$xfer += $this->success->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_createSharedNotebook_result');
if ($this->success !== null) {
if (!is_object($this->success)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
$xfer += $this->success->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 2);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 3);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_updateSharedNotebook_args {
static $_TSPEC;
public $authenticationToken = null;
public $sharedNotebook = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'sharedNotebook',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\SharedNotebook',
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['sharedNotebook'])) {
$this->sharedNotebook = $vals['sharedNotebook'];
}
}
}
public function getName() {
return 'NoteStore_updateSharedNotebook_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->sharedNotebook = new \EDAM\Types\SharedNotebook();
$xfer += $this->sharedNotebook->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_updateSharedNotebook_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->sharedNotebook !== null) {
if (!is_object($this->sharedNotebook)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('sharedNotebook', TType::STRUCT, 2);
$xfer += $this->sharedNotebook->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_updateSharedNotebook_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $notFoundException = null;
public $systemException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::I32,
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
3 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
}
}
public function getName() {
return 'NoteStore_updateSharedNotebook_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->success);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_updateSharedNotebook_result');
if ($this->success !== null) {
$xfer += $output->writeFieldBegin('success', TType::I32, 0);
$xfer += $output->writeI32($this->success);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 2);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 3);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_setSharedNotebookRecipientSettings_args {
static $_TSPEC;
public $authenticationToken = null;
public $sharedNotebookId = null;
public $recipientSettings = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'sharedNotebookId',
'type' => TType::I64,
),
3 => array(
'var' => 'recipientSettings',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\SharedNotebookRecipientSettings',
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['sharedNotebookId'])) {
$this->sharedNotebookId = $vals['sharedNotebookId'];
}
if (isset($vals['recipientSettings'])) {
$this->recipientSettings = $vals['recipientSettings'];
}
}
}
public function getName() {
return 'NoteStore_setSharedNotebookRecipientSettings_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::I64) {
$xfer += $input->readI64($this->sharedNotebookId);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->recipientSettings = new \EDAM\Types\SharedNotebookRecipientSettings();
$xfer += $this->recipientSettings->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_setSharedNotebookRecipientSettings_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->sharedNotebookId !== null) {
$xfer += $output->writeFieldBegin('sharedNotebookId', TType::I64, 2);
$xfer += $output->writeI64($this->sharedNotebookId);
$xfer += $output->writeFieldEnd();
}
if ($this->recipientSettings !== null) {
if (!is_object($this->recipientSettings)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('recipientSettings', TType::STRUCT, 3);
$xfer += $this->recipientSettings->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_setSharedNotebookRecipientSettings_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $notFoundException = null;
public $systemException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::I32,
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
3 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
}
}
public function getName() {
return 'NoteStore_setSharedNotebookRecipientSettings_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->success);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_setSharedNotebookRecipientSettings_result');
if ($this->success !== null) {
$xfer += $output->writeFieldBegin('success', TType::I32, 0);
$xfer += $output->writeI32($this->success);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 2);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 3);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_sendMessageToSharedNotebookMembers_args {
static $_TSPEC;
public $authenticationToken = null;
public $notebookGuid = null;
public $messageText = null;
public $recipients = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'notebookGuid',
'type' => TType::STRING,
),
3 => array(
'var' => 'messageText',
'type' => TType::STRING,
),
4 => array(
'var' => 'recipients',
'type' => TType::LST,
'etype' => TType::STRING,
'elem' => array(
'type' => TType::STRING,
),
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['notebookGuid'])) {
$this->notebookGuid = $vals['notebookGuid'];
}
if (isset($vals['messageText'])) {
$this->messageText = $vals['messageText'];
}
if (isset($vals['recipients'])) {
$this->recipients = $vals['recipients'];
}
}
}
public function getName() {
return 'NoteStore_sendMessageToSharedNotebookMembers_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->notebookGuid);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->messageText);
} else {
$xfer += $input->skip($ftype);
}
break;
case 4:
if ($ftype == TType::LST) {
$this->recipients = array();
$_size242 = 0;
$_etype245 = 0;
$xfer += $input->readListBegin($_etype245, $_size242);
for ($_i246 = 0; $_i246 < $_size242; ++$_i246)
{
$elem247 = null;
$xfer += $input->readString($elem247);
$this->recipients []= $elem247;
}
$xfer += $input->readListEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_sendMessageToSharedNotebookMembers_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->notebookGuid !== null) {
$xfer += $output->writeFieldBegin('notebookGuid', TType::STRING, 2);
$xfer += $output->writeString($this->notebookGuid);
$xfer += $output->writeFieldEnd();
}
if ($this->messageText !== null) {
$xfer += $output->writeFieldBegin('messageText', TType::STRING, 3);
$xfer += $output->writeString($this->messageText);
$xfer += $output->writeFieldEnd();
}
if ($this->recipients !== null) {
if (!is_array($this->recipients)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('recipients', TType::LST, 4);
{
$output->writeListBegin(TType::STRING, count($this->recipients));
{
foreach ($this->recipients as $iter248)
{
$xfer += $output->writeString($iter248);
}
}
$output->writeListEnd();
}
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_sendMessageToSharedNotebookMembers_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $notFoundException = null;
public $systemException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::I32,
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
3 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
}
}
public function getName() {
return 'NoteStore_sendMessageToSharedNotebookMembers_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->success);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_sendMessageToSharedNotebookMembers_result');
if ($this->success !== null) {
$xfer += $output->writeFieldBegin('success', TType::I32, 0);
$xfer += $output->writeI32($this->success);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 2);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 3);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_listSharedNotebooks_args {
static $_TSPEC;
public $authenticationToken = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
}
}
public function getName() {
return 'NoteStore_listSharedNotebooks_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_listSharedNotebooks_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_listSharedNotebooks_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $notFoundException = null;
public $systemException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::LST,
'etype' => TType::STRUCT,
'elem' => array(
'type' => TType::STRUCT,
'class' => '\EDAM\Types\SharedNotebook',
),
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
3 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
}
}
public function getName() {
return 'NoteStore_listSharedNotebooks_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::LST) {
$this->success = array();
$_size249 = 0;
$_etype252 = 0;
$xfer += $input->readListBegin($_etype252, $_size249);
for ($_i253 = 0; $_i253 < $_size249; ++$_i253)
{
$elem254 = null;
$elem254 = new \EDAM\Types\SharedNotebook();
$xfer += $elem254->read($input);
$this->success []= $elem254;
}
$xfer += $input->readListEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_listSharedNotebooks_result');
if ($this->success !== null) {
if (!is_array($this->success)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('success', TType::LST, 0);
{
$output->writeListBegin(TType::STRUCT, count($this->success));
{
foreach ($this->success as $iter255)
{
$xfer += $iter255->write($output);
}
}
$output->writeListEnd();
}
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 2);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 3);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_expungeSharedNotebooks_args {
static $_TSPEC;
public $authenticationToken = null;
public $sharedNotebookIds = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'sharedNotebookIds',
'type' => TType::LST,
'etype' => TType::I64,
'elem' => array(
'type' => TType::I64,
),
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['sharedNotebookIds'])) {
$this->sharedNotebookIds = $vals['sharedNotebookIds'];
}
}
}
public function getName() {
return 'NoteStore_expungeSharedNotebooks_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::LST) {
$this->sharedNotebookIds = array();
$_size256 = 0;
$_etype259 = 0;
$xfer += $input->readListBegin($_etype259, $_size256);
for ($_i260 = 0; $_i260 < $_size256; ++$_i260)
{
$elem261 = null;
$xfer += $input->readI64($elem261);
$this->sharedNotebookIds []= $elem261;
}
$xfer += $input->readListEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_expungeSharedNotebooks_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->sharedNotebookIds !== null) {
if (!is_array($this->sharedNotebookIds)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('sharedNotebookIds', TType::LST, 2);
{
$output->writeListBegin(TType::I64, count($this->sharedNotebookIds));
{
foreach ($this->sharedNotebookIds as $iter262)
{
$xfer += $output->writeI64($iter262);
}
}
$output->writeListEnd();
}
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_expungeSharedNotebooks_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $notFoundException = null;
public $systemException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::I32,
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
3 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
}
}
public function getName() {
return 'NoteStore_expungeSharedNotebooks_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->success);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_expungeSharedNotebooks_result');
if ($this->success !== null) {
$xfer += $output->writeFieldBegin('success', TType::I32, 0);
$xfer += $output->writeI32($this->success);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 2);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 3);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_createLinkedNotebook_args {
static $_TSPEC;
public $authenticationToken = null;
public $linkedNotebook = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'linkedNotebook',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\LinkedNotebook',
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['linkedNotebook'])) {
$this->linkedNotebook = $vals['linkedNotebook'];
}
}
}
public function getName() {
return 'NoteStore_createLinkedNotebook_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->linkedNotebook = new \EDAM\Types\LinkedNotebook();
$xfer += $this->linkedNotebook->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_createLinkedNotebook_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->linkedNotebook !== null) {
if (!is_object($this->linkedNotebook)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('linkedNotebook', TType::STRUCT, 2);
$xfer += $this->linkedNotebook->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_createLinkedNotebook_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $notFoundException = null;
public $systemException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\LinkedNotebook',
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
3 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
}
}
public function getName() {
return 'NoteStore_createLinkedNotebook_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::STRUCT) {
$this->success = new \EDAM\Types\LinkedNotebook();
$xfer += $this->success->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_createLinkedNotebook_result');
if ($this->success !== null) {
if (!is_object($this->success)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
$xfer += $this->success->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 2);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 3);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_updateLinkedNotebook_args {
static $_TSPEC;
public $authenticationToken = null;
public $linkedNotebook = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'linkedNotebook',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\LinkedNotebook',
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['linkedNotebook'])) {
$this->linkedNotebook = $vals['linkedNotebook'];
}
}
}
public function getName() {
return 'NoteStore_updateLinkedNotebook_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->linkedNotebook = new \EDAM\Types\LinkedNotebook();
$xfer += $this->linkedNotebook->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_updateLinkedNotebook_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->linkedNotebook !== null) {
if (!is_object($this->linkedNotebook)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('linkedNotebook', TType::STRUCT, 2);
$xfer += $this->linkedNotebook->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_updateLinkedNotebook_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $notFoundException = null;
public $systemException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::I32,
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
3 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
}
}
public function getName() {
return 'NoteStore_updateLinkedNotebook_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->success);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_updateLinkedNotebook_result');
if ($this->success !== null) {
$xfer += $output->writeFieldBegin('success', TType::I32, 0);
$xfer += $output->writeI32($this->success);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 2);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 3);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_listLinkedNotebooks_args {
static $_TSPEC;
public $authenticationToken = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
}
}
public function getName() {
return 'NoteStore_listLinkedNotebooks_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_listLinkedNotebooks_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_listLinkedNotebooks_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $notFoundException = null;
public $systemException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::LST,
'etype' => TType::STRUCT,
'elem' => array(
'type' => TType::STRUCT,
'class' => '\EDAM\Types\LinkedNotebook',
),
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
3 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
}
}
public function getName() {
return 'NoteStore_listLinkedNotebooks_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::LST) {
$this->success = array();
$_size263 = 0;
$_etype266 = 0;
$xfer += $input->readListBegin($_etype266, $_size263);
for ($_i267 = 0; $_i267 < $_size263; ++$_i267)
{
$elem268 = null;
$elem268 = new \EDAM\Types\LinkedNotebook();
$xfer += $elem268->read($input);
$this->success []= $elem268;
}
$xfer += $input->readListEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_listLinkedNotebooks_result');
if ($this->success !== null) {
if (!is_array($this->success)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('success', TType::LST, 0);
{
$output->writeListBegin(TType::STRUCT, count($this->success));
{
foreach ($this->success as $iter269)
{
$xfer += $iter269->write($output);
}
}
$output->writeListEnd();
}
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 2);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 3);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_expungeLinkedNotebook_args {
static $_TSPEC;
public $authenticationToken = null;
public $guid = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'guid',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['guid'])) {
$this->guid = $vals['guid'];
}
}
}
public function getName() {
return 'NoteStore_expungeLinkedNotebook_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->guid);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_expungeLinkedNotebook_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->guid !== null) {
$xfer += $output->writeFieldBegin('guid', TType::STRING, 2);
$xfer += $output->writeString($this->guid);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_expungeLinkedNotebook_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $notFoundException = null;
public $systemException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::I32,
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
3 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
}
}
public function getName() {
return 'NoteStore_expungeLinkedNotebook_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->success);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_expungeLinkedNotebook_result');
if ($this->success !== null) {
$xfer += $output->writeFieldBegin('success', TType::I32, 0);
$xfer += $output->writeI32($this->success);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 2);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 3);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_authenticateToSharedNotebook_args {
static $_TSPEC;
public $shareKey = null;
public $authenticationToken = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'shareKey',
'type' => TType::STRING,
),
2 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['shareKey'])) {
$this->shareKey = $vals['shareKey'];
}
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
}
}
public function getName() {
return 'NoteStore_authenticateToSharedNotebook_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->shareKey);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_authenticateToSharedNotebook_args');
if ($this->shareKey !== null) {
$xfer += $output->writeFieldBegin('shareKey', TType::STRING, 1);
$xfer += $output->writeString($this->shareKey);
$xfer += $output->writeFieldEnd();
}
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 2);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_authenticateToSharedNotebook_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $notFoundException = null;
public $systemException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::STRUCT,
'class' => '\EDAM\UserStore\AuthenticationResult',
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
3 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
}
}
public function getName() {
return 'NoteStore_authenticateToSharedNotebook_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::STRUCT) {
$this->success = new \EDAM\UserStore\AuthenticationResult();
$xfer += $this->success->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_authenticateToSharedNotebook_result');
if ($this->success !== null) {
if (!is_object($this->success)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
$xfer += $this->success->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 2);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 3);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_getSharedNotebookByAuth_args {
static $_TSPEC;
public $authenticationToken = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
}
}
public function getName() {
return 'NoteStore_getSharedNotebookByAuth_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_getSharedNotebookByAuth_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_getSharedNotebookByAuth_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $notFoundException = null;
public $systemException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\SharedNotebook',
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
3 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
}
}
public function getName() {
return 'NoteStore_getSharedNotebookByAuth_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::STRUCT) {
$this->success = new \EDAM\Types\SharedNotebook();
$xfer += $this->success->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_getSharedNotebookByAuth_result');
if ($this->success !== null) {
if (!is_object($this->success)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
$xfer += $this->success->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 2);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 3);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_emailNote_args {
static $_TSPEC;
public $authenticationToken = null;
public $parameters = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'parameters',
'type' => TType::STRUCT,
'class' => '\EDAM\NoteStore\NoteEmailParameters',
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['parameters'])) {
$this->parameters = $vals['parameters'];
}
}
}
public function getName() {
return 'NoteStore_emailNote_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->parameters = new \EDAM\NoteStore\NoteEmailParameters();
$xfer += $this->parameters->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_emailNote_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->parameters !== null) {
if (!is_object($this->parameters)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('parameters', TType::STRUCT, 2);
$xfer += $this->parameters->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_emailNote_result {
static $_TSPEC;
public $userException = null;
public $notFoundException = null;
public $systemException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
3 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
);
}
if (is_array($vals)) {
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
}
}
public function getName() {
return 'NoteStore_emailNote_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_emailNote_result');
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 2);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 3);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_shareNote_args {
static $_TSPEC;
public $authenticationToken = null;
public $guid = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'guid',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['guid'])) {
$this->guid = $vals['guid'];
}
}
}
public function getName() {
return 'NoteStore_shareNote_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->guid);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_shareNote_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->guid !== null) {
$xfer += $output->writeFieldBegin('guid', TType::STRING, 2);
$xfer += $output->writeString($this->guid);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_shareNote_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $notFoundException = null;
public $systemException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::STRING,
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
3 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
}
}
public function getName() {
return 'NoteStore_shareNote_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->success);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_shareNote_result');
if ($this->success !== null) {
$xfer += $output->writeFieldBegin('success', TType::STRING, 0);
$xfer += $output->writeString($this->success);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 2);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 3);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_stopSharingNote_args {
static $_TSPEC;
public $authenticationToken = null;
public $guid = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'guid',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['guid'])) {
$this->guid = $vals['guid'];
}
}
}
public function getName() {
return 'NoteStore_stopSharingNote_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->guid);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_stopSharingNote_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->guid !== null) {
$xfer += $output->writeFieldBegin('guid', TType::STRING, 2);
$xfer += $output->writeString($this->guid);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_stopSharingNote_result {
static $_TSPEC;
public $userException = null;
public $notFoundException = null;
public $systemException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
3 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
);
}
if (is_array($vals)) {
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
}
}
public function getName() {
return 'NoteStore_stopSharingNote_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_stopSharingNote_result');
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 2);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 3);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_authenticateToSharedNote_args {
static $_TSPEC;
public $guid = null;
public $noteKey = null;
public $authenticationToken = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'guid',
'type' => TType::STRING,
),
2 => array(
'var' => 'noteKey',
'type' => TType::STRING,
),
3 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['guid'])) {
$this->guid = $vals['guid'];
}
if (isset($vals['noteKey'])) {
$this->noteKey = $vals['noteKey'];
}
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
}
}
public function getName() {
return 'NoteStore_authenticateToSharedNote_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->guid);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->noteKey);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_authenticateToSharedNote_args');
if ($this->guid !== null) {
$xfer += $output->writeFieldBegin('guid', TType::STRING, 1);
$xfer += $output->writeString($this->guid);
$xfer += $output->writeFieldEnd();
}
if ($this->noteKey !== null) {
$xfer += $output->writeFieldBegin('noteKey', TType::STRING, 2);
$xfer += $output->writeString($this->noteKey);
$xfer += $output->writeFieldEnd();
}
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 3);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_authenticateToSharedNote_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $notFoundException = null;
public $systemException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::STRUCT,
'class' => '\EDAM\UserStore\AuthenticationResult',
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
3 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
}
}
public function getName() {
return 'NoteStore_authenticateToSharedNote_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::STRUCT) {
$this->success = new \EDAM\UserStore\AuthenticationResult();
$xfer += $this->success->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_authenticateToSharedNote_result');
if ($this->success !== null) {
if (!is_object($this->success)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
$xfer += $this->success->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 2);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 3);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_findRelated_args {
static $_TSPEC;
public $authenticationToken = null;
public $query = null;
public $resultSpec = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'query',
'type' => TType::STRUCT,
'class' => '\EDAM\NoteStore\RelatedQuery',
),
3 => array(
'var' => 'resultSpec',
'type' => TType::STRUCT,
'class' => '\EDAM\NoteStore\RelatedResultSpec',
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['query'])) {
$this->query = $vals['query'];
}
if (isset($vals['resultSpec'])) {
$this->resultSpec = $vals['resultSpec'];
}
}
}
public function getName() {
return 'NoteStore_findRelated_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->query = new \EDAM\NoteStore\RelatedQuery();
$xfer += $this->query->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->resultSpec = new \EDAM\NoteStore\RelatedResultSpec();
$xfer += $this->resultSpec->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_findRelated_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->query !== null) {
if (!is_object($this->query)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('query', TType::STRUCT, 2);
$xfer += $this->query->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->resultSpec !== null) {
if (!is_object($this->resultSpec)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('resultSpec', TType::STRUCT, 3);
$xfer += $this->resultSpec->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteStore_findRelated_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public $notFoundException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::STRUCT,
'class' => '\EDAM\NoteStore\RelatedResult',
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
3 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
}
}
public function getName() {
return 'NoteStore_findRelated_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::STRUCT) {
$this->success = new \EDAM\NoteStore\RelatedResult();
$xfer += $this->success->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteStore_findRelated_result');
if ($this->success !== null) {
if (!is_object($this->success)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
$xfer += $this->success->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 3);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
================================================
FILE: src/EDAM/NoteStore/Types.php
================================================
array(
'var' => 'currentTime',
'type' => TType::I64,
),
2 => array(
'var' => 'fullSyncBefore',
'type' => TType::I64,
),
3 => array(
'var' => 'updateCount',
'type' => TType::I32,
),
4 => array(
'var' => 'uploaded',
'type' => TType::I64,
),
);
}
if (is_array($vals)) {
if (isset($vals['currentTime'])) {
$this->currentTime = $vals['currentTime'];
}
if (isset($vals['fullSyncBefore'])) {
$this->fullSyncBefore = $vals['fullSyncBefore'];
}
if (isset($vals['updateCount'])) {
$this->updateCount = $vals['updateCount'];
}
if (isset($vals['uploaded'])) {
$this->uploaded = $vals['uploaded'];
}
}
}
public function getName() {
return 'SyncState';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::I64) {
$xfer += $input->readI64($this->currentTime);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::I64) {
$xfer += $input->readI64($this->fullSyncBefore);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->updateCount);
} else {
$xfer += $input->skip($ftype);
}
break;
case 4:
if ($ftype == TType::I64) {
$xfer += $input->readI64($this->uploaded);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('SyncState');
if ($this->currentTime !== null) {
$xfer += $output->writeFieldBegin('currentTime', TType::I64, 1);
$xfer += $output->writeI64($this->currentTime);
$xfer += $output->writeFieldEnd();
}
if ($this->fullSyncBefore !== null) {
$xfer += $output->writeFieldBegin('fullSyncBefore', TType::I64, 2);
$xfer += $output->writeI64($this->fullSyncBefore);
$xfer += $output->writeFieldEnd();
}
if ($this->updateCount !== null) {
$xfer += $output->writeFieldBegin('updateCount', TType::I32, 3);
$xfer += $output->writeI32($this->updateCount);
$xfer += $output->writeFieldEnd();
}
if ($this->uploaded !== null) {
$xfer += $output->writeFieldBegin('uploaded', TType::I64, 4);
$xfer += $output->writeI64($this->uploaded);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class SyncChunk {
static $_TSPEC;
public $currentTime = null;
public $chunkHighUSN = null;
public $updateCount = null;
public $notes = null;
public $notebooks = null;
public $tags = null;
public $searches = null;
public $resources = null;
public $expungedNotes = null;
public $expungedNotebooks = null;
public $expungedTags = null;
public $expungedSearches = null;
public $linkedNotebooks = null;
public $expungedLinkedNotebooks = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'currentTime',
'type' => TType::I64,
),
2 => array(
'var' => 'chunkHighUSN',
'type' => TType::I32,
),
3 => array(
'var' => 'updateCount',
'type' => TType::I32,
),
4 => array(
'var' => 'notes',
'type' => TType::LST,
'etype' => TType::STRUCT,
'elem' => array(
'type' => TType::STRUCT,
'class' => '\EDAM\Types\Note',
),
),
5 => array(
'var' => 'notebooks',
'type' => TType::LST,
'etype' => TType::STRUCT,
'elem' => array(
'type' => TType::STRUCT,
'class' => '\EDAM\Types\Notebook',
),
),
6 => array(
'var' => 'tags',
'type' => TType::LST,
'etype' => TType::STRUCT,
'elem' => array(
'type' => TType::STRUCT,
'class' => '\EDAM\Types\Tag',
),
),
7 => array(
'var' => 'searches',
'type' => TType::LST,
'etype' => TType::STRUCT,
'elem' => array(
'type' => TType::STRUCT,
'class' => '\EDAM\Types\SavedSearch',
),
),
8 => array(
'var' => 'resources',
'type' => TType::LST,
'etype' => TType::STRUCT,
'elem' => array(
'type' => TType::STRUCT,
'class' => '\EDAM\Types\Resource',
),
),
9 => array(
'var' => 'expungedNotes',
'type' => TType::LST,
'etype' => TType::STRING,
'elem' => array(
'type' => TType::STRING,
),
),
10 => array(
'var' => 'expungedNotebooks',
'type' => TType::LST,
'etype' => TType::STRING,
'elem' => array(
'type' => TType::STRING,
),
),
11 => array(
'var' => 'expungedTags',
'type' => TType::LST,
'etype' => TType::STRING,
'elem' => array(
'type' => TType::STRING,
),
),
12 => array(
'var' => 'expungedSearches',
'type' => TType::LST,
'etype' => TType::STRING,
'elem' => array(
'type' => TType::STRING,
),
),
13 => array(
'var' => 'linkedNotebooks',
'type' => TType::LST,
'etype' => TType::STRUCT,
'elem' => array(
'type' => TType::STRUCT,
'class' => '\EDAM\Types\LinkedNotebook',
),
),
14 => array(
'var' => 'expungedLinkedNotebooks',
'type' => TType::LST,
'etype' => TType::STRING,
'elem' => array(
'type' => TType::STRING,
),
),
);
}
if (is_array($vals)) {
if (isset($vals['currentTime'])) {
$this->currentTime = $vals['currentTime'];
}
if (isset($vals['chunkHighUSN'])) {
$this->chunkHighUSN = $vals['chunkHighUSN'];
}
if (isset($vals['updateCount'])) {
$this->updateCount = $vals['updateCount'];
}
if (isset($vals['notes'])) {
$this->notes = $vals['notes'];
}
if (isset($vals['notebooks'])) {
$this->notebooks = $vals['notebooks'];
}
if (isset($vals['tags'])) {
$this->tags = $vals['tags'];
}
if (isset($vals['searches'])) {
$this->searches = $vals['searches'];
}
if (isset($vals['resources'])) {
$this->resources = $vals['resources'];
}
if (isset($vals['expungedNotes'])) {
$this->expungedNotes = $vals['expungedNotes'];
}
if (isset($vals['expungedNotebooks'])) {
$this->expungedNotebooks = $vals['expungedNotebooks'];
}
if (isset($vals['expungedTags'])) {
$this->expungedTags = $vals['expungedTags'];
}
if (isset($vals['expungedSearches'])) {
$this->expungedSearches = $vals['expungedSearches'];
}
if (isset($vals['linkedNotebooks'])) {
$this->linkedNotebooks = $vals['linkedNotebooks'];
}
if (isset($vals['expungedLinkedNotebooks'])) {
$this->expungedLinkedNotebooks = $vals['expungedLinkedNotebooks'];
}
}
}
public function getName() {
return 'SyncChunk';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::I64) {
$xfer += $input->readI64($this->currentTime);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->chunkHighUSN);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->updateCount);
} else {
$xfer += $input->skip($ftype);
}
break;
case 4:
if ($ftype == TType::LST) {
$this->notes = array();
$_size0 = 0;
$_etype3 = 0;
$xfer += $input->readListBegin($_etype3, $_size0);
for ($_i4 = 0; $_i4 < $_size0; ++$_i4)
{
$elem5 = null;
$elem5 = new \EDAM\Types\Note();
$xfer += $elem5->read($input);
$this->notes []= $elem5;
}
$xfer += $input->readListEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
case 5:
if ($ftype == TType::LST) {
$this->notebooks = array();
$_size6 = 0;
$_etype9 = 0;
$xfer += $input->readListBegin($_etype9, $_size6);
for ($_i10 = 0; $_i10 < $_size6; ++$_i10)
{
$elem11 = null;
$elem11 = new \EDAM\Types\Notebook();
$xfer += $elem11->read($input);
$this->notebooks []= $elem11;
}
$xfer += $input->readListEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
case 6:
if ($ftype == TType::LST) {
$this->tags = array();
$_size12 = 0;
$_etype15 = 0;
$xfer += $input->readListBegin($_etype15, $_size12);
for ($_i16 = 0; $_i16 < $_size12; ++$_i16)
{
$elem17 = null;
$elem17 = new \EDAM\Types\Tag();
$xfer += $elem17->read($input);
$this->tags []= $elem17;
}
$xfer += $input->readListEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
case 7:
if ($ftype == TType::LST) {
$this->searches = array();
$_size18 = 0;
$_etype21 = 0;
$xfer += $input->readListBegin($_etype21, $_size18);
for ($_i22 = 0; $_i22 < $_size18; ++$_i22)
{
$elem23 = null;
$elem23 = new \EDAM\Types\SavedSearch();
$xfer += $elem23->read($input);
$this->searches []= $elem23;
}
$xfer += $input->readListEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
case 8:
if ($ftype == TType::LST) {
$this->resources = array();
$_size24 = 0;
$_etype27 = 0;
$xfer += $input->readListBegin($_etype27, $_size24);
for ($_i28 = 0; $_i28 < $_size24; ++$_i28)
{
$elem29 = null;
$elem29 = new \EDAM\Types\Resource();
$xfer += $elem29->read($input);
$this->resources []= $elem29;
}
$xfer += $input->readListEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
case 9:
if ($ftype == TType::LST) {
$this->expungedNotes = array();
$_size30 = 0;
$_etype33 = 0;
$xfer += $input->readListBegin($_etype33, $_size30);
for ($_i34 = 0; $_i34 < $_size30; ++$_i34)
{
$elem35 = null;
$xfer += $input->readString($elem35);
$this->expungedNotes []= $elem35;
}
$xfer += $input->readListEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
case 10:
if ($ftype == TType::LST) {
$this->expungedNotebooks = array();
$_size36 = 0;
$_etype39 = 0;
$xfer += $input->readListBegin($_etype39, $_size36);
for ($_i40 = 0; $_i40 < $_size36; ++$_i40)
{
$elem41 = null;
$xfer += $input->readString($elem41);
$this->expungedNotebooks []= $elem41;
}
$xfer += $input->readListEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
case 11:
if ($ftype == TType::LST) {
$this->expungedTags = array();
$_size42 = 0;
$_etype45 = 0;
$xfer += $input->readListBegin($_etype45, $_size42);
for ($_i46 = 0; $_i46 < $_size42; ++$_i46)
{
$elem47 = null;
$xfer += $input->readString($elem47);
$this->expungedTags []= $elem47;
}
$xfer += $input->readListEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
case 12:
if ($ftype == TType::LST) {
$this->expungedSearches = array();
$_size48 = 0;
$_etype51 = 0;
$xfer += $input->readListBegin($_etype51, $_size48);
for ($_i52 = 0; $_i52 < $_size48; ++$_i52)
{
$elem53 = null;
$xfer += $input->readString($elem53);
$this->expungedSearches []= $elem53;
}
$xfer += $input->readListEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
case 13:
if ($ftype == TType::LST) {
$this->linkedNotebooks = array();
$_size54 = 0;
$_etype57 = 0;
$xfer += $input->readListBegin($_etype57, $_size54);
for ($_i58 = 0; $_i58 < $_size54; ++$_i58)
{
$elem59 = null;
$elem59 = new \EDAM\Types\LinkedNotebook();
$xfer += $elem59->read($input);
$this->linkedNotebooks []= $elem59;
}
$xfer += $input->readListEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
case 14:
if ($ftype == TType::LST) {
$this->expungedLinkedNotebooks = array();
$_size60 = 0;
$_etype63 = 0;
$xfer += $input->readListBegin($_etype63, $_size60);
for ($_i64 = 0; $_i64 < $_size60; ++$_i64)
{
$elem65 = null;
$xfer += $input->readString($elem65);
$this->expungedLinkedNotebooks []= $elem65;
}
$xfer += $input->readListEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('SyncChunk');
if ($this->currentTime !== null) {
$xfer += $output->writeFieldBegin('currentTime', TType::I64, 1);
$xfer += $output->writeI64($this->currentTime);
$xfer += $output->writeFieldEnd();
}
if ($this->chunkHighUSN !== null) {
$xfer += $output->writeFieldBegin('chunkHighUSN', TType::I32, 2);
$xfer += $output->writeI32($this->chunkHighUSN);
$xfer += $output->writeFieldEnd();
}
if ($this->updateCount !== null) {
$xfer += $output->writeFieldBegin('updateCount', TType::I32, 3);
$xfer += $output->writeI32($this->updateCount);
$xfer += $output->writeFieldEnd();
}
if ($this->notes !== null) {
if (!is_array($this->notes)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('notes', TType::LST, 4);
{
$output->writeListBegin(TType::STRUCT, count($this->notes));
{
foreach ($this->notes as $iter66)
{
$xfer += $iter66->write($output);
}
}
$output->writeListEnd();
}
$xfer += $output->writeFieldEnd();
}
if ($this->notebooks !== null) {
if (!is_array($this->notebooks)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('notebooks', TType::LST, 5);
{
$output->writeListBegin(TType::STRUCT, count($this->notebooks));
{
foreach ($this->notebooks as $iter67)
{
$xfer += $iter67->write($output);
}
}
$output->writeListEnd();
}
$xfer += $output->writeFieldEnd();
}
if ($this->tags !== null) {
if (!is_array($this->tags)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('tags', TType::LST, 6);
{
$output->writeListBegin(TType::STRUCT, count($this->tags));
{
foreach ($this->tags as $iter68)
{
$xfer += $iter68->write($output);
}
}
$output->writeListEnd();
}
$xfer += $output->writeFieldEnd();
}
if ($this->searches !== null) {
if (!is_array($this->searches)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('searches', TType::LST, 7);
{
$output->writeListBegin(TType::STRUCT, count($this->searches));
{
foreach ($this->searches as $iter69)
{
$xfer += $iter69->write($output);
}
}
$output->writeListEnd();
}
$xfer += $output->writeFieldEnd();
}
if ($this->resources !== null) {
if (!is_array($this->resources)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('resources', TType::LST, 8);
{
$output->writeListBegin(TType::STRUCT, count($this->resources));
{
foreach ($this->resources as $iter70)
{
$xfer += $iter70->write($output);
}
}
$output->writeListEnd();
}
$xfer += $output->writeFieldEnd();
}
if ($this->expungedNotes !== null) {
if (!is_array($this->expungedNotes)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('expungedNotes', TType::LST, 9);
{
$output->writeListBegin(TType::STRING, count($this->expungedNotes));
{
foreach ($this->expungedNotes as $iter71)
{
$xfer += $output->writeString($iter71);
}
}
$output->writeListEnd();
}
$xfer += $output->writeFieldEnd();
}
if ($this->expungedNotebooks !== null) {
if (!is_array($this->expungedNotebooks)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('expungedNotebooks', TType::LST, 10);
{
$output->writeListBegin(TType::STRING, count($this->expungedNotebooks));
{
foreach ($this->expungedNotebooks as $iter72)
{
$xfer += $output->writeString($iter72);
}
}
$output->writeListEnd();
}
$xfer += $output->writeFieldEnd();
}
if ($this->expungedTags !== null) {
if (!is_array($this->expungedTags)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('expungedTags', TType::LST, 11);
{
$output->writeListBegin(TType::STRING, count($this->expungedTags));
{
foreach ($this->expungedTags as $iter73)
{
$xfer += $output->writeString($iter73);
}
}
$output->writeListEnd();
}
$xfer += $output->writeFieldEnd();
}
if ($this->expungedSearches !== null) {
if (!is_array($this->expungedSearches)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('expungedSearches', TType::LST, 12);
{
$output->writeListBegin(TType::STRING, count($this->expungedSearches));
{
foreach ($this->expungedSearches as $iter74)
{
$xfer += $output->writeString($iter74);
}
}
$output->writeListEnd();
}
$xfer += $output->writeFieldEnd();
}
if ($this->linkedNotebooks !== null) {
if (!is_array($this->linkedNotebooks)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('linkedNotebooks', TType::LST, 13);
{
$output->writeListBegin(TType::STRUCT, count($this->linkedNotebooks));
{
foreach ($this->linkedNotebooks as $iter75)
{
$xfer += $iter75->write($output);
}
}
$output->writeListEnd();
}
$xfer += $output->writeFieldEnd();
}
if ($this->expungedLinkedNotebooks !== null) {
if (!is_array($this->expungedLinkedNotebooks)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('expungedLinkedNotebooks', TType::LST, 14);
{
$output->writeListBegin(TType::STRING, count($this->expungedLinkedNotebooks));
{
foreach ($this->expungedLinkedNotebooks as $iter76)
{
$xfer += $output->writeString($iter76);
}
}
$output->writeListEnd();
}
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class SyncChunkFilter {
static $_TSPEC;
public $includeNotes = null;
public $includeNoteResources = null;
public $includeNoteAttributes = null;
public $includeNotebooks = null;
public $includeTags = null;
public $includeSearches = null;
public $includeResources = null;
public $includeLinkedNotebooks = null;
public $includeExpunged = null;
public $includeNoteApplicationDataFullMap = null;
public $includeResourceApplicationDataFullMap = null;
public $includeNoteResourceApplicationDataFullMap = null;
public $requireNoteContentClass = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'includeNotes',
'type' => TType::BOOL,
),
2 => array(
'var' => 'includeNoteResources',
'type' => TType::BOOL,
),
3 => array(
'var' => 'includeNoteAttributes',
'type' => TType::BOOL,
),
4 => array(
'var' => 'includeNotebooks',
'type' => TType::BOOL,
),
5 => array(
'var' => 'includeTags',
'type' => TType::BOOL,
),
6 => array(
'var' => 'includeSearches',
'type' => TType::BOOL,
),
7 => array(
'var' => 'includeResources',
'type' => TType::BOOL,
),
8 => array(
'var' => 'includeLinkedNotebooks',
'type' => TType::BOOL,
),
9 => array(
'var' => 'includeExpunged',
'type' => TType::BOOL,
),
10 => array(
'var' => 'includeNoteApplicationDataFullMap',
'type' => TType::BOOL,
),
12 => array(
'var' => 'includeResourceApplicationDataFullMap',
'type' => TType::BOOL,
),
13 => array(
'var' => 'includeNoteResourceApplicationDataFullMap',
'type' => TType::BOOL,
),
11 => array(
'var' => 'requireNoteContentClass',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['includeNotes'])) {
$this->includeNotes = $vals['includeNotes'];
}
if (isset($vals['includeNoteResources'])) {
$this->includeNoteResources = $vals['includeNoteResources'];
}
if (isset($vals['includeNoteAttributes'])) {
$this->includeNoteAttributes = $vals['includeNoteAttributes'];
}
if (isset($vals['includeNotebooks'])) {
$this->includeNotebooks = $vals['includeNotebooks'];
}
if (isset($vals['includeTags'])) {
$this->includeTags = $vals['includeTags'];
}
if (isset($vals['includeSearches'])) {
$this->includeSearches = $vals['includeSearches'];
}
if (isset($vals['includeResources'])) {
$this->includeResources = $vals['includeResources'];
}
if (isset($vals['includeLinkedNotebooks'])) {
$this->includeLinkedNotebooks = $vals['includeLinkedNotebooks'];
}
if (isset($vals['includeExpunged'])) {
$this->includeExpunged = $vals['includeExpunged'];
}
if (isset($vals['includeNoteApplicationDataFullMap'])) {
$this->includeNoteApplicationDataFullMap = $vals['includeNoteApplicationDataFullMap'];
}
if (isset($vals['includeResourceApplicationDataFullMap'])) {
$this->includeResourceApplicationDataFullMap = $vals['includeResourceApplicationDataFullMap'];
}
if (isset($vals['includeNoteResourceApplicationDataFullMap'])) {
$this->includeNoteResourceApplicationDataFullMap = $vals['includeNoteResourceApplicationDataFullMap'];
}
if (isset($vals['requireNoteContentClass'])) {
$this->requireNoteContentClass = $vals['requireNoteContentClass'];
}
}
}
public function getName() {
return 'SyncChunkFilter';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->includeNotes);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->includeNoteResources);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->includeNoteAttributes);
} else {
$xfer += $input->skip($ftype);
}
break;
case 4:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->includeNotebooks);
} else {
$xfer += $input->skip($ftype);
}
break;
case 5:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->includeTags);
} else {
$xfer += $input->skip($ftype);
}
break;
case 6:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->includeSearches);
} else {
$xfer += $input->skip($ftype);
}
break;
case 7:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->includeResources);
} else {
$xfer += $input->skip($ftype);
}
break;
case 8:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->includeLinkedNotebooks);
} else {
$xfer += $input->skip($ftype);
}
break;
case 9:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->includeExpunged);
} else {
$xfer += $input->skip($ftype);
}
break;
case 10:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->includeNoteApplicationDataFullMap);
} else {
$xfer += $input->skip($ftype);
}
break;
case 12:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->includeResourceApplicationDataFullMap);
} else {
$xfer += $input->skip($ftype);
}
break;
case 13:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->includeNoteResourceApplicationDataFullMap);
} else {
$xfer += $input->skip($ftype);
}
break;
case 11:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->requireNoteContentClass);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('SyncChunkFilter');
if ($this->includeNotes !== null) {
$xfer += $output->writeFieldBegin('includeNotes', TType::BOOL, 1);
$xfer += $output->writeBool($this->includeNotes);
$xfer += $output->writeFieldEnd();
}
if ($this->includeNoteResources !== null) {
$xfer += $output->writeFieldBegin('includeNoteResources', TType::BOOL, 2);
$xfer += $output->writeBool($this->includeNoteResources);
$xfer += $output->writeFieldEnd();
}
if ($this->includeNoteAttributes !== null) {
$xfer += $output->writeFieldBegin('includeNoteAttributes', TType::BOOL, 3);
$xfer += $output->writeBool($this->includeNoteAttributes);
$xfer += $output->writeFieldEnd();
}
if ($this->includeNotebooks !== null) {
$xfer += $output->writeFieldBegin('includeNotebooks', TType::BOOL, 4);
$xfer += $output->writeBool($this->includeNotebooks);
$xfer += $output->writeFieldEnd();
}
if ($this->includeTags !== null) {
$xfer += $output->writeFieldBegin('includeTags', TType::BOOL, 5);
$xfer += $output->writeBool($this->includeTags);
$xfer += $output->writeFieldEnd();
}
if ($this->includeSearches !== null) {
$xfer += $output->writeFieldBegin('includeSearches', TType::BOOL, 6);
$xfer += $output->writeBool($this->includeSearches);
$xfer += $output->writeFieldEnd();
}
if ($this->includeResources !== null) {
$xfer += $output->writeFieldBegin('includeResources', TType::BOOL, 7);
$xfer += $output->writeBool($this->includeResources);
$xfer += $output->writeFieldEnd();
}
if ($this->includeLinkedNotebooks !== null) {
$xfer += $output->writeFieldBegin('includeLinkedNotebooks', TType::BOOL, 8);
$xfer += $output->writeBool($this->includeLinkedNotebooks);
$xfer += $output->writeFieldEnd();
}
if ($this->includeExpunged !== null) {
$xfer += $output->writeFieldBegin('includeExpunged', TType::BOOL, 9);
$xfer += $output->writeBool($this->includeExpunged);
$xfer += $output->writeFieldEnd();
}
if ($this->includeNoteApplicationDataFullMap !== null) {
$xfer += $output->writeFieldBegin('includeNoteApplicationDataFullMap', TType::BOOL, 10);
$xfer += $output->writeBool($this->includeNoteApplicationDataFullMap);
$xfer += $output->writeFieldEnd();
}
if ($this->requireNoteContentClass !== null) {
$xfer += $output->writeFieldBegin('requireNoteContentClass', TType::STRING, 11);
$xfer += $output->writeString($this->requireNoteContentClass);
$xfer += $output->writeFieldEnd();
}
if ($this->includeResourceApplicationDataFullMap !== null) {
$xfer += $output->writeFieldBegin('includeResourceApplicationDataFullMap', TType::BOOL, 12);
$xfer += $output->writeBool($this->includeResourceApplicationDataFullMap);
$xfer += $output->writeFieldEnd();
}
if ($this->includeNoteResourceApplicationDataFullMap !== null) {
$xfer += $output->writeFieldBegin('includeNoteResourceApplicationDataFullMap', TType::BOOL, 13);
$xfer += $output->writeBool($this->includeNoteResourceApplicationDataFullMap);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteFilter {
static $_TSPEC;
public $order = null;
public $ascending = null;
public $words = null;
public $notebookGuid = null;
public $tagGuids = null;
public $timeZone = null;
public $inactive = null;
public $emphasized = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'order',
'type' => TType::I32,
),
2 => array(
'var' => 'ascending',
'type' => TType::BOOL,
),
3 => array(
'var' => 'words',
'type' => TType::STRING,
),
4 => array(
'var' => 'notebookGuid',
'type' => TType::STRING,
),
5 => array(
'var' => 'tagGuids',
'type' => TType::LST,
'etype' => TType::STRING,
'elem' => array(
'type' => TType::STRING,
),
),
6 => array(
'var' => 'timeZone',
'type' => TType::STRING,
),
7 => array(
'var' => 'inactive',
'type' => TType::BOOL,
),
8 => array(
'var' => 'emphasized',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['order'])) {
$this->order = $vals['order'];
}
if (isset($vals['ascending'])) {
$this->ascending = $vals['ascending'];
}
if (isset($vals['words'])) {
$this->words = $vals['words'];
}
if (isset($vals['notebookGuid'])) {
$this->notebookGuid = $vals['notebookGuid'];
}
if (isset($vals['tagGuids'])) {
$this->tagGuids = $vals['tagGuids'];
}
if (isset($vals['timeZone'])) {
$this->timeZone = $vals['timeZone'];
}
if (isset($vals['inactive'])) {
$this->inactive = $vals['inactive'];
}
if (isset($vals['emphasized'])) {
$this->emphasized = $vals['emphasized'];
}
}
}
public function getName() {
return 'NoteFilter';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->order);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->ascending);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->words);
} else {
$xfer += $input->skip($ftype);
}
break;
case 4:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->notebookGuid);
} else {
$xfer += $input->skip($ftype);
}
break;
case 5:
if ($ftype == TType::LST) {
$this->tagGuids = array();
$_size77 = 0;
$_etype80 = 0;
$xfer += $input->readListBegin($_etype80, $_size77);
for ($_i81 = 0; $_i81 < $_size77; ++$_i81)
{
$elem82 = null;
$xfer += $input->readString($elem82);
$this->tagGuids []= $elem82;
}
$xfer += $input->readListEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
case 6:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->timeZone);
} else {
$xfer += $input->skip($ftype);
}
break;
case 7:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->inactive);
} else {
$xfer += $input->skip($ftype);
}
break;
case 8:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->emphasized);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteFilter');
if ($this->order !== null) {
$xfer += $output->writeFieldBegin('order', TType::I32, 1);
$xfer += $output->writeI32($this->order);
$xfer += $output->writeFieldEnd();
}
if ($this->ascending !== null) {
$xfer += $output->writeFieldBegin('ascending', TType::BOOL, 2);
$xfer += $output->writeBool($this->ascending);
$xfer += $output->writeFieldEnd();
}
if ($this->words !== null) {
$xfer += $output->writeFieldBegin('words', TType::STRING, 3);
$xfer += $output->writeString($this->words);
$xfer += $output->writeFieldEnd();
}
if ($this->notebookGuid !== null) {
$xfer += $output->writeFieldBegin('notebookGuid', TType::STRING, 4);
$xfer += $output->writeString($this->notebookGuid);
$xfer += $output->writeFieldEnd();
}
if ($this->tagGuids !== null) {
if (!is_array($this->tagGuids)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('tagGuids', TType::LST, 5);
{
$output->writeListBegin(TType::STRING, count($this->tagGuids));
{
foreach ($this->tagGuids as $iter83)
{
$xfer += $output->writeString($iter83);
}
}
$output->writeListEnd();
}
$xfer += $output->writeFieldEnd();
}
if ($this->timeZone !== null) {
$xfer += $output->writeFieldBegin('timeZone', TType::STRING, 6);
$xfer += $output->writeString($this->timeZone);
$xfer += $output->writeFieldEnd();
}
if ($this->inactive !== null) {
$xfer += $output->writeFieldBegin('inactive', TType::BOOL, 7);
$xfer += $output->writeBool($this->inactive);
$xfer += $output->writeFieldEnd();
}
if ($this->emphasized !== null) {
$xfer += $output->writeFieldBegin('emphasized', TType::STRING, 8);
$xfer += $output->writeString($this->emphasized);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteList {
static $_TSPEC;
public $startIndex = null;
public $totalNotes = null;
public $notes = null;
public $stoppedWords = null;
public $searchedWords = null;
public $updateCount = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'startIndex',
'type' => TType::I32,
),
2 => array(
'var' => 'totalNotes',
'type' => TType::I32,
),
3 => array(
'var' => 'notes',
'type' => TType::LST,
'etype' => TType::STRUCT,
'elem' => array(
'type' => TType::STRUCT,
'class' => '\EDAM\Types\Note',
),
),
4 => array(
'var' => 'stoppedWords',
'type' => TType::LST,
'etype' => TType::STRING,
'elem' => array(
'type' => TType::STRING,
),
),
5 => array(
'var' => 'searchedWords',
'type' => TType::LST,
'etype' => TType::STRING,
'elem' => array(
'type' => TType::STRING,
),
),
6 => array(
'var' => 'updateCount',
'type' => TType::I32,
),
);
}
if (is_array($vals)) {
if (isset($vals['startIndex'])) {
$this->startIndex = $vals['startIndex'];
}
if (isset($vals['totalNotes'])) {
$this->totalNotes = $vals['totalNotes'];
}
if (isset($vals['notes'])) {
$this->notes = $vals['notes'];
}
if (isset($vals['stoppedWords'])) {
$this->stoppedWords = $vals['stoppedWords'];
}
if (isset($vals['searchedWords'])) {
$this->searchedWords = $vals['searchedWords'];
}
if (isset($vals['updateCount'])) {
$this->updateCount = $vals['updateCount'];
}
}
}
public function getName() {
return 'NoteList';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->startIndex);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->totalNotes);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::LST) {
$this->notes = array();
$_size84 = 0;
$_etype87 = 0;
$xfer += $input->readListBegin($_etype87, $_size84);
for ($_i88 = 0; $_i88 < $_size84; ++$_i88)
{
$elem89 = null;
$elem89 = new \EDAM\Types\Note();
$xfer += $elem89->read($input);
$this->notes []= $elem89;
}
$xfer += $input->readListEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
case 4:
if ($ftype == TType::LST) {
$this->stoppedWords = array();
$_size90 = 0;
$_etype93 = 0;
$xfer += $input->readListBegin($_etype93, $_size90);
for ($_i94 = 0; $_i94 < $_size90; ++$_i94)
{
$elem95 = null;
$xfer += $input->readString($elem95);
$this->stoppedWords []= $elem95;
}
$xfer += $input->readListEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
case 5:
if ($ftype == TType::LST) {
$this->searchedWords = array();
$_size96 = 0;
$_etype99 = 0;
$xfer += $input->readListBegin($_etype99, $_size96);
for ($_i100 = 0; $_i100 < $_size96; ++$_i100)
{
$elem101 = null;
$xfer += $input->readString($elem101);
$this->searchedWords []= $elem101;
}
$xfer += $input->readListEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
case 6:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->updateCount);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteList');
if ($this->startIndex !== null) {
$xfer += $output->writeFieldBegin('startIndex', TType::I32, 1);
$xfer += $output->writeI32($this->startIndex);
$xfer += $output->writeFieldEnd();
}
if ($this->totalNotes !== null) {
$xfer += $output->writeFieldBegin('totalNotes', TType::I32, 2);
$xfer += $output->writeI32($this->totalNotes);
$xfer += $output->writeFieldEnd();
}
if ($this->notes !== null) {
if (!is_array($this->notes)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('notes', TType::LST, 3);
{
$output->writeListBegin(TType::STRUCT, count($this->notes));
{
foreach ($this->notes as $iter102)
{
$xfer += $iter102->write($output);
}
}
$output->writeListEnd();
}
$xfer += $output->writeFieldEnd();
}
if ($this->stoppedWords !== null) {
if (!is_array($this->stoppedWords)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('stoppedWords', TType::LST, 4);
{
$output->writeListBegin(TType::STRING, count($this->stoppedWords));
{
foreach ($this->stoppedWords as $iter103)
{
$xfer += $output->writeString($iter103);
}
}
$output->writeListEnd();
}
$xfer += $output->writeFieldEnd();
}
if ($this->searchedWords !== null) {
if (!is_array($this->searchedWords)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('searchedWords', TType::LST, 5);
{
$output->writeListBegin(TType::STRING, count($this->searchedWords));
{
foreach ($this->searchedWords as $iter104)
{
$xfer += $output->writeString($iter104);
}
}
$output->writeListEnd();
}
$xfer += $output->writeFieldEnd();
}
if ($this->updateCount !== null) {
$xfer += $output->writeFieldBegin('updateCount', TType::I32, 6);
$xfer += $output->writeI32($this->updateCount);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteMetadata {
static $_TSPEC;
public $guid = null;
public $title = null;
public $contentLength = null;
public $created = null;
public $updated = null;
public $deleted = null;
public $updateSequenceNum = null;
public $notebookGuid = null;
public $tagGuids = null;
public $attributes = null;
public $largestResourceMime = null;
public $largestResourceSize = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'guid',
'type' => TType::STRING,
),
2 => array(
'var' => 'title',
'type' => TType::STRING,
),
5 => array(
'var' => 'contentLength',
'type' => TType::I32,
),
6 => array(
'var' => 'created',
'type' => TType::I64,
),
7 => array(
'var' => 'updated',
'type' => TType::I64,
),
8 => array(
'var' => 'deleted',
'type' => TType::I64,
),
10 => array(
'var' => 'updateSequenceNum',
'type' => TType::I32,
),
11 => array(
'var' => 'notebookGuid',
'type' => TType::STRING,
),
12 => array(
'var' => 'tagGuids',
'type' => TType::LST,
'etype' => TType::STRING,
'elem' => array(
'type' => TType::STRING,
),
),
14 => array(
'var' => 'attributes',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\NoteAttributes',
),
20 => array(
'var' => 'largestResourceMime',
'type' => TType::STRING,
),
21 => array(
'var' => 'largestResourceSize',
'type' => TType::I32,
),
);
}
if (is_array($vals)) {
if (isset($vals['guid'])) {
$this->guid = $vals['guid'];
}
if (isset($vals['title'])) {
$this->title = $vals['title'];
}
if (isset($vals['contentLength'])) {
$this->contentLength = $vals['contentLength'];
}
if (isset($vals['created'])) {
$this->created = $vals['created'];
}
if (isset($vals['updated'])) {
$this->updated = $vals['updated'];
}
if (isset($vals['deleted'])) {
$this->deleted = $vals['deleted'];
}
if (isset($vals['updateSequenceNum'])) {
$this->updateSequenceNum = $vals['updateSequenceNum'];
}
if (isset($vals['notebookGuid'])) {
$this->notebookGuid = $vals['notebookGuid'];
}
if (isset($vals['tagGuids'])) {
$this->tagGuids = $vals['tagGuids'];
}
if (isset($vals['attributes'])) {
$this->attributes = $vals['attributes'];
}
if (isset($vals['largestResourceMime'])) {
$this->largestResourceMime = $vals['largestResourceMime'];
}
if (isset($vals['largestResourceSize'])) {
$this->largestResourceSize = $vals['largestResourceSize'];
}
}
}
public function getName() {
return 'NoteMetadata';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->guid);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->title);
} else {
$xfer += $input->skip($ftype);
}
break;
case 5:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->contentLength);
} else {
$xfer += $input->skip($ftype);
}
break;
case 6:
if ($ftype == TType::I64) {
$xfer += $input->readI64($this->created);
} else {
$xfer += $input->skip($ftype);
}
break;
case 7:
if ($ftype == TType::I64) {
$xfer += $input->readI64($this->updated);
} else {
$xfer += $input->skip($ftype);
}
break;
case 8:
if ($ftype == TType::I64) {
$xfer += $input->readI64($this->deleted);
} else {
$xfer += $input->skip($ftype);
}
break;
case 10:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->updateSequenceNum);
} else {
$xfer += $input->skip($ftype);
}
break;
case 11:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->notebookGuid);
} else {
$xfer += $input->skip($ftype);
}
break;
case 12:
if ($ftype == TType::LST) {
$this->tagGuids = array();
$_size105 = 0;
$_etype108 = 0;
$xfer += $input->readListBegin($_etype108, $_size105);
for ($_i109 = 0; $_i109 < $_size105; ++$_i109)
{
$elem110 = null;
$xfer += $input->readString($elem110);
$this->tagGuids []= $elem110;
}
$xfer += $input->readListEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
case 14:
if ($ftype == TType::STRUCT) {
$this->attributes = new \EDAM\Types\NoteAttributes();
$xfer += $this->attributes->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 20:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->largestResourceMime);
} else {
$xfer += $input->skip($ftype);
}
break;
case 21:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->largestResourceSize);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteMetadata');
if ($this->guid !== null) {
$xfer += $output->writeFieldBegin('guid', TType::STRING, 1);
$xfer += $output->writeString($this->guid);
$xfer += $output->writeFieldEnd();
}
if ($this->title !== null) {
$xfer += $output->writeFieldBegin('title', TType::STRING, 2);
$xfer += $output->writeString($this->title);
$xfer += $output->writeFieldEnd();
}
if ($this->contentLength !== null) {
$xfer += $output->writeFieldBegin('contentLength', TType::I32, 5);
$xfer += $output->writeI32($this->contentLength);
$xfer += $output->writeFieldEnd();
}
if ($this->created !== null) {
$xfer += $output->writeFieldBegin('created', TType::I64, 6);
$xfer += $output->writeI64($this->created);
$xfer += $output->writeFieldEnd();
}
if ($this->updated !== null) {
$xfer += $output->writeFieldBegin('updated', TType::I64, 7);
$xfer += $output->writeI64($this->updated);
$xfer += $output->writeFieldEnd();
}
if ($this->deleted !== null) {
$xfer += $output->writeFieldBegin('deleted', TType::I64, 8);
$xfer += $output->writeI64($this->deleted);
$xfer += $output->writeFieldEnd();
}
if ($this->updateSequenceNum !== null) {
$xfer += $output->writeFieldBegin('updateSequenceNum', TType::I32, 10);
$xfer += $output->writeI32($this->updateSequenceNum);
$xfer += $output->writeFieldEnd();
}
if ($this->notebookGuid !== null) {
$xfer += $output->writeFieldBegin('notebookGuid', TType::STRING, 11);
$xfer += $output->writeString($this->notebookGuid);
$xfer += $output->writeFieldEnd();
}
if ($this->tagGuids !== null) {
if (!is_array($this->tagGuids)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('tagGuids', TType::LST, 12);
{
$output->writeListBegin(TType::STRING, count($this->tagGuids));
{
foreach ($this->tagGuids as $iter111)
{
$xfer += $output->writeString($iter111);
}
}
$output->writeListEnd();
}
$xfer += $output->writeFieldEnd();
}
if ($this->attributes !== null) {
if (!is_object($this->attributes)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('attributes', TType::STRUCT, 14);
$xfer += $this->attributes->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->largestResourceMime !== null) {
$xfer += $output->writeFieldBegin('largestResourceMime', TType::STRING, 20);
$xfer += $output->writeString($this->largestResourceMime);
$xfer += $output->writeFieldEnd();
}
if ($this->largestResourceSize !== null) {
$xfer += $output->writeFieldBegin('largestResourceSize', TType::I32, 21);
$xfer += $output->writeI32($this->largestResourceSize);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NotesMetadataList {
static $_TSPEC;
public $startIndex = null;
public $totalNotes = null;
public $notes = null;
public $stoppedWords = null;
public $searchedWords = null;
public $updateCount = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'startIndex',
'type' => TType::I32,
),
2 => array(
'var' => 'totalNotes',
'type' => TType::I32,
),
3 => array(
'var' => 'notes',
'type' => TType::LST,
'etype' => TType::STRUCT,
'elem' => array(
'type' => TType::STRUCT,
'class' => '\EDAM\NoteStore\NoteMetadata',
),
),
4 => array(
'var' => 'stoppedWords',
'type' => TType::LST,
'etype' => TType::STRING,
'elem' => array(
'type' => TType::STRING,
),
),
5 => array(
'var' => 'searchedWords',
'type' => TType::LST,
'etype' => TType::STRING,
'elem' => array(
'type' => TType::STRING,
),
),
6 => array(
'var' => 'updateCount',
'type' => TType::I32,
),
);
}
if (is_array($vals)) {
if (isset($vals['startIndex'])) {
$this->startIndex = $vals['startIndex'];
}
if (isset($vals['totalNotes'])) {
$this->totalNotes = $vals['totalNotes'];
}
if (isset($vals['notes'])) {
$this->notes = $vals['notes'];
}
if (isset($vals['stoppedWords'])) {
$this->stoppedWords = $vals['stoppedWords'];
}
if (isset($vals['searchedWords'])) {
$this->searchedWords = $vals['searchedWords'];
}
if (isset($vals['updateCount'])) {
$this->updateCount = $vals['updateCount'];
}
}
}
public function getName() {
return 'NotesMetadataList';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->startIndex);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->totalNotes);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::LST) {
$this->notes = array();
$_size112 = 0;
$_etype115 = 0;
$xfer += $input->readListBegin($_etype115, $_size112);
for ($_i116 = 0; $_i116 < $_size112; ++$_i116)
{
$elem117 = null;
$elem117 = new \EDAM\NoteStore\NoteMetadata();
$xfer += $elem117->read($input);
$this->notes []= $elem117;
}
$xfer += $input->readListEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
case 4:
if ($ftype == TType::LST) {
$this->stoppedWords = array();
$_size118 = 0;
$_etype121 = 0;
$xfer += $input->readListBegin($_etype121, $_size118);
for ($_i122 = 0; $_i122 < $_size118; ++$_i122)
{
$elem123 = null;
$xfer += $input->readString($elem123);
$this->stoppedWords []= $elem123;
}
$xfer += $input->readListEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
case 5:
if ($ftype == TType::LST) {
$this->searchedWords = array();
$_size124 = 0;
$_etype127 = 0;
$xfer += $input->readListBegin($_etype127, $_size124);
for ($_i128 = 0; $_i128 < $_size124; ++$_i128)
{
$elem129 = null;
$xfer += $input->readString($elem129);
$this->searchedWords []= $elem129;
}
$xfer += $input->readListEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
case 6:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->updateCount);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NotesMetadataList');
if ($this->startIndex !== null) {
$xfer += $output->writeFieldBegin('startIndex', TType::I32, 1);
$xfer += $output->writeI32($this->startIndex);
$xfer += $output->writeFieldEnd();
}
if ($this->totalNotes !== null) {
$xfer += $output->writeFieldBegin('totalNotes', TType::I32, 2);
$xfer += $output->writeI32($this->totalNotes);
$xfer += $output->writeFieldEnd();
}
if ($this->notes !== null) {
if (!is_array($this->notes)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('notes', TType::LST, 3);
{
$output->writeListBegin(TType::STRUCT, count($this->notes));
{
foreach ($this->notes as $iter130)
{
$xfer += $iter130->write($output);
}
}
$output->writeListEnd();
}
$xfer += $output->writeFieldEnd();
}
if ($this->stoppedWords !== null) {
if (!is_array($this->stoppedWords)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('stoppedWords', TType::LST, 4);
{
$output->writeListBegin(TType::STRING, count($this->stoppedWords));
{
foreach ($this->stoppedWords as $iter131)
{
$xfer += $output->writeString($iter131);
}
}
$output->writeListEnd();
}
$xfer += $output->writeFieldEnd();
}
if ($this->searchedWords !== null) {
if (!is_array($this->searchedWords)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('searchedWords', TType::LST, 5);
{
$output->writeListBegin(TType::STRING, count($this->searchedWords));
{
foreach ($this->searchedWords as $iter132)
{
$xfer += $output->writeString($iter132);
}
}
$output->writeListEnd();
}
$xfer += $output->writeFieldEnd();
}
if ($this->updateCount !== null) {
$xfer += $output->writeFieldBegin('updateCount', TType::I32, 6);
$xfer += $output->writeI32($this->updateCount);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NotesMetadataResultSpec {
static $_TSPEC;
public $includeTitle = null;
public $includeContentLength = null;
public $includeCreated = null;
public $includeUpdated = null;
public $includeDeleted = null;
public $includeUpdateSequenceNum = null;
public $includeNotebookGuid = null;
public $includeTagGuids = null;
public $includeAttributes = null;
public $includeLargestResourceMime = null;
public $includeLargestResourceSize = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
2 => array(
'var' => 'includeTitle',
'type' => TType::BOOL,
),
5 => array(
'var' => 'includeContentLength',
'type' => TType::BOOL,
),
6 => array(
'var' => 'includeCreated',
'type' => TType::BOOL,
),
7 => array(
'var' => 'includeUpdated',
'type' => TType::BOOL,
),
8 => array(
'var' => 'includeDeleted',
'type' => TType::BOOL,
),
10 => array(
'var' => 'includeUpdateSequenceNum',
'type' => TType::BOOL,
),
11 => array(
'var' => 'includeNotebookGuid',
'type' => TType::BOOL,
),
12 => array(
'var' => 'includeTagGuids',
'type' => TType::BOOL,
),
14 => array(
'var' => 'includeAttributes',
'type' => TType::BOOL,
),
20 => array(
'var' => 'includeLargestResourceMime',
'type' => TType::BOOL,
),
21 => array(
'var' => 'includeLargestResourceSize',
'type' => TType::BOOL,
),
);
}
if (is_array($vals)) {
if (isset($vals['includeTitle'])) {
$this->includeTitle = $vals['includeTitle'];
}
if (isset($vals['includeContentLength'])) {
$this->includeContentLength = $vals['includeContentLength'];
}
if (isset($vals['includeCreated'])) {
$this->includeCreated = $vals['includeCreated'];
}
if (isset($vals['includeUpdated'])) {
$this->includeUpdated = $vals['includeUpdated'];
}
if (isset($vals['includeDeleted'])) {
$this->includeDeleted = $vals['includeDeleted'];
}
if (isset($vals['includeUpdateSequenceNum'])) {
$this->includeUpdateSequenceNum = $vals['includeUpdateSequenceNum'];
}
if (isset($vals['includeNotebookGuid'])) {
$this->includeNotebookGuid = $vals['includeNotebookGuid'];
}
if (isset($vals['includeTagGuids'])) {
$this->includeTagGuids = $vals['includeTagGuids'];
}
if (isset($vals['includeAttributes'])) {
$this->includeAttributes = $vals['includeAttributes'];
}
if (isset($vals['includeLargestResourceMime'])) {
$this->includeLargestResourceMime = $vals['includeLargestResourceMime'];
}
if (isset($vals['includeLargestResourceSize'])) {
$this->includeLargestResourceSize = $vals['includeLargestResourceSize'];
}
}
}
public function getName() {
return 'NotesMetadataResultSpec';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 2:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->includeTitle);
} else {
$xfer += $input->skip($ftype);
}
break;
case 5:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->includeContentLength);
} else {
$xfer += $input->skip($ftype);
}
break;
case 6:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->includeCreated);
} else {
$xfer += $input->skip($ftype);
}
break;
case 7:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->includeUpdated);
} else {
$xfer += $input->skip($ftype);
}
break;
case 8:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->includeDeleted);
} else {
$xfer += $input->skip($ftype);
}
break;
case 10:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->includeUpdateSequenceNum);
} else {
$xfer += $input->skip($ftype);
}
break;
case 11:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->includeNotebookGuid);
} else {
$xfer += $input->skip($ftype);
}
break;
case 12:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->includeTagGuids);
} else {
$xfer += $input->skip($ftype);
}
break;
case 14:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->includeAttributes);
} else {
$xfer += $input->skip($ftype);
}
break;
case 20:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->includeLargestResourceMime);
} else {
$xfer += $input->skip($ftype);
}
break;
case 21:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->includeLargestResourceSize);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NotesMetadataResultSpec');
if ($this->includeTitle !== null) {
$xfer += $output->writeFieldBegin('includeTitle', TType::BOOL, 2);
$xfer += $output->writeBool($this->includeTitle);
$xfer += $output->writeFieldEnd();
}
if ($this->includeContentLength !== null) {
$xfer += $output->writeFieldBegin('includeContentLength', TType::BOOL, 5);
$xfer += $output->writeBool($this->includeContentLength);
$xfer += $output->writeFieldEnd();
}
if ($this->includeCreated !== null) {
$xfer += $output->writeFieldBegin('includeCreated', TType::BOOL, 6);
$xfer += $output->writeBool($this->includeCreated);
$xfer += $output->writeFieldEnd();
}
if ($this->includeUpdated !== null) {
$xfer += $output->writeFieldBegin('includeUpdated', TType::BOOL, 7);
$xfer += $output->writeBool($this->includeUpdated);
$xfer += $output->writeFieldEnd();
}
if ($this->includeDeleted !== null) {
$xfer += $output->writeFieldBegin('includeDeleted', TType::BOOL, 8);
$xfer += $output->writeBool($this->includeDeleted);
$xfer += $output->writeFieldEnd();
}
if ($this->includeUpdateSequenceNum !== null) {
$xfer += $output->writeFieldBegin('includeUpdateSequenceNum', TType::BOOL, 10);
$xfer += $output->writeBool($this->includeUpdateSequenceNum);
$xfer += $output->writeFieldEnd();
}
if ($this->includeNotebookGuid !== null) {
$xfer += $output->writeFieldBegin('includeNotebookGuid', TType::BOOL, 11);
$xfer += $output->writeBool($this->includeNotebookGuid);
$xfer += $output->writeFieldEnd();
}
if ($this->includeTagGuids !== null) {
$xfer += $output->writeFieldBegin('includeTagGuids', TType::BOOL, 12);
$xfer += $output->writeBool($this->includeTagGuids);
$xfer += $output->writeFieldEnd();
}
if ($this->includeAttributes !== null) {
$xfer += $output->writeFieldBegin('includeAttributes', TType::BOOL, 14);
$xfer += $output->writeBool($this->includeAttributes);
$xfer += $output->writeFieldEnd();
}
if ($this->includeLargestResourceMime !== null) {
$xfer += $output->writeFieldBegin('includeLargestResourceMime', TType::BOOL, 20);
$xfer += $output->writeBool($this->includeLargestResourceMime);
$xfer += $output->writeFieldEnd();
}
if ($this->includeLargestResourceSize !== null) {
$xfer += $output->writeFieldBegin('includeLargestResourceSize', TType::BOOL, 21);
$xfer += $output->writeBool($this->includeLargestResourceSize);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteCollectionCounts {
static $_TSPEC;
public $notebookCounts = null;
public $tagCounts = null;
public $trashCount = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'notebookCounts',
'type' => TType::MAP,
'ktype' => TType::STRING,
'vtype' => TType::I32,
'key' => array(
'type' => TType::STRING,
),
'val' => array(
'type' => TType::I32,
),
),
2 => array(
'var' => 'tagCounts',
'type' => TType::MAP,
'ktype' => TType::STRING,
'vtype' => TType::I32,
'key' => array(
'type' => TType::STRING,
),
'val' => array(
'type' => TType::I32,
),
),
3 => array(
'var' => 'trashCount',
'type' => TType::I32,
),
);
}
if (is_array($vals)) {
if (isset($vals['notebookCounts'])) {
$this->notebookCounts = $vals['notebookCounts'];
}
if (isset($vals['tagCounts'])) {
$this->tagCounts = $vals['tagCounts'];
}
if (isset($vals['trashCount'])) {
$this->trashCount = $vals['trashCount'];
}
}
}
public function getName() {
return 'NoteCollectionCounts';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::MAP) {
$this->notebookCounts = array();
$_size133 = 0;
$_ktype134 = 0;
$_vtype135 = 0;
$xfer += $input->readMapBegin($_ktype134, $_vtype135, $_size133);
for ($_i137 = 0; $_i137 < $_size133; ++$_i137)
{
$key138 = '';
$val139 = 0;
$xfer += $input->readString($key138);
$xfer += $input->readI32($val139);
$this->notebookCounts[$key138] = $val139;
}
$xfer += $input->readMapEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::MAP) {
$this->tagCounts = array();
$_size140 = 0;
$_ktype141 = 0;
$_vtype142 = 0;
$xfer += $input->readMapBegin($_ktype141, $_vtype142, $_size140);
for ($_i144 = 0; $_i144 < $_size140; ++$_i144)
{
$key145 = '';
$val146 = 0;
$xfer += $input->readString($key145);
$xfer += $input->readI32($val146);
$this->tagCounts[$key145] = $val146;
}
$xfer += $input->readMapEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->trashCount);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteCollectionCounts');
if ($this->notebookCounts !== null) {
if (!is_array($this->notebookCounts)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('notebookCounts', TType::MAP, 1);
{
$output->writeMapBegin(TType::STRING, TType::I32, count($this->notebookCounts));
{
foreach ($this->notebookCounts as $kiter147 => $viter148)
{
$xfer += $output->writeString($kiter147);
$xfer += $output->writeI32($viter148);
}
}
$output->writeMapEnd();
}
$xfer += $output->writeFieldEnd();
}
if ($this->tagCounts !== null) {
if (!is_array($this->tagCounts)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('tagCounts', TType::MAP, 2);
{
$output->writeMapBegin(TType::STRING, TType::I32, count($this->tagCounts));
{
foreach ($this->tagCounts as $kiter149 => $viter150)
{
$xfer += $output->writeString($kiter149);
$xfer += $output->writeI32($viter150);
}
}
$output->writeMapEnd();
}
$xfer += $output->writeFieldEnd();
}
if ($this->trashCount !== null) {
$xfer += $output->writeFieldBegin('trashCount', TType::I32, 3);
$xfer += $output->writeI32($this->trashCount);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteEmailParameters {
static $_TSPEC;
public $guid = null;
public $note = null;
public $toAddresses = null;
public $ccAddresses = null;
public $subject = null;
public $message = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'guid',
'type' => TType::STRING,
),
2 => array(
'var' => 'note',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\Note',
),
3 => array(
'var' => 'toAddresses',
'type' => TType::LST,
'etype' => TType::STRING,
'elem' => array(
'type' => TType::STRING,
),
),
4 => array(
'var' => 'ccAddresses',
'type' => TType::LST,
'etype' => TType::STRING,
'elem' => array(
'type' => TType::STRING,
),
),
5 => array(
'var' => 'subject',
'type' => TType::STRING,
),
6 => array(
'var' => 'message',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['guid'])) {
$this->guid = $vals['guid'];
}
if (isset($vals['note'])) {
$this->note = $vals['note'];
}
if (isset($vals['toAddresses'])) {
$this->toAddresses = $vals['toAddresses'];
}
if (isset($vals['ccAddresses'])) {
$this->ccAddresses = $vals['ccAddresses'];
}
if (isset($vals['subject'])) {
$this->subject = $vals['subject'];
}
if (isset($vals['message'])) {
$this->message = $vals['message'];
}
}
}
public function getName() {
return 'NoteEmailParameters';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->guid);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->note = new \EDAM\Types\Note();
$xfer += $this->note->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::LST) {
$this->toAddresses = array();
$_size151 = 0;
$_etype154 = 0;
$xfer += $input->readListBegin($_etype154, $_size151);
for ($_i155 = 0; $_i155 < $_size151; ++$_i155)
{
$elem156 = null;
$xfer += $input->readString($elem156);
$this->toAddresses []= $elem156;
}
$xfer += $input->readListEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
case 4:
if ($ftype == TType::LST) {
$this->ccAddresses = array();
$_size157 = 0;
$_etype160 = 0;
$xfer += $input->readListBegin($_etype160, $_size157);
for ($_i161 = 0; $_i161 < $_size157; ++$_i161)
{
$elem162 = null;
$xfer += $input->readString($elem162);
$this->ccAddresses []= $elem162;
}
$xfer += $input->readListEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
case 5:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->subject);
} else {
$xfer += $input->skip($ftype);
}
break;
case 6:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->message);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteEmailParameters');
if ($this->guid !== null) {
$xfer += $output->writeFieldBegin('guid', TType::STRING, 1);
$xfer += $output->writeString($this->guid);
$xfer += $output->writeFieldEnd();
}
if ($this->note !== null) {
if (!is_object($this->note)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('note', TType::STRUCT, 2);
$xfer += $this->note->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->toAddresses !== null) {
if (!is_array($this->toAddresses)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('toAddresses', TType::LST, 3);
{
$output->writeListBegin(TType::STRING, count($this->toAddresses));
{
foreach ($this->toAddresses as $iter163)
{
$xfer += $output->writeString($iter163);
}
}
$output->writeListEnd();
}
$xfer += $output->writeFieldEnd();
}
if ($this->ccAddresses !== null) {
if (!is_array($this->ccAddresses)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('ccAddresses', TType::LST, 4);
{
$output->writeListBegin(TType::STRING, count($this->ccAddresses));
{
foreach ($this->ccAddresses as $iter164)
{
$xfer += $output->writeString($iter164);
}
}
$output->writeListEnd();
}
$xfer += $output->writeFieldEnd();
}
if ($this->subject !== null) {
$xfer += $output->writeFieldBegin('subject', TType::STRING, 5);
$xfer += $output->writeString($this->subject);
$xfer += $output->writeFieldEnd();
}
if ($this->message !== null) {
$xfer += $output->writeFieldBegin('message', TType::STRING, 6);
$xfer += $output->writeString($this->message);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteVersionId {
static $_TSPEC;
public $updateSequenceNum = null;
public $updated = null;
public $saved = null;
public $title = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'updateSequenceNum',
'type' => TType::I32,
),
2 => array(
'var' => 'updated',
'type' => TType::I64,
),
3 => array(
'var' => 'saved',
'type' => TType::I64,
),
4 => array(
'var' => 'title',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['updateSequenceNum'])) {
$this->updateSequenceNum = $vals['updateSequenceNum'];
}
if (isset($vals['updated'])) {
$this->updated = $vals['updated'];
}
if (isset($vals['saved'])) {
$this->saved = $vals['saved'];
}
if (isset($vals['title'])) {
$this->title = $vals['title'];
}
}
}
public function getName() {
return 'NoteVersionId';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->updateSequenceNum);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::I64) {
$xfer += $input->readI64($this->updated);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::I64) {
$xfer += $input->readI64($this->saved);
} else {
$xfer += $input->skip($ftype);
}
break;
case 4:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->title);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteVersionId');
if ($this->updateSequenceNum !== null) {
$xfer += $output->writeFieldBegin('updateSequenceNum', TType::I32, 1);
$xfer += $output->writeI32($this->updateSequenceNum);
$xfer += $output->writeFieldEnd();
}
if ($this->updated !== null) {
$xfer += $output->writeFieldBegin('updated', TType::I64, 2);
$xfer += $output->writeI64($this->updated);
$xfer += $output->writeFieldEnd();
}
if ($this->saved !== null) {
$xfer += $output->writeFieldBegin('saved', TType::I64, 3);
$xfer += $output->writeI64($this->saved);
$xfer += $output->writeFieldEnd();
}
if ($this->title !== null) {
$xfer += $output->writeFieldBegin('title', TType::STRING, 4);
$xfer += $output->writeString($this->title);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class ClientUsageMetrics {
static $_TSPEC;
public $sessions = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'sessions',
'type' => TType::I32,
),
);
}
if (is_array($vals)) {
if (isset($vals['sessions'])) {
$this->sessions = $vals['sessions'];
}
}
}
public function getName() {
return 'ClientUsageMetrics';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->sessions);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('ClientUsageMetrics');
if ($this->sessions !== null) {
$xfer += $output->writeFieldBegin('sessions', TType::I32, 1);
$xfer += $output->writeI32($this->sessions);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class RelatedQuery {
static $_TSPEC;
public $noteGuid = null;
public $plainText = null;
public $filter = null;
public $referenceUri = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'noteGuid',
'type' => TType::STRING,
),
2 => array(
'var' => 'plainText',
'type' => TType::STRING,
),
3 => array(
'var' => 'filter',
'type' => TType::STRUCT,
'class' => '\EDAM\NoteStore\NoteFilter',
),
4 => array(
'var' => 'referenceUri',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['noteGuid'])) {
$this->noteGuid = $vals['noteGuid'];
}
if (isset($vals['plainText'])) {
$this->plainText = $vals['plainText'];
}
if (isset($vals['filter'])) {
$this->filter = $vals['filter'];
}
if (isset($vals['referenceUri'])) {
$this->referenceUri = $vals['referenceUri'];
}
}
}
public function getName() {
return 'RelatedQuery';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->noteGuid);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->plainText);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->filter = new \EDAM\NoteStore\NoteFilter();
$xfer += $this->filter->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 4:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->referenceUri);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('RelatedQuery');
if ($this->noteGuid !== null) {
$xfer += $output->writeFieldBegin('noteGuid', TType::STRING, 1);
$xfer += $output->writeString($this->noteGuid);
$xfer += $output->writeFieldEnd();
}
if ($this->plainText !== null) {
$xfer += $output->writeFieldBegin('plainText', TType::STRING, 2);
$xfer += $output->writeString($this->plainText);
$xfer += $output->writeFieldEnd();
}
if ($this->filter !== null) {
if (!is_object($this->filter)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('filter', TType::STRUCT, 3);
$xfer += $this->filter->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->referenceUri !== null) {
$xfer += $output->writeFieldBegin('referenceUri', TType::STRING, 4);
$xfer += $output->writeString($this->referenceUri);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class RelatedResult {
static $_TSPEC;
public $notes = null;
public $notebooks = null;
public $tags = null;
public $containingNotebooks = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'notes',
'type' => TType::LST,
'etype' => TType::STRUCT,
'elem' => array(
'type' => TType::STRUCT,
'class' => '\EDAM\Types\Note',
),
),
2 => array(
'var' => 'notebooks',
'type' => TType::LST,
'etype' => TType::STRUCT,
'elem' => array(
'type' => TType::STRUCT,
'class' => '\EDAM\Types\Notebook',
),
),
3 => array(
'var' => 'tags',
'type' => TType::LST,
'etype' => TType::STRUCT,
'elem' => array(
'type' => TType::STRUCT,
'class' => '\EDAM\Types\Tag',
),
),
4 => array(
'var' => 'containingNotebooks',
'type' => TType::LST,
'etype' => TType::STRUCT,
'elem' => array(
'type' => TType::STRUCT,
'class' => '\EDAM\Types\NotebookDescriptor',
),
),
);
}
if (is_array($vals)) {
if (isset($vals['notes'])) {
$this->notes = $vals['notes'];
}
if (isset($vals['notebooks'])) {
$this->notebooks = $vals['notebooks'];
}
if (isset($vals['tags'])) {
$this->tags = $vals['tags'];
}
if (isset($vals['containingNotebooks'])) {
$this->containingNotebooks = $vals['containingNotebooks'];
}
}
}
public function getName() {
return 'RelatedResult';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::LST) {
$this->notes = array();
$_size165 = 0;
$_etype168 = 0;
$xfer += $input->readListBegin($_etype168, $_size165);
for ($_i169 = 0; $_i169 < $_size165; ++$_i169)
{
$elem170 = null;
$elem170 = new \EDAM\Types\Note();
$xfer += $elem170->read($input);
$this->notes []= $elem170;
}
$xfer += $input->readListEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::LST) {
$this->notebooks = array();
$_size171 = 0;
$_etype174 = 0;
$xfer += $input->readListBegin($_etype174, $_size171);
for ($_i175 = 0; $_i175 < $_size171; ++$_i175)
{
$elem176 = null;
$elem176 = new \EDAM\Types\Notebook();
$xfer += $elem176->read($input);
$this->notebooks []= $elem176;
}
$xfer += $input->readListEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::LST) {
$this->tags = array();
$_size177 = 0;
$_etype180 = 0;
$xfer += $input->readListBegin($_etype180, $_size177);
for ($_i181 = 0; $_i181 < $_size177; ++$_i181)
{
$elem182 = null;
$elem182 = new \EDAM\Types\Tag();
$xfer += $elem182->read($input);
$this->tags []= $elem182;
}
$xfer += $input->readListEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
case 4:
if ($ftype == TType::LST) {
$this->containingNotebooks = array();
$_size183 = 0;
$_etype186 = 0;
$xfer += $input->readListBegin($_etype186, $_size183);
for ($_i187 = 0; $_i187 < $_size183; ++$_i187)
{
$elem188 = null;
$elem188 = new \EDAM\Types\NotebookDescriptor();
$xfer += $elem188->read($input);
$this->containingNotebooks []= $elem188;
}
$xfer += $input->readListEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('RelatedResult');
if ($this->notes !== null) {
if (!is_array($this->notes)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('notes', TType::LST, 1);
{
$output->writeListBegin(TType::STRUCT, count($this->notes));
{
foreach ($this->notes as $iter189)
{
$xfer += $iter189->write($output);
}
}
$output->writeListEnd();
}
$xfer += $output->writeFieldEnd();
}
if ($this->notebooks !== null) {
if (!is_array($this->notebooks)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('notebooks', TType::LST, 2);
{
$output->writeListBegin(TType::STRUCT, count($this->notebooks));
{
foreach ($this->notebooks as $iter190)
{
$xfer += $iter190->write($output);
}
}
$output->writeListEnd();
}
$xfer += $output->writeFieldEnd();
}
if ($this->tags !== null) {
if (!is_array($this->tags)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('tags', TType::LST, 3);
{
$output->writeListBegin(TType::STRUCT, count($this->tags));
{
foreach ($this->tags as $iter191)
{
$xfer += $iter191->write($output);
}
}
$output->writeListEnd();
}
$xfer += $output->writeFieldEnd();
}
if ($this->containingNotebooks !== null) {
if (!is_array($this->containingNotebooks)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('containingNotebooks', TType::LST, 4);
{
$output->writeListBegin(TType::STRUCT, count($this->containingNotebooks));
{
foreach ($this->containingNotebooks as $iter192)
{
$xfer += $iter192->write($output);
}
}
$output->writeListEnd();
}
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class RelatedResultSpec {
static $_TSPEC;
public $maxNotes = null;
public $maxNotebooks = null;
public $maxTags = null;
public $writableNotebooksOnly = null;
public $includeContainingNotebooks = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'maxNotes',
'type' => TType::I32,
),
2 => array(
'var' => 'maxNotebooks',
'type' => TType::I32,
),
3 => array(
'var' => 'maxTags',
'type' => TType::I32,
),
4 => array(
'var' => 'writableNotebooksOnly',
'type' => TType::BOOL,
),
5 => array(
'var' => 'includeContainingNotebooks',
'type' => TType::BOOL,
),
);
}
if (is_array($vals)) {
if (isset($vals['maxNotes'])) {
$this->maxNotes = $vals['maxNotes'];
}
if (isset($vals['maxNotebooks'])) {
$this->maxNotebooks = $vals['maxNotebooks'];
}
if (isset($vals['maxTags'])) {
$this->maxTags = $vals['maxTags'];
}
if (isset($vals['writableNotebooksOnly'])) {
$this->writableNotebooksOnly = $vals['writableNotebooksOnly'];
}
if (isset($vals['includeContainingNotebooks'])) {
$this->includeContainingNotebooks = $vals['includeContainingNotebooks'];
}
}
}
public function getName() {
return 'RelatedResultSpec';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->maxNotes);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->maxNotebooks);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->maxTags);
} else {
$xfer += $input->skip($ftype);
}
break;
case 4:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->writableNotebooksOnly);
} else {
$xfer += $input->skip($ftype);
}
break;
case 5:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->includeContainingNotebooks);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('RelatedResultSpec');
if ($this->maxNotes !== null) {
$xfer += $output->writeFieldBegin('maxNotes', TType::I32, 1);
$xfer += $output->writeI32($this->maxNotes);
$xfer += $output->writeFieldEnd();
}
if ($this->maxNotebooks !== null) {
$xfer += $output->writeFieldBegin('maxNotebooks', TType::I32, 2);
$xfer += $output->writeI32($this->maxNotebooks);
$xfer += $output->writeFieldEnd();
}
if ($this->maxTags !== null) {
$xfer += $output->writeFieldBegin('maxTags', TType::I32, 3);
$xfer += $output->writeI32($this->maxTags);
$xfer += $output->writeFieldEnd();
}
if ($this->writableNotebooksOnly !== null) {
$xfer += $output->writeFieldBegin('writableNotebooksOnly', TType::BOOL, 4);
$xfer += $output->writeBool($this->writableNotebooksOnly);
$xfer += $output->writeFieldEnd();
}
if ($this->includeContainingNotebooks !== null) {
$xfer += $output->writeFieldBegin('includeContainingNotebooks', TType::BOOL, 5);
$xfer += $output->writeBool($this->includeContainingNotebooks);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
================================================
FILE: src/EDAM/Types/Types.php
================================================
'NORMAL',
3 => 'PREMIUM',
5 => 'VIP',
7 => 'MANAGER',
8 => 'SUPPORT',
9 => 'ADMIN',
);
}
final class QueryFormat {
const USER = 1;
const SEXP = 2;
static public $__names = array(
1 => 'USER',
2 => 'SEXP',
);
}
final class NoteSortOrder {
const CREATED = 1;
const UPDATED = 2;
const RELEVANCE = 3;
const UPDATE_SEQUENCE_NUMBER = 4;
const TITLE = 5;
static public $__names = array(
1 => 'CREATED',
2 => 'UPDATED',
3 => 'RELEVANCE',
4 => 'UPDATE_SEQUENCE_NUMBER',
5 => 'TITLE',
);
}
final class PremiumOrderStatus {
const NONE = 0;
const PENDING = 1;
const ACTIVE = 2;
const FAILED = 3;
const CANCELLATION_PENDING = 4;
const CANCELED = 5;
static public $__names = array(
0 => 'NONE',
1 => 'PENDING',
2 => 'ACTIVE',
3 => 'FAILED',
4 => 'CANCELLATION_PENDING',
5 => 'CANCELED',
);
}
final class SharedNotebookPrivilegeLevel {
const READ_NOTEBOOK = 0;
const MODIFY_NOTEBOOK_PLUS_ACTIVITY = 1;
const READ_NOTEBOOK_PLUS_ACTIVITY = 2;
const GROUP = 3;
const FULL_ACCESS = 4;
const BUSINESS_FULL_ACCESS = 5;
static public $__names = array(
0 => 'READ_NOTEBOOK',
1 => 'MODIFY_NOTEBOOK_PLUS_ACTIVITY',
2 => 'READ_NOTEBOOK_PLUS_ACTIVITY',
3 => 'GROUP',
4 => 'FULL_ACCESS',
5 => 'BUSINESS_FULL_ACCESS',
);
}
final class SponsoredGroupRole {
const GROUP_MEMBER = 1;
const GROUP_ADMIN = 2;
const GROUP_OWNER = 3;
static public $__names = array(
1 => 'GROUP_MEMBER',
2 => 'GROUP_ADMIN',
3 => 'GROUP_OWNER',
);
}
final class BusinessUserRole {
const ADMIN = 1;
const NORMAL = 2;
static public $__names = array(
1 => 'ADMIN',
2 => 'NORMAL',
);
}
final class SharedNotebookInstanceRestrictions {
const ONLY_JOINED_OR_PREVIEW = 1;
const NO_SHARED_NOTEBOOKS = 2;
static public $__names = array(
1 => 'ONLY_JOINED_OR_PREVIEW',
2 => 'NO_SHARED_NOTEBOOKS',
);
}
final class ReminderEmailConfig {
const DO_NOT_SEND = 1;
const SEND_DAILY_EMAIL = 2;
static public $__names = array(
1 => 'DO_NOT_SEND',
2 => 'SEND_DAILY_EMAIL',
);
}
class Data {
static $_TSPEC;
public $bodyHash = null;
public $size = null;
public $body = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'bodyHash',
'type' => TType::STRING,
),
2 => array(
'var' => 'size',
'type' => TType::I32,
),
3 => array(
'var' => 'body',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['bodyHash'])) {
$this->bodyHash = $vals['bodyHash'];
}
if (isset($vals['size'])) {
$this->size = $vals['size'];
}
if (isset($vals['body'])) {
$this->body = $vals['body'];
}
}
}
public function getName() {
return 'Data';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->bodyHash);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->size);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->body);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('Data');
if ($this->bodyHash !== null) {
$xfer += $output->writeFieldBegin('bodyHash', TType::STRING, 1);
$xfer += $output->writeString($this->bodyHash);
$xfer += $output->writeFieldEnd();
}
if ($this->size !== null) {
$xfer += $output->writeFieldBegin('size', TType::I32, 2);
$xfer += $output->writeI32($this->size);
$xfer += $output->writeFieldEnd();
}
if ($this->body !== null) {
$xfer += $output->writeFieldBegin('body', TType::STRING, 3);
$xfer += $output->writeString($this->body);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class UserAttributes {
static $_TSPEC;
public $defaultLocationName = null;
public $defaultLatitude = null;
public $defaultLongitude = null;
public $preactivation = null;
public $viewedPromotions = null;
public $incomingEmailAddress = null;
public $recentMailedAddresses = null;
public $comments = null;
public $dateAgreedToTermsOfService = null;
public $maxReferrals = null;
public $referralCount = null;
public $refererCode = null;
public $sentEmailDate = null;
public $sentEmailCount = null;
public $dailyEmailLimit = null;
public $emailOptOutDate = null;
public $partnerEmailOptInDate = null;
public $preferredLanguage = null;
public $preferredCountry = null;
public $clipFullPage = null;
public $twitterUserName = null;
public $twitterId = null;
public $groupName = null;
public $recognitionLanguage = null;
public $referralProof = null;
public $educationalDiscount = null;
public $businessAddress = null;
public $hideSponsorBilling = null;
public $taxExempt = null;
public $useEmailAutoFiling = null;
public $reminderEmailConfig = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'defaultLocationName',
'type' => TType::STRING,
),
2 => array(
'var' => 'defaultLatitude',
'type' => TType::DOUBLE,
),
3 => array(
'var' => 'defaultLongitude',
'type' => TType::DOUBLE,
),
4 => array(
'var' => 'preactivation',
'type' => TType::BOOL,
),
5 => array(
'var' => 'viewedPromotions',
'type' => TType::LST,
'etype' => TType::STRING,
'elem' => array(
'type' => TType::STRING,
),
),
6 => array(
'var' => 'incomingEmailAddress',
'type' => TType::STRING,
),
7 => array(
'var' => 'recentMailedAddresses',
'type' => TType::LST,
'etype' => TType::STRING,
'elem' => array(
'type' => TType::STRING,
),
),
9 => array(
'var' => 'comments',
'type' => TType::STRING,
),
11 => array(
'var' => 'dateAgreedToTermsOfService',
'type' => TType::I64,
),
12 => array(
'var' => 'maxReferrals',
'type' => TType::I32,
),
13 => array(
'var' => 'referralCount',
'type' => TType::I32,
),
14 => array(
'var' => 'refererCode',
'type' => TType::STRING,
),
15 => array(
'var' => 'sentEmailDate',
'type' => TType::I64,
),
16 => array(
'var' => 'sentEmailCount',
'type' => TType::I32,
),
17 => array(
'var' => 'dailyEmailLimit',
'type' => TType::I32,
),
18 => array(
'var' => 'emailOptOutDate',
'type' => TType::I64,
),
19 => array(
'var' => 'partnerEmailOptInDate',
'type' => TType::I64,
),
20 => array(
'var' => 'preferredLanguage',
'type' => TType::STRING,
),
21 => array(
'var' => 'preferredCountry',
'type' => TType::STRING,
),
22 => array(
'var' => 'clipFullPage',
'type' => TType::BOOL,
),
23 => array(
'var' => 'twitterUserName',
'type' => TType::STRING,
),
24 => array(
'var' => 'twitterId',
'type' => TType::STRING,
),
25 => array(
'var' => 'groupName',
'type' => TType::STRING,
),
26 => array(
'var' => 'recognitionLanguage',
'type' => TType::STRING,
),
28 => array(
'var' => 'referralProof',
'type' => TType::STRING,
),
29 => array(
'var' => 'educationalDiscount',
'type' => TType::BOOL,
),
30 => array(
'var' => 'businessAddress',
'type' => TType::STRING,
),
31 => array(
'var' => 'hideSponsorBilling',
'type' => TType::BOOL,
),
32 => array(
'var' => 'taxExempt',
'type' => TType::BOOL,
),
33 => array(
'var' => 'useEmailAutoFiling',
'type' => TType::BOOL,
),
34 => array(
'var' => 'reminderEmailConfig',
'type' => TType::I32,
),
);
}
if (is_array($vals)) {
if (isset($vals['defaultLocationName'])) {
$this->defaultLocationName = $vals['defaultLocationName'];
}
if (isset($vals['defaultLatitude'])) {
$this->defaultLatitude = $vals['defaultLatitude'];
}
if (isset($vals['defaultLongitude'])) {
$this->defaultLongitude = $vals['defaultLongitude'];
}
if (isset($vals['preactivation'])) {
$this->preactivation = $vals['preactivation'];
}
if (isset($vals['viewedPromotions'])) {
$this->viewedPromotions = $vals['viewedPromotions'];
}
if (isset($vals['incomingEmailAddress'])) {
$this->incomingEmailAddress = $vals['incomingEmailAddress'];
}
if (isset($vals['recentMailedAddresses'])) {
$this->recentMailedAddresses = $vals['recentMailedAddresses'];
}
if (isset($vals['comments'])) {
$this->comments = $vals['comments'];
}
if (isset($vals['dateAgreedToTermsOfService'])) {
$this->dateAgreedToTermsOfService = $vals['dateAgreedToTermsOfService'];
}
if (isset($vals['maxReferrals'])) {
$this->maxReferrals = $vals['maxReferrals'];
}
if (isset($vals['referralCount'])) {
$this->referralCount = $vals['referralCount'];
}
if (isset($vals['refererCode'])) {
$this->refererCode = $vals['refererCode'];
}
if (isset($vals['sentEmailDate'])) {
$this->sentEmailDate = $vals['sentEmailDate'];
}
if (isset($vals['sentEmailCount'])) {
$this->sentEmailCount = $vals['sentEmailCount'];
}
if (isset($vals['dailyEmailLimit'])) {
$this->dailyEmailLimit = $vals['dailyEmailLimit'];
}
if (isset($vals['emailOptOutDate'])) {
$this->emailOptOutDate = $vals['emailOptOutDate'];
}
if (isset($vals['partnerEmailOptInDate'])) {
$this->partnerEmailOptInDate = $vals['partnerEmailOptInDate'];
}
if (isset($vals['preferredLanguage'])) {
$this->preferredLanguage = $vals['preferredLanguage'];
}
if (isset($vals['preferredCountry'])) {
$this->preferredCountry = $vals['preferredCountry'];
}
if (isset($vals['clipFullPage'])) {
$this->clipFullPage = $vals['clipFullPage'];
}
if (isset($vals['twitterUserName'])) {
$this->twitterUserName = $vals['twitterUserName'];
}
if (isset($vals['twitterId'])) {
$this->twitterId = $vals['twitterId'];
}
if (isset($vals['groupName'])) {
$this->groupName = $vals['groupName'];
}
if (isset($vals['recognitionLanguage'])) {
$this->recognitionLanguage = $vals['recognitionLanguage'];
}
if (isset($vals['referralProof'])) {
$this->referralProof = $vals['referralProof'];
}
if (isset($vals['educationalDiscount'])) {
$this->educationalDiscount = $vals['educationalDiscount'];
}
if (isset($vals['businessAddress'])) {
$this->businessAddress = $vals['businessAddress'];
}
if (isset($vals['hideSponsorBilling'])) {
$this->hideSponsorBilling = $vals['hideSponsorBilling'];
}
if (isset($vals['taxExempt'])) {
$this->taxExempt = $vals['taxExempt'];
}
if (isset($vals['useEmailAutoFiling'])) {
$this->useEmailAutoFiling = $vals['useEmailAutoFiling'];
}
if (isset($vals['reminderEmailConfig'])) {
$this->reminderEmailConfig = $vals['reminderEmailConfig'];
}
}
}
public function getName() {
return 'UserAttributes';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->defaultLocationName);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::DOUBLE) {
$xfer += $input->readDouble($this->defaultLatitude);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::DOUBLE) {
$xfer += $input->readDouble($this->defaultLongitude);
} else {
$xfer += $input->skip($ftype);
}
break;
case 4:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->preactivation);
} else {
$xfer += $input->skip($ftype);
}
break;
case 5:
if ($ftype == TType::LST) {
$this->viewedPromotions = array();
$_size0 = 0;
$_etype3 = 0;
$xfer += $input->readListBegin($_etype3, $_size0);
for ($_i4 = 0; $_i4 < $_size0; ++$_i4)
{
$elem5 = null;
$xfer += $input->readString($elem5);
$this->viewedPromotions []= $elem5;
}
$xfer += $input->readListEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
case 6:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->incomingEmailAddress);
} else {
$xfer += $input->skip($ftype);
}
break;
case 7:
if ($ftype == TType::LST) {
$this->recentMailedAddresses = array();
$_size6 = 0;
$_etype9 = 0;
$xfer += $input->readListBegin($_etype9, $_size6);
for ($_i10 = 0; $_i10 < $_size6; ++$_i10)
{
$elem11 = null;
$xfer += $input->readString($elem11);
$this->recentMailedAddresses []= $elem11;
}
$xfer += $input->readListEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
case 9:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->comments);
} else {
$xfer += $input->skip($ftype);
}
break;
case 11:
if ($ftype == TType::I64) {
$xfer += $input->readI64($this->dateAgreedToTermsOfService);
} else {
$xfer += $input->skip($ftype);
}
break;
case 12:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->maxReferrals);
} else {
$xfer += $input->skip($ftype);
}
break;
case 13:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->referralCount);
} else {
$xfer += $input->skip($ftype);
}
break;
case 14:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->refererCode);
} else {
$xfer += $input->skip($ftype);
}
break;
case 15:
if ($ftype == TType::I64) {
$xfer += $input->readI64($this->sentEmailDate);
} else {
$xfer += $input->skip($ftype);
}
break;
case 16:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->sentEmailCount);
} else {
$xfer += $input->skip($ftype);
}
break;
case 17:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->dailyEmailLimit);
} else {
$xfer += $input->skip($ftype);
}
break;
case 18:
if ($ftype == TType::I64) {
$xfer += $input->readI64($this->emailOptOutDate);
} else {
$xfer += $input->skip($ftype);
}
break;
case 19:
if ($ftype == TType::I64) {
$xfer += $input->readI64($this->partnerEmailOptInDate);
} else {
$xfer += $input->skip($ftype);
}
break;
case 20:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->preferredLanguage);
} else {
$xfer += $input->skip($ftype);
}
break;
case 21:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->preferredCountry);
} else {
$xfer += $input->skip($ftype);
}
break;
case 22:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->clipFullPage);
} else {
$xfer += $input->skip($ftype);
}
break;
case 23:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->twitterUserName);
} else {
$xfer += $input->skip($ftype);
}
break;
case 24:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->twitterId);
} else {
$xfer += $input->skip($ftype);
}
break;
case 25:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->groupName);
} else {
$xfer += $input->skip($ftype);
}
break;
case 26:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->recognitionLanguage);
} else {
$xfer += $input->skip($ftype);
}
break;
case 28:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->referralProof);
} else {
$xfer += $input->skip($ftype);
}
break;
case 29:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->educationalDiscount);
} else {
$xfer += $input->skip($ftype);
}
break;
case 30:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->businessAddress);
} else {
$xfer += $input->skip($ftype);
}
break;
case 31:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->hideSponsorBilling);
} else {
$xfer += $input->skip($ftype);
}
break;
case 32:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->taxExempt);
} else {
$xfer += $input->skip($ftype);
}
break;
case 33:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->useEmailAutoFiling);
} else {
$xfer += $input->skip($ftype);
}
break;
case 34:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->reminderEmailConfig);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('UserAttributes');
if ($this->defaultLocationName !== null) {
$xfer += $output->writeFieldBegin('defaultLocationName', TType::STRING, 1);
$xfer += $output->writeString($this->defaultLocationName);
$xfer += $output->writeFieldEnd();
}
if ($this->defaultLatitude !== null) {
$xfer += $output->writeFieldBegin('defaultLatitude', TType::DOUBLE, 2);
$xfer += $output->writeDouble($this->defaultLatitude);
$xfer += $output->writeFieldEnd();
}
if ($this->defaultLongitude !== null) {
$xfer += $output->writeFieldBegin('defaultLongitude', TType::DOUBLE, 3);
$xfer += $output->writeDouble($this->defaultLongitude);
$xfer += $output->writeFieldEnd();
}
if ($this->preactivation !== null) {
$xfer += $output->writeFieldBegin('preactivation', TType::BOOL, 4);
$xfer += $output->writeBool($this->preactivation);
$xfer += $output->writeFieldEnd();
}
if ($this->viewedPromotions !== null) {
if (!is_array($this->viewedPromotions)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('viewedPromotions', TType::LST, 5);
{
$output->writeListBegin(TType::STRING, count($this->viewedPromotions));
{
foreach ($this->viewedPromotions as $iter12)
{
$xfer += $output->writeString($iter12);
}
}
$output->writeListEnd();
}
$xfer += $output->writeFieldEnd();
}
if ($this->incomingEmailAddress !== null) {
$xfer += $output->writeFieldBegin('incomingEmailAddress', TType::STRING, 6);
$xfer += $output->writeString($this->incomingEmailAddress);
$xfer += $output->writeFieldEnd();
}
if ($this->recentMailedAddresses !== null) {
if (!is_array($this->recentMailedAddresses)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('recentMailedAddresses', TType::LST, 7);
{
$output->writeListBegin(TType::STRING, count($this->recentMailedAddresses));
{
foreach ($this->recentMailedAddresses as $iter13)
{
$xfer += $output->writeString($iter13);
}
}
$output->writeListEnd();
}
$xfer += $output->writeFieldEnd();
}
if ($this->comments !== null) {
$xfer += $output->writeFieldBegin('comments', TType::STRING, 9);
$xfer += $output->writeString($this->comments);
$xfer += $output->writeFieldEnd();
}
if ($this->dateAgreedToTermsOfService !== null) {
$xfer += $output->writeFieldBegin('dateAgreedToTermsOfService', TType::I64, 11);
$xfer += $output->writeI64($this->dateAgreedToTermsOfService);
$xfer += $output->writeFieldEnd();
}
if ($this->maxReferrals !== null) {
$xfer += $output->writeFieldBegin('maxReferrals', TType::I32, 12);
$xfer += $output->writeI32($this->maxReferrals);
$xfer += $output->writeFieldEnd();
}
if ($this->referralCount !== null) {
$xfer += $output->writeFieldBegin('referralCount', TType::I32, 13);
$xfer += $output->writeI32($this->referralCount);
$xfer += $output->writeFieldEnd();
}
if ($this->refererCode !== null) {
$xfer += $output->writeFieldBegin('refererCode', TType::STRING, 14);
$xfer += $output->writeString($this->refererCode);
$xfer += $output->writeFieldEnd();
}
if ($this->sentEmailDate !== null) {
$xfer += $output->writeFieldBegin('sentEmailDate', TType::I64, 15);
$xfer += $output->writeI64($this->sentEmailDate);
$xfer += $output->writeFieldEnd();
}
if ($this->sentEmailCount !== null) {
$xfer += $output->writeFieldBegin('sentEmailCount', TType::I32, 16);
$xfer += $output->writeI32($this->sentEmailCount);
$xfer += $output->writeFieldEnd();
}
if ($this->dailyEmailLimit !== null) {
$xfer += $output->writeFieldBegin('dailyEmailLimit', TType::I32, 17);
$xfer += $output->writeI32($this->dailyEmailLimit);
$xfer += $output->writeFieldEnd();
}
if ($this->emailOptOutDate !== null) {
$xfer += $output->writeFieldBegin('emailOptOutDate', TType::I64, 18);
$xfer += $output->writeI64($this->emailOptOutDate);
$xfer += $output->writeFieldEnd();
}
if ($this->partnerEmailOptInDate !== null) {
$xfer += $output->writeFieldBegin('partnerEmailOptInDate', TType::I64, 19);
$xfer += $output->writeI64($this->partnerEmailOptInDate);
$xfer += $output->writeFieldEnd();
}
if ($this->preferredLanguage !== null) {
$xfer += $output->writeFieldBegin('preferredLanguage', TType::STRING, 20);
$xfer += $output->writeString($this->preferredLanguage);
$xfer += $output->writeFieldEnd();
}
if ($this->preferredCountry !== null) {
$xfer += $output->writeFieldBegin('preferredCountry', TType::STRING, 21);
$xfer += $output->writeString($this->preferredCountry);
$xfer += $output->writeFieldEnd();
}
if ($this->clipFullPage !== null) {
$xfer += $output->writeFieldBegin('clipFullPage', TType::BOOL, 22);
$xfer += $output->writeBool($this->clipFullPage);
$xfer += $output->writeFieldEnd();
}
if ($this->twitterUserName !== null) {
$xfer += $output->writeFieldBegin('twitterUserName', TType::STRING, 23);
$xfer += $output->writeString($this->twitterUserName);
$xfer += $output->writeFieldEnd();
}
if ($this->twitterId !== null) {
$xfer += $output->writeFieldBegin('twitterId', TType::STRING, 24);
$xfer += $output->writeString($this->twitterId);
$xfer += $output->writeFieldEnd();
}
if ($this->groupName !== null) {
$xfer += $output->writeFieldBegin('groupName', TType::STRING, 25);
$xfer += $output->writeString($this->groupName);
$xfer += $output->writeFieldEnd();
}
if ($this->recognitionLanguage !== null) {
$xfer += $output->writeFieldBegin('recognitionLanguage', TType::STRING, 26);
$xfer += $output->writeString($this->recognitionLanguage);
$xfer += $output->writeFieldEnd();
}
if ($this->referralProof !== null) {
$xfer += $output->writeFieldBegin('referralProof', TType::STRING, 28);
$xfer += $output->writeString($this->referralProof);
$xfer += $output->writeFieldEnd();
}
if ($this->educationalDiscount !== null) {
$xfer += $output->writeFieldBegin('educationalDiscount', TType::BOOL, 29);
$xfer += $output->writeBool($this->educationalDiscount);
$xfer += $output->writeFieldEnd();
}
if ($this->businessAddress !== null) {
$xfer += $output->writeFieldBegin('businessAddress', TType::STRING, 30);
$xfer += $output->writeString($this->businessAddress);
$xfer += $output->writeFieldEnd();
}
if ($this->hideSponsorBilling !== null) {
$xfer += $output->writeFieldBegin('hideSponsorBilling', TType::BOOL, 31);
$xfer += $output->writeBool($this->hideSponsorBilling);
$xfer += $output->writeFieldEnd();
}
if ($this->taxExempt !== null) {
$xfer += $output->writeFieldBegin('taxExempt', TType::BOOL, 32);
$xfer += $output->writeBool($this->taxExempt);
$xfer += $output->writeFieldEnd();
}
if ($this->useEmailAutoFiling !== null) {
$xfer += $output->writeFieldBegin('useEmailAutoFiling', TType::BOOL, 33);
$xfer += $output->writeBool($this->useEmailAutoFiling);
$xfer += $output->writeFieldEnd();
}
if ($this->reminderEmailConfig !== null) {
$xfer += $output->writeFieldBegin('reminderEmailConfig', TType::I32, 34);
$xfer += $output->writeI32($this->reminderEmailConfig);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class Accounting {
static $_TSPEC;
public $uploadLimit = null;
public $uploadLimitEnd = null;
public $uploadLimitNextMonth = null;
public $premiumServiceStatus = null;
public $premiumOrderNumber = null;
public $premiumCommerceService = null;
public $premiumServiceStart = null;
public $premiumServiceSKU = null;
public $lastSuccessfulCharge = null;
public $lastFailedCharge = null;
public $lastFailedChargeReason = null;
public $nextPaymentDue = null;
public $premiumLockUntil = null;
public $updated = null;
public $premiumSubscriptionNumber = null;
public $lastRequestedCharge = null;
public $currency = null;
public $unitPrice = null;
public $businessId = null;
public $businessName = null;
public $businessRole = null;
public $unitDiscount = null;
public $nextChargeDate = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'uploadLimit',
'type' => TType::I64,
),
2 => array(
'var' => 'uploadLimitEnd',
'type' => TType::I64,
),
3 => array(
'var' => 'uploadLimitNextMonth',
'type' => TType::I64,
),
4 => array(
'var' => 'premiumServiceStatus',
'type' => TType::I32,
),
5 => array(
'var' => 'premiumOrderNumber',
'type' => TType::STRING,
),
6 => array(
'var' => 'premiumCommerceService',
'type' => TType::STRING,
),
7 => array(
'var' => 'premiumServiceStart',
'type' => TType::I64,
),
8 => array(
'var' => 'premiumServiceSKU',
'type' => TType::STRING,
),
9 => array(
'var' => 'lastSuccessfulCharge',
'type' => TType::I64,
),
10 => array(
'var' => 'lastFailedCharge',
'type' => TType::I64,
),
11 => array(
'var' => 'lastFailedChargeReason',
'type' => TType::STRING,
),
12 => array(
'var' => 'nextPaymentDue',
'type' => TType::I64,
),
13 => array(
'var' => 'premiumLockUntil',
'type' => TType::I64,
),
14 => array(
'var' => 'updated',
'type' => TType::I64,
),
16 => array(
'var' => 'premiumSubscriptionNumber',
'type' => TType::STRING,
),
17 => array(
'var' => 'lastRequestedCharge',
'type' => TType::I64,
),
18 => array(
'var' => 'currency',
'type' => TType::STRING,
),
19 => array(
'var' => 'unitPrice',
'type' => TType::I32,
),
20 => array(
'var' => 'businessId',
'type' => TType::I32,
),
21 => array(
'var' => 'businessName',
'type' => TType::STRING,
),
22 => array(
'var' => 'businessRole',
'type' => TType::I32,
),
23 => array(
'var' => 'unitDiscount',
'type' => TType::I32,
),
24 => array(
'var' => 'nextChargeDate',
'type' => TType::I64,
),
);
}
if (is_array($vals)) {
if (isset($vals['uploadLimit'])) {
$this->uploadLimit = $vals['uploadLimit'];
}
if (isset($vals['uploadLimitEnd'])) {
$this->uploadLimitEnd = $vals['uploadLimitEnd'];
}
if (isset($vals['uploadLimitNextMonth'])) {
$this->uploadLimitNextMonth = $vals['uploadLimitNextMonth'];
}
if (isset($vals['premiumServiceStatus'])) {
$this->premiumServiceStatus = $vals['premiumServiceStatus'];
}
if (isset($vals['premiumOrderNumber'])) {
$this->premiumOrderNumber = $vals['premiumOrderNumber'];
}
if (isset($vals['premiumCommerceService'])) {
$this->premiumCommerceService = $vals['premiumCommerceService'];
}
if (isset($vals['premiumServiceStart'])) {
$this->premiumServiceStart = $vals['premiumServiceStart'];
}
if (isset($vals['premiumServiceSKU'])) {
$this->premiumServiceSKU = $vals['premiumServiceSKU'];
}
if (isset($vals['lastSuccessfulCharge'])) {
$this->lastSuccessfulCharge = $vals['lastSuccessfulCharge'];
}
if (isset($vals['lastFailedCharge'])) {
$this->lastFailedCharge = $vals['lastFailedCharge'];
}
if (isset($vals['lastFailedChargeReason'])) {
$this->lastFailedChargeReason = $vals['lastFailedChargeReason'];
}
if (isset($vals['nextPaymentDue'])) {
$this->nextPaymentDue = $vals['nextPaymentDue'];
}
if (isset($vals['premiumLockUntil'])) {
$this->premiumLockUntil = $vals['premiumLockUntil'];
}
if (isset($vals['updated'])) {
$this->updated = $vals['updated'];
}
if (isset($vals['premiumSubscriptionNumber'])) {
$this->premiumSubscriptionNumber = $vals['premiumSubscriptionNumber'];
}
if (isset($vals['lastRequestedCharge'])) {
$this->lastRequestedCharge = $vals['lastRequestedCharge'];
}
if (isset($vals['currency'])) {
$this->currency = $vals['currency'];
}
if (isset($vals['unitPrice'])) {
$this->unitPrice = $vals['unitPrice'];
}
if (isset($vals['businessId'])) {
$this->businessId = $vals['businessId'];
}
if (isset($vals['businessName'])) {
$this->businessName = $vals['businessName'];
}
if (isset($vals['businessRole'])) {
$this->businessRole = $vals['businessRole'];
}
if (isset($vals['unitDiscount'])) {
$this->unitDiscount = $vals['unitDiscount'];
}
if (isset($vals['nextChargeDate'])) {
$this->nextChargeDate = $vals['nextChargeDate'];
}
}
}
public function getName() {
return 'Accounting';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::I64) {
$xfer += $input->readI64($this->uploadLimit);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::I64) {
$xfer += $input->readI64($this->uploadLimitEnd);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::I64) {
$xfer += $input->readI64($this->uploadLimitNextMonth);
} else {
$xfer += $input->skip($ftype);
}
break;
case 4:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->premiumServiceStatus);
} else {
$xfer += $input->skip($ftype);
}
break;
case 5:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->premiumOrderNumber);
} else {
$xfer += $input->skip($ftype);
}
break;
case 6:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->premiumCommerceService);
} else {
$xfer += $input->skip($ftype);
}
break;
case 7:
if ($ftype == TType::I64) {
$xfer += $input->readI64($this->premiumServiceStart);
} else {
$xfer += $input->skip($ftype);
}
break;
case 8:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->premiumServiceSKU);
} else {
$xfer += $input->skip($ftype);
}
break;
case 9:
if ($ftype == TType::I64) {
$xfer += $input->readI64($this->lastSuccessfulCharge);
} else {
$xfer += $input->skip($ftype);
}
break;
case 10:
if ($ftype == TType::I64) {
$xfer += $input->readI64($this->lastFailedCharge);
} else {
$xfer += $input->skip($ftype);
}
break;
case 11:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->lastFailedChargeReason);
} else {
$xfer += $input->skip($ftype);
}
break;
case 12:
if ($ftype == TType::I64) {
$xfer += $input->readI64($this->nextPaymentDue);
} else {
$xfer += $input->skip($ftype);
}
break;
case 13:
if ($ftype == TType::I64) {
$xfer += $input->readI64($this->premiumLockUntil);
} else {
$xfer += $input->skip($ftype);
}
break;
case 14:
if ($ftype == TType::I64) {
$xfer += $input->readI64($this->updated);
} else {
$xfer += $input->skip($ftype);
}
break;
case 16:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->premiumSubscriptionNumber);
} else {
$xfer += $input->skip($ftype);
}
break;
case 17:
if ($ftype == TType::I64) {
$xfer += $input->readI64($this->lastRequestedCharge);
} else {
$xfer += $input->skip($ftype);
}
break;
case 18:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->currency);
} else {
$xfer += $input->skip($ftype);
}
break;
case 19:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->unitPrice);
} else {
$xfer += $input->skip($ftype);
}
break;
case 20:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->businessId);
} else {
$xfer += $input->skip($ftype);
}
break;
case 21:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->businessName);
} else {
$xfer += $input->skip($ftype);
}
break;
case 22:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->businessRole);
} else {
$xfer += $input->skip($ftype);
}
break;
case 23:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->unitDiscount);
} else {
$xfer += $input->skip($ftype);
}
break;
case 24:
if ($ftype == TType::I64) {
$xfer += $input->readI64($this->nextChargeDate);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('Accounting');
if ($this->uploadLimit !== null) {
$xfer += $output->writeFieldBegin('uploadLimit', TType::I64, 1);
$xfer += $output->writeI64($this->uploadLimit);
$xfer += $output->writeFieldEnd();
}
if ($this->uploadLimitEnd !== null) {
$xfer += $output->writeFieldBegin('uploadLimitEnd', TType::I64, 2);
$xfer += $output->writeI64($this->uploadLimitEnd);
$xfer += $output->writeFieldEnd();
}
if ($this->uploadLimitNextMonth !== null) {
$xfer += $output->writeFieldBegin('uploadLimitNextMonth', TType::I64, 3);
$xfer += $output->writeI64($this->uploadLimitNextMonth);
$xfer += $output->writeFieldEnd();
}
if ($this->premiumServiceStatus !== null) {
$xfer += $output->writeFieldBegin('premiumServiceStatus', TType::I32, 4);
$xfer += $output->writeI32($this->premiumServiceStatus);
$xfer += $output->writeFieldEnd();
}
if ($this->premiumOrderNumber !== null) {
$xfer += $output->writeFieldBegin('premiumOrderNumber', TType::STRING, 5);
$xfer += $output->writeString($this->premiumOrderNumber);
$xfer += $output->writeFieldEnd();
}
if ($this->premiumCommerceService !== null) {
$xfer += $output->writeFieldBegin('premiumCommerceService', TType::STRING, 6);
$xfer += $output->writeString($this->premiumCommerceService);
$xfer += $output->writeFieldEnd();
}
if ($this->premiumServiceStart !== null) {
$xfer += $output->writeFieldBegin('premiumServiceStart', TType::I64, 7);
$xfer += $output->writeI64($this->premiumServiceStart);
$xfer += $output->writeFieldEnd();
}
if ($this->premiumServiceSKU !== null) {
$xfer += $output->writeFieldBegin('premiumServiceSKU', TType::STRING, 8);
$xfer += $output->writeString($this->premiumServiceSKU);
$xfer += $output->writeFieldEnd();
}
if ($this->lastSuccessfulCharge !== null) {
$xfer += $output->writeFieldBegin('lastSuccessfulCharge', TType::I64, 9);
$xfer += $output->writeI64($this->lastSuccessfulCharge);
$xfer += $output->writeFieldEnd();
}
if ($this->lastFailedCharge !== null) {
$xfer += $output->writeFieldBegin('lastFailedCharge', TType::I64, 10);
$xfer += $output->writeI64($this->lastFailedCharge);
$xfer += $output->writeFieldEnd();
}
if ($this->lastFailedChargeReason !== null) {
$xfer += $output->writeFieldBegin('lastFailedChargeReason', TType::STRING, 11);
$xfer += $output->writeString($this->lastFailedChargeReason);
$xfer += $output->writeFieldEnd();
}
if ($this->nextPaymentDue !== null) {
$xfer += $output->writeFieldBegin('nextPaymentDue', TType::I64, 12);
$xfer += $output->writeI64($this->nextPaymentDue);
$xfer += $output->writeFieldEnd();
}
if ($this->premiumLockUntil !== null) {
$xfer += $output->writeFieldBegin('premiumLockUntil', TType::I64, 13);
$xfer += $output->writeI64($this->premiumLockUntil);
$xfer += $output->writeFieldEnd();
}
if ($this->updated !== null) {
$xfer += $output->writeFieldBegin('updated', TType::I64, 14);
$xfer += $output->writeI64($this->updated);
$xfer += $output->writeFieldEnd();
}
if ($this->premiumSubscriptionNumber !== null) {
$xfer += $output->writeFieldBegin('premiumSubscriptionNumber', TType::STRING, 16);
$xfer += $output->writeString($this->premiumSubscriptionNumber);
$xfer += $output->writeFieldEnd();
}
if ($this->lastRequestedCharge !== null) {
$xfer += $output->writeFieldBegin('lastRequestedCharge', TType::I64, 17);
$xfer += $output->writeI64($this->lastRequestedCharge);
$xfer += $output->writeFieldEnd();
}
if ($this->currency !== null) {
$xfer += $output->writeFieldBegin('currency', TType::STRING, 18);
$xfer += $output->writeString($this->currency);
$xfer += $output->writeFieldEnd();
}
if ($this->unitPrice !== null) {
$xfer += $output->writeFieldBegin('unitPrice', TType::I32, 19);
$xfer += $output->writeI32($this->unitPrice);
$xfer += $output->writeFieldEnd();
}
if ($this->businessId !== null) {
$xfer += $output->writeFieldBegin('businessId', TType::I32, 20);
$xfer += $output->writeI32($this->businessId);
$xfer += $output->writeFieldEnd();
}
if ($this->businessName !== null) {
$xfer += $output->writeFieldBegin('businessName', TType::STRING, 21);
$xfer += $output->writeString($this->businessName);
$xfer += $output->writeFieldEnd();
}
if ($this->businessRole !== null) {
$xfer += $output->writeFieldBegin('businessRole', TType::I32, 22);
$xfer += $output->writeI32($this->businessRole);
$xfer += $output->writeFieldEnd();
}
if ($this->unitDiscount !== null) {
$xfer += $output->writeFieldBegin('unitDiscount', TType::I32, 23);
$xfer += $output->writeI32($this->unitDiscount);
$xfer += $output->writeFieldEnd();
}
if ($this->nextChargeDate !== null) {
$xfer += $output->writeFieldBegin('nextChargeDate', TType::I64, 24);
$xfer += $output->writeI64($this->nextChargeDate);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class BusinessUserInfo {
static $_TSPEC;
public $businessId = null;
public $businessName = null;
public $role = null;
public $email = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'businessId',
'type' => TType::I32,
),
2 => array(
'var' => 'businessName',
'type' => TType::STRING,
),
3 => array(
'var' => 'role',
'type' => TType::I32,
),
4 => array(
'var' => 'email',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['businessId'])) {
$this->businessId = $vals['businessId'];
}
if (isset($vals['businessName'])) {
$this->businessName = $vals['businessName'];
}
if (isset($vals['role'])) {
$this->role = $vals['role'];
}
if (isset($vals['email'])) {
$this->email = $vals['email'];
}
}
}
public function getName() {
return 'BusinessUserInfo';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->businessId);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->businessName);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->role);
} else {
$xfer += $input->skip($ftype);
}
break;
case 4:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->email);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('BusinessUserInfo');
if ($this->businessId !== null) {
$xfer += $output->writeFieldBegin('businessId', TType::I32, 1);
$xfer += $output->writeI32($this->businessId);
$xfer += $output->writeFieldEnd();
}
if ($this->businessName !== null) {
$xfer += $output->writeFieldBegin('businessName', TType::STRING, 2);
$xfer += $output->writeString($this->businessName);
$xfer += $output->writeFieldEnd();
}
if ($this->role !== null) {
$xfer += $output->writeFieldBegin('role', TType::I32, 3);
$xfer += $output->writeI32($this->role);
$xfer += $output->writeFieldEnd();
}
if ($this->email !== null) {
$xfer += $output->writeFieldBegin('email', TType::STRING, 4);
$xfer += $output->writeString($this->email);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class PremiumInfo {
static $_TSPEC;
public $currentTime = null;
public $premium = null;
public $premiumRecurring = null;
public $premiumExpirationDate = null;
public $premiumExtendable = null;
public $premiumPending = null;
public $premiumCancellationPending = null;
public $canPurchaseUploadAllowance = null;
public $sponsoredGroupName = null;
public $sponsoredGroupRole = null;
public $premiumUpgradable = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'currentTime',
'type' => TType::I64,
),
2 => array(
'var' => 'premium',
'type' => TType::BOOL,
),
3 => array(
'var' => 'premiumRecurring',
'type' => TType::BOOL,
),
4 => array(
'var' => 'premiumExpirationDate',
'type' => TType::I64,
),
5 => array(
'var' => 'premiumExtendable',
'type' => TType::BOOL,
),
6 => array(
'var' => 'premiumPending',
'type' => TType::BOOL,
),
7 => array(
'var' => 'premiumCancellationPending',
'type' => TType::BOOL,
),
8 => array(
'var' => 'canPurchaseUploadAllowance',
'type' => TType::BOOL,
),
9 => array(
'var' => 'sponsoredGroupName',
'type' => TType::STRING,
),
10 => array(
'var' => 'sponsoredGroupRole',
'type' => TType::I32,
),
11 => array(
'var' => 'premiumUpgradable',
'type' => TType::BOOL,
),
);
}
if (is_array($vals)) {
if (isset($vals['currentTime'])) {
$this->currentTime = $vals['currentTime'];
}
if (isset($vals['premium'])) {
$this->premium = $vals['premium'];
}
if (isset($vals['premiumRecurring'])) {
$this->premiumRecurring = $vals['premiumRecurring'];
}
if (isset($vals['premiumExpirationDate'])) {
$this->premiumExpirationDate = $vals['premiumExpirationDate'];
}
if (isset($vals['premiumExtendable'])) {
$this->premiumExtendable = $vals['premiumExtendable'];
}
if (isset($vals['premiumPending'])) {
$this->premiumPending = $vals['premiumPending'];
}
if (isset($vals['premiumCancellationPending'])) {
$this->premiumCancellationPending = $vals['premiumCancellationPending'];
}
if (isset($vals['canPurchaseUploadAllowance'])) {
$this->canPurchaseUploadAllowance = $vals['canPurchaseUploadAllowance'];
}
if (isset($vals['sponsoredGroupName'])) {
$this->sponsoredGroupName = $vals['sponsoredGroupName'];
}
if (isset($vals['sponsoredGroupRole'])) {
$this->sponsoredGroupRole = $vals['sponsoredGroupRole'];
}
if (isset($vals['premiumUpgradable'])) {
$this->premiumUpgradable = $vals['premiumUpgradable'];
}
}
}
public function getName() {
return 'PremiumInfo';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::I64) {
$xfer += $input->readI64($this->currentTime);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->premium);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->premiumRecurring);
} else {
$xfer += $input->skip($ftype);
}
break;
case 4:
if ($ftype == TType::I64) {
$xfer += $input->readI64($this->premiumExpirationDate);
} else {
$xfer += $input->skip($ftype);
}
break;
case 5:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->premiumExtendable);
} else {
$xfer += $input->skip($ftype);
}
break;
case 6:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->premiumPending);
} else {
$xfer += $input->skip($ftype);
}
break;
case 7:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->premiumCancellationPending);
} else {
$xfer += $input->skip($ftype);
}
break;
case 8:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->canPurchaseUploadAllowance);
} else {
$xfer += $input->skip($ftype);
}
break;
case 9:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->sponsoredGroupName);
} else {
$xfer += $input->skip($ftype);
}
break;
case 10:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->sponsoredGroupRole);
} else {
$xfer += $input->skip($ftype);
}
break;
case 11:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->premiumUpgradable);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('PremiumInfo');
if ($this->currentTime !== null) {
$xfer += $output->writeFieldBegin('currentTime', TType::I64, 1);
$xfer += $output->writeI64($this->currentTime);
$xfer += $output->writeFieldEnd();
}
if ($this->premium !== null) {
$xfer += $output->writeFieldBegin('premium', TType::BOOL, 2);
$xfer += $output->writeBool($this->premium);
$xfer += $output->writeFieldEnd();
}
if ($this->premiumRecurring !== null) {
$xfer += $output->writeFieldBegin('premiumRecurring', TType::BOOL, 3);
$xfer += $output->writeBool($this->premiumRecurring);
$xfer += $output->writeFieldEnd();
}
if ($this->premiumExpirationDate !== null) {
$xfer += $output->writeFieldBegin('premiumExpirationDate', TType::I64, 4);
$xfer += $output->writeI64($this->premiumExpirationDate);
$xfer += $output->writeFieldEnd();
}
if ($this->premiumExtendable !== null) {
$xfer += $output->writeFieldBegin('premiumExtendable', TType::BOOL, 5);
$xfer += $output->writeBool($this->premiumExtendable);
$xfer += $output->writeFieldEnd();
}
if ($this->premiumPending !== null) {
$xfer += $output->writeFieldBegin('premiumPending', TType::BOOL, 6);
$xfer += $output->writeBool($this->premiumPending);
$xfer += $output->writeFieldEnd();
}
if ($this->premiumCancellationPending !== null) {
$xfer += $output->writeFieldBegin('premiumCancellationPending', TType::BOOL, 7);
$xfer += $output->writeBool($this->premiumCancellationPending);
$xfer += $output->writeFieldEnd();
}
if ($this->canPurchaseUploadAllowance !== null) {
$xfer += $output->writeFieldBegin('canPurchaseUploadAllowance', TType::BOOL, 8);
$xfer += $output->writeBool($this->canPurchaseUploadAllowance);
$xfer += $output->writeFieldEnd();
}
if ($this->sponsoredGroupName !== null) {
$xfer += $output->writeFieldBegin('sponsoredGroupName', TType::STRING, 9);
$xfer += $output->writeString($this->sponsoredGroupName);
$xfer += $output->writeFieldEnd();
}
if ($this->sponsoredGroupRole !== null) {
$xfer += $output->writeFieldBegin('sponsoredGroupRole', TType::I32, 10);
$xfer += $output->writeI32($this->sponsoredGroupRole);
$xfer += $output->writeFieldEnd();
}
if ($this->premiumUpgradable !== null) {
$xfer += $output->writeFieldBegin('premiumUpgradable', TType::BOOL, 11);
$xfer += $output->writeBool($this->premiumUpgradable);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class User {
static $_TSPEC;
public $id = null;
public $username = null;
public $email = null;
public $name = null;
public $timezone = null;
public $privilege = null;
public $created = null;
public $updated = null;
public $deleted = null;
public $active = null;
public $shardId = null;
public $attributes = null;
public $accounting = null;
public $premiumInfo = null;
public $businessUserInfo = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'id',
'type' => TType::I32,
),
2 => array(
'var' => 'username',
'type' => TType::STRING,
),
3 => array(
'var' => 'email',
'type' => TType::STRING,
),
4 => array(
'var' => 'name',
'type' => TType::STRING,
),
6 => array(
'var' => 'timezone',
'type' => TType::STRING,
),
7 => array(
'var' => 'privilege',
'type' => TType::I32,
),
9 => array(
'var' => 'created',
'type' => TType::I64,
),
10 => array(
'var' => 'updated',
'type' => TType::I64,
),
11 => array(
'var' => 'deleted',
'type' => TType::I64,
),
13 => array(
'var' => 'active',
'type' => TType::BOOL,
),
14 => array(
'var' => 'shardId',
'type' => TType::STRING,
),
15 => array(
'var' => 'attributes',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\UserAttributes',
),
16 => array(
'var' => 'accounting',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\Accounting',
),
17 => array(
'var' => 'premiumInfo',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\PremiumInfo',
),
18 => array(
'var' => 'businessUserInfo',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\BusinessUserInfo',
),
);
}
if (is_array($vals)) {
if (isset($vals['id'])) {
$this->id = $vals['id'];
}
if (isset($vals['username'])) {
$this->username = $vals['username'];
}
if (isset($vals['email'])) {
$this->email = $vals['email'];
}
if (isset($vals['name'])) {
$this->name = $vals['name'];
}
if (isset($vals['timezone'])) {
$this->timezone = $vals['timezone'];
}
if (isset($vals['privilege'])) {
$this->privilege = $vals['privilege'];
}
if (isset($vals['created'])) {
$this->created = $vals['created'];
}
if (isset($vals['updated'])) {
$this->updated = $vals['updated'];
}
if (isset($vals['deleted'])) {
$this->deleted = $vals['deleted'];
}
if (isset($vals['active'])) {
$this->active = $vals['active'];
}
if (isset($vals['shardId'])) {
$this->shardId = $vals['shardId'];
}
if (isset($vals['attributes'])) {
$this->attributes = $vals['attributes'];
}
if (isset($vals['accounting'])) {
$this->accounting = $vals['accounting'];
}
if (isset($vals['premiumInfo'])) {
$this->premiumInfo = $vals['premiumInfo'];
}
if (isset($vals['businessUserInfo'])) {
$this->businessUserInfo = $vals['businessUserInfo'];
}
}
}
public function getName() {
return 'User';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->id);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->username);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->email);
} else {
$xfer += $input->skip($ftype);
}
break;
case 4:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->name);
} else {
$xfer += $input->skip($ftype);
}
break;
case 6:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->timezone);
} else {
$xfer += $input->skip($ftype);
}
break;
case 7:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->privilege);
} else {
$xfer += $input->skip($ftype);
}
break;
case 9:
if ($ftype == TType::I64) {
$xfer += $input->readI64($this->created);
} else {
$xfer += $input->skip($ftype);
}
break;
case 10:
if ($ftype == TType::I64) {
$xfer += $input->readI64($this->updated);
} else {
$xfer += $input->skip($ftype);
}
break;
case 11:
if ($ftype == TType::I64) {
$xfer += $input->readI64($this->deleted);
} else {
$xfer += $input->skip($ftype);
}
break;
case 13:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->active);
} else {
$xfer += $input->skip($ftype);
}
break;
case 14:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->shardId);
} else {
$xfer += $input->skip($ftype);
}
break;
case 15:
if ($ftype == TType::STRUCT) {
$this->attributes = new \EDAM\Types\UserAttributes();
$xfer += $this->attributes->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 16:
if ($ftype == TType::STRUCT) {
$this->accounting = new \EDAM\Types\Accounting();
$xfer += $this->accounting->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 17:
if ($ftype == TType::STRUCT) {
$this->premiumInfo = new \EDAM\Types\PremiumInfo();
$xfer += $this->premiumInfo->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 18:
if ($ftype == TType::STRUCT) {
$this->businessUserInfo = new \EDAM\Types\BusinessUserInfo();
$xfer += $this->businessUserInfo->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('User');
if ($this->id !== null) {
$xfer += $output->writeFieldBegin('id', TType::I32, 1);
$xfer += $output->writeI32($this->id);
$xfer += $output->writeFieldEnd();
}
if ($this->username !== null) {
$xfer += $output->writeFieldBegin('username', TType::STRING, 2);
$xfer += $output->writeString($this->username);
$xfer += $output->writeFieldEnd();
}
if ($this->email !== null) {
$xfer += $output->writeFieldBegin('email', TType::STRING, 3);
$xfer += $output->writeString($this->email);
$xfer += $output->writeFieldEnd();
}
if ($this->name !== null) {
$xfer += $output->writeFieldBegin('name', TType::STRING, 4);
$xfer += $output->writeString($this->name);
$xfer += $output->writeFieldEnd();
}
if ($this->timezone !== null) {
$xfer += $output->writeFieldBegin('timezone', TType::STRING, 6);
$xfer += $output->writeString($this->timezone);
$xfer += $output->writeFieldEnd();
}
if ($this->privilege !== null) {
$xfer += $output->writeFieldBegin('privilege', TType::I32, 7);
$xfer += $output->writeI32($this->privilege);
$xfer += $output->writeFieldEnd();
}
if ($this->created !== null) {
$xfer += $output->writeFieldBegin('created', TType::I64, 9);
$xfer += $output->writeI64($this->created);
$xfer += $output->writeFieldEnd();
}
if ($this->updated !== null) {
$xfer += $output->writeFieldBegin('updated', TType::I64, 10);
$xfer += $output->writeI64($this->updated);
$xfer += $output->writeFieldEnd();
}
if ($this->deleted !== null) {
$xfer += $output->writeFieldBegin('deleted', TType::I64, 11);
$xfer += $output->writeI64($this->deleted);
$xfer += $output->writeFieldEnd();
}
if ($this->active !== null) {
$xfer += $output->writeFieldBegin('active', TType::BOOL, 13);
$xfer += $output->writeBool($this->active);
$xfer += $output->writeFieldEnd();
}
if ($this->shardId !== null) {
$xfer += $output->writeFieldBegin('shardId', TType::STRING, 14);
$xfer += $output->writeString($this->shardId);
$xfer += $output->writeFieldEnd();
}
if ($this->attributes !== null) {
if (!is_object($this->attributes)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('attributes', TType::STRUCT, 15);
$xfer += $this->attributes->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->accounting !== null) {
if (!is_object($this->accounting)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('accounting', TType::STRUCT, 16);
$xfer += $this->accounting->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->premiumInfo !== null) {
if (!is_object($this->premiumInfo)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('premiumInfo', TType::STRUCT, 17);
$xfer += $this->premiumInfo->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->businessUserInfo !== null) {
if (!is_object($this->businessUserInfo)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('businessUserInfo', TType::STRUCT, 18);
$xfer += $this->businessUserInfo->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class Tag {
static $_TSPEC;
public $guid = null;
public $name = null;
public $parentGuid = null;
public $updateSequenceNum = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'guid',
'type' => TType::STRING,
),
2 => array(
'var' => 'name',
'type' => TType::STRING,
),
3 => array(
'var' => 'parentGuid',
'type' => TType::STRING,
),
4 => array(
'var' => 'updateSequenceNum',
'type' => TType::I32,
),
);
}
if (is_array($vals)) {
if (isset($vals['guid'])) {
$this->guid = $vals['guid'];
}
if (isset($vals['name'])) {
$this->name = $vals['name'];
}
if (isset($vals['parentGuid'])) {
$this->parentGuid = $vals['parentGuid'];
}
if (isset($vals['updateSequenceNum'])) {
$this->updateSequenceNum = $vals['updateSequenceNum'];
}
}
}
public function getName() {
return 'Tag';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->guid);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->name);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->parentGuid);
} else {
$xfer += $input->skip($ftype);
}
break;
case 4:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->updateSequenceNum);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('Tag');
if ($this->guid !== null) {
$xfer += $output->writeFieldBegin('guid', TType::STRING, 1);
$xfer += $output->writeString($this->guid);
$xfer += $output->writeFieldEnd();
}
if ($this->name !== null) {
$xfer += $output->writeFieldBegin('name', TType::STRING, 2);
$xfer += $output->writeString($this->name);
$xfer += $output->writeFieldEnd();
}
if ($this->parentGuid !== null) {
$xfer += $output->writeFieldBegin('parentGuid', TType::STRING, 3);
$xfer += $output->writeString($this->parentGuid);
$xfer += $output->writeFieldEnd();
}
if ($this->updateSequenceNum !== null) {
$xfer += $output->writeFieldBegin('updateSequenceNum', TType::I32, 4);
$xfer += $output->writeI32($this->updateSequenceNum);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class LazyMap {
static $_TSPEC;
public $keysOnly = null;
public $fullMap = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'keysOnly',
'type' => TType::SET,
'etype' => TType::STRING,
'elem' => array(
'type' => TType::STRING,
),
),
2 => array(
'var' => 'fullMap',
'type' => TType::MAP,
'ktype' => TType::STRING,
'vtype' => TType::STRING,
'key' => array(
'type' => TType::STRING,
),
'val' => array(
'type' => TType::STRING,
),
),
);
}
if (is_array($vals)) {
if (isset($vals['keysOnly'])) {
$this->keysOnly = $vals['keysOnly'];
}
if (isset($vals['fullMap'])) {
$this->fullMap = $vals['fullMap'];
}
}
}
public function getName() {
return 'LazyMap';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::SET) {
$this->keysOnly = array();
$_size14 = 0;
$_etype17 = 0;
$xfer += $input->readSetBegin($_etype17, $_size14);
for ($_i18 = 0; $_i18 < $_size14; ++$_i18)
{
$elem19 = null;
$xfer += $input->readString($elem19);
if (is_scalar($elem19)) {
$this->keysOnly[$elem19] = true;
} else {
$this->keysOnly []= $elem19;
}
}
$xfer += $input->readSetEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::MAP) {
$this->fullMap = array();
$_size20 = 0;
$_ktype21 = 0;
$_vtype22 = 0;
$xfer += $input->readMapBegin($_ktype21, $_vtype22, $_size20);
for ($_i24 = 0; $_i24 < $_size20; ++$_i24)
{
$key25 = '';
$val26 = '';
$xfer += $input->readString($key25);
$xfer += $input->readString($val26);
$this->fullMap[$key25] = $val26;
}
$xfer += $input->readMapEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('LazyMap');
if ($this->keysOnly !== null) {
if (!is_array($this->keysOnly)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('keysOnly', TType::SET, 1);
{
$output->writeSetBegin(TType::STRING, count($this->keysOnly));
{
foreach ($this->keysOnly as $iter27 => $iter28)
{
if (is_scalar($iter28)) {
$xfer += $output->writeString($iter27);
} else {
$xfer += $output->writeString($iter28);
}
}
}
$output->writeSetEnd();
}
$xfer += $output->writeFieldEnd();
}
if ($this->fullMap !== null) {
if (!is_array($this->fullMap)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('fullMap', TType::MAP, 2);
{
$output->writeMapBegin(TType::STRING, TType::STRING, count($this->fullMap));
{
foreach ($this->fullMap as $kiter29 => $viter30)
{
$xfer += $output->writeString($kiter29);
$xfer += $output->writeString($viter30);
}
}
$output->writeMapEnd();
}
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class ResourceAttributes {
static $_TSPEC;
public $sourceURL = null;
public $timestamp = null;
public $latitude = null;
public $longitude = null;
public $altitude = null;
public $cameraMake = null;
public $cameraModel = null;
public $clientWillIndex = null;
public $recoType = null;
public $fileName = null;
public $attachment = null;
public $applicationData = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'sourceURL',
'type' => TType::STRING,
),
2 => array(
'var' => 'timestamp',
'type' => TType::I64,
),
3 => array(
'var' => 'latitude',
'type' => TType::DOUBLE,
),
4 => array(
'var' => 'longitude',
'type' => TType::DOUBLE,
),
5 => array(
'var' => 'altitude',
'type' => TType::DOUBLE,
),
6 => array(
'var' => 'cameraMake',
'type' => TType::STRING,
),
7 => array(
'var' => 'cameraModel',
'type' => TType::STRING,
),
8 => array(
'var' => 'clientWillIndex',
'type' => TType::BOOL,
),
9 => array(
'var' => 'recoType',
'type' => TType::STRING,
),
10 => array(
'var' => 'fileName',
'type' => TType::STRING,
),
11 => array(
'var' => 'attachment',
'type' => TType::BOOL,
),
12 => array(
'var' => 'applicationData',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\LazyMap',
),
);
}
if (is_array($vals)) {
if (isset($vals['sourceURL'])) {
$this->sourceURL = $vals['sourceURL'];
}
if (isset($vals['timestamp'])) {
$this->timestamp = $vals['timestamp'];
}
if (isset($vals['latitude'])) {
$this->latitude = $vals['latitude'];
}
if (isset($vals['longitude'])) {
$this->longitude = $vals['longitude'];
}
if (isset($vals['altitude'])) {
$this->altitude = $vals['altitude'];
}
if (isset($vals['cameraMake'])) {
$this->cameraMake = $vals['cameraMake'];
}
if (isset($vals['cameraModel'])) {
$this->cameraModel = $vals['cameraModel'];
}
if (isset($vals['clientWillIndex'])) {
$this->clientWillIndex = $vals['clientWillIndex'];
}
if (isset($vals['recoType'])) {
$this->recoType = $vals['recoType'];
}
if (isset($vals['fileName'])) {
$this->fileName = $vals['fileName'];
}
if (isset($vals['attachment'])) {
$this->attachment = $vals['attachment'];
}
if (isset($vals['applicationData'])) {
$this->applicationData = $vals['applicationData'];
}
}
}
public function getName() {
return 'ResourceAttributes';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->sourceURL);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::I64) {
$xfer += $input->readI64($this->timestamp);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::DOUBLE) {
$xfer += $input->readDouble($this->latitude);
} else {
$xfer += $input->skip($ftype);
}
break;
case 4:
if ($ftype == TType::DOUBLE) {
$xfer += $input->readDouble($this->longitude);
} else {
$xfer += $input->skip($ftype);
}
break;
case 5:
if ($ftype == TType::DOUBLE) {
$xfer += $input->readDouble($this->altitude);
} else {
$xfer += $input->skip($ftype);
}
break;
case 6:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->cameraMake);
} else {
$xfer += $input->skip($ftype);
}
break;
case 7:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->cameraModel);
} else {
$xfer += $input->skip($ftype);
}
break;
case 8:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->clientWillIndex);
} else {
$xfer += $input->skip($ftype);
}
break;
case 9:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->recoType);
} else {
$xfer += $input->skip($ftype);
}
break;
case 10:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->fileName);
} else {
$xfer += $input->skip($ftype);
}
break;
case 11:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->attachment);
} else {
$xfer += $input->skip($ftype);
}
break;
case 12:
if ($ftype == TType::STRUCT) {
$this->applicationData = new \EDAM\Types\LazyMap();
$xfer += $this->applicationData->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('ResourceAttributes');
if ($this->sourceURL !== null) {
$xfer += $output->writeFieldBegin('sourceURL', TType::STRING, 1);
$xfer += $output->writeString($this->sourceURL);
$xfer += $output->writeFieldEnd();
}
if ($this->timestamp !== null) {
$xfer += $output->writeFieldBegin('timestamp', TType::I64, 2);
$xfer += $output->writeI64($this->timestamp);
$xfer += $output->writeFieldEnd();
}
if ($this->latitude !== null) {
$xfer += $output->writeFieldBegin('latitude', TType::DOUBLE, 3);
$xfer += $output->writeDouble($this->latitude);
$xfer += $output->writeFieldEnd();
}
if ($this->longitude !== null) {
$xfer += $output->writeFieldBegin('longitude', TType::DOUBLE, 4);
$xfer += $output->writeDouble($this->longitude);
$xfer += $output->writeFieldEnd();
}
if ($this->altitude !== null) {
$xfer += $output->writeFieldBegin('altitude', TType::DOUBLE, 5);
$xfer += $output->writeDouble($this->altitude);
$xfer += $output->writeFieldEnd();
}
if ($this->cameraMake !== null) {
$xfer += $output->writeFieldBegin('cameraMake', TType::STRING, 6);
$xfer += $output->writeString($this->cameraMake);
$xfer += $output->writeFieldEnd();
}
if ($this->cameraModel !== null) {
$xfer += $output->writeFieldBegin('cameraModel', TType::STRING, 7);
$xfer += $output->writeString($this->cameraModel);
$xfer += $output->writeFieldEnd();
}
if ($this->clientWillIndex !== null) {
$xfer += $output->writeFieldBegin('clientWillIndex', TType::BOOL, 8);
$xfer += $output->writeBool($this->clientWillIndex);
$xfer += $output->writeFieldEnd();
}
if ($this->recoType !== null) {
$xfer += $output->writeFieldBegin('recoType', TType::STRING, 9);
$xfer += $output->writeString($this->recoType);
$xfer += $output->writeFieldEnd();
}
if ($this->fileName !== null) {
$xfer += $output->writeFieldBegin('fileName', TType::STRING, 10);
$xfer += $output->writeString($this->fileName);
$xfer += $output->writeFieldEnd();
}
if ($this->attachment !== null) {
$xfer += $output->writeFieldBegin('attachment', TType::BOOL, 11);
$xfer += $output->writeBool($this->attachment);
$xfer += $output->writeFieldEnd();
}
if ($this->applicationData !== null) {
if (!is_object($this->applicationData)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('applicationData', TType::STRUCT, 12);
$xfer += $this->applicationData->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class Resource {
static $_TSPEC;
public $guid = null;
public $noteGuid = null;
public $data = null;
public $mime = null;
public $width = null;
public $height = null;
public $duration = null;
public $active = null;
public $recognition = null;
public $attributes = null;
public $updateSequenceNum = null;
public $alternateData = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'guid',
'type' => TType::STRING,
),
2 => array(
'var' => 'noteGuid',
'type' => TType::STRING,
),
3 => array(
'var' => 'data',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\Data',
),
4 => array(
'var' => 'mime',
'type' => TType::STRING,
),
5 => array(
'var' => 'width',
'type' => TType::I16,
),
6 => array(
'var' => 'height',
'type' => TType::I16,
),
7 => array(
'var' => 'duration',
'type' => TType::I16,
),
8 => array(
'var' => 'active',
'type' => TType::BOOL,
),
9 => array(
'var' => 'recognition',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\Data',
),
11 => array(
'var' => 'attributes',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\ResourceAttributes',
),
12 => array(
'var' => 'updateSequenceNum',
'type' => TType::I32,
),
13 => array(
'var' => 'alternateData',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\Data',
),
);
}
if (is_array($vals)) {
if (isset($vals['guid'])) {
$this->guid = $vals['guid'];
}
if (isset($vals['noteGuid'])) {
$this->noteGuid = $vals['noteGuid'];
}
if (isset($vals['data'])) {
$this->data = $vals['data'];
}
if (isset($vals['mime'])) {
$this->mime = $vals['mime'];
}
if (isset($vals['width'])) {
$this->width = $vals['width'];
}
if (isset($vals['height'])) {
$this->height = $vals['height'];
}
if (isset($vals['duration'])) {
$this->duration = $vals['duration'];
}
if (isset($vals['active'])) {
$this->active = $vals['active'];
}
if (isset($vals['recognition'])) {
$this->recognition = $vals['recognition'];
}
if (isset($vals['attributes'])) {
$this->attributes = $vals['attributes'];
}
if (isset($vals['updateSequenceNum'])) {
$this->updateSequenceNum = $vals['updateSequenceNum'];
}
if (isset($vals['alternateData'])) {
$this->alternateData = $vals['alternateData'];
}
}
}
public function getName() {
return 'Resource';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->guid);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->noteGuid);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->data = new \EDAM\Types\Data();
$xfer += $this->data->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 4:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->mime);
} else {
$xfer += $input->skip($ftype);
}
break;
case 5:
if ($ftype == TType::I16) {
$xfer += $input->readI16($this->width);
} else {
$xfer += $input->skip($ftype);
}
break;
case 6:
if ($ftype == TType::I16) {
$xfer += $input->readI16($this->height);
} else {
$xfer += $input->skip($ftype);
}
break;
case 7:
if ($ftype == TType::I16) {
$xfer += $input->readI16($this->duration);
} else {
$xfer += $input->skip($ftype);
}
break;
case 8:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->active);
} else {
$xfer += $input->skip($ftype);
}
break;
case 9:
if ($ftype == TType::STRUCT) {
$this->recognition = new \EDAM\Types\Data();
$xfer += $this->recognition->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 11:
if ($ftype == TType::STRUCT) {
$this->attributes = new \EDAM\Types\ResourceAttributes();
$xfer += $this->attributes->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 12:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->updateSequenceNum);
} else {
$xfer += $input->skip($ftype);
}
break;
case 13:
if ($ftype == TType::STRUCT) {
$this->alternateData = new \EDAM\Types\Data();
$xfer += $this->alternateData->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('Resource');
if ($this->guid !== null) {
$xfer += $output->writeFieldBegin('guid', TType::STRING, 1);
$xfer += $output->writeString($this->guid);
$xfer += $output->writeFieldEnd();
}
if ($this->noteGuid !== null) {
$xfer += $output->writeFieldBegin('noteGuid', TType::STRING, 2);
$xfer += $output->writeString($this->noteGuid);
$xfer += $output->writeFieldEnd();
}
if ($this->data !== null) {
if (!is_object($this->data)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('data', TType::STRUCT, 3);
$xfer += $this->data->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->mime !== null) {
$xfer += $output->writeFieldBegin('mime', TType::STRING, 4);
$xfer += $output->writeString($this->mime);
$xfer += $output->writeFieldEnd();
}
if ($this->width !== null) {
$xfer += $output->writeFieldBegin('width', TType::I16, 5);
$xfer += $output->writeI16($this->width);
$xfer += $output->writeFieldEnd();
}
if ($this->height !== null) {
$xfer += $output->writeFieldBegin('height', TType::I16, 6);
$xfer += $output->writeI16($this->height);
$xfer += $output->writeFieldEnd();
}
if ($this->duration !== null) {
$xfer += $output->writeFieldBegin('duration', TType::I16, 7);
$xfer += $output->writeI16($this->duration);
$xfer += $output->writeFieldEnd();
}
if ($this->active !== null) {
$xfer += $output->writeFieldBegin('active', TType::BOOL, 8);
$xfer += $output->writeBool($this->active);
$xfer += $output->writeFieldEnd();
}
if ($this->recognition !== null) {
if (!is_object($this->recognition)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('recognition', TType::STRUCT, 9);
$xfer += $this->recognition->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->attributes !== null) {
if (!is_object($this->attributes)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('attributes', TType::STRUCT, 11);
$xfer += $this->attributes->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->updateSequenceNum !== null) {
$xfer += $output->writeFieldBegin('updateSequenceNum', TType::I32, 12);
$xfer += $output->writeI32($this->updateSequenceNum);
$xfer += $output->writeFieldEnd();
}
if ($this->alternateData !== null) {
if (!is_object($this->alternateData)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('alternateData', TType::STRUCT, 13);
$xfer += $this->alternateData->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NoteAttributes {
static $_TSPEC;
public $subjectDate = null;
public $latitude = null;
public $longitude = null;
public $altitude = null;
public $author = null;
public $source = null;
public $sourceURL = null;
public $sourceApplication = null;
public $shareDate = null;
public $reminderOrder = null;
public $reminderDoneTime = null;
public $reminderTime = null;
public $placeName = null;
public $contentClass = null;
public $applicationData = null;
public $lastEditedBy = null;
public $classifications = null;
public $creatorId = null;
public $lastEditorId = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'subjectDate',
'type' => TType::I64,
),
10 => array(
'var' => 'latitude',
'type' => TType::DOUBLE,
),
11 => array(
'var' => 'longitude',
'type' => TType::DOUBLE,
),
12 => array(
'var' => 'altitude',
'type' => TType::DOUBLE,
),
13 => array(
'var' => 'author',
'type' => TType::STRING,
),
14 => array(
'var' => 'source',
'type' => TType::STRING,
),
15 => array(
'var' => 'sourceURL',
'type' => TType::STRING,
),
16 => array(
'var' => 'sourceApplication',
'type' => TType::STRING,
),
17 => array(
'var' => 'shareDate',
'type' => TType::I64,
),
18 => array(
'var' => 'reminderOrder',
'type' => TType::I64,
),
19 => array(
'var' => 'reminderDoneTime',
'type' => TType::I64,
),
20 => array(
'var' => 'reminderTime',
'type' => TType::I64,
),
21 => array(
'var' => 'placeName',
'type' => TType::STRING,
),
22 => array(
'var' => 'contentClass',
'type' => TType::STRING,
),
23 => array(
'var' => 'applicationData',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\LazyMap',
),
24 => array(
'var' => 'lastEditedBy',
'type' => TType::STRING,
),
26 => array(
'var' => 'classifications',
'type' => TType::MAP,
'ktype' => TType::STRING,
'vtype' => TType::STRING,
'key' => array(
'type' => TType::STRING,
),
'val' => array(
'type' => TType::STRING,
),
),
27 => array(
'var' => 'creatorId',
'type' => TType::I32,
),
28 => array(
'var' => 'lastEditorId',
'type' => TType::I32,
),
);
}
if (is_array($vals)) {
if (isset($vals['subjectDate'])) {
$this->subjectDate = $vals['subjectDate'];
}
if (isset($vals['latitude'])) {
$this->latitude = $vals['latitude'];
}
if (isset($vals['longitude'])) {
$this->longitude = $vals['longitude'];
}
if (isset($vals['altitude'])) {
$this->altitude = $vals['altitude'];
}
if (isset($vals['author'])) {
$this->author = $vals['author'];
}
if (isset($vals['source'])) {
$this->source = $vals['source'];
}
if (isset($vals['sourceURL'])) {
$this->sourceURL = $vals['sourceURL'];
}
if (isset($vals['sourceApplication'])) {
$this->sourceApplication = $vals['sourceApplication'];
}
if (isset($vals['shareDate'])) {
$this->shareDate = $vals['shareDate'];
}
if (isset($vals['reminderOrder'])) {
$this->reminderOrder = $vals['reminderOrder'];
}
if (isset($vals['reminderDoneTime'])) {
$this->reminderDoneTime = $vals['reminderDoneTime'];
}
if (isset($vals['reminderTime'])) {
$this->reminderTime = $vals['reminderTime'];
}
if (isset($vals['placeName'])) {
$this->placeName = $vals['placeName'];
}
if (isset($vals['contentClass'])) {
$this->contentClass = $vals['contentClass'];
}
if (isset($vals['applicationData'])) {
$this->applicationData = $vals['applicationData'];
}
if (isset($vals['lastEditedBy'])) {
$this->lastEditedBy = $vals['lastEditedBy'];
}
if (isset($vals['classifications'])) {
$this->classifications = $vals['classifications'];
}
if (isset($vals['creatorId'])) {
$this->creatorId = $vals['creatorId'];
}
if (isset($vals['lastEditorId'])) {
$this->lastEditorId = $vals['lastEditorId'];
}
}
}
public function getName() {
return 'NoteAttributes';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::I64) {
$xfer += $input->readI64($this->subjectDate);
} else {
$xfer += $input->skip($ftype);
}
break;
case 10:
if ($ftype == TType::DOUBLE) {
$xfer += $input->readDouble($this->latitude);
} else {
$xfer += $input->skip($ftype);
}
break;
case 11:
if ($ftype == TType::DOUBLE) {
$xfer += $input->readDouble($this->longitude);
} else {
$xfer += $input->skip($ftype);
}
break;
case 12:
if ($ftype == TType::DOUBLE) {
$xfer += $input->readDouble($this->altitude);
} else {
$xfer += $input->skip($ftype);
}
break;
case 13:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->author);
} else {
$xfer += $input->skip($ftype);
}
break;
case 14:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->source);
} else {
$xfer += $input->skip($ftype);
}
break;
case 15:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->sourceURL);
} else {
$xfer += $input->skip($ftype);
}
break;
case 16:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->sourceApplication);
} else {
$xfer += $input->skip($ftype);
}
break;
case 17:
if ($ftype == TType::I64) {
$xfer += $input->readI64($this->shareDate);
} else {
$xfer += $input->skip($ftype);
}
break;
case 18:
if ($ftype == TType::I64) {
$xfer += $input->readI64($this->reminderOrder);
} else {
$xfer += $input->skip($ftype);
}
break;
case 19:
if ($ftype == TType::I64) {
$xfer += $input->readI64($this->reminderDoneTime);
} else {
$xfer += $input->skip($ftype);
}
break;
case 20:
if ($ftype == TType::I64) {
$xfer += $input->readI64($this->reminderTime);
} else {
$xfer += $input->skip($ftype);
}
break;
case 21:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->placeName);
} else {
$xfer += $input->skip($ftype);
}
break;
case 22:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->contentClass);
} else {
$xfer += $input->skip($ftype);
}
break;
case 23:
if ($ftype == TType::STRUCT) {
$this->applicationData = new \EDAM\Types\LazyMap();
$xfer += $this->applicationData->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 24:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->lastEditedBy);
} else {
$xfer += $input->skip($ftype);
}
break;
case 26:
if ($ftype == TType::MAP) {
$this->classifications = array();
$_size31 = 0;
$_ktype32 = 0;
$_vtype33 = 0;
$xfer += $input->readMapBegin($_ktype32, $_vtype33, $_size31);
for ($_i35 = 0; $_i35 < $_size31; ++$_i35)
{
$key36 = '';
$val37 = '';
$xfer += $input->readString($key36);
$xfer += $input->readString($val37);
$this->classifications[$key36] = $val37;
}
$xfer += $input->readMapEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
case 27:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->creatorId);
} else {
$xfer += $input->skip($ftype);
}
break;
case 28:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->lastEditorId);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NoteAttributes');
if ($this->subjectDate !== null) {
$xfer += $output->writeFieldBegin('subjectDate', TType::I64, 1);
$xfer += $output->writeI64($this->subjectDate);
$xfer += $output->writeFieldEnd();
}
if ($this->latitude !== null) {
$xfer += $output->writeFieldBegin('latitude', TType::DOUBLE, 10);
$xfer += $output->writeDouble($this->latitude);
$xfer += $output->writeFieldEnd();
}
if ($this->longitude !== null) {
$xfer += $output->writeFieldBegin('longitude', TType::DOUBLE, 11);
$xfer += $output->writeDouble($this->longitude);
$xfer += $output->writeFieldEnd();
}
if ($this->altitude !== null) {
$xfer += $output->writeFieldBegin('altitude', TType::DOUBLE, 12);
$xfer += $output->writeDouble($this->altitude);
$xfer += $output->writeFieldEnd();
}
if ($this->author !== null) {
$xfer += $output->writeFieldBegin('author', TType::STRING, 13);
$xfer += $output->writeString($this->author);
$xfer += $output->writeFieldEnd();
}
if ($this->source !== null) {
$xfer += $output->writeFieldBegin('source', TType::STRING, 14);
$xfer += $output->writeString($this->source);
$xfer += $output->writeFieldEnd();
}
if ($this->sourceURL !== null) {
$xfer += $output->writeFieldBegin('sourceURL', TType::STRING, 15);
$xfer += $output->writeString($this->sourceURL);
$xfer += $output->writeFieldEnd();
}
if ($this->sourceApplication !== null) {
$xfer += $output->writeFieldBegin('sourceApplication', TType::STRING, 16);
$xfer += $output->writeString($this->sourceApplication);
$xfer += $output->writeFieldEnd();
}
if ($this->shareDate !== null) {
$xfer += $output->writeFieldBegin('shareDate', TType::I64, 17);
$xfer += $output->writeI64($this->shareDate);
$xfer += $output->writeFieldEnd();
}
if ($this->reminderOrder !== null) {
$xfer += $output->writeFieldBegin('reminderOrder', TType::I64, 18);
$xfer += $output->writeI64($this->reminderOrder);
$xfer += $output->writeFieldEnd();
}
if ($this->reminderDoneTime !== null) {
$xfer += $output->writeFieldBegin('reminderDoneTime', TType::I64, 19);
$xfer += $output->writeI64($this->reminderDoneTime);
$xfer += $output->writeFieldEnd();
}
if ($this->reminderTime !== null) {
$xfer += $output->writeFieldBegin('reminderTime', TType::I64, 20);
$xfer += $output->writeI64($this->reminderTime);
$xfer += $output->writeFieldEnd();
}
if ($this->placeName !== null) {
$xfer += $output->writeFieldBegin('placeName', TType::STRING, 21);
$xfer += $output->writeString($this->placeName);
$xfer += $output->writeFieldEnd();
}
if ($this->contentClass !== null) {
$xfer += $output->writeFieldBegin('contentClass', TType::STRING, 22);
$xfer += $output->writeString($this->contentClass);
$xfer += $output->writeFieldEnd();
}
if ($this->applicationData !== null) {
if (!is_object($this->applicationData)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('applicationData', TType::STRUCT, 23);
$xfer += $this->applicationData->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->lastEditedBy !== null) {
$xfer += $output->writeFieldBegin('lastEditedBy', TType::STRING, 24);
$xfer += $output->writeString($this->lastEditedBy);
$xfer += $output->writeFieldEnd();
}
if ($this->classifications !== null) {
if (!is_array($this->classifications)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('classifications', TType::MAP, 26);
{
$output->writeMapBegin(TType::STRING, TType::STRING, count($this->classifications));
{
foreach ($this->classifications as $kiter38 => $viter39)
{
$xfer += $output->writeString($kiter38);
$xfer += $output->writeString($viter39);
}
}
$output->writeMapEnd();
}
$xfer += $output->writeFieldEnd();
}
if ($this->creatorId !== null) {
$xfer += $output->writeFieldBegin('creatorId', TType::I32, 27);
$xfer += $output->writeI32($this->creatorId);
$xfer += $output->writeFieldEnd();
}
if ($this->lastEditorId !== null) {
$xfer += $output->writeFieldBegin('lastEditorId', TType::I32, 28);
$xfer += $output->writeI32($this->lastEditorId);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class Note {
static $_TSPEC;
public $guid = null;
public $title = null;
public $content = null;
public $contentHash = null;
public $contentLength = null;
public $created = null;
public $updated = null;
public $deleted = null;
public $active = null;
public $updateSequenceNum = null;
public $notebookGuid = null;
public $tagGuids = null;
public $resources = null;
public $attributes = null;
public $tagNames = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'guid',
'type' => TType::STRING,
),
2 => array(
'var' => 'title',
'type' => TType::STRING,
),
3 => array(
'var' => 'content',
'type' => TType::STRING,
),
4 => array(
'var' => 'contentHash',
'type' => TType::STRING,
),
5 => array(
'var' => 'contentLength',
'type' => TType::I32,
),
6 => array(
'var' => 'created',
'type' => TType::I64,
),
7 => array(
'var' => 'updated',
'type' => TType::I64,
),
8 => array(
'var' => 'deleted',
'type' => TType::I64,
),
9 => array(
'var' => 'active',
'type' => TType::BOOL,
),
10 => array(
'var' => 'updateSequenceNum',
'type' => TType::I32,
),
11 => array(
'var' => 'notebookGuid',
'type' => TType::STRING,
),
12 => array(
'var' => 'tagGuids',
'type' => TType::LST,
'etype' => TType::STRING,
'elem' => array(
'type' => TType::STRING,
),
),
13 => array(
'var' => 'resources',
'type' => TType::LST,
'etype' => TType::STRUCT,
'elem' => array(
'type' => TType::STRUCT,
'class' => '\EDAM\Types\Resource',
),
),
14 => array(
'var' => 'attributes',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\NoteAttributes',
),
15 => array(
'var' => 'tagNames',
'type' => TType::LST,
'etype' => TType::STRING,
'elem' => array(
'type' => TType::STRING,
),
),
);
}
if (is_array($vals)) {
if (isset($vals['guid'])) {
$this->guid = $vals['guid'];
}
if (isset($vals['title'])) {
$this->title = $vals['title'];
}
if (isset($vals['content'])) {
$this->content = $vals['content'];
}
if (isset($vals['contentHash'])) {
$this->contentHash = $vals['contentHash'];
}
if (isset($vals['contentLength'])) {
$this->contentLength = $vals['contentLength'];
}
if (isset($vals['created'])) {
$this->created = $vals['created'];
}
if (isset($vals['updated'])) {
$this->updated = $vals['updated'];
}
if (isset($vals['deleted'])) {
$this->deleted = $vals['deleted'];
}
if (isset($vals['active'])) {
$this->active = $vals['active'];
}
if (isset($vals['updateSequenceNum'])) {
$this->updateSequenceNum = $vals['updateSequenceNum'];
}
if (isset($vals['notebookGuid'])) {
$this->notebookGuid = $vals['notebookGuid'];
}
if (isset($vals['tagGuids'])) {
$this->tagGuids = $vals['tagGuids'];
}
if (isset($vals['resources'])) {
$this->resources = $vals['resources'];
}
if (isset($vals['attributes'])) {
$this->attributes = $vals['attributes'];
}
if (isset($vals['tagNames'])) {
$this->tagNames = $vals['tagNames'];
}
}
}
public function getName() {
return 'Note';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->guid);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->title);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->content);
} else {
$xfer += $input->skip($ftype);
}
break;
case 4:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->contentHash);
} else {
$xfer += $input->skip($ftype);
}
break;
case 5:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->contentLength);
} else {
$xfer += $input->skip($ftype);
}
break;
case 6:
if ($ftype == TType::I64) {
$xfer += $input->readI64($this->created);
} else {
$xfer += $input->skip($ftype);
}
break;
case 7:
if ($ftype == TType::I64) {
$xfer += $input->readI64($this->updated);
} else {
$xfer += $input->skip($ftype);
}
break;
case 8:
if ($ftype == TType::I64) {
$xfer += $input->readI64($this->deleted);
} else {
$xfer += $input->skip($ftype);
}
break;
case 9:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->active);
} else {
$xfer += $input->skip($ftype);
}
break;
case 10:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->updateSequenceNum);
} else {
$xfer += $input->skip($ftype);
}
break;
case 11:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->notebookGuid);
} else {
$xfer += $input->skip($ftype);
}
break;
case 12:
if ($ftype == TType::LST) {
$this->tagGuids = array();
$_size40 = 0;
$_etype43 = 0;
$xfer += $input->readListBegin($_etype43, $_size40);
for ($_i44 = 0; $_i44 < $_size40; ++$_i44)
{
$elem45 = null;
$xfer += $input->readString($elem45);
$this->tagGuids []= $elem45;
}
$xfer += $input->readListEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
case 13:
if ($ftype == TType::LST) {
$this->resources = array();
$_size46 = 0;
$_etype49 = 0;
$xfer += $input->readListBegin($_etype49, $_size46);
for ($_i50 = 0; $_i50 < $_size46; ++$_i50)
{
$elem51 = null;
$elem51 = new \EDAM\Types\Resource();
$xfer += $elem51->read($input);
$this->resources []= $elem51;
}
$xfer += $input->readListEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
case 14:
if ($ftype == TType::STRUCT) {
$this->attributes = new \EDAM\Types\NoteAttributes();
$xfer += $this->attributes->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 15:
if ($ftype == TType::LST) {
$this->tagNames = array();
$_size52 = 0;
$_etype55 = 0;
$xfer += $input->readListBegin($_etype55, $_size52);
for ($_i56 = 0; $_i56 < $_size52; ++$_i56)
{
$elem57 = null;
$xfer += $input->readString($elem57);
$this->tagNames []= $elem57;
}
$xfer += $input->readListEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('Note');
if ($this->guid !== null) {
$xfer += $output->writeFieldBegin('guid', TType::STRING, 1);
$xfer += $output->writeString($this->guid);
$xfer += $output->writeFieldEnd();
}
if ($this->title !== null) {
$xfer += $output->writeFieldBegin('title', TType::STRING, 2);
$xfer += $output->writeString($this->title);
$xfer += $output->writeFieldEnd();
}
if ($this->content !== null) {
$xfer += $output->writeFieldBegin('content', TType::STRING, 3);
$xfer += $output->writeString($this->content);
$xfer += $output->writeFieldEnd();
}
if ($this->contentHash !== null) {
$xfer += $output->writeFieldBegin('contentHash', TType::STRING, 4);
$xfer += $output->writeString($this->contentHash);
$xfer += $output->writeFieldEnd();
}
if ($this->contentLength !== null) {
$xfer += $output->writeFieldBegin('contentLength', TType::I32, 5);
$xfer += $output->writeI32($this->contentLength);
$xfer += $output->writeFieldEnd();
}
if ($this->created !== null) {
$xfer += $output->writeFieldBegin('created', TType::I64, 6);
$xfer += $output->writeI64($this->created);
$xfer += $output->writeFieldEnd();
}
if ($this->updated !== null) {
$xfer += $output->writeFieldBegin('updated', TType::I64, 7);
$xfer += $output->writeI64($this->updated);
$xfer += $output->writeFieldEnd();
}
if ($this->deleted !== null) {
$xfer += $output->writeFieldBegin('deleted', TType::I64, 8);
$xfer += $output->writeI64($this->deleted);
$xfer += $output->writeFieldEnd();
}
if ($this->active !== null) {
$xfer += $output->writeFieldBegin('active', TType::BOOL, 9);
$xfer += $output->writeBool($this->active);
$xfer += $output->writeFieldEnd();
}
if ($this->updateSequenceNum !== null) {
$xfer += $output->writeFieldBegin('updateSequenceNum', TType::I32, 10);
$xfer += $output->writeI32($this->updateSequenceNum);
$xfer += $output->writeFieldEnd();
}
if ($this->notebookGuid !== null) {
$xfer += $output->writeFieldBegin('notebookGuid', TType::STRING, 11);
$xfer += $output->writeString($this->notebookGuid);
$xfer += $output->writeFieldEnd();
}
if ($this->tagGuids !== null) {
if (!is_array($this->tagGuids)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('tagGuids', TType::LST, 12);
{
$output->writeListBegin(TType::STRING, count($this->tagGuids));
{
foreach ($this->tagGuids as $iter58)
{
$xfer += $output->writeString($iter58);
}
}
$output->writeListEnd();
}
$xfer += $output->writeFieldEnd();
}
if ($this->resources !== null) {
if (!is_array($this->resources)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('resources', TType::LST, 13);
{
$output->writeListBegin(TType::STRUCT, count($this->resources));
{
foreach ($this->resources as $iter59)
{
$xfer += $iter59->write($output);
}
}
$output->writeListEnd();
}
$xfer += $output->writeFieldEnd();
}
if ($this->attributes !== null) {
if (!is_object($this->attributes)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('attributes', TType::STRUCT, 14);
$xfer += $this->attributes->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->tagNames !== null) {
if (!is_array($this->tagNames)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('tagNames', TType::LST, 15);
{
$output->writeListBegin(TType::STRING, count($this->tagNames));
{
foreach ($this->tagNames as $iter60)
{
$xfer += $output->writeString($iter60);
}
}
$output->writeListEnd();
}
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class Publishing {
static $_TSPEC;
public $uri = null;
public $order = null;
public $ascending = null;
public $publicDescription = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'uri',
'type' => TType::STRING,
),
2 => array(
'var' => 'order',
'type' => TType::I32,
),
3 => array(
'var' => 'ascending',
'type' => TType::BOOL,
),
4 => array(
'var' => 'publicDescription',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['uri'])) {
$this->uri = $vals['uri'];
}
if (isset($vals['order'])) {
$this->order = $vals['order'];
}
if (isset($vals['ascending'])) {
$this->ascending = $vals['ascending'];
}
if (isset($vals['publicDescription'])) {
$this->publicDescription = $vals['publicDescription'];
}
}
}
public function getName() {
return 'Publishing';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->uri);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->order);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->ascending);
} else {
$xfer += $input->skip($ftype);
}
break;
case 4:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->publicDescription);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('Publishing');
if ($this->uri !== null) {
$xfer += $output->writeFieldBegin('uri', TType::STRING, 1);
$xfer += $output->writeString($this->uri);
$xfer += $output->writeFieldEnd();
}
if ($this->order !== null) {
$xfer += $output->writeFieldBegin('order', TType::I32, 2);
$xfer += $output->writeI32($this->order);
$xfer += $output->writeFieldEnd();
}
if ($this->ascending !== null) {
$xfer += $output->writeFieldBegin('ascending', TType::BOOL, 3);
$xfer += $output->writeBool($this->ascending);
$xfer += $output->writeFieldEnd();
}
if ($this->publicDescription !== null) {
$xfer += $output->writeFieldBegin('publicDescription', TType::STRING, 4);
$xfer += $output->writeString($this->publicDescription);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class BusinessNotebook {
static $_TSPEC;
public $notebookDescription = null;
public $privilege = null;
public $recommended = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'notebookDescription',
'type' => TType::STRING,
),
2 => array(
'var' => 'privilege',
'type' => TType::I32,
),
3 => array(
'var' => 'recommended',
'type' => TType::BOOL,
),
);
}
if (is_array($vals)) {
if (isset($vals['notebookDescription'])) {
$this->notebookDescription = $vals['notebookDescription'];
}
if (isset($vals['privilege'])) {
$this->privilege = $vals['privilege'];
}
if (isset($vals['recommended'])) {
$this->recommended = $vals['recommended'];
}
}
}
public function getName() {
return 'BusinessNotebook';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->notebookDescription);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->privilege);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->recommended);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('BusinessNotebook');
if ($this->notebookDescription !== null) {
$xfer += $output->writeFieldBegin('notebookDescription', TType::STRING, 1);
$xfer += $output->writeString($this->notebookDescription);
$xfer += $output->writeFieldEnd();
}
if ($this->privilege !== null) {
$xfer += $output->writeFieldBegin('privilege', TType::I32, 2);
$xfer += $output->writeI32($this->privilege);
$xfer += $output->writeFieldEnd();
}
if ($this->recommended !== null) {
$xfer += $output->writeFieldBegin('recommended', TType::BOOL, 3);
$xfer += $output->writeBool($this->recommended);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class SavedSearchScope {
static $_TSPEC;
public $includeAccount = null;
public $includePersonalLinkedNotebooks = null;
public $includeBusinessLinkedNotebooks = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'includeAccount',
'type' => TType::BOOL,
),
2 => array(
'var' => 'includePersonalLinkedNotebooks',
'type' => TType::BOOL,
),
3 => array(
'var' => 'includeBusinessLinkedNotebooks',
'type' => TType::BOOL,
),
);
}
if (is_array($vals)) {
if (isset($vals['includeAccount'])) {
$this->includeAccount = $vals['includeAccount'];
}
if (isset($vals['includePersonalLinkedNotebooks'])) {
$this->includePersonalLinkedNotebooks = $vals['includePersonalLinkedNotebooks'];
}
if (isset($vals['includeBusinessLinkedNotebooks'])) {
$this->includeBusinessLinkedNotebooks = $vals['includeBusinessLinkedNotebooks'];
}
}
}
public function getName() {
return 'SavedSearchScope';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->includeAccount);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->includePersonalLinkedNotebooks);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->includeBusinessLinkedNotebooks);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('SavedSearchScope');
if ($this->includeAccount !== null) {
$xfer += $output->writeFieldBegin('includeAccount', TType::BOOL, 1);
$xfer += $output->writeBool($this->includeAccount);
$xfer += $output->writeFieldEnd();
}
if ($this->includePersonalLinkedNotebooks !== null) {
$xfer += $output->writeFieldBegin('includePersonalLinkedNotebooks', TType::BOOL, 2);
$xfer += $output->writeBool($this->includePersonalLinkedNotebooks);
$xfer += $output->writeFieldEnd();
}
if ($this->includeBusinessLinkedNotebooks !== null) {
$xfer += $output->writeFieldBegin('includeBusinessLinkedNotebooks', TType::BOOL, 3);
$xfer += $output->writeBool($this->includeBusinessLinkedNotebooks);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class SavedSearch {
static $_TSPEC;
public $guid = null;
public $name = null;
public $query = null;
public $format = null;
public $updateSequenceNum = null;
public $scope = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'guid',
'type' => TType::STRING,
),
2 => array(
'var' => 'name',
'type' => TType::STRING,
),
3 => array(
'var' => 'query',
'type' => TType::STRING,
),
4 => array(
'var' => 'format',
'type' => TType::I32,
),
5 => array(
'var' => 'updateSequenceNum',
'type' => TType::I32,
),
6 => array(
'var' => 'scope',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\SavedSearchScope',
),
);
}
if (is_array($vals)) {
if (isset($vals['guid'])) {
$this->guid = $vals['guid'];
}
if (isset($vals['name'])) {
$this->name = $vals['name'];
}
if (isset($vals['query'])) {
$this->query = $vals['query'];
}
if (isset($vals['format'])) {
$this->format = $vals['format'];
}
if (isset($vals['updateSequenceNum'])) {
$this->updateSequenceNum = $vals['updateSequenceNum'];
}
if (isset($vals['scope'])) {
$this->scope = $vals['scope'];
}
}
}
public function getName() {
return 'SavedSearch';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->guid);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->name);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->query);
} else {
$xfer += $input->skip($ftype);
}
break;
case 4:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->format);
} else {
$xfer += $input->skip($ftype);
}
break;
case 5:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->updateSequenceNum);
} else {
$xfer += $input->skip($ftype);
}
break;
case 6:
if ($ftype == TType::STRUCT) {
$this->scope = new \EDAM\Types\SavedSearchScope();
$xfer += $this->scope->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('SavedSearch');
if ($this->guid !== null) {
$xfer += $output->writeFieldBegin('guid', TType::STRING, 1);
$xfer += $output->writeString($this->guid);
$xfer += $output->writeFieldEnd();
}
if ($this->name !== null) {
$xfer += $output->writeFieldBegin('name', TType::STRING, 2);
$xfer += $output->writeString($this->name);
$xfer += $output->writeFieldEnd();
}
if ($this->query !== null) {
$xfer += $output->writeFieldBegin('query', TType::STRING, 3);
$xfer += $output->writeString($this->query);
$xfer += $output->writeFieldEnd();
}
if ($this->format !== null) {
$xfer += $output->writeFieldBegin('format', TType::I32, 4);
$xfer += $output->writeI32($this->format);
$xfer += $output->writeFieldEnd();
}
if ($this->updateSequenceNum !== null) {
$xfer += $output->writeFieldBegin('updateSequenceNum', TType::I32, 5);
$xfer += $output->writeI32($this->updateSequenceNum);
$xfer += $output->writeFieldEnd();
}
if ($this->scope !== null) {
if (!is_object($this->scope)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('scope', TType::STRUCT, 6);
$xfer += $this->scope->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class SharedNotebookRecipientSettings {
static $_TSPEC;
public $reminderNotifyEmail = null;
public $reminderNotifyInApp = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'reminderNotifyEmail',
'type' => TType::BOOL,
),
2 => array(
'var' => 'reminderNotifyInApp',
'type' => TType::BOOL,
),
);
}
if (is_array($vals)) {
if (isset($vals['reminderNotifyEmail'])) {
$this->reminderNotifyEmail = $vals['reminderNotifyEmail'];
}
if (isset($vals['reminderNotifyInApp'])) {
$this->reminderNotifyInApp = $vals['reminderNotifyInApp'];
}
}
}
public function getName() {
return 'SharedNotebookRecipientSettings';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->reminderNotifyEmail);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->reminderNotifyInApp);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('SharedNotebookRecipientSettings');
if ($this->reminderNotifyEmail !== null) {
$xfer += $output->writeFieldBegin('reminderNotifyEmail', TType::BOOL, 1);
$xfer += $output->writeBool($this->reminderNotifyEmail);
$xfer += $output->writeFieldEnd();
}
if ($this->reminderNotifyInApp !== null) {
$xfer += $output->writeFieldBegin('reminderNotifyInApp', TType::BOOL, 2);
$xfer += $output->writeBool($this->reminderNotifyInApp);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class SharedNotebook {
static $_TSPEC;
public $id = null;
public $userId = null;
public $notebookGuid = null;
public $email = null;
public $notebookModifiable = null;
public $requireLogin = null;
public $serviceCreated = null;
public $serviceUpdated = null;
public $shareKey = null;
public $username = null;
public $privilege = null;
public $allowPreview = null;
public $recipientSettings = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'id',
'type' => TType::I64,
),
2 => array(
'var' => 'userId',
'type' => TType::I32,
),
3 => array(
'var' => 'notebookGuid',
'type' => TType::STRING,
),
4 => array(
'var' => 'email',
'type' => TType::STRING,
),
5 => array(
'var' => 'notebookModifiable',
'type' => TType::BOOL,
),
6 => array(
'var' => 'requireLogin',
'type' => TType::BOOL,
),
7 => array(
'var' => 'serviceCreated',
'type' => TType::I64,
),
10 => array(
'var' => 'serviceUpdated',
'type' => TType::I64,
),
8 => array(
'var' => 'shareKey',
'type' => TType::STRING,
),
9 => array(
'var' => 'username',
'type' => TType::STRING,
),
11 => array(
'var' => 'privilege',
'type' => TType::I32,
),
12 => array(
'var' => 'allowPreview',
'type' => TType::BOOL,
),
13 => array(
'var' => 'recipientSettings',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\SharedNotebookRecipientSettings',
),
);
}
if (is_array($vals)) {
if (isset($vals['id'])) {
$this->id = $vals['id'];
}
if (isset($vals['userId'])) {
$this->userId = $vals['userId'];
}
if (isset($vals['notebookGuid'])) {
$this->notebookGuid = $vals['notebookGuid'];
}
if (isset($vals['email'])) {
$this->email = $vals['email'];
}
if (isset($vals['notebookModifiable'])) {
$this->notebookModifiable = $vals['notebookModifiable'];
}
if (isset($vals['requireLogin'])) {
$this->requireLogin = $vals['requireLogin'];
}
if (isset($vals['serviceCreated'])) {
$this->serviceCreated = $vals['serviceCreated'];
}
if (isset($vals['serviceUpdated'])) {
$this->serviceUpdated = $vals['serviceUpdated'];
}
if (isset($vals['shareKey'])) {
$this->shareKey = $vals['shareKey'];
}
if (isset($vals['username'])) {
$this->username = $vals['username'];
}
if (isset($vals['privilege'])) {
$this->privilege = $vals['privilege'];
}
if (isset($vals['allowPreview'])) {
$this->allowPreview = $vals['allowPreview'];
}
if (isset($vals['recipientSettings'])) {
$this->recipientSettings = $vals['recipientSettings'];
}
}
}
public function getName() {
return 'SharedNotebook';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::I64) {
$xfer += $input->readI64($this->id);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->userId);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->notebookGuid);
} else {
$xfer += $input->skip($ftype);
}
break;
case 4:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->email);
} else {
$xfer += $input->skip($ftype);
}
break;
case 5:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->notebookModifiable);
} else {
$xfer += $input->skip($ftype);
}
break;
case 6:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->requireLogin);
} else {
$xfer += $input->skip($ftype);
}
break;
case 7:
if ($ftype == TType::I64) {
$xfer += $input->readI64($this->serviceCreated);
} else {
$xfer += $input->skip($ftype);
}
break;
case 10:
if ($ftype == TType::I64) {
$xfer += $input->readI64($this->serviceUpdated);
} else {
$xfer += $input->skip($ftype);
}
break;
case 8:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->shareKey);
} else {
$xfer += $input->skip($ftype);
}
break;
case 9:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->username);
} else {
$xfer += $input->skip($ftype);
}
break;
case 11:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->privilege);
} else {
$xfer += $input->skip($ftype);
}
break;
case 12:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->allowPreview);
} else {
$xfer += $input->skip($ftype);
}
break;
case 13:
if ($ftype == TType::STRUCT) {
$this->recipientSettings = new \EDAM\Types\SharedNotebookRecipientSettings();
$xfer += $this->recipientSettings->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('SharedNotebook');
if ($this->id !== null) {
$xfer += $output->writeFieldBegin('id', TType::I64, 1);
$xfer += $output->writeI64($this->id);
$xfer += $output->writeFieldEnd();
}
if ($this->userId !== null) {
$xfer += $output->writeFieldBegin('userId', TType::I32, 2);
$xfer += $output->writeI32($this->userId);
$xfer += $output->writeFieldEnd();
}
if ($this->notebookGuid !== null) {
$xfer += $output->writeFieldBegin('notebookGuid', TType::STRING, 3);
$xfer += $output->writeString($this->notebookGuid);
$xfer += $output->writeFieldEnd();
}
if ($this->email !== null) {
$xfer += $output->writeFieldBegin('email', TType::STRING, 4);
$xfer += $output->writeString($this->email);
$xfer += $output->writeFieldEnd();
}
if ($this->notebookModifiable !== null) {
$xfer += $output->writeFieldBegin('notebookModifiable', TType::BOOL, 5);
$xfer += $output->writeBool($this->notebookModifiable);
$xfer += $output->writeFieldEnd();
}
if ($this->requireLogin !== null) {
$xfer += $output->writeFieldBegin('requireLogin', TType::BOOL, 6);
$xfer += $output->writeBool($this->requireLogin);
$xfer += $output->writeFieldEnd();
}
if ($this->serviceCreated !== null) {
$xfer += $output->writeFieldBegin('serviceCreated', TType::I64, 7);
$xfer += $output->writeI64($this->serviceCreated);
$xfer += $output->writeFieldEnd();
}
if ($this->shareKey !== null) {
$xfer += $output->writeFieldBegin('shareKey', TType::STRING, 8);
$xfer += $output->writeString($this->shareKey);
$xfer += $output->writeFieldEnd();
}
if ($this->username !== null) {
$xfer += $output->writeFieldBegin('username', TType::STRING, 9);
$xfer += $output->writeString($this->username);
$xfer += $output->writeFieldEnd();
}
if ($this->serviceUpdated !== null) {
$xfer += $output->writeFieldBegin('serviceUpdated', TType::I64, 10);
$xfer += $output->writeI64($this->serviceUpdated);
$xfer += $output->writeFieldEnd();
}
if ($this->privilege !== null) {
$xfer += $output->writeFieldBegin('privilege', TType::I32, 11);
$xfer += $output->writeI32($this->privilege);
$xfer += $output->writeFieldEnd();
}
if ($this->allowPreview !== null) {
$xfer += $output->writeFieldBegin('allowPreview', TType::BOOL, 12);
$xfer += $output->writeBool($this->allowPreview);
$xfer += $output->writeFieldEnd();
}
if ($this->recipientSettings !== null) {
if (!is_object($this->recipientSettings)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('recipientSettings', TType::STRUCT, 13);
$xfer += $this->recipientSettings->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NotebookRestrictions {
static $_TSPEC;
public $noReadNotes = null;
public $noCreateNotes = null;
public $noUpdateNotes = null;
public $noExpungeNotes = null;
public $noShareNotes = null;
public $noEmailNotes = null;
public $noSendMessageToRecipients = null;
public $noUpdateNotebook = null;
public $noExpungeNotebook = null;
public $noSetDefaultNotebook = null;
public $noSetNotebookStack = null;
public $noPublishToPublic = null;
public $noPublishToBusinessLibrary = null;
public $noCreateTags = null;
public $noUpdateTags = null;
public $noExpungeTags = null;
public $noSetParentTag = null;
public $noCreateSharedNotebooks = null;
public $updateWhichSharedNotebookRestrictions = null;
public $expungeWhichSharedNotebookRestrictions = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'noReadNotes',
'type' => TType::BOOL,
),
2 => array(
'var' => 'noCreateNotes',
'type' => TType::BOOL,
),
3 => array(
'var' => 'noUpdateNotes',
'type' => TType::BOOL,
),
4 => array(
'var' => 'noExpungeNotes',
'type' => TType::BOOL,
),
5 => array(
'var' => 'noShareNotes',
'type' => TType::BOOL,
),
6 => array(
'var' => 'noEmailNotes',
'type' => TType::BOOL,
),
7 => array(
'var' => 'noSendMessageToRecipients',
'type' => TType::BOOL,
),
8 => array(
'var' => 'noUpdateNotebook',
'type' => TType::BOOL,
),
9 => array(
'var' => 'noExpungeNotebook',
'type' => TType::BOOL,
),
10 => array(
'var' => 'noSetDefaultNotebook',
'type' => TType::BOOL,
),
11 => array(
'var' => 'noSetNotebookStack',
'type' => TType::BOOL,
),
12 => array(
'var' => 'noPublishToPublic',
'type' => TType::BOOL,
),
13 => array(
'var' => 'noPublishToBusinessLibrary',
'type' => TType::BOOL,
),
14 => array(
'var' => 'noCreateTags',
'type' => TType::BOOL,
),
15 => array(
'var' => 'noUpdateTags',
'type' => TType::BOOL,
),
16 => array(
'var' => 'noExpungeTags',
'type' => TType::BOOL,
),
17 => array(
'var' => 'noSetParentTag',
'type' => TType::BOOL,
),
18 => array(
'var' => 'noCreateSharedNotebooks',
'type' => TType::BOOL,
),
19 => array(
'var' => 'updateWhichSharedNotebookRestrictions',
'type' => TType::I32,
),
20 => array(
'var' => 'expungeWhichSharedNotebookRestrictions',
'type' => TType::I32,
),
);
}
if (is_array($vals)) {
if (isset($vals['noReadNotes'])) {
$this->noReadNotes = $vals['noReadNotes'];
}
if (isset($vals['noCreateNotes'])) {
$this->noCreateNotes = $vals['noCreateNotes'];
}
if (isset($vals['noUpdateNotes'])) {
$this->noUpdateNotes = $vals['noUpdateNotes'];
}
if (isset($vals['noExpungeNotes'])) {
$this->noExpungeNotes = $vals['noExpungeNotes'];
}
if (isset($vals['noShareNotes'])) {
$this->noShareNotes = $vals['noShareNotes'];
}
if (isset($vals['noEmailNotes'])) {
$this->noEmailNotes = $vals['noEmailNotes'];
}
if (isset($vals['noSendMessageToRecipients'])) {
$this->noSendMessageToRecipients = $vals['noSendMessageToRecipients'];
}
if (isset($vals['noUpdateNotebook'])) {
$this->noUpdateNotebook = $vals['noUpdateNotebook'];
}
if (isset($vals['noExpungeNotebook'])) {
$this->noExpungeNotebook = $vals['noExpungeNotebook'];
}
if (isset($vals['noSetDefaultNotebook'])) {
$this->noSetDefaultNotebook = $vals['noSetDefaultNotebook'];
}
if (isset($vals['noSetNotebookStack'])) {
$this->noSetNotebookStack = $vals['noSetNotebookStack'];
}
if (isset($vals['noPublishToPublic'])) {
$this->noPublishToPublic = $vals['noPublishToPublic'];
}
if (isset($vals['noPublishToBusinessLibrary'])) {
$this->noPublishToBusinessLibrary = $vals['noPublishToBusinessLibrary'];
}
if (isset($vals['noCreateTags'])) {
$this->noCreateTags = $vals['noCreateTags'];
}
if (isset($vals['noUpdateTags'])) {
$this->noUpdateTags = $vals['noUpdateTags'];
}
if (isset($vals['noExpungeTags'])) {
$this->noExpungeTags = $vals['noExpungeTags'];
}
if (isset($vals['noSetParentTag'])) {
$this->noSetParentTag = $vals['noSetParentTag'];
}
if (isset($vals['noCreateSharedNotebooks'])) {
$this->noCreateSharedNotebooks = $vals['noCreateSharedNotebooks'];
}
if (isset($vals['updateWhichSharedNotebookRestrictions'])) {
$this->updateWhichSharedNotebookRestrictions = $vals['updateWhichSharedNotebookRestrictions'];
}
if (isset($vals['expungeWhichSharedNotebookRestrictions'])) {
$this->expungeWhichSharedNotebookRestrictions = $vals['expungeWhichSharedNotebookRestrictions'];
}
}
}
public function getName() {
return 'NotebookRestrictions';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->noReadNotes);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->noCreateNotes);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->noUpdateNotes);
} else {
$xfer += $input->skip($ftype);
}
break;
case 4:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->noExpungeNotes);
} else {
$xfer += $input->skip($ftype);
}
break;
case 5:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->noShareNotes);
} else {
$xfer += $input->skip($ftype);
}
break;
case 6:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->noEmailNotes);
} else {
$xfer += $input->skip($ftype);
}
break;
case 7:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->noSendMessageToRecipients);
} else {
$xfer += $input->skip($ftype);
}
break;
case 8:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->noUpdateNotebook);
} else {
$xfer += $input->skip($ftype);
}
break;
case 9:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->noExpungeNotebook);
} else {
$xfer += $input->skip($ftype);
}
break;
case 10:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->noSetDefaultNotebook);
} else {
$xfer += $input->skip($ftype);
}
break;
case 11:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->noSetNotebookStack);
} else {
$xfer += $input->skip($ftype);
}
break;
case 12:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->noPublishToPublic);
} else {
$xfer += $input->skip($ftype);
}
break;
case 13:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->noPublishToBusinessLibrary);
} else {
$xfer += $input->skip($ftype);
}
break;
case 14:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->noCreateTags);
} else {
$xfer += $input->skip($ftype);
}
break;
case 15:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->noUpdateTags);
} else {
$xfer += $input->skip($ftype);
}
break;
case 16:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->noExpungeTags);
} else {
$xfer += $input->skip($ftype);
}
break;
case 17:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->noSetParentTag);
} else {
$xfer += $input->skip($ftype);
}
break;
case 18:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->noCreateSharedNotebooks);
} else {
$xfer += $input->skip($ftype);
}
break;
case 19:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->updateWhichSharedNotebookRestrictions);
} else {
$xfer += $input->skip($ftype);
}
break;
case 20:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->expungeWhichSharedNotebookRestrictions);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NotebookRestrictions');
if ($this->noReadNotes !== null) {
$xfer += $output->writeFieldBegin('noReadNotes', TType::BOOL, 1);
$xfer += $output->writeBool($this->noReadNotes);
$xfer += $output->writeFieldEnd();
}
if ($this->noCreateNotes !== null) {
$xfer += $output->writeFieldBegin('noCreateNotes', TType::BOOL, 2);
$xfer += $output->writeBool($this->noCreateNotes);
$xfer += $output->writeFieldEnd();
}
if ($this->noUpdateNotes !== null) {
$xfer += $output->writeFieldBegin('noUpdateNotes', TType::BOOL, 3);
$xfer += $output->writeBool($this->noUpdateNotes);
$xfer += $output->writeFieldEnd();
}
if ($this->noExpungeNotes !== null) {
$xfer += $output->writeFieldBegin('noExpungeNotes', TType::BOOL, 4);
$xfer += $output->writeBool($this->noExpungeNotes);
$xfer += $output->writeFieldEnd();
}
if ($this->noShareNotes !== null) {
$xfer += $output->writeFieldBegin('noShareNotes', TType::BOOL, 5);
$xfer += $output->writeBool($this->noShareNotes);
$xfer += $output->writeFieldEnd();
}
if ($this->noEmailNotes !== null) {
$xfer += $output->writeFieldBegin('noEmailNotes', TType::BOOL, 6);
$xfer += $output->writeBool($this->noEmailNotes);
$xfer += $output->writeFieldEnd();
}
if ($this->noSendMessageToRecipients !== null) {
$xfer += $output->writeFieldBegin('noSendMessageToRecipients', TType::BOOL, 7);
$xfer += $output->writeBool($this->noSendMessageToRecipients);
$xfer += $output->writeFieldEnd();
}
if ($this->noUpdateNotebook !== null) {
$xfer += $output->writeFieldBegin('noUpdateNotebook', TType::BOOL, 8);
$xfer += $output->writeBool($this->noUpdateNotebook);
$xfer += $output->writeFieldEnd();
}
if ($this->noExpungeNotebook !== null) {
$xfer += $output->writeFieldBegin('noExpungeNotebook', TType::BOOL, 9);
$xfer += $output->writeBool($this->noExpungeNotebook);
$xfer += $output->writeFieldEnd();
}
if ($this->noSetDefaultNotebook !== null) {
$xfer += $output->writeFieldBegin('noSetDefaultNotebook', TType::BOOL, 10);
$xfer += $output->writeBool($this->noSetDefaultNotebook);
$xfer += $output->writeFieldEnd();
}
if ($this->noSetNotebookStack !== null) {
$xfer += $output->writeFieldBegin('noSetNotebookStack', TType::BOOL, 11);
$xfer += $output->writeBool($this->noSetNotebookStack);
$xfer += $output->writeFieldEnd();
}
if ($this->noPublishToPublic !== null) {
$xfer += $output->writeFieldBegin('noPublishToPublic', TType::BOOL, 12);
$xfer += $output->writeBool($this->noPublishToPublic);
$xfer += $output->writeFieldEnd();
}
if ($this->noPublishToBusinessLibrary !== null) {
$xfer += $output->writeFieldBegin('noPublishToBusinessLibrary', TType::BOOL, 13);
$xfer += $output->writeBool($this->noPublishToBusinessLibrary);
$xfer += $output->writeFieldEnd();
}
if ($this->noCreateTags !== null) {
$xfer += $output->writeFieldBegin('noCreateTags', TType::BOOL, 14);
$xfer += $output->writeBool($this->noCreateTags);
$xfer += $output->writeFieldEnd();
}
if ($this->noUpdateTags !== null) {
$xfer += $output->writeFieldBegin('noUpdateTags', TType::BOOL, 15);
$xfer += $output->writeBool($this->noUpdateTags);
$xfer += $output->writeFieldEnd();
}
if ($this->noExpungeTags !== null) {
$xfer += $output->writeFieldBegin('noExpungeTags', TType::BOOL, 16);
$xfer += $output->writeBool($this->noExpungeTags);
$xfer += $output->writeFieldEnd();
}
if ($this->noSetParentTag !== null) {
$xfer += $output->writeFieldBegin('noSetParentTag', TType::BOOL, 17);
$xfer += $output->writeBool($this->noSetParentTag);
$xfer += $output->writeFieldEnd();
}
if ($this->noCreateSharedNotebooks !== null) {
$xfer += $output->writeFieldBegin('noCreateSharedNotebooks', TType::BOOL, 18);
$xfer += $output->writeBool($this->noCreateSharedNotebooks);
$xfer += $output->writeFieldEnd();
}
if ($this->updateWhichSharedNotebookRestrictions !== null) {
$xfer += $output->writeFieldBegin('updateWhichSharedNotebookRestrictions', TType::I32, 19);
$xfer += $output->writeI32($this->updateWhichSharedNotebookRestrictions);
$xfer += $output->writeFieldEnd();
}
if ($this->expungeWhichSharedNotebookRestrictions !== null) {
$xfer += $output->writeFieldBegin('expungeWhichSharedNotebookRestrictions', TType::I32, 20);
$xfer += $output->writeI32($this->expungeWhichSharedNotebookRestrictions);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class Notebook {
static $_TSPEC;
public $guid = null;
public $name = null;
public $updateSequenceNum = null;
public $defaultNotebook = null;
public $serviceCreated = null;
public $serviceUpdated = null;
public $publishing = null;
public $published = null;
public $stack = null;
public $sharedNotebookIds = null;
public $sharedNotebooks = null;
public $businessNotebook = null;
public $contact = null;
public $restrictions = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'guid',
'type' => TType::STRING,
),
2 => array(
'var' => 'name',
'type' => TType::STRING,
),
5 => array(
'var' => 'updateSequenceNum',
'type' => TType::I32,
),
6 => array(
'var' => 'defaultNotebook',
'type' => TType::BOOL,
),
7 => array(
'var' => 'serviceCreated',
'type' => TType::I64,
),
8 => array(
'var' => 'serviceUpdated',
'type' => TType::I64,
),
10 => array(
'var' => 'publishing',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\Publishing',
),
11 => array(
'var' => 'published',
'type' => TType::BOOL,
),
12 => array(
'var' => 'stack',
'type' => TType::STRING,
),
13 => array(
'var' => 'sharedNotebookIds',
'type' => TType::LST,
'etype' => TType::I64,
'elem' => array(
'type' => TType::I64,
),
),
14 => array(
'var' => 'sharedNotebooks',
'type' => TType::LST,
'etype' => TType::STRUCT,
'elem' => array(
'type' => TType::STRUCT,
'class' => '\EDAM\Types\SharedNotebook',
),
),
15 => array(
'var' => 'businessNotebook',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\BusinessNotebook',
),
16 => array(
'var' => 'contact',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\User',
),
17 => array(
'var' => 'restrictions',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\NotebookRestrictions',
),
);
}
if (is_array($vals)) {
if (isset($vals['guid'])) {
$this->guid = $vals['guid'];
}
if (isset($vals['name'])) {
$this->name = $vals['name'];
}
if (isset($vals['updateSequenceNum'])) {
$this->updateSequenceNum = $vals['updateSequenceNum'];
}
if (isset($vals['defaultNotebook'])) {
$this->defaultNotebook = $vals['defaultNotebook'];
}
if (isset($vals['serviceCreated'])) {
$this->serviceCreated = $vals['serviceCreated'];
}
if (isset($vals['serviceUpdated'])) {
$this->serviceUpdated = $vals['serviceUpdated'];
}
if (isset($vals['publishing'])) {
$this->publishing = $vals['publishing'];
}
if (isset($vals['published'])) {
$this->published = $vals['published'];
}
if (isset($vals['stack'])) {
$this->stack = $vals['stack'];
}
if (isset($vals['sharedNotebookIds'])) {
$this->sharedNotebookIds = $vals['sharedNotebookIds'];
}
if (isset($vals['sharedNotebooks'])) {
$this->sharedNotebooks = $vals['sharedNotebooks'];
}
if (isset($vals['businessNotebook'])) {
$this->businessNotebook = $vals['businessNotebook'];
}
if (isset($vals['contact'])) {
$this->contact = $vals['contact'];
}
if (isset($vals['restrictions'])) {
$this->restrictions = $vals['restrictions'];
}
}
}
public function getName() {
return 'Notebook';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->guid);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->name);
} else {
$xfer += $input->skip($ftype);
}
break;
case 5:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->updateSequenceNum);
} else {
$xfer += $input->skip($ftype);
}
break;
case 6:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->defaultNotebook);
} else {
$xfer += $input->skip($ftype);
}
break;
case 7:
if ($ftype == TType::I64) {
$xfer += $input->readI64($this->serviceCreated);
} else {
$xfer += $input->skip($ftype);
}
break;
case 8:
if ($ftype == TType::I64) {
$xfer += $input->readI64($this->serviceUpdated);
} else {
$xfer += $input->skip($ftype);
}
break;
case 10:
if ($ftype == TType::STRUCT) {
$this->publishing = new \EDAM\Types\Publishing();
$xfer += $this->publishing->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 11:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->published);
} else {
$xfer += $input->skip($ftype);
}
break;
case 12:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->stack);
} else {
$xfer += $input->skip($ftype);
}
break;
case 13:
if ($ftype == TType::LST) {
$this->sharedNotebookIds = array();
$_size61 = 0;
$_etype64 = 0;
$xfer += $input->readListBegin($_etype64, $_size61);
for ($_i65 = 0; $_i65 < $_size61; ++$_i65)
{
$elem66 = null;
$xfer += $input->readI64($elem66);
$this->sharedNotebookIds []= $elem66;
}
$xfer += $input->readListEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
case 14:
if ($ftype == TType::LST) {
$this->sharedNotebooks = array();
$_size67 = 0;
$_etype70 = 0;
$xfer += $input->readListBegin($_etype70, $_size67);
for ($_i71 = 0; $_i71 < $_size67; ++$_i71)
{
$elem72 = null;
$elem72 = new \EDAM\Types\SharedNotebook();
$xfer += $elem72->read($input);
$this->sharedNotebooks []= $elem72;
}
$xfer += $input->readListEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
case 15:
if ($ftype == TType::STRUCT) {
$this->businessNotebook = new \EDAM\Types\BusinessNotebook();
$xfer += $this->businessNotebook->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 16:
if ($ftype == TType::STRUCT) {
$this->contact = new \EDAM\Types\User();
$xfer += $this->contact->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 17:
if ($ftype == TType::STRUCT) {
$this->restrictions = new \EDAM\Types\NotebookRestrictions();
$xfer += $this->restrictions->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('Notebook');
if ($this->guid !== null) {
$xfer += $output->writeFieldBegin('guid', TType::STRING, 1);
$xfer += $output->writeString($this->guid);
$xfer += $output->writeFieldEnd();
}
if ($this->name !== null) {
$xfer += $output->writeFieldBegin('name', TType::STRING, 2);
$xfer += $output->writeString($this->name);
$xfer += $output->writeFieldEnd();
}
if ($this->updateSequenceNum !== null) {
$xfer += $output->writeFieldBegin('updateSequenceNum', TType::I32, 5);
$xfer += $output->writeI32($this->updateSequenceNum);
$xfer += $output->writeFieldEnd();
}
if ($this->defaultNotebook !== null) {
$xfer += $output->writeFieldBegin('defaultNotebook', TType::BOOL, 6);
$xfer += $output->writeBool($this->defaultNotebook);
$xfer += $output->writeFieldEnd();
}
if ($this->serviceCreated !== null) {
$xfer += $output->writeFieldBegin('serviceCreated', TType::I64, 7);
$xfer += $output->writeI64($this->serviceCreated);
$xfer += $output->writeFieldEnd();
}
if ($this->serviceUpdated !== null) {
$xfer += $output->writeFieldBegin('serviceUpdated', TType::I64, 8);
$xfer += $output->writeI64($this->serviceUpdated);
$xfer += $output->writeFieldEnd();
}
if ($this->publishing !== null) {
if (!is_object($this->publishing)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('publishing', TType::STRUCT, 10);
$xfer += $this->publishing->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->published !== null) {
$xfer += $output->writeFieldBegin('published', TType::BOOL, 11);
$xfer += $output->writeBool($this->published);
$xfer += $output->writeFieldEnd();
}
if ($this->stack !== null) {
$xfer += $output->writeFieldBegin('stack', TType::STRING, 12);
$xfer += $output->writeString($this->stack);
$xfer += $output->writeFieldEnd();
}
if ($this->sharedNotebookIds !== null) {
if (!is_array($this->sharedNotebookIds)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('sharedNotebookIds', TType::LST, 13);
{
$output->writeListBegin(TType::I64, count($this->sharedNotebookIds));
{
foreach ($this->sharedNotebookIds as $iter73)
{
$xfer += $output->writeI64($iter73);
}
}
$output->writeListEnd();
}
$xfer += $output->writeFieldEnd();
}
if ($this->sharedNotebooks !== null) {
if (!is_array($this->sharedNotebooks)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('sharedNotebooks', TType::LST, 14);
{
$output->writeListBegin(TType::STRUCT, count($this->sharedNotebooks));
{
foreach ($this->sharedNotebooks as $iter74)
{
$xfer += $iter74->write($output);
}
}
$output->writeListEnd();
}
$xfer += $output->writeFieldEnd();
}
if ($this->businessNotebook !== null) {
if (!is_object($this->businessNotebook)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('businessNotebook', TType::STRUCT, 15);
$xfer += $this->businessNotebook->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->contact !== null) {
if (!is_object($this->contact)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('contact', TType::STRUCT, 16);
$xfer += $this->contact->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->restrictions !== null) {
if (!is_object($this->restrictions)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('restrictions', TType::STRUCT, 17);
$xfer += $this->restrictions->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class LinkedNotebook {
static $_TSPEC;
public $shareName = null;
public $username = null;
public $shardId = null;
public $shareKey = null;
public $uri = null;
public $guid = null;
public $updateSequenceNum = null;
public $noteStoreUrl = null;
public $webApiUrlPrefix = null;
public $stack = null;
public $businessId = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
2 => array(
'var' => 'shareName',
'type' => TType::STRING,
),
3 => array(
'var' => 'username',
'type' => TType::STRING,
),
4 => array(
'var' => 'shardId',
'type' => TType::STRING,
),
5 => array(
'var' => 'shareKey',
'type' => TType::STRING,
),
6 => array(
'var' => 'uri',
'type' => TType::STRING,
),
7 => array(
'var' => 'guid',
'type' => TType::STRING,
),
8 => array(
'var' => 'updateSequenceNum',
'type' => TType::I32,
),
9 => array(
'var' => 'noteStoreUrl',
'type' => TType::STRING,
),
10 => array(
'var' => 'webApiUrlPrefix',
'type' => TType::STRING,
),
11 => array(
'var' => 'stack',
'type' => TType::STRING,
),
12 => array(
'var' => 'businessId',
'type' => TType::I32,
),
);
}
if (is_array($vals)) {
if (isset($vals['shareName'])) {
$this->shareName = $vals['shareName'];
}
if (isset($vals['username'])) {
$this->username = $vals['username'];
}
if (isset($vals['shardId'])) {
$this->shardId = $vals['shardId'];
}
if (isset($vals['shareKey'])) {
$this->shareKey = $vals['shareKey'];
}
if (isset($vals['uri'])) {
$this->uri = $vals['uri'];
}
if (isset($vals['guid'])) {
$this->guid = $vals['guid'];
}
if (isset($vals['updateSequenceNum'])) {
$this->updateSequenceNum = $vals['updateSequenceNum'];
}
if (isset($vals['noteStoreUrl'])) {
$this->noteStoreUrl = $vals['noteStoreUrl'];
}
if (isset($vals['webApiUrlPrefix'])) {
$this->webApiUrlPrefix = $vals['webApiUrlPrefix'];
}
if (isset($vals['stack'])) {
$this->stack = $vals['stack'];
}
if (isset($vals['businessId'])) {
$this->businessId = $vals['businessId'];
}
}
}
public function getName() {
return 'LinkedNotebook';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->shareName);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->username);
} else {
$xfer += $input->skip($ftype);
}
break;
case 4:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->shardId);
} else {
$xfer += $input->skip($ftype);
}
break;
case 5:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->shareKey);
} else {
$xfer += $input->skip($ftype);
}
break;
case 6:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->uri);
} else {
$xfer += $input->skip($ftype);
}
break;
case 7:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->guid);
} else {
$xfer += $input->skip($ftype);
}
break;
case 8:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->updateSequenceNum);
} else {
$xfer += $input->skip($ftype);
}
break;
case 9:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->noteStoreUrl);
} else {
$xfer += $input->skip($ftype);
}
break;
case 10:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->webApiUrlPrefix);
} else {
$xfer += $input->skip($ftype);
}
break;
case 11:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->stack);
} else {
$xfer += $input->skip($ftype);
}
break;
case 12:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->businessId);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('LinkedNotebook');
if ($this->shareName !== null) {
$xfer += $output->writeFieldBegin('shareName', TType::STRING, 2);
$xfer += $output->writeString($this->shareName);
$xfer += $output->writeFieldEnd();
}
if ($this->username !== null) {
$xfer += $output->writeFieldBegin('username', TType::STRING, 3);
$xfer += $output->writeString($this->username);
$xfer += $output->writeFieldEnd();
}
if ($this->shardId !== null) {
$xfer += $output->writeFieldBegin('shardId', TType::STRING, 4);
$xfer += $output->writeString($this->shardId);
$xfer += $output->writeFieldEnd();
}
if ($this->shareKey !== null) {
$xfer += $output->writeFieldBegin('shareKey', TType::STRING, 5);
$xfer += $output->writeString($this->shareKey);
$xfer += $output->writeFieldEnd();
}
if ($this->uri !== null) {
$xfer += $output->writeFieldBegin('uri', TType::STRING, 6);
$xfer += $output->writeString($this->uri);
$xfer += $output->writeFieldEnd();
}
if ($this->guid !== null) {
$xfer += $output->writeFieldBegin('guid', TType::STRING, 7);
$xfer += $output->writeString($this->guid);
$xfer += $output->writeFieldEnd();
}
if ($this->updateSequenceNum !== null) {
$xfer += $output->writeFieldBegin('updateSequenceNum', TType::I32, 8);
$xfer += $output->writeI32($this->updateSequenceNum);
$xfer += $output->writeFieldEnd();
}
if ($this->noteStoreUrl !== null) {
$xfer += $output->writeFieldBegin('noteStoreUrl', TType::STRING, 9);
$xfer += $output->writeString($this->noteStoreUrl);
$xfer += $output->writeFieldEnd();
}
if ($this->webApiUrlPrefix !== null) {
$xfer += $output->writeFieldBegin('webApiUrlPrefix', TType::STRING, 10);
$xfer += $output->writeString($this->webApiUrlPrefix);
$xfer += $output->writeFieldEnd();
}
if ($this->stack !== null) {
$xfer += $output->writeFieldBegin('stack', TType::STRING, 11);
$xfer += $output->writeString($this->stack);
$xfer += $output->writeFieldEnd();
}
if ($this->businessId !== null) {
$xfer += $output->writeFieldBegin('businessId', TType::I32, 12);
$xfer += $output->writeI32($this->businessId);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class NotebookDescriptor {
static $_TSPEC;
public $guid = null;
public $notebookDisplayName = null;
public $contactName = null;
public $hasSharedNotebook = null;
public $joinedUserCount = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'guid',
'type' => TType::STRING,
),
2 => array(
'var' => 'notebookDisplayName',
'type' => TType::STRING,
),
3 => array(
'var' => 'contactName',
'type' => TType::STRING,
),
4 => array(
'var' => 'hasSharedNotebook',
'type' => TType::BOOL,
),
5 => array(
'var' => 'joinedUserCount',
'type' => TType::I32,
),
);
}
if (is_array($vals)) {
if (isset($vals['guid'])) {
$this->guid = $vals['guid'];
}
if (isset($vals['notebookDisplayName'])) {
$this->notebookDisplayName = $vals['notebookDisplayName'];
}
if (isset($vals['contactName'])) {
$this->contactName = $vals['contactName'];
}
if (isset($vals['hasSharedNotebook'])) {
$this->hasSharedNotebook = $vals['hasSharedNotebook'];
}
if (isset($vals['joinedUserCount'])) {
$this->joinedUserCount = $vals['joinedUserCount'];
}
}
}
public function getName() {
return 'NotebookDescriptor';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->guid);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->notebookDisplayName);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->contactName);
} else {
$xfer += $input->skip($ftype);
}
break;
case 4:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->hasSharedNotebook);
} else {
$xfer += $input->skip($ftype);
}
break;
case 5:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->joinedUserCount);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('NotebookDescriptor');
if ($this->guid !== null) {
$xfer += $output->writeFieldBegin('guid', TType::STRING, 1);
$xfer += $output->writeString($this->guid);
$xfer += $output->writeFieldEnd();
}
if ($this->notebookDisplayName !== null) {
$xfer += $output->writeFieldBegin('notebookDisplayName', TType::STRING, 2);
$xfer += $output->writeString($this->notebookDisplayName);
$xfer += $output->writeFieldEnd();
}
if ($this->contactName !== null) {
$xfer += $output->writeFieldBegin('contactName', TType::STRING, 3);
$xfer += $output->writeString($this->contactName);
$xfer += $output->writeFieldEnd();
}
if ($this->hasSharedNotebook !== null) {
$xfer += $output->writeFieldBegin('hasSharedNotebook', TType::BOOL, 4);
$xfer += $output->writeBool($this->hasSharedNotebook);
$xfer += $output->writeFieldEnd();
}
if ($this->joinedUserCount !== null) {
$xfer += $output->writeFieldBegin('joinedUserCount', TType::I32, 5);
$xfer += $output->writeI32($this->joinedUserCount);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
final class Constant extends \Thrift\Type\TConstant {
static protected $CLASSIFICATION_RECIPE_USER_NON_RECIPE;
static protected $CLASSIFICATION_RECIPE_USER_RECIPE;
static protected $CLASSIFICATION_RECIPE_SERVICE_RECIPE;
static protected $EDAM_NOTE_SOURCE_WEB_CLIP;
static protected $EDAM_NOTE_SOURCE_MAIL_CLIP;
static protected $EDAM_NOTE_SOURCE_MAIL_SMTP_GATEWAY;
static protected function init_CLASSIFICATION_RECIPE_USER_NON_RECIPE() {
return "000";
}
static protected function init_CLASSIFICATION_RECIPE_USER_RECIPE() {
return "001";
}
static protected function init_CLASSIFICATION_RECIPE_SERVICE_RECIPE() {
return "002";
}
static protected function init_EDAM_NOTE_SOURCE_WEB_CLIP() {
return "web.clip";
}
static protected function init_EDAM_NOTE_SOURCE_MAIL_CLIP() {
return "mail.clip";
}
static protected function init_EDAM_NOTE_SOURCE_MAIL_SMTP_GATEWAY() {
return "mail.smtp";
}
}
================================================
FILE: src/EDAM/UserStore/Types.php
================================================
array(
'var' => 'userId',
'type' => TType::I32,
),
2 => array(
'var' => 'shardId',
'type' => TType::STRING,
),
3 => array(
'var' => 'privilege',
'type' => TType::I32,
),
4 => array(
'var' => 'username',
'type' => TType::STRING,
),
5 => array(
'var' => 'noteStoreUrl',
'type' => TType::STRING,
),
6 => array(
'var' => 'webApiUrlPrefix',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['userId'])) {
$this->userId = $vals['userId'];
}
if (isset($vals['shardId'])) {
$this->shardId = $vals['shardId'];
}
if (isset($vals['privilege'])) {
$this->privilege = $vals['privilege'];
}
if (isset($vals['username'])) {
$this->username = $vals['username'];
}
if (isset($vals['noteStoreUrl'])) {
$this->noteStoreUrl = $vals['noteStoreUrl'];
}
if (isset($vals['webApiUrlPrefix'])) {
$this->webApiUrlPrefix = $vals['webApiUrlPrefix'];
}
}
}
public function getName() {
return 'PublicUserInfo';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->userId);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->shardId);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->privilege);
} else {
$xfer += $input->skip($ftype);
}
break;
case 4:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->username);
} else {
$xfer += $input->skip($ftype);
}
break;
case 5:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->noteStoreUrl);
} else {
$xfer += $input->skip($ftype);
}
break;
case 6:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->webApiUrlPrefix);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('PublicUserInfo');
if ($this->userId !== null) {
$xfer += $output->writeFieldBegin('userId', TType::I32, 1);
$xfer += $output->writeI32($this->userId);
$xfer += $output->writeFieldEnd();
}
if ($this->shardId !== null) {
$xfer += $output->writeFieldBegin('shardId', TType::STRING, 2);
$xfer += $output->writeString($this->shardId);
$xfer += $output->writeFieldEnd();
}
if ($this->privilege !== null) {
$xfer += $output->writeFieldBegin('privilege', TType::I32, 3);
$xfer += $output->writeI32($this->privilege);
$xfer += $output->writeFieldEnd();
}
if ($this->username !== null) {
$xfer += $output->writeFieldBegin('username', TType::STRING, 4);
$xfer += $output->writeString($this->username);
$xfer += $output->writeFieldEnd();
}
if ($this->noteStoreUrl !== null) {
$xfer += $output->writeFieldBegin('noteStoreUrl', TType::STRING, 5);
$xfer += $output->writeString($this->noteStoreUrl);
$xfer += $output->writeFieldEnd();
}
if ($this->webApiUrlPrefix !== null) {
$xfer += $output->writeFieldBegin('webApiUrlPrefix', TType::STRING, 6);
$xfer += $output->writeString($this->webApiUrlPrefix);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class AuthenticationResult {
static $_TSPEC;
public $currentTime = null;
public $authenticationToken = null;
public $expiration = null;
public $user = null;
public $publicUserInfo = null;
public $noteStoreUrl = null;
public $webApiUrlPrefix = null;
public $secondFactorRequired = null;
public $secondFactorDeliveryHint = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'currentTime',
'type' => TType::I64,
),
2 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
3 => array(
'var' => 'expiration',
'type' => TType::I64,
),
4 => array(
'var' => 'user',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\User',
),
5 => array(
'var' => 'publicUserInfo',
'type' => TType::STRUCT,
'class' => '\EDAM\UserStore\PublicUserInfo',
),
6 => array(
'var' => 'noteStoreUrl',
'type' => TType::STRING,
),
7 => array(
'var' => 'webApiUrlPrefix',
'type' => TType::STRING,
),
8 => array(
'var' => 'secondFactorRequired',
'type' => TType::BOOL,
),
9 => array(
'var' => 'secondFactorDeliveryHint',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['currentTime'])) {
$this->currentTime = $vals['currentTime'];
}
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['expiration'])) {
$this->expiration = $vals['expiration'];
}
if (isset($vals['user'])) {
$this->user = $vals['user'];
}
if (isset($vals['publicUserInfo'])) {
$this->publicUserInfo = $vals['publicUserInfo'];
}
if (isset($vals['noteStoreUrl'])) {
$this->noteStoreUrl = $vals['noteStoreUrl'];
}
if (isset($vals['webApiUrlPrefix'])) {
$this->webApiUrlPrefix = $vals['webApiUrlPrefix'];
}
if (isset($vals['secondFactorRequired'])) {
$this->secondFactorRequired = $vals['secondFactorRequired'];
}
if (isset($vals['secondFactorDeliveryHint'])) {
$this->secondFactorDeliveryHint = $vals['secondFactorDeliveryHint'];
}
}
}
public function getName() {
return 'AuthenticationResult';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::I64) {
$xfer += $input->readI64($this->currentTime);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::I64) {
$xfer += $input->readI64($this->expiration);
} else {
$xfer += $input->skip($ftype);
}
break;
case 4:
if ($ftype == TType::STRUCT) {
$this->user = new \EDAM\Types\User();
$xfer += $this->user->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 5:
if ($ftype == TType::STRUCT) {
$this->publicUserInfo = new \EDAM\UserStore\PublicUserInfo();
$xfer += $this->publicUserInfo->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 6:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->noteStoreUrl);
} else {
$xfer += $input->skip($ftype);
}
break;
case 7:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->webApiUrlPrefix);
} else {
$xfer += $input->skip($ftype);
}
break;
case 8:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->secondFactorRequired);
} else {
$xfer += $input->skip($ftype);
}
break;
case 9:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->secondFactorDeliveryHint);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('AuthenticationResult');
if ($this->currentTime !== null) {
$xfer += $output->writeFieldBegin('currentTime', TType::I64, 1);
$xfer += $output->writeI64($this->currentTime);
$xfer += $output->writeFieldEnd();
}
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 2);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->expiration !== null) {
$xfer += $output->writeFieldBegin('expiration', TType::I64, 3);
$xfer += $output->writeI64($this->expiration);
$xfer += $output->writeFieldEnd();
}
if ($this->user !== null) {
if (!is_object($this->user)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('user', TType::STRUCT, 4);
$xfer += $this->user->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->publicUserInfo !== null) {
if (!is_object($this->publicUserInfo)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('publicUserInfo', TType::STRUCT, 5);
$xfer += $this->publicUserInfo->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->noteStoreUrl !== null) {
$xfer += $output->writeFieldBegin('noteStoreUrl', TType::STRING, 6);
$xfer += $output->writeString($this->noteStoreUrl);
$xfer += $output->writeFieldEnd();
}
if ($this->webApiUrlPrefix !== null) {
$xfer += $output->writeFieldBegin('webApiUrlPrefix', TType::STRING, 7);
$xfer += $output->writeString($this->webApiUrlPrefix);
$xfer += $output->writeFieldEnd();
}
if ($this->secondFactorRequired !== null) {
$xfer += $output->writeFieldBegin('secondFactorRequired', TType::BOOL, 8);
$xfer += $output->writeBool($this->secondFactorRequired);
$xfer += $output->writeFieldEnd();
}
if ($this->secondFactorDeliveryHint !== null) {
$xfer += $output->writeFieldBegin('secondFactorDeliveryHint', TType::STRING, 9);
$xfer += $output->writeString($this->secondFactorDeliveryHint);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class BootstrapSettings {
static $_TSPEC;
public $serviceHost = null;
public $marketingUrl = null;
public $supportUrl = null;
public $accountEmailDomain = null;
public $enableFacebookSharing = null;
public $enableGiftSubscriptions = null;
public $enableSupportTickets = null;
public $enableSharedNotebooks = null;
public $enableSingleNoteSharing = null;
public $enableSponsoredAccounts = null;
public $enableTwitterSharing = null;
public $enableLinkedInSharing = null;
public $enablePublicNotebooks = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'serviceHost',
'type' => TType::STRING,
),
2 => array(
'var' => 'marketingUrl',
'type' => TType::STRING,
),
3 => array(
'var' => 'supportUrl',
'type' => TType::STRING,
),
4 => array(
'var' => 'accountEmailDomain',
'type' => TType::STRING,
),
5 => array(
'var' => 'enableFacebookSharing',
'type' => TType::BOOL,
),
6 => array(
'var' => 'enableGiftSubscriptions',
'type' => TType::BOOL,
),
7 => array(
'var' => 'enableSupportTickets',
'type' => TType::BOOL,
),
8 => array(
'var' => 'enableSharedNotebooks',
'type' => TType::BOOL,
),
9 => array(
'var' => 'enableSingleNoteSharing',
'type' => TType::BOOL,
),
10 => array(
'var' => 'enableSponsoredAccounts',
'type' => TType::BOOL,
),
11 => array(
'var' => 'enableTwitterSharing',
'type' => TType::BOOL,
),
12 => array(
'var' => 'enableLinkedInSharing',
'type' => TType::BOOL,
),
13 => array(
'var' => 'enablePublicNotebooks',
'type' => TType::BOOL,
),
);
}
if (is_array($vals)) {
if (isset($vals['serviceHost'])) {
$this->serviceHost = $vals['serviceHost'];
}
if (isset($vals['marketingUrl'])) {
$this->marketingUrl = $vals['marketingUrl'];
}
if (isset($vals['supportUrl'])) {
$this->supportUrl = $vals['supportUrl'];
}
if (isset($vals['accountEmailDomain'])) {
$this->accountEmailDomain = $vals['accountEmailDomain'];
}
if (isset($vals['enableFacebookSharing'])) {
$this->enableFacebookSharing = $vals['enableFacebookSharing'];
}
if (isset($vals['enableGiftSubscriptions'])) {
$this->enableGiftSubscriptions = $vals['enableGiftSubscriptions'];
}
if (isset($vals['enableSupportTickets'])) {
$this->enableSupportTickets = $vals['enableSupportTickets'];
}
if (isset($vals['enableSharedNotebooks'])) {
$this->enableSharedNotebooks = $vals['enableSharedNotebooks'];
}
if (isset($vals['enableSingleNoteSharing'])) {
$this->enableSingleNoteSharing = $vals['enableSingleNoteSharing'];
}
if (isset($vals['enableSponsoredAccounts'])) {
$this->enableSponsoredAccounts = $vals['enableSponsoredAccounts'];
}
if (isset($vals['enableTwitterSharing'])) {
$this->enableTwitterSharing = $vals['enableTwitterSharing'];
}
if (isset($vals['enableLinkedInSharing'])) {
$this->enableLinkedInSharing = $vals['enableLinkedInSharing'];
}
if (isset($vals['enablePublicNotebooks'])) {
$this->enablePublicNotebooks = $vals['enablePublicNotebooks'];
}
}
}
public function getName() {
return 'BootstrapSettings';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->serviceHost);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->marketingUrl);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->supportUrl);
} else {
$xfer += $input->skip($ftype);
}
break;
case 4:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->accountEmailDomain);
} else {
$xfer += $input->skip($ftype);
}
break;
case 5:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->enableFacebookSharing);
} else {
$xfer += $input->skip($ftype);
}
break;
case 6:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->enableGiftSubscriptions);
} else {
$xfer += $input->skip($ftype);
}
break;
case 7:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->enableSupportTickets);
} else {
$xfer += $input->skip($ftype);
}
break;
case 8:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->enableSharedNotebooks);
} else {
$xfer += $input->skip($ftype);
}
break;
case 9:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->enableSingleNoteSharing);
} else {
$xfer += $input->skip($ftype);
}
break;
case 10:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->enableSponsoredAccounts);
} else {
$xfer += $input->skip($ftype);
}
break;
case 11:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->enableTwitterSharing);
} else {
$xfer += $input->skip($ftype);
}
break;
case 12:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->enableLinkedInSharing);
} else {
$xfer += $input->skip($ftype);
}
break;
case 13:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->enablePublicNotebooks);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('BootstrapSettings');
if ($this->serviceHost !== null) {
$xfer += $output->writeFieldBegin('serviceHost', TType::STRING, 1);
$xfer += $output->writeString($this->serviceHost);
$xfer += $output->writeFieldEnd();
}
if ($this->marketingUrl !== null) {
$xfer += $output->writeFieldBegin('marketingUrl', TType::STRING, 2);
$xfer += $output->writeString($this->marketingUrl);
$xfer += $output->writeFieldEnd();
}
if ($this->supportUrl !== null) {
$xfer += $output->writeFieldBegin('supportUrl', TType::STRING, 3);
$xfer += $output->writeString($this->supportUrl);
$xfer += $output->writeFieldEnd();
}
if ($this->accountEmailDomain !== null) {
$xfer += $output->writeFieldBegin('accountEmailDomain', TType::STRING, 4);
$xfer += $output->writeString($this->accountEmailDomain);
$xfer += $output->writeFieldEnd();
}
if ($this->enableFacebookSharing !== null) {
$xfer += $output->writeFieldBegin('enableFacebookSharing', TType::BOOL, 5);
$xfer += $output->writeBool($this->enableFacebookSharing);
$xfer += $output->writeFieldEnd();
}
if ($this->enableGiftSubscriptions !== null) {
$xfer += $output->writeFieldBegin('enableGiftSubscriptions', TType::BOOL, 6);
$xfer += $output->writeBool($this->enableGiftSubscriptions);
$xfer += $output->writeFieldEnd();
}
if ($this->enableSupportTickets !== null) {
$xfer += $output->writeFieldBegin('enableSupportTickets', TType::BOOL, 7);
$xfer += $output->writeBool($this->enableSupportTickets);
$xfer += $output->writeFieldEnd();
}
if ($this->enableSharedNotebooks !== null) {
$xfer += $output->writeFieldBegin('enableSharedNotebooks', TType::BOOL, 8);
$xfer += $output->writeBool($this->enableSharedNotebooks);
$xfer += $output->writeFieldEnd();
}
if ($this->enableSingleNoteSharing !== null) {
$xfer += $output->writeFieldBegin('enableSingleNoteSharing', TType::BOOL, 9);
$xfer += $output->writeBool($this->enableSingleNoteSharing);
$xfer += $output->writeFieldEnd();
}
if ($this->enableSponsoredAccounts !== null) {
$xfer += $output->writeFieldBegin('enableSponsoredAccounts', TType::BOOL, 10);
$xfer += $output->writeBool($this->enableSponsoredAccounts);
$xfer += $output->writeFieldEnd();
}
if ($this->enableTwitterSharing !== null) {
$xfer += $output->writeFieldBegin('enableTwitterSharing', TType::BOOL, 11);
$xfer += $output->writeBool($this->enableTwitterSharing);
$xfer += $output->writeFieldEnd();
}
if ($this->enableLinkedInSharing !== null) {
$xfer += $output->writeFieldBegin('enableLinkedInSharing', TType::BOOL, 12);
$xfer += $output->writeBool($this->enableLinkedInSharing);
$xfer += $output->writeFieldEnd();
}
if ($this->enablePublicNotebooks !== null) {
$xfer += $output->writeFieldBegin('enablePublicNotebooks', TType::BOOL, 13);
$xfer += $output->writeBool($this->enablePublicNotebooks);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class BootstrapProfile {
static $_TSPEC;
public $name = null;
public $settings = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'name',
'type' => TType::STRING,
),
2 => array(
'var' => 'settings',
'type' => TType::STRUCT,
'class' => '\EDAM\UserStore\BootstrapSettings',
),
);
}
if (is_array($vals)) {
if (isset($vals['name'])) {
$this->name = $vals['name'];
}
if (isset($vals['settings'])) {
$this->settings = $vals['settings'];
}
}
}
public function getName() {
return 'BootstrapProfile';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->name);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->settings = new \EDAM\UserStore\BootstrapSettings();
$xfer += $this->settings->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('BootstrapProfile');
if ($this->name !== null) {
$xfer += $output->writeFieldBegin('name', TType::STRING, 1);
$xfer += $output->writeString($this->name);
$xfer += $output->writeFieldEnd();
}
if ($this->settings !== null) {
if (!is_object($this->settings)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('settings', TType::STRUCT, 2);
$xfer += $this->settings->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class BootstrapInfo {
static $_TSPEC;
public $profiles = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'profiles',
'type' => TType::LST,
'etype' => TType::STRUCT,
'elem' => array(
'type' => TType::STRUCT,
'class' => '\EDAM\UserStore\BootstrapProfile',
),
),
);
}
if (is_array($vals)) {
if (isset($vals['profiles'])) {
$this->profiles = $vals['profiles'];
}
}
}
public function getName() {
return 'BootstrapInfo';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::LST) {
$this->profiles = array();
$_size0 = 0;
$_etype3 = 0;
$xfer += $input->readListBegin($_etype3, $_size0);
for ($_i4 = 0; $_i4 < $_size0; ++$_i4)
{
$elem5 = null;
$elem5 = new \EDAM\UserStore\BootstrapProfile();
$xfer += $elem5->read($input);
$this->profiles []= $elem5;
}
$xfer += $input->readListEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('BootstrapInfo');
if ($this->profiles !== null) {
if (!is_array($this->profiles)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('profiles', TType::LST, 1);
{
$output->writeListBegin(TType::STRUCT, count($this->profiles));
{
foreach ($this->profiles as $iter6)
{
$xfer += $iter6->write($output);
}
}
$output->writeListEnd();
}
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
final class Constant extends \Thrift\Type\TConstant {
static protected $EDAM_VERSION_MAJOR;
static protected $EDAM_VERSION_MINOR;
static protected function init_EDAM_VERSION_MAJOR() {
return 1;
}
static protected function init_EDAM_VERSION_MINOR() {
return 25;
}
}
================================================
FILE: src/EDAM/UserStore/UserStore.php
================================================
input_ = $input;
$this->output_ = $output ? $output : $input;
}
public function checkVersion($clientName, $edamVersionMajor, $edamVersionMinor)
{
$this->send_checkVersion($clientName, $edamVersionMajor, $edamVersionMinor);
return $this->recv_checkVersion();
}
public function send_checkVersion($clientName, $edamVersionMajor, $edamVersionMinor)
{
$args = new \EDAM\UserStore\UserStore_checkVersion_args();
$args->clientName = $clientName;
$args->edamVersionMajor = $edamVersionMajor;
$args->edamVersionMinor = $edamVersionMinor;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'checkVersion', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('checkVersion', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_checkVersion()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\UserStore\UserStore_checkVersion_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\UserStore\UserStore_checkVersion_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
throw new \Exception("checkVersion failed: unknown result");
}
public function getBootstrapInfo($locale)
{
$this->send_getBootstrapInfo($locale);
return $this->recv_getBootstrapInfo();
}
public function send_getBootstrapInfo($locale)
{
$args = new \EDAM\UserStore\UserStore_getBootstrapInfo_args();
$args->locale = $locale;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'getBootstrapInfo', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('getBootstrapInfo', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_getBootstrapInfo()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\UserStore\UserStore_getBootstrapInfo_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\UserStore\UserStore_getBootstrapInfo_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
throw new \Exception("getBootstrapInfo failed: unknown result");
}
public function authenticate($username, $password, $consumerKey, $consumerSecret, $supportsTwoFactor)
{
$this->send_authenticate($username, $password, $consumerKey, $consumerSecret, $supportsTwoFactor);
return $this->recv_authenticate();
}
public function send_authenticate($username, $password, $consumerKey, $consumerSecret, $supportsTwoFactor)
{
$args = new \EDAM\UserStore\UserStore_authenticate_args();
$args->username = $username;
$args->password = $password;
$args->consumerKey = $consumerKey;
$args->consumerSecret = $consumerSecret;
$args->supportsTwoFactor = $supportsTwoFactor;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'authenticate', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('authenticate', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_authenticate()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\UserStore\UserStore_authenticate_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\UserStore\UserStore_authenticate_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
throw new \Exception("authenticate failed: unknown result");
}
public function authenticateLongSession($username, $password, $consumerKey, $consumerSecret, $deviceIdentifier, $deviceDescription, $supportsTwoFactor)
{
$this->send_authenticateLongSession($username, $password, $consumerKey, $consumerSecret, $deviceIdentifier, $deviceDescription, $supportsTwoFactor);
return $this->recv_authenticateLongSession();
}
public function send_authenticateLongSession($username, $password, $consumerKey, $consumerSecret, $deviceIdentifier, $deviceDescription, $supportsTwoFactor)
{
$args = new \EDAM\UserStore\UserStore_authenticateLongSession_args();
$args->username = $username;
$args->password = $password;
$args->consumerKey = $consumerKey;
$args->consumerSecret = $consumerSecret;
$args->deviceIdentifier = $deviceIdentifier;
$args->deviceDescription = $deviceDescription;
$args->supportsTwoFactor = $supportsTwoFactor;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'authenticateLongSession', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('authenticateLongSession', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_authenticateLongSession()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\UserStore\UserStore_authenticateLongSession_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\UserStore\UserStore_authenticateLongSession_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
throw new \Exception("authenticateLongSession failed: unknown result");
}
public function completeTwoFactorAuthentication($authenticationToken, $oneTimeCode, $deviceIdentifier, $deviceDescription)
{
$this->send_completeTwoFactorAuthentication($authenticationToken, $oneTimeCode, $deviceIdentifier, $deviceDescription);
return $this->recv_completeTwoFactorAuthentication();
}
public function send_completeTwoFactorAuthentication($authenticationToken, $oneTimeCode, $deviceIdentifier, $deviceDescription)
{
$args = new \EDAM\UserStore\UserStore_completeTwoFactorAuthentication_args();
$args->authenticationToken = $authenticationToken;
$args->oneTimeCode = $oneTimeCode;
$args->deviceIdentifier = $deviceIdentifier;
$args->deviceDescription = $deviceDescription;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'completeTwoFactorAuthentication', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('completeTwoFactorAuthentication', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_completeTwoFactorAuthentication()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\UserStore\UserStore_completeTwoFactorAuthentication_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\UserStore\UserStore_completeTwoFactorAuthentication_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
throw new \Exception("completeTwoFactorAuthentication failed: unknown result");
}
public function revokeLongSession($authenticationToken)
{
$this->send_revokeLongSession($authenticationToken);
$this->recv_revokeLongSession();
}
public function send_revokeLongSession($authenticationToken)
{
$args = new \EDAM\UserStore\UserStore_revokeLongSession_args();
$args->authenticationToken = $authenticationToken;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'revokeLongSession', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('revokeLongSession', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_revokeLongSession()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\UserStore\UserStore_revokeLongSession_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\UserStore\UserStore_revokeLongSession_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
return;
}
public function authenticateToBusiness($authenticationToken)
{
$this->send_authenticateToBusiness($authenticationToken);
return $this->recv_authenticateToBusiness();
}
public function send_authenticateToBusiness($authenticationToken)
{
$args = new \EDAM\UserStore\UserStore_authenticateToBusiness_args();
$args->authenticationToken = $authenticationToken;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'authenticateToBusiness', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('authenticateToBusiness', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_authenticateToBusiness()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\UserStore\UserStore_authenticateToBusiness_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\UserStore\UserStore_authenticateToBusiness_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
throw new \Exception("authenticateToBusiness failed: unknown result");
}
public function refreshAuthentication($authenticationToken)
{
$this->send_refreshAuthentication($authenticationToken);
return $this->recv_refreshAuthentication();
}
public function send_refreshAuthentication($authenticationToken)
{
$args = new \EDAM\UserStore\UserStore_refreshAuthentication_args();
$args->authenticationToken = $authenticationToken;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'refreshAuthentication', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('refreshAuthentication', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_refreshAuthentication()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\UserStore\UserStore_refreshAuthentication_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\UserStore\UserStore_refreshAuthentication_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
throw new \Exception("refreshAuthentication failed: unknown result");
}
public function getUser($authenticationToken)
{
$this->send_getUser($authenticationToken);
return $this->recv_getUser();
}
public function send_getUser($authenticationToken)
{
$args = new \EDAM\UserStore\UserStore_getUser_args();
$args->authenticationToken = $authenticationToken;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'getUser', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('getUser', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_getUser()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\UserStore\UserStore_getUser_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\UserStore\UserStore_getUser_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
throw new \Exception("getUser failed: unknown result");
}
public function getPublicUserInfo($username)
{
$this->send_getPublicUserInfo($username);
return $this->recv_getPublicUserInfo();
}
public function send_getPublicUserInfo($username)
{
$args = new \EDAM\UserStore\UserStore_getPublicUserInfo_args();
$args->username = $username;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'getPublicUserInfo', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('getPublicUserInfo', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_getPublicUserInfo()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\UserStore\UserStore_getPublicUserInfo_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\UserStore\UserStore_getPublicUserInfo_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->notFoundException !== null) {
throw $result->notFoundException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
if ($result->userException !== null) {
throw $result->userException;
}
throw new \Exception("getPublicUserInfo failed: unknown result");
}
public function getPremiumInfo($authenticationToken)
{
$this->send_getPremiumInfo($authenticationToken);
return $this->recv_getPremiumInfo();
}
public function send_getPremiumInfo($authenticationToken)
{
$args = new \EDAM\UserStore\UserStore_getPremiumInfo_args();
$args->authenticationToken = $authenticationToken;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'getPremiumInfo', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('getPremiumInfo', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_getPremiumInfo()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\UserStore\UserStore_getPremiumInfo_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\UserStore\UserStore_getPremiumInfo_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
throw new \Exception("getPremiumInfo failed: unknown result");
}
public function getNoteStoreUrl($authenticationToken)
{
$this->send_getNoteStoreUrl($authenticationToken);
return $this->recv_getNoteStoreUrl();
}
public function send_getNoteStoreUrl($authenticationToken)
{
$args = new \EDAM\UserStore\UserStore_getNoteStoreUrl_args();
$args->authenticationToken = $authenticationToken;
$bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
thrift_protocol_write_binary($this->output_, 'getNoteStoreUrl', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
}
else
{
$this->output_->writeMessageBegin('getNoteStoreUrl', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
public function recv_getNoteStoreUrl()
{
$bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\EDAM\UserStore\UserStore_getNoteStoreUrl_result', $this->input_->isStrictRead());
else
{
$rseqid = 0;
$fname = null;
$mtype = 0;
$this->input_->readMessageBegin($fname, $mtype, $rseqid);
if ($mtype == TMessageType::EXCEPTION) {
$x = new TApplicationException();
$x->read($this->input_);
$this->input_->readMessageEnd();
throw $x;
}
$result = new \EDAM\UserStore\UserStore_getNoteStoreUrl_result();
$result->read($this->input_);
$this->input_->readMessageEnd();
}
if ($result->success !== null) {
return $result->success;
}
if ($result->userException !== null) {
throw $result->userException;
}
if ($result->systemException !== null) {
throw $result->systemException;
}
throw new \Exception("getNoteStoreUrl failed: unknown result");
}
}
// HELPER FUNCTIONS AND STRUCTURES
class UserStore_checkVersion_args {
static $_TSPEC;
public $clientName = null;
public $edamVersionMajor = 1;
public $edamVersionMinor = 25;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'clientName',
'type' => TType::STRING,
),
2 => array(
'var' => 'edamVersionMajor',
'type' => TType::I16,
),
3 => array(
'var' => 'edamVersionMinor',
'type' => TType::I16,
),
);
}
if (is_array($vals)) {
if (isset($vals['clientName'])) {
$this->clientName = $vals['clientName'];
}
if (isset($vals['edamVersionMajor'])) {
$this->edamVersionMajor = $vals['edamVersionMajor'];
}
if (isset($vals['edamVersionMinor'])) {
$this->edamVersionMinor = $vals['edamVersionMinor'];
}
}
}
public function getName() {
return 'UserStore_checkVersion_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->clientName);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::I16) {
$xfer += $input->readI16($this->edamVersionMajor);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::I16) {
$xfer += $input->readI16($this->edamVersionMinor);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('UserStore_checkVersion_args');
if ($this->clientName !== null) {
$xfer += $output->writeFieldBegin('clientName', TType::STRING, 1);
$xfer += $output->writeString($this->clientName);
$xfer += $output->writeFieldEnd();
}
if ($this->edamVersionMajor !== null) {
$xfer += $output->writeFieldBegin('edamVersionMajor', TType::I16, 2);
$xfer += $output->writeI16($this->edamVersionMajor);
$xfer += $output->writeFieldEnd();
}
if ($this->edamVersionMinor !== null) {
$xfer += $output->writeFieldBegin('edamVersionMinor', TType::I16, 3);
$xfer += $output->writeI16($this->edamVersionMinor);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class UserStore_checkVersion_result {
static $_TSPEC;
public $success = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::BOOL,
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
}
}
public function getName() {
return 'UserStore_checkVersion_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->success);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('UserStore_checkVersion_result');
if ($this->success !== null) {
$xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
$xfer += $output->writeBool($this->success);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class UserStore_getBootstrapInfo_args {
static $_TSPEC;
public $locale = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'locale',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['locale'])) {
$this->locale = $vals['locale'];
}
}
}
public function getName() {
return 'UserStore_getBootstrapInfo_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->locale);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('UserStore_getBootstrapInfo_args');
if ($this->locale !== null) {
$xfer += $output->writeFieldBegin('locale', TType::STRING, 1);
$xfer += $output->writeString($this->locale);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class UserStore_getBootstrapInfo_result {
static $_TSPEC;
public $success = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::STRUCT,
'class' => '\EDAM\UserStore\BootstrapInfo',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
}
}
public function getName() {
return 'UserStore_getBootstrapInfo_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::STRUCT) {
$this->success = new \EDAM\UserStore\BootstrapInfo();
$xfer += $this->success->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('UserStore_getBootstrapInfo_result');
if ($this->success !== null) {
if (!is_object($this->success)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
$xfer += $this->success->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class UserStore_authenticate_args {
static $_TSPEC;
public $username = null;
public $password = null;
public $consumerKey = null;
public $consumerSecret = null;
public $supportsTwoFactor = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'username',
'type' => TType::STRING,
),
2 => array(
'var' => 'password',
'type' => TType::STRING,
),
3 => array(
'var' => 'consumerKey',
'type' => TType::STRING,
),
4 => array(
'var' => 'consumerSecret',
'type' => TType::STRING,
),
5 => array(
'var' => 'supportsTwoFactor',
'type' => TType::BOOL,
),
);
}
if (is_array($vals)) {
if (isset($vals['username'])) {
$this->username = $vals['username'];
}
if (isset($vals['password'])) {
$this->password = $vals['password'];
}
if (isset($vals['consumerKey'])) {
$this->consumerKey = $vals['consumerKey'];
}
if (isset($vals['consumerSecret'])) {
$this->consumerSecret = $vals['consumerSecret'];
}
if (isset($vals['supportsTwoFactor'])) {
$this->supportsTwoFactor = $vals['supportsTwoFactor'];
}
}
}
public function getName() {
return 'UserStore_authenticate_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->username);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->password);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->consumerKey);
} else {
$xfer += $input->skip($ftype);
}
break;
case 4:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->consumerSecret);
} else {
$xfer += $input->skip($ftype);
}
break;
case 5:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->supportsTwoFactor);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('UserStore_authenticate_args');
if ($this->username !== null) {
$xfer += $output->writeFieldBegin('username', TType::STRING, 1);
$xfer += $output->writeString($this->username);
$xfer += $output->writeFieldEnd();
}
if ($this->password !== null) {
$xfer += $output->writeFieldBegin('password', TType::STRING, 2);
$xfer += $output->writeString($this->password);
$xfer += $output->writeFieldEnd();
}
if ($this->consumerKey !== null) {
$xfer += $output->writeFieldBegin('consumerKey', TType::STRING, 3);
$xfer += $output->writeString($this->consumerKey);
$xfer += $output->writeFieldEnd();
}
if ($this->consumerSecret !== null) {
$xfer += $output->writeFieldBegin('consumerSecret', TType::STRING, 4);
$xfer += $output->writeString($this->consumerSecret);
$xfer += $output->writeFieldEnd();
}
if ($this->supportsTwoFactor !== null) {
$xfer += $output->writeFieldBegin('supportsTwoFactor', TType::BOOL, 5);
$xfer += $output->writeBool($this->supportsTwoFactor);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class UserStore_authenticate_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::STRUCT,
'class' => '\EDAM\UserStore\AuthenticationResult',
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
}
}
public function getName() {
return 'UserStore_authenticate_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::STRUCT) {
$this->success = new \EDAM\UserStore\AuthenticationResult();
$xfer += $this->success->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('UserStore_authenticate_result');
if ($this->success !== null) {
if (!is_object($this->success)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
$xfer += $this->success->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class UserStore_authenticateLongSession_args {
static $_TSPEC;
public $username = null;
public $password = null;
public $consumerKey = null;
public $consumerSecret = null;
public $deviceIdentifier = null;
public $deviceDescription = null;
public $supportsTwoFactor = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'username',
'type' => TType::STRING,
),
2 => array(
'var' => 'password',
'type' => TType::STRING,
),
3 => array(
'var' => 'consumerKey',
'type' => TType::STRING,
),
4 => array(
'var' => 'consumerSecret',
'type' => TType::STRING,
),
5 => array(
'var' => 'deviceIdentifier',
'type' => TType::STRING,
),
6 => array(
'var' => 'deviceDescription',
'type' => TType::STRING,
),
7 => array(
'var' => 'supportsTwoFactor',
'type' => TType::BOOL,
),
);
}
if (is_array($vals)) {
if (isset($vals['username'])) {
$this->username = $vals['username'];
}
if (isset($vals['password'])) {
$this->password = $vals['password'];
}
if (isset($vals['consumerKey'])) {
$this->consumerKey = $vals['consumerKey'];
}
if (isset($vals['consumerSecret'])) {
$this->consumerSecret = $vals['consumerSecret'];
}
if (isset($vals['deviceIdentifier'])) {
$this->deviceIdentifier = $vals['deviceIdentifier'];
}
if (isset($vals['deviceDescription'])) {
$this->deviceDescription = $vals['deviceDescription'];
}
if (isset($vals['supportsTwoFactor'])) {
$this->supportsTwoFactor = $vals['supportsTwoFactor'];
}
}
}
public function getName() {
return 'UserStore_authenticateLongSession_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->username);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->password);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->consumerKey);
} else {
$xfer += $input->skip($ftype);
}
break;
case 4:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->consumerSecret);
} else {
$xfer += $input->skip($ftype);
}
break;
case 5:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->deviceIdentifier);
} else {
$xfer += $input->skip($ftype);
}
break;
case 6:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->deviceDescription);
} else {
$xfer += $input->skip($ftype);
}
break;
case 7:
if ($ftype == TType::BOOL) {
$xfer += $input->readBool($this->supportsTwoFactor);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('UserStore_authenticateLongSession_args');
if ($this->username !== null) {
$xfer += $output->writeFieldBegin('username', TType::STRING, 1);
$xfer += $output->writeString($this->username);
$xfer += $output->writeFieldEnd();
}
if ($this->password !== null) {
$xfer += $output->writeFieldBegin('password', TType::STRING, 2);
$xfer += $output->writeString($this->password);
$xfer += $output->writeFieldEnd();
}
if ($this->consumerKey !== null) {
$xfer += $output->writeFieldBegin('consumerKey', TType::STRING, 3);
$xfer += $output->writeString($this->consumerKey);
$xfer += $output->writeFieldEnd();
}
if ($this->consumerSecret !== null) {
$xfer += $output->writeFieldBegin('consumerSecret', TType::STRING, 4);
$xfer += $output->writeString($this->consumerSecret);
$xfer += $output->writeFieldEnd();
}
if ($this->deviceIdentifier !== null) {
$xfer += $output->writeFieldBegin('deviceIdentifier', TType::STRING, 5);
$xfer += $output->writeString($this->deviceIdentifier);
$xfer += $output->writeFieldEnd();
}
if ($this->deviceDescription !== null) {
$xfer += $output->writeFieldBegin('deviceDescription', TType::STRING, 6);
$xfer += $output->writeString($this->deviceDescription);
$xfer += $output->writeFieldEnd();
}
if ($this->supportsTwoFactor !== null) {
$xfer += $output->writeFieldBegin('supportsTwoFactor', TType::BOOL, 7);
$xfer += $output->writeBool($this->supportsTwoFactor);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class UserStore_authenticateLongSession_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::STRUCT,
'class' => '\EDAM\UserStore\AuthenticationResult',
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
}
}
public function getName() {
return 'UserStore_authenticateLongSession_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::STRUCT) {
$this->success = new \EDAM\UserStore\AuthenticationResult();
$xfer += $this->success->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('UserStore_authenticateLongSession_result');
if ($this->success !== null) {
if (!is_object($this->success)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
$xfer += $this->success->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class UserStore_completeTwoFactorAuthentication_args {
static $_TSPEC;
public $authenticationToken = null;
public $oneTimeCode = null;
public $deviceIdentifier = null;
public $deviceDescription = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
2 => array(
'var' => 'oneTimeCode',
'type' => TType::STRING,
),
3 => array(
'var' => 'deviceIdentifier',
'type' => TType::STRING,
),
4 => array(
'var' => 'deviceDescription',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
if (isset($vals['oneTimeCode'])) {
$this->oneTimeCode = $vals['oneTimeCode'];
}
if (isset($vals['deviceIdentifier'])) {
$this->deviceIdentifier = $vals['deviceIdentifier'];
}
if (isset($vals['deviceDescription'])) {
$this->deviceDescription = $vals['deviceDescription'];
}
}
}
public function getName() {
return 'UserStore_completeTwoFactorAuthentication_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->oneTimeCode);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->deviceIdentifier);
} else {
$xfer += $input->skip($ftype);
}
break;
case 4:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->deviceDescription);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('UserStore_completeTwoFactorAuthentication_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
if ($this->oneTimeCode !== null) {
$xfer += $output->writeFieldBegin('oneTimeCode', TType::STRING, 2);
$xfer += $output->writeString($this->oneTimeCode);
$xfer += $output->writeFieldEnd();
}
if ($this->deviceIdentifier !== null) {
$xfer += $output->writeFieldBegin('deviceIdentifier', TType::STRING, 3);
$xfer += $output->writeString($this->deviceIdentifier);
$xfer += $output->writeFieldEnd();
}
if ($this->deviceDescription !== null) {
$xfer += $output->writeFieldBegin('deviceDescription', TType::STRING, 4);
$xfer += $output->writeString($this->deviceDescription);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class UserStore_completeTwoFactorAuthentication_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::STRUCT,
'class' => '\EDAM\UserStore\AuthenticationResult',
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
}
}
public function getName() {
return 'UserStore_completeTwoFactorAuthentication_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::STRUCT) {
$this->success = new \EDAM\UserStore\AuthenticationResult();
$xfer += $this->success->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('UserStore_completeTwoFactorAuthentication_result');
if ($this->success !== null) {
if (!is_object($this->success)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
$xfer += $this->success->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class UserStore_revokeLongSession_args {
static $_TSPEC;
public $authenticationToken = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
}
}
public function getName() {
return 'UserStore_revokeLongSession_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('UserStore_revokeLongSession_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class UserStore_revokeLongSession_result {
static $_TSPEC;
public $userException = null;
public $systemException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
);
}
if (is_array($vals)) {
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
}
}
public function getName() {
return 'UserStore_revokeLongSession_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('UserStore_revokeLongSession_result');
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class UserStore_authenticateToBusiness_args {
static $_TSPEC;
public $authenticationToken = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
}
}
public function getName() {
return 'UserStore_authenticateToBusiness_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('UserStore_authenticateToBusiness_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class UserStore_authenticateToBusiness_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::STRUCT,
'class' => '\EDAM\UserStore\AuthenticationResult',
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
}
}
public function getName() {
return 'UserStore_authenticateToBusiness_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::STRUCT) {
$this->success = new \EDAM\UserStore\AuthenticationResult();
$xfer += $this->success->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('UserStore_authenticateToBusiness_result');
if ($this->success !== null) {
if (!is_object($this->success)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
$xfer += $this->success->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class UserStore_refreshAuthentication_args {
static $_TSPEC;
public $authenticationToken = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
}
}
public function getName() {
return 'UserStore_refreshAuthentication_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('UserStore_refreshAuthentication_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class UserStore_refreshAuthentication_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::STRUCT,
'class' => '\EDAM\UserStore\AuthenticationResult',
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
}
}
public function getName() {
return 'UserStore_refreshAuthentication_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::STRUCT) {
$this->success = new \EDAM\UserStore\AuthenticationResult();
$xfer += $this->success->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('UserStore_refreshAuthentication_result');
if ($this->success !== null) {
if (!is_object($this->success)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
$xfer += $this->success->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class UserStore_getUser_args {
static $_TSPEC;
public $authenticationToken = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
}
}
public function getName() {
return 'UserStore_getUser_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('UserStore_getUser_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class UserStore_getUser_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\User',
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
}
}
public function getName() {
return 'UserStore_getUser_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::STRUCT) {
$this->success = new \EDAM\Types\User();
$xfer += $this->success->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('UserStore_getUser_result');
if ($this->success !== null) {
if (!is_object($this->success)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
$xfer += $this->success->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class UserStore_getPublicUserInfo_args {
static $_TSPEC;
public $username = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'username',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['username'])) {
$this->username = $vals['username'];
}
}
}
public function getName() {
return 'UserStore_getPublicUserInfo_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->username);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('UserStore_getPublicUserInfo_args');
if ($this->username !== null) {
$xfer += $output->writeFieldBegin('username', TType::STRING, 1);
$xfer += $output->writeString($this->username);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class UserStore_getPublicUserInfo_result {
static $_TSPEC;
public $success = null;
public $notFoundException = null;
public $systemException = null;
public $userException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::STRUCT,
'class' => '\EDAM\UserStore\PublicUserInfo',
),
1 => array(
'var' => 'notFoundException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMNotFoundException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
3 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['notFoundException'])) {
$this->notFoundException = $vals['notFoundException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
}
}
public function getName() {
return 'UserStore_getPublicUserInfo_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::STRUCT) {
$this->success = new \EDAM\UserStore\PublicUserInfo();
$xfer += $this->success->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
$xfer += $this->notFoundException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('UserStore_getPublicUserInfo_result');
if ($this->success !== null) {
if (!is_object($this->success)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
$xfer += $this->success->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->notFoundException !== null) {
$xfer += $output->writeFieldBegin('notFoundException', TType::STRUCT, 1);
$xfer += $this->notFoundException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 3);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class UserStore_getPremiumInfo_args {
static $_TSPEC;
public $authenticationToken = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
}
}
public function getName() {
return 'UserStore_getPremiumInfo_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('UserStore_getPremiumInfo_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class UserStore_getPremiumInfo_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::STRUCT,
'class' => '\EDAM\Types\PremiumInfo',
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
}
}
public function getName() {
return 'UserStore_getPremiumInfo_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::STRUCT) {
$this->success = new \EDAM\Types\PremiumInfo();
$xfer += $this->success->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('UserStore_getPremiumInfo_result');
if ($this->success !== null) {
if (!is_object($this->success)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
$xfer += $this->success->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class UserStore_getNoteStoreUrl_args {
static $_TSPEC;
public $authenticationToken = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
'var' => 'authenticationToken',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
if (isset($vals['authenticationToken'])) {
$this->authenticationToken = $vals['authenticationToken'];
}
}
}
public function getName() {
return 'UserStore_getNoteStoreUrl_args';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 1:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->authenticationToken);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('UserStore_getNoteStoreUrl_args');
if ($this->authenticationToken !== null) {
$xfer += $output->writeFieldBegin('authenticationToken', TType::STRING, 1);
$xfer += $output->writeString($this->authenticationToken);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
class UserStore_getNoteStoreUrl_result {
static $_TSPEC;
public $success = null;
public $userException = null;
public $systemException = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
'type' => TType::STRING,
),
1 => array(
'var' => 'userException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMUserException',
),
2 => array(
'var' => 'systemException',
'type' => TType::STRUCT,
'class' => '\EDAM\Error\EDAMSystemException',
),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
if (isset($vals['userException'])) {
$this->userException = $vals['userException'];
}
if (isset($vals['systemException'])) {
$this->systemException = $vals['systemException'];
}
}
}
public function getName() {
return 'UserStore_getNoteStoreUrl_result';
}
public function read($input)
{
$xfer = 0;
$fname = null;
$ftype = 0;
$fid = 0;
$xfer += $input->readStructBegin($fname);
while (true)
{
$xfer += $input->readFieldBegin($fname, $ftype, $fid);
if ($ftype == TType::STOP) {
break;
}
switch ($fid)
{
case 0:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->success);
} else {
$xfer += $input->skip($ftype);
}
break;
case 1:
if ($ftype == TType::STRUCT) {
$this->userException = new \EDAM\Error\EDAMUserException();
$xfer += $this->userException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
$this->systemException = new \EDAM\Error\EDAMSystemException();
$xfer += $this->systemException->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
default:
$xfer += $input->skip($ftype);
break;
}
$xfer += $input->readFieldEnd();
}
$xfer += $input->readStructEnd();
return $xfer;
}
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('UserStore_getNoteStoreUrl_result');
if ($this->success !== null) {
$xfer += $output->writeFieldBegin('success', TType::STRING, 0);
$xfer += $output->writeString($this->success);
$xfer += $output->writeFieldEnd();
}
if ($this->userException !== null) {
$xfer += $output->writeFieldBegin('userException', TType::STRUCT, 1);
$xfer += $this->userException->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->systemException !== null) {
$xfer += $output->writeFieldBegin('systemException', TType::STRUCT, 2);
$xfer += $this->systemException->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}
================================================
FILE: src/Evernote/AdvancedClient.php
================================================
token = $token;
$this->sandbox = $sandbox;
$this->thriftClientFactory = $thriftClientFactory;
$this->logger = $logger ?: new NullLogger;
$this->china = $china;
}
/**
* @return \EDAM\UserStore\UserStoreClient
*/
public function getUserStore()
{
if (null === $this->userStore) {
$this->userStore = $this->getStoreInstance($this->token, 'user', $this->getEndpoint('/edam/user'));
}
return $this->userStore;
}
/**
* @param $noteStoreUrl
* @return mixed
*/
public function getNoteStore($noteStoreUrl = null, $token = null)
{
if (null === $noteStoreUrl) {
$noteStoreUrl = $this->getUserStore()->getNoteStoreUrl($this->token);
}
if (null == $token) {
$token = $this->token;
}
return $this->getStoreInstance($token, 'note', $noteStoreUrl);
}
public function getSharedNoteStore($linkedNotebook)
{
$noteStoreUrl = $linkedNotebook->noteStoreUrl;
$noteStore = $this->getNoteStore($noteStoreUrl);
$sharedAuth = $noteStore->authenticateToSharedNotebook($linkedNotebook->shareKey);
$sharedToken = $sharedAuth->authenticationToken;
return $this->getStoreInstance($sharedToken, 'note', $noteStoreUrl);
}
public function getBusinessNoteStore()
{
$businessAuth = $this->getUserStore()->authenticateToBusiness($this->token);
return $this->getNoteStore($businessAuth->noteStoreUrl, $businessAuth->authenticationToken);
}
/**
* @param null $path
* @return string
*/
public function getEndpoint($path = null)
{
if (true === $this->sandbox) {
$url = self::SANDBOX_BASE_URL;
} elseif (true === $this->china) {
$url = self::CHINA_BASE_URL;
} else {
$url = self::PROD_BASE_URL;
}
if (null != $path) {
$url .= '/' . $path;
}
return $url;
}
/**
* @return ThriftClientFactory
*/
public function getThriftClientFactory()
{
return $this->thriftClientFactory;
}
public function getStoreInstance($token, $type, $url)
{
return new Store($this->getThriftClientFactory(), $token, $type, $url);
}
}
================================================
FILE: src/Evernote/Auth/OauthHandler.php
================================================
sandbox = $sandbox;
$this->supportLinkedSandbox = $supportLinkedSandbox;
$this->china = $china;
$this->params['oauth_callback'] = null;
$this->params['oauth_consumer_key'] = null;
$this->params['oauth_nonce'] = $this->getOauthNonce();
$this->params['oauth_signature'] = null;
$this->params['oauth_signature_method'] = 'HMAC-SHA1';
$this->params['oauth_timestamp'] = $this->getOauthTimestamp();
$this->params['oauth_token'] = null;
$this->params['oauth_verifier'] = '1.0';
$this->params['oauth_version'] = '1.0';
$this->token_secret = '';
}
public function authorize($consumer_key, $consumer_secret, $callback)
{
$this->params['oauth_callback'] = $callback;
$this->params['oauth_consumer_key'] = $consumer_key;
$this->consumer_secret = $consumer_secret;
if (session_status() == PHP_SESSION_NONE) {
session_start();
}
// first call
if (!array_key_exists('oauth_verifier', $_GET) && !array_key_exists('oauth_token', $_GET)) {
unset($this->params['oauth_token']);
unset($this->params['oauth_verifier']);
$temporaryCredentials = $this->getTemporaryCredentials();
$_SESSION['oauth_token_secret'] = $temporaryCredentials['oauth_token_secret'];;
$authorizationUrl = 'Location: '
. $this->getBaseUrl('OAuth.action?oauth_token=')
. $temporaryCredentials['oauth_token'];
if ($this->supportLinkedSandbox) {
$authorizationUrl .= '&supportLinkedSandbox=true';
}
header($authorizationUrl);
// the user declined the authorization
} elseif (!array_key_exists('oauth_verifier', $_GET) && array_key_exists('oauth_token', $_GET)) {
throw new AuthorizationDeniedException('Authorization declined.');
//the user authorized the app
} else {
$this->token_secret = $_SESSION['oauth_token_secret'];
$this->params['oauth_token'] = $_GET['oauth_token'];
$this->params['oauth_verifier'] = $_GET['oauth_verifier'];
unset($this->params['oauth_callback']);
return $this->getTemporaryCredentials();
}
}
protected function getBaseUrl($prefix = '')
{
$baseUrl = '';
if (true === $this->sandbox) {
$baseUrl = "https://sandbox.evernote.com";
} elseif (true === $this->china) {
$baseUrl = "https://app.yinxiang.com";
} else {
$baseUrl = "https://www.evernote.com";
}
$baseUrl .= $prefix == '' ? '' : '/' . $prefix;
return $baseUrl;
}
protected function getTemporaryCredentials()
{
$headers = array();
$headers['Content-Type'] = 'application/x-www-form-urlencoded';
$headers['Authorization'] = $this->getAuthorizationHeaderString();
$arguments = array();
$handle = curl_init();
curl_setopt_array($handle, array(
CURLOPT_POST => true,
CURLOPT_URL => $this->getBaseUrl('oauth'),
CURLOPT_HTTPHEADER => $this->formatHeaders($headers),
CURLOPT_POSTFIELDS => http_build_query($arguments, '', '&'),
CURLOPT_HEADER => true,
CURLOPT_RETURNTRANSFER => true
));
$raw = curl_exec($handle);
# close curl handle
curl_close($handle);
$responseBody = $this->getResponseBody($raw);
parse_str($responseBody, $parts);
return $parts;
}
protected function getResponseBody($raw)
{
list($headers, $text) = explode("\r\n\r\n", $raw, 2);
if (strpos($headers, ' 100 Continue') !== false) {
list(, $text) = explode("\r\n\r\n", $text, 2);
}
return $text;
}
protected function getOauthNonce()
{
return md5(mt_rand());
}
protected function getOauthTimestamp()
{
return time();
}
protected function getOauthSignature()
{
$baseString = $this->getSignatureBaseString();
$signatureKey = $this->getSignatureKey();
$oauth_signature = base64_encode(
hash_hmac(
'sha1',
$baseString,
$signatureKey,
true
)
);
return rawurlencode($oauth_signature);
}
protected function getSignatureBaseString()
{
$params = $this->params;
unset($params['oauth_signature']);
if (array_key_exists('oauth_callback', $params)) {
$params['oauth_callback'] = rawurlencode($params['oauth_callback']);
}
return 'POST&' . rawurlencode($this->getBaseUrl('oauth')) .'&' . rawurlencode($this->formatParametersString($params, '&'));
}
protected function formatParametersString($params, $glue, $enclosure = '')
{
$result = array();
foreach ($params as $key => $value) {
$result[] = $key . '=' . $enclosure . $value . $enclosure;
}
return implode($glue, $result);
}
protected function getAuthorizationHeaderString()
{
$params = $this->params;
$params['oauth_signature'] = $this->getOauthSignature();
return 'OAuth ' . $this->formatParametersString($params, ', ', '"');
}
protected function getSignatureKey()
{
return $this->consumer_secret . '&' . $this->token_secret;
}
protected function formatHeaders($headers)
{
$result = array();
foreach($headers as $key => $value) {
$result[] = "$key: $value";
}
return $result;
}
}
================================================
FILE: src/Evernote/Client.php
================================================
token = $token;
$this->sandbox = $sandbox;
$this->advancedClient = $advancedClient;
$this->logger = $logger ?: new NullLogger;
$this->china = $china;
}
/**
* Returns a boolean indicating if the user has a business account
*
* @return bool
*/
public function isBusinessUser()
{
if (null === $this->isBusinessUser) {
try {
$user = $this->getAdvancedClient()
->getUserStore()->getUser($this->token);
} catch (\Exception $e) {
throw ExceptionFactory::create($e);
}
$this->isBusinessUser = $user->accounting->businessId !== null;
}
return $this->isBusinessUser;
}
/**
* Returns the token used to access the business notestore
*
* @return string
*/
public function getBusinessToken()
{
if (null === $this->businessToken) {
$this->businessToken = $this->getBusinessAuth()->authenticationToken;
}
return $this->businessToken;
}
/**
* Returns the business notestore
*
* @return \EDAM\NoteStore\NoteStoreClient|mixed
*/
public function getBusinessNoteStore()
{
if (null === $this->businessNoteStore && $this->isBusinessUser()) {
$this->businessNoteStore = $this->getAdvancedClient()->getBusinessNoteStore();
}
return $this->businessNoteStore;
}
/**
* Returns the list of notebooks shared by the user with her business account
*
* @return null
*/
public function getBusinessSharedNotebooks()
{
return $this->getBusinessNoteStore()->listSharedNotebooks($this->getBusinessToken());
}
/**
* Returns the list of notebooks shared to the user through the business account
*
* @return array
*/
public function getBusinessLinkedNotebooks()
{
return $this->getBusinessNoteStore()->listNotebooks($this->getBusinessToken());
}
/**
* Returns the list of notebooks
*
* @return array
*/
public function listNotebooks()
{
/**
* 1. Get all of the user's personal notebooks.
*/
try {
$personalNotebooks = $this->listPersonalNotebooks();
} catch (EDAMUserException $e) {
$personalNotebooks = array();
} catch (EDAMSystemException $e) {
$personalNotebooks = array();
}
$resultNotebooks = array();
$guidsToNotebooks = array();
foreach($personalNotebooks as $personalNotebook) {
$resultNotebook = new Notebook($personalNotebook);
$resultNotebooks[] = $resultNotebook;
$guidsToNotebooks[$personalNotebook->guid] = $resultNotebook;
}
/**
* Get shared notebooks and flag the matching notebook as shared
*/
try {
$sharedNotebooks = $this->listSharedNotebooks();
} catch (EDAMUserException $e) {
$sharedNotebooks = array();
} catch (EDAMSystemException $e) {
$sharedNotebooks = array();
}
foreach ($sharedNotebooks as $sharedNotebook) {
$guidsToNotebooks[$sharedNotebook->notebookGuid]->isShared = true;
}
/**
* 2. Get all of the user's linked notebooks. These will include business and/or shared notebooks.
*/
try {
$linkedNotebooks = $this->listLinkedNotebooks();
} catch (EDAMUserException $e) {
$linkedNotebooks = array();
} catch (EDAMSystemException $e) {
$linkedNotebooks = array();
}
if (count($linkedNotebooks) > 0) {
/**
* 3. Business user
*/
if (null !== $this->getBusinessNoteStore()) {
/**
* a. Get the business's shared notebooks. Some of these may match to personal linked notebooks.
*
*/
$businessSharedNotebooks = $this->getBusinessSharedNotebooks();
$sharedBusinessNotebookGuids = array();
$sharedBusinessNotebooks = array();
foreach ($businessSharedNotebooks as $businessSharedNotebook) {
$sharedBusinessNotebooks[$businessSharedNotebook->shareKey] = $businessSharedNotebook;
$sharedBusinessNotebookGuids[] = $businessSharedNotebook->notebookGuid;
}
$guidsCount = array_count_values($sharedBusinessNotebookGuids);
$businessNotebooksGuids = array();
/**
* b. Get the business's linked notebooks. Some of these will match to shared notebooks in (a), providing a
* complete authorization story for the notebook.
*/
$businessNotebooks = $this->getBusinessLinkedNotebooks();
foreach ($businessNotebooks as $businessNotebook) {
$businessNotebooksGuids[$businessNotebook->guid] = $businessNotebook;
}
foreach ($linkedNotebooks as $linkedNotebook) {
if (array_key_exists($linkedNotebook->shareKey, $sharedBusinessNotebooks)) {
$sharedNotebook = $sharedBusinessNotebooks[$linkedNotebook->shareKey];
$businessNotebook = $businessNotebooksGuids[$sharedNotebook->notebookGuid];
$result = new Notebook($businessNotebook, $linkedNotebook, $sharedNotebook, $businessNotebook);
if ((array_key_exists($sharedNotebook->notebookGuid, $guidsCount) && $guidsCount[$sharedNotebook->notebookGuid] > 1)
|| $businessNotebook->businessNotebook !== null) {
$result->isShared = true;
}
$resultNotebooks[] = $result;
} else {
if (null === $linkedNotebook->shareKey) {
continue;
}
$resultNotebooks[] = $this->getNoteBookByLinkedNotebook($linkedNotebook);
}
}
} else {
foreach ($linkedNotebooks as $linkedNotebook) {
try {
$resultNotebooks[] = $this->getNoteBookByLinkedNotebook($linkedNotebook);
} catch (\Exception $e) {
$e = ExceptionFactory::create($e);
$this->logger->error('An error occured while fetching a linked notebook as a business user', array('exception' => $e, 'token' => $this->getToken()));
}
};
}
}
return $resultNotebooks;
}
/**
* Returns the list of personal notebooks
*
* @return array
*/
public function listPersonalNotebooks()
{
$notebooks = $this->getUserNotestore()->listNotebooks($this->token);
return $notebooks;
}
/**
* Returns the list of notebooks shared by the user
*
* @return array
*/
public function listSharedNotebooks()
{
return $this->getUserNotestore()->listSharedNotebooks($this->token);
}
/**
* Returns the list of notebooks shared to the user
*
* @return array
*/
public function listLinkedNotebooks()
{
return $this->getUserNotestore()->listLinkedNotebooks($this->token);
}
/**
*
* Returns the personal notestore of the user
*
* @return \EDAM\NoteStore\NoteStoreClient|mixed
*/
public function getUserNotestore()
{
if (null === $this->userNoteStore) {
$this->userNoteStore = $this->getAdvancedClient()->getNoteStore();
}
return $this->userNoteStore;
}
/**
* Replaces an existing note by another one (new or existing)
*
* @param Note $noteToReplace
* @param Note $note
* @return Note
*/
public function replaceNote(Note $noteToReplace, Note $note)
{
$edamNote = $noteToReplace->getEdamNote();
$edamNote->title = $note->title;
$edamNote->content = $note->content;
$edamNote->attributes = $note->attributes;
$edamNote->resources = $note->resources;
$uploaded_note = $noteToReplace->noteStore->updateNote($noteToReplace->authToken, $edamNote);
$uploaded_note->content = $note->content;
$en_note = new Note($uploaded_note);
$en_note->setSaved(true);
return $en_note;
}
/**
* Sends a new Note to the API
*
* @param Note $note
* @param Notebook $notebook
* @return Note
* @throws \EDAM\Error\EDAMNotFoundException
* @throws \Exception
*/
public function uploadNote(Note $note, Notebook $notebook = null)
{
if ($this->isAppNotebookToken($this->token)) {
$notebook = new Notebook();
}
if (null != $notebook
&& true === $note->getSaved()
&& $note->notebookGuid === $notebook->guid) {
return $this->replaceNote($note, $note);
}
if ($note->getEdamNote()) {
$edamNote = $note->getEdamNote();
} else {
$edamNote = new \EDAM\Types\Note();
}
$edamNote->title = $note->title;
$edamNote->content = $note->content;
$edamNote->attributes = $note->attributes;
$edamNote->created = $note->created;
$edamNote->resources = $note->resources;
$edamNote->tagNames = $note->tagNames;
if (null !== $notebook && null !== $notebook->guid) {
$edamNote->notebookGuid = $notebook->guid;
}
try {
$uploaded_note = $this->getUserNotestore()->createNote($this->token, $edamNote);
$noteStore = $this->getUserNotestore();
$token = $this->token;
} catch (EDAMNotFoundException $e) {
$notebook = $this->getNotebook($notebook->guid, self::LINKED_SCOPE);
if (null === $notebook) {
throw $e;
}
if ($notebook->isLinkedNotebook()) {
$noteStore = $this->getNotestore($notebook->linkedNotebook->noteStoreUrl);
$token = $notebook->authToken;
$edamNote->notebookGuid = $notebook->guid;
$uploaded_note = $noteStore->createNote($token, $edamNote);
}
}
$uploaded_note->content = $note->content;
$note = $this->getNoteInstance($uploaded_note, $noteStore, $token);
$note->setSaved(true);
return $note;
}
/**
* Deletes a note
*
* @param Note $note
* @return bool
*/
public function deleteNote(Note $note)
{
if (null === $note->guid) {
return false;
}
// we have the credentials
if (null !== $note->noteStore && null !== $note->authToken) {
$note->noteStore->deleteNote($note->authToken, $note->guid);
return true;
}
try {
// We try to delete it with the personal credentials
$this->getUserNotestore()->deleteNote($this->token, $note->guid);
return true;
} catch (EDAMNotFoundException $e) {
// The note's not in a personal notebook. We'll need to find it
$note = $this->getNote($note->guid, self::LINKED_SCOPE);
if (null !== $note) {
return $this->deleteNote($note);
}
return false;
} catch (EDAMUserException $e) {
// You don't have permission to delete this note.
return false;
}
}
/**
* Shares a note and returns the share url
*
* @param Note $note
* @return null|string
*/
public function shareNote(Note $note)
{
if (null === $note->guid) {
return null;
}
// we have the credentials
if (null !== $note->noteStore && null !== $note->authToken) {
$shareKey = $note->noteStore->shareNote($note->authToken, $note->guid);
$shardId = $this->getShardIdFromToken($note->authToken);
return $this->getShareUrl($note->guid, $shardId, $shareKey, $this->getAdvancedClient()->getEndpoint());
}
try {
// We don't have credentials so we assume it's a personal note
return $this->getUserNotestore()->shareNote($this->token, $note->guid);
} catch (EDAMNotFoundException $e) {
// The note's not in a personal notebook. We'll need to find it
$note = $this->getNote($note->guid, self::LINKED_SCOPE);
if (null !== $note) {
$shareKey = $note->noteStore->shareNote($note->authToken, $note->guid);
$shardId = $this->getShardIdFromToken($note->authToken);
return $this->getShareUrl($note->guid, $shardId, $shareKey, $this->getAdvancedClient()->getEndpoint());
}
return null;
}
}
/**
* Moves a note to another notebook
*
* @param Note $note
* @param Notebook $notebook
* @return Note
* @throws Exception\PermissionDeniedException
* @throws \EDAM\Error\EDAMUserException
* @throws \Exception
*/
public function moveNote(Note $note, Notebook $notebook)
{
if ($this->isAppNotebookToken($this->token)) {
throw new PermissionDeniedException("You can't move a note as you're using an app notebook token");
}
$edamNote = $note->getEdamNote();
$noteStore = $note->getNoteStore();
$token = $note->getAuthToken();
$edamNote->notebookGuid = $notebook->guid;
try {
$moved_note = $noteStore->updateNote($token, $edamNote);
$note = $this->getNoteInstance($moved_note, $noteStore, $token);
} catch (EDAMNotFoundException $e) {
$moved_note = $this->uploadNote($note, $notebook);
if ($moved_note && $moved_note->notebookGuid === $notebook->guid) {
$this->deleteNote($note);
}
$note = $moved_note;
} catch (EDAMUserException $e) {
if ($e->parameter === 'Note.notebookGuid') {
$moved_note = $this->uploadNote($note, $notebook);
if ($moved_note && $moved_note->notebookGuid === $notebook->guid) {
$this->deleteNote($note);
}
$note = $moved_note;
} else {
throw $e;
}
}
return $note;
}
/**
* Retrieves an existing note
*
* @param $guid
* @param null $scope
* @return Note|null
*/
public function getNote($guid, $scope = null)
{
if (null === $scope || self::PERSONAL_SCOPE === $scope) {
try {
$edam_note = $this->getUserNotestore()->getNote($this->token, $guid, true, true, false, false);
return $this->getNoteInstance($edam_note, $this->getUserNotestore(), $this->token);
} catch (EDAMNotFoundException $e) {
// The note does not exist. No need to go further.
if (self::PERSONAL_SCOPE === $scope) {
return null;
}
} catch (EDAMUserException $e) {
// The note is in a linked notebook
if (self::PERSONAL_SCOPE === $scope) {
// we only want the personal notes
return null;
}
}
}
if (null === $scope || self::LINKED_SCOPE === $scope) {
$linkedNotebooks = $this->listLinkedNotebooks();
foreach ($linkedNotebooks as $linkedNotebook) {
try {
$sharedNoteStore = $this->getNotestore($linkedNotebook->noteStoreUrl);
$authToken = $this->getSharedNotebookAuthResult($linkedNotebook)->authenticationToken;
$edam_note = $sharedNoteStore->getNote($authToken, $guid, true, true, false, false);
return $this->getNoteInstance($edam_note, $sharedNoteStore, $authToken);
} catch (EDAMUserException $e) {
// No right on this notebook.
continue;
} catch (EDAMNotFoundException $e) {
// Note not found
continue;
}
}
return null;
}
}
/**
* Checks if the token is an "app notebook" one
*
* @param $token
* @return bool
*/
public function isAppNotebookToken($token)
{
return strpos($token, ':B=') !== false;
}
/**
* Retrieves a notebook
*
* @param $notebook_guid
* @param null $scope
* @return Notebook|null
*/
public function getNotebook($notebook_guid, $scope = null)
{
if (null === $scope || self::PERSONAL_SCOPE === $scope) {
try {
$edamNotebook = $this->getUserNotestore()->getNotebook($this->token, $notebook_guid);
return new Notebook($edamNotebook);
} catch (EDAMNotFoundException $e) {
if (self::PERSONAL_SCOPE === $scope) {
return null;
}
}
}
if (null === $scope || self::LINKED_SCOPE === $scope) {
$linkedNotebooks = $this->listLinkedNotebooks();
foreach ($linkedNotebooks as $linkedNotebook) {
try {
$sharedNotebook = $this->getNoteBookByLinkedNotebook($linkedNotebook);
if ($this->isAppNotebookToken($this->token)) {
return $sharedNotebook;
}
} catch (EDAMUserException $e) {
// No right on this notebook.
continue;
}
if ($sharedNotebook->guid === $notebook_guid) {
return $sharedNotebook;
}
}
return null;
}
}
/**
* Searches for notes
*
* @param $noteSearch
* @param Notebook $notebook
* @param int $scope
* @param int $sortOrder
* @param int $maxResults
* @return array|bool
*/
public function findNotesWithSearch($noteSearch, Notebook $notebook = null, $scope = 0, $sortOrder = 0, $maxResults = 20)
{
if (!$noteSearch instanceof Search) {
$noteSearch = new Search($noteSearch);
}
// App notebook scope is internally just an "all" search, because we don't a priori know where the app
// notebook is. There's some room for a fast path in this flow if we have a saved linked record to a
// linked app notebook, but that case is likely rare enough to prevent complexifying this code for.
if ($this->isFlagSet($scope, self::SEARCH_SCOPE_APP_NOTEBOOK)) {
$scope = self::SEARCH_SCOPE_ALL;
}
// Validate the scope and sort arguments.
if (null !== $notebook && $scope != self::SEARCH_SCOPE_NONE) {
$scope = self::SEARCH_SCOPE_NONE;
} elseif (null === $notebook && $scope == self::SEARCH_SCOPE_NONE) {
$scope = self::SEARCH_SCOPE_DEFAULT;
}
$requiresLocalMerge = false;
if ($scope != self::SEARCH_SCOPE_NONE) {
// Check for multiple scopes. Because linked scope can subsume multiple linked notebooks, that *always* triggers
// the multiple scopes. If not, then both personal and business must be set together.
if (($this->isFlagSet($scope, self::SEARCH_SCOPE_PERSONAL) && $this->isFlagSet($scope, self::SEARCH_SCOPE_BUSINESS)) ||
$this->isFlagSet($scope, self::SEARCH_SCOPE_PERSONAL_LINKED)) {
// If we're asked for multiple scopes, relevance is not longer supportable (since we
// don't know how to combine relevance on the client), so default to updated date,
// which is probably the closest proxy to relevance.
if ($this->isFlagSet($sortOrder, self::SORT_ORDER_RELEVANCE)) {
$sortOrder = self::SORT_ORDER_RECENTLY_UPDATED;
}
$requiresLocalMerge = true;
}
}
$resultSpec = new NotesMetadataResultSpec();
$resultSpec->includeNotebookGuid = true;
$resultSpec->includeTitle = true;
$resultSpec->includeCreated = true;
$resultSpec->includeUpdated = true;
$resultSpec->includeUpdateSequenceNum = true;
$noteFilter = new NoteFilter();
$noteFilter->words = $noteSearch->getSearchString();
if ($this->isFlagSet($sortOrder, self::SORT_ORDER_TITLE)) {
$noteFilter->order = NoteSortOrder::TITLE;
} elseif ($this->isFlagSet($sortOrder, self::SORT_ORDER_RECENTLY_CREATED)) {
$noteFilter->order = NoteSortOrder::CREATED;
} elseif ($this->isFlagSet($sortOrder, self::SORT_ORDER_RECENTLY_UPDATED)) {
$noteFilter->order = NoteSortOrder::UPDATED;
} elseif ($this->isFlagSet($sortOrder, self::SORT_ORDER_RELEVANCE)) {
$noteFilter->order = NoteSortOrder::RELEVANCE;
}
// "Normal" sort is ascending for titles, and descending for dates and relevance.
$sortAscending = $this->isFlagSet($sortOrder, self::SORT_ORDER_TITLE);
if ($this->isFlagSet($sortOrder, self::SORT_ORDER_REVERSE)) {
$sortAscending = !$sortAscending;
}
$noteFilter->ascending = $sortAscending;
if (null !== $notebook) {
$noteFilter->notebookGuid = $notebook->guid;
}
// Set up context.
$context = new \stdClass();
$context->scopeNotebook = $notebook;
$context->scope = $scope;
$context->sortOrder = $sortOrder;
$context->noteFilter = $noteFilter;
$context->resultSpec = $resultSpec;
$context->maxResults = $maxResults;
$context->findMetadataResults = array();
$context->requiresLocalMerge = $requiresLocalMerge;
$context->sortAscending = $sortAscending;
// If we have a scope notebook, we already know what notebook the results will appear in.
// If we don't have a scope notebook, then we need to query for all the notebooks to determine
// where to search.
if (null === $context->scopeNotebook) {
return $this->findNotes_listNotebooksWithContext($context);
}
// Go directly to the next step.
return $this->findNotes_findInPersonalScopeWithContext($context);
}
/**********************/
/** Getters / Setters */
/**********************/
/**
* Sets the advancedClient
*
* @param \Evernote\AdvancedClient $advancedClient
*/
public function setAdvancedClient($advancedClient)
{
$this->advancedClient = $advancedClient;
}
/**
* Returns the advancedClient
*
* @return \Evernote\AdvancedClient
*/
public function getAdvancedClient()
{
if (null === $this->advancedClient) {
$this->advancedClient = new AdvancedClient($this->getToken(), $this->sandbox, null, $this->logger, $this->china);
}
return $this->advancedClient;
}
/**
* Sets the sandbox flag to true or false
*
* @param boolean $sandbox
*/
public function setSandbox($sandbox)
{
$this->sandbox = $sandbox;
}
/**
* Gets the current sandbox flag
*
* @return boolean
*/
public function getSandbox()
{
return $this->sandbox;
}
/**
* Sets the china flag to true or false
*
* @param boolean $china
*/
public function setChina($china)
{
$this->china = $china;
}
/**
* Gets the current china flag
*
* @return boolean
*/
public function getChina()
{
return $this->china;
}
/**
* Sets the authentication token
*
* @param string $token
*/
public function setToken($token)
{
$this->token = $token;
}
/**
* Returns the current authentication token
*
* @return string
*/
public function getToken()
{
return $this->token;
}
/**************************/
/***************************/
/**** protected methods ****/
/***************************/
protected function getNoteStore($noteStoreUrl)
{
return $this->getAdvancedClient()->getNoteStore($noteStoreUrl);
}
protected function getShareUrl($guid, $shardId, $shareKey, $serviceHost)
{
return $serviceHost . "/shard/" . $shardId . "/sh/" . $guid . "/" . $shareKey;
}
protected function getSharedNotebookAuthResult(LinkedNotebook $linkedNotebook)
{
$sharedNoteStore = $this->getNotestore($linkedNotebook->noteStoreUrl);
return $sharedNoteStore->authenticateToSharedNotebook($linkedNotebook->shareKey, $this->token);
}
protected function getNoteBookByLinkedNotebook(LinkedNotebook $linkedNotebook)
{
$sharedNoteStore = $this->getNotestore($linkedNotebook->noteStoreUrl);
$authToken = $this->getSharedNotebookAuthResult($linkedNotebook)->authenticationToken;
$sharedNotebook = $sharedNoteStore->getSharedNotebookByAuth($authToken);
$notebook = new Notebook(null, $linkedNotebook, $sharedNotebook);
$notebook->authToken = $authToken;
return $notebook;
}
/**
* @return \EDAM\UserStore\AuthenticationResult
* @throws \Exception
*/
protected function getBusinessAuth()
{
if (null === $this->businessAuth) {
try {
$this->businessAuth =
$this->getAdvancedClient()
->getUserStore()->authenticateToBusiness($this->token);
} catch (\Exception $e) {
throw ExceptionFactory::create($e);
}
}
return $this->businessAuth;
}
protected function getNoteInstance(\EDAM\Types\Note $edamNote = null, $noteStore = null, $token = null)
{
$note = new Note($edamNote);
$note->authToken = $token;
$note->noteStore = $noteStore;
return $note;
}
protected function getShardIdFromToken($token)
{
$result = preg_match('/:?S=(s[0-9]+):?/', $token, $matches);
if ($result === 1 && array_key_exists(1, $matches)) {
return $matches[1];
}
return null;
}
protected function isFlagSet($flags, $flag)
{
return !!(($flags) & ($flag));
}
protected function findNotes_listNotebooksWithContext($context)
{
// XXX: We do the full listNotebooks operation here, which is overkill in all situations,
// and could wind us up doing a bunch of extra work. Optimization is to only look at -listNotebooks
// if we're personal scope, and -listLinkedNotebooks for linked and business, without ever
// authenticating to other note stores.
$notebooks = $this->listNotebooks();
if ($notebooks) {
$context->allNotebooks = $notebooks;
return $this->findNotes_findInPersonalScopeWithContext($context);
} else {
// TODO : handle error
}
}
protected function findNotes_findInPersonalScopeWithContext($context)
{
$skipPersonalScope = false;
// Skip the personal scope if the scope notebook isn't personal, or if the scope
// flag doesn't include personal.
if ($context->scopeNotebook) {
// If the scope notebook isn't personal, skip personal.
if ($context->scopeNotebook->isLinkedNotebook()) {
$skipPersonalScope = true;
}
} else if (!$this->isFlagSet($context->scope, self::SEARCH_SCOPE_PERSONAL)) {
// If the caller didn't request personal scope.
$skipPersonalScope = true;
}
// TODO : handle linked app notebook
// else if ([self appNotebookIsLinked]) {
// // If we know this is an app notebook scoped app, and we know the app notebook is not personal.
// $skipPersonalScope = true;
// }
// If we're skipping personal scope, proceed directly to busines scope.
if (true === $skipPersonalScope) {
return $this->findNotes_findInBusinessScopeWithContext($context);
}
$notesMetadataList = $this->getUserNotestore()->findNotesMetadata(
$this->token,
$context->noteFilter,
0,
$context->maxResults,
$context->resultSpec
);
foreach ($notesMetadataList->notes as $notesMetadata) {
$context->findMetadataResults[] = $notesMetadata;
}
return $this->findNotes_findInBusinessScopeWithContext($context);
}
protected function findNotes_findInBusinessScopeWithContext($context)
{
// Skip the business scope if the user is not a business user, or the scope notebook
// is not a business notebook, or the business scope is not included.
if (false === $this->isBusinessUser() ||
($context->scopeNotebook && !$context->scopeNotebook->isBusinessNotebook()) ||
(!$context->scopeNotebook && !$this->isFlagSet($context->scope, self::SEARCH_SCOPE_BUSINESS))
) {
return $this->findNotes_findInLinkedScopeWithContext($context);
}
$notesMetadataList = $this->getBusinessNoteStore()->findNotesMetadata(
$this->getBusinessToken(),
$context->noteFilter,
0,
$context->maxResults,
$context->resultSpec
);
foreach ($notesMetadataList->notes as $notesMetadata) {
$context->findMetadataResults[] = $notesMetadata;
}
// Remember which note guids came from the business. We'll use this later to
// determine if we're worried about an inability to map back to notebooks.
$context->resultGuidsFromBusiness = array();
foreach ($notesMetadataList->notes as $noteMetadata) {
$context->resultGuidsFromBusiness[] = $noteMetadata->guid;
}
return $this->findNotes_findInLinkedScopeWithContext($context);
//TODO:
// This is a business user, but apparently has an app notebook restriction that's
// not in the business. Go look in linked scope.
}
protected function findNotes_findInLinkedScopeWithContext($context)
{
// Skip linked scope if scope notebook is not a personal linked notebook, or if the
// linked scope is not included.
if ($context->scopeNotebook) {
if (!$context->scopeNotebook->isLinkedNotebook() || !$context->scopeNotebook->isBusinessNotebook()) {
return $this->findNotes_processResultsWithContext($context);
}
} elseif (!$this->isFlagSet($context->scope, self::SEARCH_SCOPE_PERSONAL_LINKED)) {
return $this->findNotes_processResultsWithContext($context);
}
// Build a list of all the linked notebooks that we need to run the search against.
$context->linkedNotebooksToSearch = array();
if ($context->scopeNotebook) {
$context->linkedNotebooksToSearch[] = $context->scopeNotebook;
} else {
foreach ($context->allNotebooks as $notebook) {
if ($notebook->isLinkedNotebook() && !$notebook->isBusinessNotebook()) {
$context->linkedNotebooksToSearch[] = $notebook;
}
}
}
$this->findNotes_nextFindInLinkedScopeWithContext($context);
}
protected function findNotes_nextFindInLinkedScopeWithContext($context)
{
if (count($context->linkedNotebooksToSearch) == 0) {
$this->findNotes_processResultsWithContext($context);
return;
}
// Pull the first notebook off the list of pending linked notebooks.
$linkedNotebook = array_shift($context->linkedNotebooksToSearch);
$noteStore = $this->getNotestore($linkedNotebook->noteStoreUrl);
$authToken = $this->getSharedNotebookAuthResult($linkedNotebook)->authenticationToken;
$notesMetadataList = $noteStore->findNotesMetadata(
$authToken,
$context->noteFilter,
0,
$context->maxResults,
$context->resultSpec
);
foreach ($notesMetadataList->notes as $notesMetadata) {
$context->findMetadataResults[] = $notesMetadata;
}
$this->findNotes_nextFindInLinkedScopeWithContext($context);
$this->findNotes_processResultsWithContext($context);
}
protected function compareByTitle($obj1, $obj2)
{
return strcmp($obj1->title, $obj2->title);
}
protected function compareByCreated($obj1, $obj2)
{
return strcmp($obj1->created, $obj2->created);
}
protected function compareByUpdated($obj1, $obj2)
{
return strcmp($obj1->updated, $obj2->updated);
}
protected function findNotes_processResultsWithContext($context)
{
// OK, now we have a complete list of note refs objects. If we need to do a local sort, then do so.
if ($context->requiresLocalMerge) {
if ($this->isFlagSet($context->sortOrder, self::SORT_ORDER_RECENTLY_CREATED)) {
return usort($context->findMetadataResults, array($this, 'compareByCreated'));
} elseif ($this->isFlagSet($context->sortOrder, self::SORT_ORDER_RECENTLY_UPDATED)) {
return usort($context->findMetadataResults, array($this, 'compareByUpdated'));
} else {
return usort($context->findMetadataResults, array($this, 'compareByTitle'));
}
}
// Prepare a dictionary of all notebooks by GUID so lookup below is fast.
$notebooksByGuid = array();
if (!$context->scopeNotebook) {
foreach ($context->allNotebooks as $notebook) {
$notebooksByGuid[$notebook->guid] = $notebook;
}
}
$findNotesResults = array();
// Turn the metadata list into a list of note refs.
foreach ($context->findMetadataResults as $metadata) {
$result = new SearchResult();
$result->guid = $metadata->guid;
// Figure out which notebook this note belongs to. (If there's a scope notebook, it always belongs to that one.)
$notebook = $context->scopeNotebook ?: $notebooksByGuid[$metadata->notebookGuid];
if (!$notebook) {
// This is probably a business notebook that we haven't explicitly joined, so we don't have it in our list.
if (!array_key_exists($metadata->guid, $context->resultGuidsFromBusiness)) {
//TODO
// Oh, it's not from the business. We really can't find it. This is an error.
//ENSDKLogError(@"Found note metadata but can't determine owning notebook by guid. Metadata = %@", metadata);
}
continue;
}
if ($notebook->isBusinessNotebook()) {
$result->type = self::BUSINESS_NOTE;
} elseif ($notebook->isLinkedNotebook()) {
$result->type = self::SHARED_NOTE;
} else {
$result->type = self::PERSONAL_NOTE;
}
//$result->notebook = $notebook;
$result->title = $metadata->title;
$result->created = $metadata->created;
$result->updated = $metadata->updated;
$result->updateSequenceNum = $metadata->updateSequenceNum;
$findNotesResults[] = $result;
// If the caller specified a max result count, and we've reached it, then stop fixing up
// results here.
if ($context->maxResults > 0 && count($findNotesResults) >= $context->maxResults) {
break;
}
}
return $findNotesResults;
}
}
================================================
FILE: src/Evernote/Enml/CSSInliner/CssInlinerInterface.php
================================================
cssInliner = new \TijsVerkoyen\CssToInlineStyles\CssToInlineStyles();
}
public function convert($html, $css)
{
$this->cssInliner->setHTML($html);
$this->cssInliner->setCSS($css);
return $this->cssInliner->convert();
}
}
================================================
FILE: src/Evernote/Enml/Converter/EnmlConverterInterface.php
================================================
xslTransform($content, __DIR__ . '/enml2html.xslt');
}
public function xslTransform($enml, $xsl_file)
{
$xml = new \DOMDocument();
@$xml->loadXML($enml);
$xsl = new \DOMDocument();
$xsl->load($xsl_file);
$proc = new \XSLTProcessor();
$proc->importStyleSheet($xsl); // attach the xsl rules
return $proc->transformToXML($xml);
}
}
================================================
FILE: src/Evernote/Enml/Converter/HtmlConverterInterface.php
================================================
htmlCleaner = $html_cleaner;
$this->cssInliner = $css_inliner;
}
public function convertToEnml($content, $base_url = null)
{
$base_url = ($base_url === null)?'http://example.com':$base_url;
//fix urls
$content = str_replace('href="/', 'href="' . $base_url . '/', $content);
$content = str_replace('href=""', 'href="' . $base_url . '"', $content);
// $css = $this->extractCssFromHtml($content);
//Then we inline the CSS
// echo $cleanHtml = @$this->inlineCss($content, $css);
//First we try to clean the HTML
$content = $this->cleanHtml($content);
//Transform to ENML via XSLT
$enml_body = $this->xslTransform($content, __DIR__ . '/html2enml.xslt');
$enml = <<
$enml_body
EOF;
$enml = $enml_body;
return $enml;
}
public function extractUrls($html)
{
$dom = new \DOMDocument();
$dom->loadHTML($html);
$xpath = new \DOMXPath($dom);
$nodes = $xpath->query('//a/@href');
$urls = array();
foreach($nodes as $href) {
$urls[] = $href->nodeValue;
}
return $urls;
}
public function isUrlValid($url)
{
$allowed_protocols = array('http', 'https', 'file');
return in_array(parse_url($url, PHP_URL_SCHEME), $allowed_protocols)
&& filter_var($url, FILTER_VALIDATE_URL) !== false;
}
public function xslTransform($xhtml, $xsl_file)
{
$xml = new \DOMDocument();
@$xml->loadXML($xhtml);
$xsl = new \DOMDocument();
$xsl->load($xsl_file);
$proc = new \XSLTProcessor();
$proc->importStyleSheet($xsl); // attach the xsl rules
return $proc->transformToXML($xml);
}
public function cleanHtml($html)
{
$htmlCleaner = $this->getHtmlCleaner();
$cleanHtml = $htmlCleaner->clean($html);
return <<
$cleanHtml