├── .editorconfig
├── .gitignore
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── composer.json
├── phpcs_ruleset.xml
├── phpunit.xml.dist
├── src
├── GPBMetadata
│ └── Google
│ │ └── Photos
│ │ ├── Library
│ │ └── V1
│ │ │ └── PhotosLibrary.php
│ │ └── Types
│ │ ├── Album.php
│ │ ├── DateRange.php
│ │ └── MediaItem.php
└── Google
│ └── Photos
│ ├── Library
│ └── V1
│ │ ├── AddEnrichmentToAlbumRequest.php
│ │ ├── AddEnrichmentToAlbumResponse.php
│ │ ├── AlbumPosition.php
│ │ ├── AlbumPosition
│ │ └── PositionType.php
│ │ ├── AlbumPosition_PositionType.php
│ │ ├── BatchAddMediaItemsToAlbumRequest.php
│ │ ├── BatchAddMediaItemsToAlbumResponse.php
│ │ ├── BatchCreateMediaItemsRequest.php
│ │ ├── BatchCreateMediaItemsResponse.php
│ │ ├── BatchGetMediaItemsRequest.php
│ │ ├── BatchGetMediaItemsResponse.php
│ │ ├── BatchRemoveMediaItemsFromAlbumRequest.php
│ │ ├── BatchRemoveMediaItemsFromAlbumResponse.php
│ │ ├── ContentCategory.php
│ │ ├── ContentFilter.php
│ │ ├── CreateAlbumRequest.php
│ │ ├── DateFilter.php
│ │ ├── EnrichmentItem.php
│ │ ├── FeatureFilter.php
│ │ ├── FeatureFilter
│ │ └── Feature.php
│ │ ├── FeatureFilter_Feature.php
│ │ ├── Filters.php
│ │ ├── FiltersBuilder.php
│ │ ├── Gapic
│ │ └── PhotosLibraryGapicClient.php
│ │ ├── GetAlbumRequest.php
│ │ ├── GetMediaItemRequest.php
│ │ ├── GetSharedAlbumRequest.php
│ │ ├── JoinSharedAlbumRequest.php
│ │ ├── JoinSharedAlbumResponse.php
│ │ ├── LeaveSharedAlbumRequest.php
│ │ ├── LeaveSharedAlbumResponse.php
│ │ ├── ListAlbumsRequest.php
│ │ ├── ListAlbumsResponse.php
│ │ ├── ListMediaItemsRequest.php
│ │ ├── ListMediaItemsResponse.php
│ │ ├── ListSharedAlbumsRequest.php
│ │ ├── ListSharedAlbumsResponse.php
│ │ ├── Location.php
│ │ ├── LocationEnrichment.php
│ │ ├── MapEnrichment.php
│ │ ├── MediaItemResult.php
│ │ ├── MediaTypeFilter.php
│ │ ├── MediaTypeFilter
│ │ └── MediaType.php
│ │ ├── MediaTypeFilter_MediaType.php
│ │ ├── NewEnrichmentItem.php
│ │ ├── NewMediaItem.php
│ │ ├── NewMediaItemResult.php
│ │ ├── PhotosLibraryClient.php
│ │ ├── PhotosLibraryGrpcClient.php
│ │ ├── PhotosLibraryResourceFactory.php
│ │ ├── SearchMediaItemsRequest.php
│ │ ├── SearchMediaItemsResponse.php
│ │ ├── ShareAlbumRequest.php
│ │ ├── ShareAlbumResponse.php
│ │ ├── SimpleMediaItem.php
│ │ ├── TextEnrichment.php
│ │ ├── UnshareAlbumRequest.php
│ │ ├── UnshareAlbumResponse.php
│ │ ├── UpdateAlbumRequest.php
│ │ ├── UpdateMediaItemRequest.php
│ │ ├── UploadRetrySettings.php
│ │ ├── gapic_metadata.json
│ │ ├── resources
│ │ ├── photos_library_client_config.json
│ │ ├── photos_library_descriptor_config.php
│ │ └── photos_library_rest_client_config.php
│ │ └── util
│ │ └── OrderBy.php
│ └── Types
│ ├── Album.php
│ ├── ContributorInfo.php
│ ├── DateRange.php
│ ├── MediaItem.php
│ ├── MediaMetadata.php
│ ├── Photo.php
│ ├── ShareInfo.php
│ ├── SharedAlbumOptions.php
│ ├── Video.php
│ └── VideoProcessingStatus.php
└── tests
└── Unit
└── V1
├── FiltersBuilderTest.php
├── PhotosLibraryClientTest.php
├── PhotosLibraryClientWrapperTest.php
└── PhotosLibraryResourceFactoryTest.php
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [**.php]
4 | indent_style = space
5 | indent_size = 4
6 | charset = utf-8
7 | trim_trailing_whitespace = true
8 | insert_final_newline = true
9 |
10 | [composer.json]
11 | indent_size = 2
12 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_STORE
2 | .idea/
3 | *.iml
4 | composer.lock
5 | out/
6 | vendor/
7 | phpunit.xml
8 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # How to Contribute
2 |
3 | We'd love to accept your patches and contributions to this project. There are
4 | just a few small guidelines you need to follow.
5 |
6 | ## Contributor License Agreement
7 |
8 | Contributions to this project must be accompanied by a Contributor License
9 | Agreement. You (or your employer) retain the copyright to your contribution;
10 | this simply gives us permission to use and redistribute your contributions as
11 | part of the project. Head over to string album_id = 1 [(.google.api.field_behavior) = REQUIRED];
22 | */
23 | protected $album_id = '';
24 | /**
25 | * Required. The enrichment to be added.
26 | *
27 | * Generated from protobuf field .google.photos.library.v1.NewEnrichmentItem new_enrichment_item = 2 [(.google.api.field_behavior) = REQUIRED];
28 | */
29 | protected $new_enrichment_item = null;
30 | /**
31 | * Required. The position in the album where the enrichment is to be inserted.
32 | *
33 | * Generated from protobuf field .google.photos.library.v1.AlbumPosition album_position = 3 [(.google.api.field_behavior) = REQUIRED];
34 | */
35 | protected $album_position = null;
36 |
37 | /**
38 | * Constructor.
39 | *
40 | * @param array $data {
41 | * Optional. Data for populating the Message object.
42 | *
43 | * @type string $album_id
44 | * Required. Identifier of the album where the enrichment is to be added.
45 | * @type \Google\Photos\Library\V1\NewEnrichmentItem $new_enrichment_item
46 | * Required. The enrichment to be added.
47 | * @type \Google\Photos\Library\V1\AlbumPosition $album_position
48 | * Required. The position in the album where the enrichment is to be inserted.
49 | * }
50 | */
51 | public function __construct($data = NULL) {
52 | \GPBMetadata\Google\Photos\Library\V1\PhotosLibrary::initOnce();
53 | parent::__construct($data);
54 | }
55 |
56 | /**
57 | * Required. Identifier of the album where the enrichment is to be added.
58 | *
59 | * Generated from protobuf field string album_id = 1 [(.google.api.field_behavior) = REQUIRED];
60 | * @return string
61 | */
62 | public function getAlbumId()
63 | {
64 | return $this->album_id;
65 | }
66 |
67 | /**
68 | * Required. Identifier of the album where the enrichment is to be added.
69 | *
70 | * Generated from protobuf field string album_id = 1 [(.google.api.field_behavior) = REQUIRED];
71 | * @param string $var
72 | * @return $this
73 | */
74 | public function setAlbumId($var)
75 | {
76 | GPBUtil::checkString($var, True);
77 | $this->album_id = $var;
78 |
79 | return $this;
80 | }
81 |
82 | /**
83 | * Required. The enrichment to be added.
84 | *
85 | * Generated from protobuf field .google.photos.library.v1.NewEnrichmentItem new_enrichment_item = 2 [(.google.api.field_behavior) = REQUIRED];
86 | * @return \Google\Photos\Library\V1\NewEnrichmentItem|null
87 | */
88 | public function getNewEnrichmentItem()
89 | {
90 | return isset($this->new_enrichment_item) ? $this->new_enrichment_item : null;
91 | }
92 |
93 | public function hasNewEnrichmentItem()
94 | {
95 | return isset($this->new_enrichment_item);
96 | }
97 |
98 | public function clearNewEnrichmentItem()
99 | {
100 | unset($this->new_enrichment_item);
101 | }
102 |
103 | /**
104 | * Required. The enrichment to be added.
105 | *
106 | * Generated from protobuf field .google.photos.library.v1.NewEnrichmentItem new_enrichment_item = 2 [(.google.api.field_behavior) = REQUIRED];
107 | * @param \Google\Photos\Library\V1\NewEnrichmentItem $var
108 | * @return $this
109 | */
110 | public function setNewEnrichmentItem($var)
111 | {
112 | GPBUtil::checkMessage($var, \Google\Photos\Library\V1\NewEnrichmentItem::class);
113 | $this->new_enrichment_item = $var;
114 |
115 | return $this;
116 | }
117 |
118 | /**
119 | * Required. The position in the album where the enrichment is to be inserted.
120 | *
121 | * Generated from protobuf field .google.photos.library.v1.AlbumPosition album_position = 3 [(.google.api.field_behavior) = REQUIRED];
122 | * @return \Google\Photos\Library\V1\AlbumPosition|null
123 | */
124 | public function getAlbumPosition()
125 | {
126 | return isset($this->album_position) ? $this->album_position : null;
127 | }
128 |
129 | public function hasAlbumPosition()
130 | {
131 | return isset($this->album_position);
132 | }
133 |
134 | public function clearAlbumPosition()
135 | {
136 | unset($this->album_position);
137 | }
138 |
139 | /**
140 | * Required. The position in the album where the enrichment is to be inserted.
141 | *
142 | * Generated from protobuf field .google.photos.library.v1.AlbumPosition album_position = 3 [(.google.api.field_behavior) = REQUIRED];
143 | * @param \Google\Photos\Library\V1\AlbumPosition $var
144 | * @return $this
145 | */
146 | public function setAlbumPosition($var)
147 | {
148 | GPBUtil::checkMessage($var, \Google\Photos\Library\V1\AlbumPosition::class);
149 | $this->album_position = $var;
150 |
151 | return $this;
152 | }
153 |
154 | }
155 |
156 |
--------------------------------------------------------------------------------
/src/Google/Photos/Library/V1/AddEnrichmentToAlbumResponse.php:
--------------------------------------------------------------------------------
1 | google.photos.library.v1.AddEnrichmentToAlbumResponse
15 | */
16 | class AddEnrichmentToAlbumResponse extends \Google\Protobuf\Internal\Message
17 | {
18 | /**
19 | * Output only. Enrichment which was added.
20 | *
21 | * Generated from protobuf field .google.photos.library.v1.EnrichmentItem enrichment_item = 1;
22 | */
23 | protected $enrichment_item = null;
24 |
25 | /**
26 | * Constructor.
27 | *
28 | * @param array $data {
29 | * Optional. Data for populating the Message object.
30 | *
31 | * @type \Google\Photos\Library\V1\EnrichmentItem $enrichment_item
32 | * Output only. Enrichment which was added.
33 | * }
34 | */
35 | public function __construct($data = NULL) {
36 | \GPBMetadata\Google\Photos\Library\V1\PhotosLibrary::initOnce();
37 | parent::__construct($data);
38 | }
39 |
40 | /**
41 | * Output only. Enrichment which was added.
42 | *
43 | * Generated from protobuf field .google.photos.library.v1.EnrichmentItem enrichment_item = 1;
44 | * @return \Google\Photos\Library\V1\EnrichmentItem|null
45 | */
46 | public function getEnrichmentItem()
47 | {
48 | return isset($this->enrichment_item) ? $this->enrichment_item : null;
49 | }
50 |
51 | public function hasEnrichmentItem()
52 | {
53 | return isset($this->enrichment_item);
54 | }
55 |
56 | public function clearEnrichmentItem()
57 | {
58 | unset($this->enrichment_item);
59 | }
60 |
61 | /**
62 | * Output only. Enrichment which was added.
63 | *
64 | * Generated from protobuf field .google.photos.library.v1.EnrichmentItem enrichment_item = 1;
65 | * @param \Google\Photos\Library\V1\EnrichmentItem $var
66 | * @return $this
67 | */
68 | public function setEnrichmentItem($var)
69 | {
70 | GPBUtil::checkMessage($var, \Google\Photos\Library\V1\EnrichmentItem::class);
71 | $this->enrichment_item = $var;
72 |
73 | return $this;
74 | }
75 |
76 | }
77 |
78 |
--------------------------------------------------------------------------------
/src/Google/Photos/Library/V1/AlbumPosition.php:
--------------------------------------------------------------------------------
1 | google.photos.library.v1.AlbumPosition
15 | */
16 | class AlbumPosition extends \Google\Protobuf\Internal\Message
17 | {
18 | /**
19 | * Type of position, for a media or enrichment item.
20 | *
21 | * Generated from protobuf field .google.photos.library.v1.AlbumPosition.PositionType position = 1;
22 | */
23 | protected $position = 0;
24 | protected $relative_item;
25 |
26 | /**
27 | * Constructor.
28 | *
29 | * @param array $data {
30 | * Optional. Data for populating the Message object.
31 | *
32 | * @type int $position
33 | * Type of position, for a media or enrichment item.
34 | * @type string $relative_media_item_id
35 | * The media item to which the position is relative to.
36 | * Only used when position type is AFTER_MEDIA_ITEM.
37 | * @type string $relative_enrichment_item_id
38 | * The enrichment item to which the position is relative to.
39 | * Only used when position type is AFTER_ENRICHMENT_ITEM.
40 | * }
41 | */
42 | public function __construct($data = NULL) {
43 | \GPBMetadata\Google\Photos\Library\V1\PhotosLibrary::initOnce();
44 | parent::__construct($data);
45 | }
46 |
47 | /**
48 | * Type of position, for a media or enrichment item.
49 | *
50 | * Generated from protobuf field .google.photos.library.v1.AlbumPosition.PositionType position = 1;
51 | * @return int
52 | */
53 | public function getPosition()
54 | {
55 | return $this->position;
56 | }
57 |
58 | /**
59 | * Type of position, for a media or enrichment item.
60 | *
61 | * Generated from protobuf field .google.photos.library.v1.AlbumPosition.PositionType position = 1;
62 | * @param int $var
63 | * @return $this
64 | */
65 | public function setPosition($var)
66 | {
67 | GPBUtil::checkEnum($var, \Google\Photos\Library\V1\AlbumPosition\PositionType::class);
68 | $this->position = $var;
69 |
70 | return $this;
71 | }
72 |
73 | /**
74 | * The media item to which the position is relative to.
75 | * Only used when position type is AFTER_MEDIA_ITEM.
76 | *
77 | * Generated from protobuf field string relative_media_item_id = 2;
78 | * @return string
79 | */
80 | public function getRelativeMediaItemId()
81 | {
82 | return $this->readOneof(2);
83 | }
84 |
85 | public function hasRelativeMediaItemId()
86 | {
87 | return $this->hasOneof(2);
88 | }
89 |
90 | /**
91 | * The media item to which the position is relative to.
92 | * Only used when position type is AFTER_MEDIA_ITEM.
93 | *
94 | * Generated from protobuf field string relative_media_item_id = 2;
95 | * @param string $var
96 | * @return $this
97 | */
98 | public function setRelativeMediaItemId($var)
99 | {
100 | GPBUtil::checkString($var, True);
101 | $this->writeOneof(2, $var);
102 |
103 | return $this;
104 | }
105 |
106 | /**
107 | * The enrichment item to which the position is relative to.
108 | * Only used when position type is AFTER_ENRICHMENT_ITEM.
109 | *
110 | * Generated from protobuf field string relative_enrichment_item_id = 3;
111 | * @return string
112 | */
113 | public function getRelativeEnrichmentItemId()
114 | {
115 | return $this->readOneof(3);
116 | }
117 |
118 | public function hasRelativeEnrichmentItemId()
119 | {
120 | return $this->hasOneof(3);
121 | }
122 |
123 | /**
124 | * The enrichment item to which the position is relative to.
125 | * Only used when position type is AFTER_ENRICHMENT_ITEM.
126 | *
127 | * Generated from protobuf field string relative_enrichment_item_id = 3;
128 | * @param string $var
129 | * @return $this
130 | */
131 | public function setRelativeEnrichmentItemId($var)
132 | {
133 | GPBUtil::checkString($var, True);
134 | $this->writeOneof(3, $var);
135 |
136 | return $this;
137 | }
138 |
139 | /**
140 | * @return string
141 | */
142 | public function getRelativeItem()
143 | {
144 | return $this->whichOneof("relative_item");
145 | }
146 |
147 | }
148 |
149 |
--------------------------------------------------------------------------------
/src/Google/Photos/Library/V1/AlbumPosition/PositionType.php:
--------------------------------------------------------------------------------
1 | google.photos.library.v1.AlbumPosition.PositionType
13 | */
14 | class PositionType
15 | {
16 | /**
17 | * Default value if this enum isn't set.
18 | *
19 | * Generated from protobuf enum POSITION_TYPE_UNSPECIFIED = 0;
20 | */
21 | const POSITION_TYPE_UNSPECIFIED = 0;
22 | /**
23 | * At the beginning of the album.
24 | *
25 | * Generated from protobuf enum FIRST_IN_ALBUM = 1;
26 | */
27 | const FIRST_IN_ALBUM = 1;
28 | /**
29 | * At the end of the album.
30 | *
31 | * Generated from protobuf enum LAST_IN_ALBUM = 2;
32 | */
33 | const LAST_IN_ALBUM = 2;
34 | /**
35 | * After a media item.
36 | *
37 | * Generated from protobuf enum AFTER_MEDIA_ITEM = 3;
38 | */
39 | const AFTER_MEDIA_ITEM = 3;
40 | /**
41 | * After an enrichment item.
42 | *
43 | * Generated from protobuf enum AFTER_ENRICHMENT_ITEM = 4;
44 | */
45 | const AFTER_ENRICHMENT_ITEM = 4;
46 |
47 | private static $valueToName = [
48 | self::POSITION_TYPE_UNSPECIFIED => 'POSITION_TYPE_UNSPECIFIED',
49 | self::FIRST_IN_ALBUM => 'FIRST_IN_ALBUM',
50 | self::LAST_IN_ALBUM => 'LAST_IN_ALBUM',
51 | self::AFTER_MEDIA_ITEM => 'AFTER_MEDIA_ITEM',
52 | self::AFTER_ENRICHMENT_ITEM => 'AFTER_ENRICHMENT_ITEM',
53 | ];
54 |
55 | public static function name($value)
56 | {
57 | if (!isset(self::$valueToName[$value])) {
58 | throw new UnexpectedValueException(sprintf(
59 | 'Enum %s has no name defined for value %s', __CLASS__, $value));
60 | }
61 | return self::$valueToName[$value];
62 | }
63 |
64 |
65 | public static function value($name)
66 | {
67 | $const = __CLASS__ . '::' . strtoupper($name);
68 | if (!defined($const)) {
69 | throw new UnexpectedValueException(sprintf(
70 | 'Enum %s has no value defined for name %s', __CLASS__, $name));
71 | }
72 | return constant($const);
73 | }
74 | }
75 |
76 | // Adding a class alias for backwards compatibility with the previous class name.
77 | class_alias(PositionType::class, \Google\Photos\Library\V1\AlbumPosition_PositionType::class);
78 |
79 |
--------------------------------------------------------------------------------
/src/Google/Photos/Library/V1/AlbumPosition_PositionType.php:
--------------------------------------------------------------------------------
1 | google.photos.library.v1.BatchAddMediaItemsToAlbumRequest
15 | */
16 | class BatchAddMediaItemsToAlbumRequest extends \Google\Protobuf\Internal\Message
17 | {
18 | /**
19 | * Required. Identifiers of the [MediaItem][google.photos.types.MediaItem]s to be
20 | * added.
21 | * The maximum number of media items that can be added in one call is 50.
22 | *
23 | * Generated from protobuf field repeated string media_item_ids = 1 [(.google.api.field_behavior) = REQUIRED];
24 | */
25 | private $media_item_ids;
26 | /**
27 | * Required. Identifier of the [Album][google.photos.types.Album] that the
28 | * media items are added to.
29 | *
30 | * Generated from protobuf field string album_id = 2 [(.google.api.field_behavior) = REQUIRED];
31 | */
32 | protected $album_id = '';
33 |
34 | /**
35 | * Constructor.
36 | *
37 | * @param array $data {
38 | * Optional. Data for populating the Message object.
39 | *
40 | * @type string[]|\Google\Protobuf\Internal\RepeatedField $media_item_ids
41 | * Required. Identifiers of the [MediaItem][google.photos.types.MediaItem]s to be
42 | * added.
43 | * The maximum number of media items that can be added in one call is 50.
44 | * @type string $album_id
45 | * Required. Identifier of the [Album][google.photos.types.Album] that the
46 | * media items are added to.
47 | * }
48 | */
49 | public function __construct($data = NULL) {
50 | \GPBMetadata\Google\Photos\Library\V1\PhotosLibrary::initOnce();
51 | parent::__construct($data);
52 | }
53 |
54 | /**
55 | * Required. Identifiers of the [MediaItem][google.photos.types.MediaItem]s to be
56 | * added.
57 | * The maximum number of media items that can be added in one call is 50.
58 | *
59 | * Generated from protobuf field repeated string media_item_ids = 1 [(.google.api.field_behavior) = REQUIRED];
60 | * @return \Google\Protobuf\Internal\RepeatedField
61 | */
62 | public function getMediaItemIds()
63 | {
64 | return $this->media_item_ids;
65 | }
66 |
67 | /**
68 | * Required. Identifiers of the [MediaItem][google.photos.types.MediaItem]s to be
69 | * added.
70 | * The maximum number of media items that can be added in one call is 50.
71 | *
72 | * Generated from protobuf field repeated string media_item_ids = 1 [(.google.api.field_behavior) = REQUIRED];
73 | * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
74 | * @return $this
75 | */
76 | public function setMediaItemIds($var)
77 | {
78 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
79 | $this->media_item_ids = $arr;
80 |
81 | return $this;
82 | }
83 |
84 | /**
85 | * Required. Identifier of the [Album][google.photos.types.Album] that the
86 | * media items are added to.
87 | *
88 | * Generated from protobuf field string album_id = 2 [(.google.api.field_behavior) = REQUIRED];
89 | * @return string
90 | */
91 | public function getAlbumId()
92 | {
93 | return $this->album_id;
94 | }
95 |
96 | /**
97 | * Required. Identifier of the [Album][google.photos.types.Album] that the
98 | * media items are added to.
99 | *
100 | * Generated from protobuf field string album_id = 2 [(.google.api.field_behavior) = REQUIRED];
101 | * @param string $var
102 | * @return $this
103 | */
104 | public function setAlbumId($var)
105 | {
106 | GPBUtil::checkString($var, True);
107 | $this->album_id = $var;
108 |
109 | return $this;
110 | }
111 |
112 | }
113 |
114 |
--------------------------------------------------------------------------------
/src/Google/Photos/Library/V1/BatchAddMediaItemsToAlbumResponse.php:
--------------------------------------------------------------------------------
1 | google.photos.library.v1.BatchAddMediaItemsToAlbumResponse
15 | */
16 | class BatchAddMediaItemsToAlbumResponse extends \Google\Protobuf\Internal\Message
17 | {
18 |
19 | /**
20 | * Constructor.
21 | *
22 | * @param array $data {
23 | * Optional. Data for populating the Message object.
24 | *
25 | * }
26 | */
27 | public function __construct($data = NULL) {
28 | \GPBMetadata\Google\Photos\Library\V1\PhotosLibrary::initOnce();
29 | parent::__construct($data);
30 | }
31 |
32 | }
33 |
34 |
--------------------------------------------------------------------------------
/src/Google/Photos/Library/V1/BatchCreateMediaItemsResponse.php:
--------------------------------------------------------------------------------
1 | google.photos.library.v1.BatchCreateMediaItemsResponse
15 | */
16 | class BatchCreateMediaItemsResponse extends \Google\Protobuf\Internal\Message
17 | {
18 | /**
19 | * Output only. List of media items created.
20 | *
21 | * Generated from protobuf field repeated .google.photos.library.v1.NewMediaItemResult new_media_item_results = 1;
22 | */
23 | private $new_media_item_results;
24 |
25 | /**
26 | * Constructor.
27 | *
28 | * @param array $data {
29 | * Optional. Data for populating the Message object.
30 | *
31 | * @type \Google\Photos\Library\V1\NewMediaItemResult[]|\Google\Protobuf\Internal\RepeatedField $new_media_item_results
32 | * Output only. List of media items created.
33 | * }
34 | */
35 | public function __construct($data = NULL) {
36 | \GPBMetadata\Google\Photos\Library\V1\PhotosLibrary::initOnce();
37 | parent::__construct($data);
38 | }
39 |
40 | /**
41 | * Output only. List of media items created.
42 | *
43 | * Generated from protobuf field repeated .google.photos.library.v1.NewMediaItemResult new_media_item_results = 1;
44 | * @return \Google\Protobuf\Internal\RepeatedField
45 | */
46 | public function getNewMediaItemResults()
47 | {
48 | return $this->new_media_item_results;
49 | }
50 |
51 | /**
52 | * Output only. List of media items created.
53 | *
54 | * Generated from protobuf field repeated .google.photos.library.v1.NewMediaItemResult new_media_item_results = 1;
55 | * @param \Google\Photos\Library\V1\NewMediaItemResult[]|\Google\Protobuf\Internal\RepeatedField $var
56 | * @return $this
57 | */
58 | public function setNewMediaItemResults($var)
59 | {
60 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Photos\Library\V1\NewMediaItemResult::class);
61 | $this->new_media_item_results = $arr;
62 |
63 | return $this;
64 | }
65 |
66 | }
67 |
68 |
--------------------------------------------------------------------------------
/src/Google/Photos/Library/V1/BatchGetMediaItemsRequest.php:
--------------------------------------------------------------------------------
1 | google.photos.library.v1.BatchGetMediaItemsRequest
15 | */
16 | class BatchGetMediaItemsRequest extends \Google\Protobuf\Internal\Message
17 | {
18 | /**
19 | * Required. Identifiers of the media items to be requested.
20 | * Must not contain repeated identifiers and cannot be empty. The maximum
21 | * number of media items that can be retrieved in one call is 50.
22 | *
23 | * Generated from protobuf field repeated string media_item_ids = 1 [(.google.api.field_behavior) = REQUIRED];
24 | */
25 | private $media_item_ids;
26 |
27 | /**
28 | * Constructor.
29 | *
30 | * @param array $data {
31 | * Optional. Data for populating the Message object.
32 | *
33 | * @type string[]|\Google\Protobuf\Internal\RepeatedField $media_item_ids
34 | * Required. Identifiers of the media items to be requested.
35 | * Must not contain repeated identifiers and cannot be empty. The maximum
36 | * number of media items that can be retrieved in one call is 50.
37 | * }
38 | */
39 | public function __construct($data = NULL) {
40 | \GPBMetadata\Google\Photos\Library\V1\PhotosLibrary::initOnce();
41 | parent::__construct($data);
42 | }
43 |
44 | /**
45 | * Required. Identifiers of the media items to be requested.
46 | * Must not contain repeated identifiers and cannot be empty. The maximum
47 | * number of media items that can be retrieved in one call is 50.
48 | *
49 | * Generated from protobuf field repeated string media_item_ids = 1 [(.google.api.field_behavior) = REQUIRED];
50 | * @return \Google\Protobuf\Internal\RepeatedField
51 | */
52 | public function getMediaItemIds()
53 | {
54 | return $this->media_item_ids;
55 | }
56 |
57 | /**
58 | * Required. Identifiers of the media items to be requested.
59 | * Must not contain repeated identifiers and cannot be empty. The maximum
60 | * number of media items that can be retrieved in one call is 50.
61 | *
62 | * Generated from protobuf field repeated string media_item_ids = 1 [(.google.api.field_behavior) = REQUIRED];
63 | * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
64 | * @return $this
65 | */
66 | public function setMediaItemIds($var)
67 | {
68 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
69 | $this->media_item_ids = $arr;
70 |
71 | return $this;
72 | }
73 |
74 | }
75 |
76 |
--------------------------------------------------------------------------------
/src/Google/Photos/Library/V1/BatchGetMediaItemsResponse.php:
--------------------------------------------------------------------------------
1 | google.photos.library.v1.BatchGetMediaItemsResponse
15 | */
16 | class BatchGetMediaItemsResponse extends \Google\Protobuf\Internal\Message
17 | {
18 | /**
19 | * Output only. List of media items retrieved.
20 | * Note that even if the call to BatchGetMediaItems succeeds, there may have
21 | * been failures for some media items in the batch. These failures are
22 | * indicated in each
23 | * [MediaItemResult.status][google.photos.library.v1.MediaItemResult.status].
24 | *
25 | * Generated from protobuf field repeated .google.photos.library.v1.MediaItemResult media_item_results = 1;
26 | */
27 | private $media_item_results;
28 |
29 | /**
30 | * Constructor.
31 | *
32 | * @param array $data {
33 | * Optional. Data for populating the Message object.
34 | *
35 | * @type \Google\Photos\Library\V1\MediaItemResult[]|\Google\Protobuf\Internal\RepeatedField $media_item_results
36 | * Output only. List of media items retrieved.
37 | * Note that even if the call to BatchGetMediaItems succeeds, there may have
38 | * been failures for some media items in the batch. These failures are
39 | * indicated in each
40 | * [MediaItemResult.status][google.photos.library.v1.MediaItemResult.status].
41 | * }
42 | */
43 | public function __construct($data = NULL) {
44 | \GPBMetadata\Google\Photos\Library\V1\PhotosLibrary::initOnce();
45 | parent::__construct($data);
46 | }
47 |
48 | /**
49 | * Output only. List of media items retrieved.
50 | * Note that even if the call to BatchGetMediaItems succeeds, there may have
51 | * been failures for some media items in the batch. These failures are
52 | * indicated in each
53 | * [MediaItemResult.status][google.photos.library.v1.MediaItemResult.status].
54 | *
55 | * Generated from protobuf field repeated .google.photos.library.v1.MediaItemResult media_item_results = 1;
56 | * @return \Google\Protobuf\Internal\RepeatedField
57 | */
58 | public function getMediaItemResults()
59 | {
60 | return $this->media_item_results;
61 | }
62 |
63 | /**
64 | * Output only. List of media items retrieved.
65 | * Note that even if the call to BatchGetMediaItems succeeds, there may have
66 | * been failures for some media items in the batch. These failures are
67 | * indicated in each
68 | * [MediaItemResult.status][google.photos.library.v1.MediaItemResult.status].
69 | *
70 | * Generated from protobuf field repeated .google.photos.library.v1.MediaItemResult media_item_results = 1;
71 | * @param \Google\Photos\Library\V1\MediaItemResult[]|\Google\Protobuf\Internal\RepeatedField $var
72 | * @return $this
73 | */
74 | public function setMediaItemResults($var)
75 | {
76 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Photos\Library\V1\MediaItemResult::class);
77 | $this->media_item_results = $arr;
78 |
79 | return $this;
80 | }
81 |
82 | }
83 |
84 |
--------------------------------------------------------------------------------
/src/Google/Photos/Library/V1/BatchRemoveMediaItemsFromAlbumRequest.php:
--------------------------------------------------------------------------------
1 | google.photos.library.v1.BatchRemoveMediaItemsFromAlbumRequest
15 | */
16 | class BatchRemoveMediaItemsFromAlbumRequest extends \Google\Protobuf\Internal\Message
17 | {
18 | /**
19 | * Required. Identifiers of the [MediaItem][google.photos.types.MediaItem]s to be
20 | * removed.
21 | * Must not contain repeated identifiers and cannot be empty. The maximum
22 | * number of media items that can be removed in one call is 50.
23 | *
24 | * Generated from protobuf field repeated string media_item_ids = 1 [(.google.api.field_behavior) = REQUIRED];
25 | */
26 | private $media_item_ids;
27 | /**
28 | * Required. Identifier of the [Album][google.photos.types.Album] that the media
29 | * items are to be removed from.
30 | *
31 | * Generated from protobuf field string album_id = 2 [(.google.api.field_behavior) = REQUIRED];
32 | */
33 | protected $album_id = '';
34 |
35 | /**
36 | * Constructor.
37 | *
38 | * @param array $data {
39 | * Optional. Data for populating the Message object.
40 | *
41 | * @type string[]|\Google\Protobuf\Internal\RepeatedField $media_item_ids
42 | * Required. Identifiers of the [MediaItem][google.photos.types.MediaItem]s to be
43 | * removed.
44 | * Must not contain repeated identifiers and cannot be empty. The maximum
45 | * number of media items that can be removed in one call is 50.
46 | * @type string $album_id
47 | * Required. Identifier of the [Album][google.photos.types.Album] that the media
48 | * items are to be removed from.
49 | * }
50 | */
51 | public function __construct($data = NULL) {
52 | \GPBMetadata\Google\Photos\Library\V1\PhotosLibrary::initOnce();
53 | parent::__construct($data);
54 | }
55 |
56 | /**
57 | * Required. Identifiers of the [MediaItem][google.photos.types.MediaItem]s to be
58 | * removed.
59 | * Must not contain repeated identifiers and cannot be empty. The maximum
60 | * number of media items that can be removed in one call is 50.
61 | *
62 | * Generated from protobuf field repeated string media_item_ids = 1 [(.google.api.field_behavior) = REQUIRED];
63 | * @return \Google\Protobuf\Internal\RepeatedField
64 | */
65 | public function getMediaItemIds()
66 | {
67 | return $this->media_item_ids;
68 | }
69 |
70 | /**
71 | * Required. Identifiers of the [MediaItem][google.photos.types.MediaItem]s to be
72 | * removed.
73 | * Must not contain repeated identifiers and cannot be empty. The maximum
74 | * number of media items that can be removed in one call is 50.
75 | *
76 | * Generated from protobuf field repeated string media_item_ids = 1 [(.google.api.field_behavior) = REQUIRED];
77 | * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
78 | * @return $this
79 | */
80 | public function setMediaItemIds($var)
81 | {
82 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
83 | $this->media_item_ids = $arr;
84 |
85 | return $this;
86 | }
87 |
88 | /**
89 | * Required. Identifier of the [Album][google.photos.types.Album] that the media
90 | * items are to be removed from.
91 | *
92 | * Generated from protobuf field string album_id = 2 [(.google.api.field_behavior) = REQUIRED];
93 | * @return string
94 | */
95 | public function getAlbumId()
96 | {
97 | return $this->album_id;
98 | }
99 |
100 | /**
101 | * Required. Identifier of the [Album][google.photos.types.Album] that the media
102 | * items are to be removed from.
103 | *
104 | * Generated from protobuf field string album_id = 2 [(.google.api.field_behavior) = REQUIRED];
105 | * @param string $var
106 | * @return $this
107 | */
108 | public function setAlbumId($var)
109 | {
110 | GPBUtil::checkString($var, True);
111 | $this->album_id = $var;
112 |
113 | return $this;
114 | }
115 |
116 | }
117 |
118 |
--------------------------------------------------------------------------------
/src/Google/Photos/Library/V1/BatchRemoveMediaItemsFromAlbumResponse.php:
--------------------------------------------------------------------------------
1 | google.photos.library.v1.BatchRemoveMediaItemsFromAlbumResponse
15 | */
16 | class BatchRemoveMediaItemsFromAlbumResponse extends \Google\Protobuf\Internal\Message
17 | {
18 |
19 | /**
20 | * Constructor.
21 | *
22 | * @param array $data {
23 | * Optional. Data for populating the Message object.
24 | *
25 | * }
26 | */
27 | public function __construct($data = NULL) {
28 | \GPBMetadata\Google\Photos\Library\V1\PhotosLibrary::initOnce();
29 | parent::__construct($data);
30 | }
31 |
32 | }
33 |
34 |
--------------------------------------------------------------------------------
/src/Google/Photos/Library/V1/ContentFilter.php:
--------------------------------------------------------------------------------
1 |
16 | * The content filter `includedContentCategories`: [c1, c2, c3] would get media
17 | * items that contain (c1 OR c2 OR c3).
18 | * The content filter `excludedContentCategories`: [c1, c2, c3] would NOT get 19 | * media items that contain (c1 OR c2 OR c3).
20 | * You can also include some categories while excluding others, as in this 21 | * example: `includedContentCategories`: [c1, c2], `excludedContentCategories`: 22 | * [c3, c4]
23 | * The previous example would get media items that contain (c1 OR c2) AND NOT
24 | * (c3 OR c4). A category that appears in `includedContentategories` must not
25 | * appear in `excludedContentCategories`.
26 | *
27 | * Generated from protobuf message google.photos.library.v1.ContentFilter
28 | */
29 | class ContentFilter extends \Google\Protobuf\Internal\Message
30 | {
31 | /**
32 | * The set of categories to be included in the media item search results.
33 | * The items in the set are ORed. There's a maximum of 10
34 | * `includedContentCategories` per request.
35 | *
36 | * Generated from protobuf field repeated .google.photos.library.v1.ContentCategory included_content_categories = 1;
37 | */
38 | private $included_content_categories;
39 | /**
40 | * The set of categories which are not to be included in the media item search
41 | * results. The items in the set are ORed. There's a maximum of 10
42 | * `excludedContentCategories` per request.
43 | *
44 | * Generated from protobuf field repeated .google.photos.library.v1.ContentCategory excluded_content_categories = 2;
45 | */
46 | private $excluded_content_categories;
47 |
48 | /**
49 | * Constructor.
50 | *
51 | * @param array $data {
52 | * Optional. Data for populating the Message object.
53 | *
54 | * @type int[]|\Google\Protobuf\Internal\RepeatedField $included_content_categories
55 | * The set of categories to be included in the media item search results.
56 | * The items in the set are ORed. There's a maximum of 10
57 | * `includedContentCategories` per request.
58 | * @type int[]|\Google\Protobuf\Internal\RepeatedField $excluded_content_categories
59 | * The set of categories which are not to be included in the media item search
60 | * results. The items in the set are ORed. There's a maximum of 10
61 | * `excludedContentCategories` per request.
62 | * }
63 | */
64 | public function __construct($data = NULL) {
65 | \GPBMetadata\Google\Photos\Library\V1\PhotosLibrary::initOnce();
66 | parent::__construct($data);
67 | }
68 |
69 | /**
70 | * The set of categories to be included in the media item search results.
71 | * The items in the set are ORed. There's a maximum of 10
72 | * `includedContentCategories` per request.
73 | *
74 | * Generated from protobuf field repeated .google.photos.library.v1.ContentCategory included_content_categories = 1;
75 | * @return \Google\Protobuf\Internal\RepeatedField
76 | */
77 | public function getIncludedContentCategories()
78 | {
79 | return $this->included_content_categories;
80 | }
81 |
82 | /**
83 | * The set of categories to be included in the media item search results.
84 | * The items in the set are ORed. There's a maximum of 10
85 | * `includedContentCategories` per request.
86 | *
87 | * Generated from protobuf field repeated .google.photos.library.v1.ContentCategory included_content_categories = 1;
88 | * @param int[]|\Google\Protobuf\Internal\RepeatedField $var
89 | * @return $this
90 | */
91 | public function setIncludedContentCategories($var)
92 | {
93 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Photos\Library\V1\ContentCategory::class);
94 | $this->included_content_categories = $arr;
95 |
96 | return $this;
97 | }
98 |
99 | /**
100 | * The set of categories which are not to be included in the media item search
101 | * results. The items in the set are ORed. There's a maximum of 10
102 | * `excludedContentCategories` per request.
103 | *
104 | * Generated from protobuf field repeated .google.photos.library.v1.ContentCategory excluded_content_categories = 2;
105 | * @return \Google\Protobuf\Internal\RepeatedField
106 | */
107 | public function getExcludedContentCategories()
108 | {
109 | return $this->excluded_content_categories;
110 | }
111 |
112 | /**
113 | * The set of categories which are not to be included in the media item search
114 | * results. The items in the set are ORed. There's a maximum of 10
115 | * `excludedContentCategories` per request.
116 | *
117 | * Generated from protobuf field repeated .google.photos.library.v1.ContentCategory excluded_content_categories = 2;
118 | * @param int[]|\Google\Protobuf\Internal\RepeatedField $var
119 | * @return $this
120 | */
121 | public function setExcludedContentCategories($var)
122 | {
123 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Photos\Library\V1\ContentCategory::class);
124 | $this->excluded_content_categories = $arr;
125 |
126 | return $this;
127 | }
128 |
129 | }
130 |
131 |
--------------------------------------------------------------------------------
/src/Google/Photos/Library/V1/CreateAlbumRequest.php:
--------------------------------------------------------------------------------
1 | google.photos.library.v1.CreateAlbumRequest
15 | */
16 | class CreateAlbumRequest extends \Google\Protobuf\Internal\Message
17 | {
18 | /**
19 | * Required. The album to be created.
20 | *
21 | * Generated from protobuf field .google.photos.types.Album album = 1 [(.google.api.field_behavior) = REQUIRED];
22 | */
23 | protected $album = null;
24 |
25 | /**
26 | * Constructor.
27 | *
28 | * @param array $data {
29 | * Optional. Data for populating the Message object.
30 | *
31 | * @type \Google\Photos\Types\Album $album
32 | * Required. The album to be created.
33 | * }
34 | */
35 | public function __construct($data = NULL) {
36 | \GPBMetadata\Google\Photos\Library\V1\PhotosLibrary::initOnce();
37 | parent::__construct($data);
38 | }
39 |
40 | /**
41 | * Required. The album to be created.
42 | *
43 | * Generated from protobuf field .google.photos.types.Album album = 1 [(.google.api.field_behavior) = REQUIRED];
44 | * @return \Google\Photos\Types\Album|null
45 | */
46 | public function getAlbum()
47 | {
48 | return isset($this->album) ? $this->album : null;
49 | }
50 |
51 | public function hasAlbum()
52 | {
53 | return isset($this->album);
54 | }
55 |
56 | public function clearAlbum()
57 | {
58 | unset($this->album);
59 | }
60 |
61 | /**
62 | * Required. The album to be created.
63 | *
64 | * Generated from protobuf field .google.photos.types.Album album = 1 [(.google.api.field_behavior) = REQUIRED];
65 | * @param \Google\Photos\Types\Album $var
66 | * @return $this
67 | */
68 | public function setAlbum($var)
69 | {
70 | GPBUtil::checkMessage($var, \Google\Photos\Types\Album::class);
71 | $this->album = $var;
72 |
73 | return $this;
74 | }
75 |
76 | }
77 |
78 |
--------------------------------------------------------------------------------
/src/Google/Photos/Library/V1/DateFilter.php:
--------------------------------------------------------------------------------
1 | google.photos.library.v1.DateFilter
16 | */
17 | class DateFilter extends \Google\Protobuf\Internal\Message
18 | {
19 | /**
20 | * List of dates that match the media items' creation date. A maximum of
21 | * 5 dates can be included per request.
22 | *
23 | * Generated from protobuf field repeated .google.type.Date dates = 1;
24 | */
25 | private $dates;
26 | /**
27 | * List of dates ranges that match the media items' creation date. A
28 | * maximum of 5 dates ranges can be included per request.
29 | *
30 | * Generated from protobuf field repeated .google.photos.types.DateRange ranges = 2;
31 | */
32 | private $ranges;
33 |
34 | /**
35 | * Constructor.
36 | *
37 | * @param array $data {
38 | * Optional. Data for populating the Message object.
39 | *
40 | * @type \Google\Type\Date[]|\Google\Protobuf\Internal\RepeatedField $dates
41 | * List of dates that match the media items' creation date. A maximum of
42 | * 5 dates can be included per request.
43 | * @type \Google\Photos\Types\DateRange[]|\Google\Protobuf\Internal\RepeatedField $ranges
44 | * List of dates ranges that match the media items' creation date. A
45 | * maximum of 5 dates ranges can be included per request.
46 | * }
47 | */
48 | public function __construct($data = NULL) {
49 | \GPBMetadata\Google\Photos\Library\V1\PhotosLibrary::initOnce();
50 | parent::__construct($data);
51 | }
52 |
53 | /**
54 | * List of dates that match the media items' creation date. A maximum of
55 | * 5 dates can be included per request.
56 | *
57 | * Generated from protobuf field repeated .google.type.Date dates = 1;
58 | * @return \Google\Protobuf\Internal\RepeatedField
59 | */
60 | public function getDates()
61 | {
62 | return $this->dates;
63 | }
64 |
65 | /**
66 | * List of dates that match the media items' creation date. A maximum of
67 | * 5 dates can be included per request.
68 | *
69 | * Generated from protobuf field repeated .google.type.Date dates = 1;
70 | * @param \Google\Type\Date[]|\Google\Protobuf\Internal\RepeatedField $var
71 | * @return $this
72 | */
73 | public function setDates($var)
74 | {
75 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Type\Date::class);
76 | $this->dates = $arr;
77 |
78 | return $this;
79 | }
80 |
81 | /**
82 | * List of dates ranges that match the media items' creation date. A
83 | * maximum of 5 dates ranges can be included per request.
84 | *
85 | * Generated from protobuf field repeated .google.photos.types.DateRange ranges = 2;
86 | * @return \Google\Protobuf\Internal\RepeatedField
87 | */
88 | public function getRanges()
89 | {
90 | return $this->ranges;
91 | }
92 |
93 | /**
94 | * List of dates ranges that match the media items' creation date. A
95 | * maximum of 5 dates ranges can be included per request.
96 | *
97 | * Generated from protobuf field repeated .google.photos.types.DateRange ranges = 2;
98 | * @param \Google\Photos\Types\DateRange[]|\Google\Protobuf\Internal\RepeatedField $var
99 | * @return $this
100 | */
101 | public function setRanges($var)
102 | {
103 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Photos\Types\DateRange::class);
104 | $this->ranges = $arr;
105 |
106 | return $this;
107 | }
108 |
109 | }
110 |
111 |
--------------------------------------------------------------------------------
/src/Google/Photos/Library/V1/EnrichmentItem.php:
--------------------------------------------------------------------------------
1 | google.photos.library.v1.EnrichmentItem
15 | */
16 | class EnrichmentItem extends \Google\Protobuf\Internal\Message
17 | {
18 | /**
19 | * Identifier of the enrichment item.
20 | *
21 | * Generated from protobuf field string id = 1;
22 | */
23 | protected $id = '';
24 |
25 | /**
26 | * Constructor.
27 | *
28 | * @param array $data {
29 | * Optional. Data for populating the Message object.
30 | *
31 | * @type string $id
32 | * Identifier of the enrichment item.
33 | * }
34 | */
35 | public function __construct($data = NULL) {
36 | \GPBMetadata\Google\Photos\Library\V1\PhotosLibrary::initOnce();
37 | parent::__construct($data);
38 | }
39 |
40 | /**
41 | * Identifier of the enrichment item.
42 | *
43 | * Generated from protobuf field string id = 1;
44 | * @return string
45 | */
46 | public function getId()
47 | {
48 | return $this->id;
49 | }
50 |
51 | /**
52 | * Identifier of the enrichment item.
53 | *
54 | * Generated from protobuf field string id = 1;
55 | * @param string $var
56 | * @return $this
57 | */
58 | public function setId($var)
59 | {
60 | GPBUtil::checkString($var, True);
61 | $this->id = $var;
62 |
63 | return $this;
64 | }
65 |
66 | }
67 |
68 |
--------------------------------------------------------------------------------
/src/Google/Photos/Library/V1/FeatureFilter.php:
--------------------------------------------------------------------------------
1 | google.photos.library.v1.FeatureFilter
15 | */
16 | class FeatureFilter extends \Google\Protobuf\Internal\Message
17 | {
18 | /**
19 | * The set of features to be included in the media item search results.
20 | * The items in the set are ORed and may match any of the specified features.
21 | *
22 | * Generated from protobuf field repeated .google.photos.library.v1.FeatureFilter.Feature included_features = 1;
23 | */
24 | private $included_features;
25 |
26 | /**
27 | * Constructor.
28 | *
29 | * @param array $data {
30 | * Optional. Data for populating the Message object.
31 | *
32 | * @type int[]|\Google\Protobuf\Internal\RepeatedField $included_features
33 | * The set of features to be included in the media item search results.
34 | * The items in the set are ORed and may match any of the specified features.
35 | * }
36 | */
37 | public function __construct($data = NULL) {
38 | \GPBMetadata\Google\Photos\Library\V1\PhotosLibrary::initOnce();
39 | parent::__construct($data);
40 | }
41 |
42 | /**
43 | * The set of features to be included in the media item search results.
44 | * The items in the set are ORed and may match any of the specified features.
45 | *
46 | * Generated from protobuf field repeated .google.photos.library.v1.FeatureFilter.Feature included_features = 1;
47 | * @return \Google\Protobuf\Internal\RepeatedField
48 | */
49 | public function getIncludedFeatures()
50 | {
51 | return $this->included_features;
52 | }
53 |
54 | /**
55 | * The set of features to be included in the media item search results.
56 | * The items in the set are ORed and may match any of the specified features.
57 | *
58 | * Generated from protobuf field repeated .google.photos.library.v1.FeatureFilter.Feature included_features = 1;
59 | * @param int[]|\Google\Protobuf\Internal\RepeatedField $var
60 | * @return $this
61 | */
62 | public function setIncludedFeatures($var)
63 | {
64 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Photos\Library\V1\FeatureFilter\Feature::class);
65 | $this->included_features = $arr;
66 |
67 | return $this;
68 | }
69 |
70 | }
71 |
72 |
--------------------------------------------------------------------------------
/src/Google/Photos/Library/V1/FeatureFilter/Feature.php:
--------------------------------------------------------------------------------
1 | google.photos.library.v1.FeatureFilter.Feature
13 | */
14 | class Feature
15 | {
16 | /**
17 | * Treated as if no filters are applied. All features are included.
18 | *
19 | * Generated from protobuf enum NONE = 0;
20 | */
21 | const NONE = 0;
22 | /**
23 | * Media items that the user has marked as favorites in the Google Photos
24 | * app.
25 | *
26 | * Generated from protobuf enum FAVORITES = 1;
27 | */
28 | const FAVORITES = 1;
29 |
30 | private static $valueToName = [
31 | self::NONE => 'NONE',
32 | self::FAVORITES => 'FAVORITES',
33 | ];
34 |
35 | public static function name($value)
36 | {
37 | if (!isset(self::$valueToName[$value])) {
38 | throw new UnexpectedValueException(sprintf(
39 | 'Enum %s has no name defined for value %s', __CLASS__, $value));
40 | }
41 | return self::$valueToName[$value];
42 | }
43 |
44 |
45 | public static function value($name)
46 | {
47 | $const = __CLASS__ . '::' . strtoupper($name);
48 | if (!defined($const)) {
49 | throw new UnexpectedValueException(sprintf(
50 | 'Enum %s has no value defined for name %s', __CLASS__, $name));
51 | }
52 | return constant($const);
53 | }
54 | }
55 |
56 | // Adding a class alias for backwards compatibility with the previous class name.
57 | class_alias(Feature::class, \Google\Photos\Library\V1\FeatureFilter_Feature::class);
58 |
59 |
--------------------------------------------------------------------------------
/src/Google/Photos/Library/V1/FeatureFilter_Feature.php:
--------------------------------------------------------------------------------
1 | google.photos.library.v1.GetAlbumRequest
15 | */
16 | class GetAlbumRequest extends \Google\Protobuf\Internal\Message
17 | {
18 | /**
19 | * Required. Identifier of the album to be requested.
20 | *
21 | * Generated from protobuf field string album_id = 1 [(.google.api.field_behavior) = REQUIRED];
22 | */
23 | protected $album_id = '';
24 |
25 | /**
26 | * Constructor.
27 | *
28 | * @param array $data {
29 | * Optional. Data for populating the Message object.
30 | *
31 | * @type string $album_id
32 | * Required. Identifier of the album to be requested.
33 | * }
34 | */
35 | public function __construct($data = NULL) {
36 | \GPBMetadata\Google\Photos\Library\V1\PhotosLibrary::initOnce();
37 | parent::__construct($data);
38 | }
39 |
40 | /**
41 | * Required. Identifier of the album to be requested.
42 | *
43 | * Generated from protobuf field string album_id = 1 [(.google.api.field_behavior) = REQUIRED];
44 | * @return string
45 | */
46 | public function getAlbumId()
47 | {
48 | return $this->album_id;
49 | }
50 |
51 | /**
52 | * Required. Identifier of the album to be requested.
53 | *
54 | * Generated from protobuf field string album_id = 1 [(.google.api.field_behavior) = REQUIRED];
55 | * @param string $var
56 | * @return $this
57 | */
58 | public function setAlbumId($var)
59 | {
60 | GPBUtil::checkString($var, True);
61 | $this->album_id = $var;
62 |
63 | return $this;
64 | }
65 |
66 | }
67 |
68 |
--------------------------------------------------------------------------------
/src/Google/Photos/Library/V1/GetMediaItemRequest.php:
--------------------------------------------------------------------------------
1 | google.photos.library.v1.GetMediaItemRequest
16 | */
17 | class GetMediaItemRequest extends \Google\Protobuf\Internal\Message
18 | {
19 | /**
20 | * Required. Identifier of the media item to be requested.
21 | *
22 | * Generated from protobuf field string media_item_id = 1 [(.google.api.field_behavior) = REQUIRED];
23 | */
24 | protected $media_item_id = '';
25 |
26 | /**
27 | * Constructor.
28 | *
29 | * @param array $data {
30 | * Optional. Data for populating the Message object.
31 | *
32 | * @type string $media_item_id
33 | * Required. Identifier of the media item to be requested.
34 | * }
35 | */
36 | public function __construct($data = NULL) {
37 | \GPBMetadata\Google\Photos\Library\V1\PhotosLibrary::initOnce();
38 | parent::__construct($data);
39 | }
40 |
41 | /**
42 | * Required. Identifier of the media item to be requested.
43 | *
44 | * Generated from protobuf field string media_item_id = 1 [(.google.api.field_behavior) = REQUIRED];
45 | * @return string
46 | */
47 | public function getMediaItemId()
48 | {
49 | return $this->media_item_id;
50 | }
51 |
52 | /**
53 | * Required. Identifier of the media item to be requested.
54 | *
55 | * Generated from protobuf field string media_item_id = 1 [(.google.api.field_behavior) = REQUIRED];
56 | * @param string $var
57 | * @return $this
58 | */
59 | public function setMediaItemId($var)
60 | {
61 | GPBUtil::checkString($var, True);
62 | $this->media_item_id = $var;
63 |
64 | return $this;
65 | }
66 |
67 | }
68 |
69 |
--------------------------------------------------------------------------------
/src/Google/Photos/Library/V1/GetSharedAlbumRequest.php:
--------------------------------------------------------------------------------
1 | google.photos.library.v1.GetSharedAlbumRequest
15 | */
16 | class GetSharedAlbumRequest extends \Google\Protobuf\Internal\Message
17 | {
18 | /**
19 | * Required. Share token of the album to be requested.
20 | *
21 | * Generated from protobuf field string share_token = 1 [(.google.api.field_behavior) = REQUIRED];
22 | */
23 | protected $share_token = '';
24 |
25 | /**
26 | * Constructor.
27 | *
28 | * @param array $data {
29 | * Optional. Data for populating the Message object.
30 | *
31 | * @type string $share_token
32 | * Required. Share token of the album to be requested.
33 | * }
34 | */
35 | public function __construct($data = NULL) {
36 | \GPBMetadata\Google\Photos\Library\V1\PhotosLibrary::initOnce();
37 | parent::__construct($data);
38 | }
39 |
40 | /**
41 | * Required. Share token of the album to be requested.
42 | *
43 | * Generated from protobuf field string share_token = 1 [(.google.api.field_behavior) = REQUIRED];
44 | * @return string
45 | */
46 | public function getShareToken()
47 | {
48 | return $this->share_token;
49 | }
50 |
51 | /**
52 | * Required. Share token of the album to be requested.
53 | *
54 | * Generated from protobuf field string share_token = 1 [(.google.api.field_behavior) = REQUIRED];
55 | * @param string $var
56 | * @return $this
57 | */
58 | public function setShareToken($var)
59 | {
60 | GPBUtil::checkString($var, True);
61 | $this->share_token = $var;
62 |
63 | return $this;
64 | }
65 |
66 | }
67 |
68 |
--------------------------------------------------------------------------------
/src/Google/Photos/Library/V1/JoinSharedAlbumRequest.php:
--------------------------------------------------------------------------------
1 | google.photos.library.v1.JoinSharedAlbumRequest
16 | */
17 | class JoinSharedAlbumRequest extends \Google\Protobuf\Internal\Message
18 | {
19 | /**
20 | * Required. Token to join the shared album on behalf of the user.
21 | *
22 | * Generated from protobuf field string share_token = 1 [(.google.api.field_behavior) = REQUIRED];
23 | */
24 | protected $share_token = '';
25 |
26 | /**
27 | * Constructor.
28 | *
29 | * @param array $data {
30 | * Optional. Data for populating the Message object.
31 | *
32 | * @type string $share_token
33 | * Required. Token to join the shared album on behalf of the user.
34 | * }
35 | */
36 | public function __construct($data = NULL) {
37 | \GPBMetadata\Google\Photos\Library\V1\PhotosLibrary::initOnce();
38 | parent::__construct($data);
39 | }
40 |
41 | /**
42 | * Required. Token to join the shared album on behalf of the user.
43 | *
44 | * Generated from protobuf field string share_token = 1 [(.google.api.field_behavior) = REQUIRED];
45 | * @return string
46 | */
47 | public function getShareToken()
48 | {
49 | return $this->share_token;
50 | }
51 |
52 | /**
53 | * Required. Token to join the shared album on behalf of the user.
54 | *
55 | * Generated from protobuf field string share_token = 1 [(.google.api.field_behavior) = REQUIRED];
56 | * @param string $var
57 | * @return $this
58 | */
59 | public function setShareToken($var)
60 | {
61 | GPBUtil::checkString($var, True);
62 | $this->share_token = $var;
63 |
64 | return $this;
65 | }
66 |
67 | }
68 |
69 |
--------------------------------------------------------------------------------
/src/Google/Photos/Library/V1/JoinSharedAlbumResponse.php:
--------------------------------------------------------------------------------
1 | google.photos.library.v1.JoinSharedAlbumResponse
15 | */
16 | class JoinSharedAlbumResponse extends \Google\Protobuf\Internal\Message
17 | {
18 | /**
19 | * Shared album that the user has joined.
20 | *
21 | * Generated from protobuf field .google.photos.types.Album album = 1;
22 | */
23 | protected $album = null;
24 |
25 | /**
26 | * Constructor.
27 | *
28 | * @param array $data {
29 | * Optional. Data for populating the Message object.
30 | *
31 | * @type \Google\Photos\Types\Album $album
32 | * Shared album that the user has joined.
33 | * }
34 | */
35 | public function __construct($data = NULL) {
36 | \GPBMetadata\Google\Photos\Library\V1\PhotosLibrary::initOnce();
37 | parent::__construct($data);
38 | }
39 |
40 | /**
41 | * Shared album that the user has joined.
42 | *
43 | * Generated from protobuf field .google.photos.types.Album album = 1;
44 | * @return \Google\Photos\Types\Album|null
45 | */
46 | public function getAlbum()
47 | {
48 | return isset($this->album) ? $this->album : null;
49 | }
50 |
51 | public function hasAlbum()
52 | {
53 | return isset($this->album);
54 | }
55 |
56 | public function clearAlbum()
57 | {
58 | unset($this->album);
59 | }
60 |
61 | /**
62 | * Shared album that the user has joined.
63 | *
64 | * Generated from protobuf field .google.photos.types.Album album = 1;
65 | * @param \Google\Photos\Types\Album $var
66 | * @return $this
67 | */
68 | public function setAlbum($var)
69 | {
70 | GPBUtil::checkMessage($var, \Google\Photos\Types\Album::class);
71 | $this->album = $var;
72 |
73 | return $this;
74 | }
75 |
76 | }
77 |
78 |
--------------------------------------------------------------------------------
/src/Google/Photos/Library/V1/LeaveSharedAlbumRequest.php:
--------------------------------------------------------------------------------
1 | google.photos.library.v1.LeaveSharedAlbumRequest
16 | */
17 | class LeaveSharedAlbumRequest extends \Google\Protobuf\Internal\Message
18 | {
19 | /**
20 | * Required. Token to leave the shared album on behalf of the user.
21 | *
22 | * Generated from protobuf field string share_token = 1 [(.google.api.field_behavior) = REQUIRED];
23 | */
24 | protected $share_token = '';
25 |
26 | /**
27 | * Constructor.
28 | *
29 | * @param array $data {
30 | * Optional. Data for populating the Message object.
31 | *
32 | * @type string $share_token
33 | * Required. Token to leave the shared album on behalf of the user.
34 | * }
35 | */
36 | public function __construct($data = NULL) {
37 | \GPBMetadata\Google\Photos\Library\V1\PhotosLibrary::initOnce();
38 | parent::__construct($data);
39 | }
40 |
41 | /**
42 | * Required. Token to leave the shared album on behalf of the user.
43 | *
44 | * Generated from protobuf field string share_token = 1 [(.google.api.field_behavior) = REQUIRED];
45 | * @return string
46 | */
47 | public function getShareToken()
48 | {
49 | return $this->share_token;
50 | }
51 |
52 | /**
53 | * Required. Token to leave the shared album on behalf of the user.
54 | *
55 | * Generated from protobuf field string share_token = 1 [(.google.api.field_behavior) = REQUIRED];
56 | * @param string $var
57 | * @return $this
58 | */
59 | public function setShareToken($var)
60 | {
61 | GPBUtil::checkString($var, True);
62 | $this->share_token = $var;
63 |
64 | return $this;
65 | }
66 |
67 | }
68 |
69 |
--------------------------------------------------------------------------------
/src/Google/Photos/Library/V1/LeaveSharedAlbumResponse.php:
--------------------------------------------------------------------------------
1 | google.photos.library.v1.LeaveSharedAlbumResponse
15 | */
16 | class LeaveSharedAlbumResponse extends \Google\Protobuf\Internal\Message
17 | {
18 |
19 | /**
20 | * Constructor.
21 | *
22 | * @param array $data {
23 | * Optional. Data for populating the Message object.
24 | *
25 | * }
26 | */
27 | public function __construct($data = NULL) {
28 | \GPBMetadata\Google\Photos\Library\V1\PhotosLibrary::initOnce();
29 | parent::__construct($data);
30 | }
31 |
32 | }
33 |
34 |
--------------------------------------------------------------------------------
/src/Google/Photos/Library/V1/ListAlbumsRequest.php:
--------------------------------------------------------------------------------
1 | google.photos.library.v1.ListAlbumsRequest
17 | */
18 | class ListAlbumsRequest extends \Google\Protobuf\Internal\Message
19 | {
20 | /**
21 | * Maximum number of albums to return in the response. Fewer albums might be
22 | * returned than the specified number. The default `pageSize` is 20, the
23 | * maximum is 50.
24 | *
25 | * Generated from protobuf field int32 page_size = 1;
26 | */
27 | protected $page_size = 0;
28 | /**
29 | * A continuation token to get the next page of the results. Adding this to
30 | * the request returns the rows after the `pageToken`. The `pageToken` should
31 | * be the value returned in the `nextPageToken` parameter in the response to
32 | * the `listAlbums` request.
33 | *
34 | * Generated from protobuf field string page_token = 2;
35 | */
36 | protected $page_token = '';
37 | /**
38 | * If set, the results exclude media items that were not created by this app.
39 | * Defaults to false (all albums are returned). This field is ignored if the
40 | * photoslibrary.readonly.appcreateddata scope is used.
41 | *
42 | * Generated from protobuf field bool exclude_non_app_created_data = 3;
43 | */
44 | protected $exclude_non_app_created_data = false;
45 |
46 | /**
47 | * Constructor.
48 | *
49 | * @param array $data {
50 | * Optional. Data for populating the Message object.
51 | *
52 | * @type int $page_size
53 | * Maximum number of albums to return in the response. Fewer albums might be
54 | * returned than the specified number. The default `pageSize` is 20, the
55 | * maximum is 50.
56 | * @type string $page_token
57 | * A continuation token to get the next page of the results. Adding this to
58 | * the request returns the rows after the `pageToken`. The `pageToken` should
59 | * be the value returned in the `nextPageToken` parameter in the response to
60 | * the `listAlbums` request.
61 | * @type bool $exclude_non_app_created_data
62 | * If set, the results exclude media items that were not created by this app.
63 | * Defaults to false (all albums are returned). This field is ignored if the
64 | * photoslibrary.readonly.appcreateddata scope is used.
65 | * }
66 | */
67 | public function __construct($data = NULL) {
68 | \GPBMetadata\Google\Photos\Library\V1\PhotosLibrary::initOnce();
69 | parent::__construct($data);
70 | }
71 |
72 | /**
73 | * Maximum number of albums to return in the response. Fewer albums might be
74 | * returned than the specified number. The default `pageSize` is 20, the
75 | * maximum is 50.
76 | *
77 | * Generated from protobuf field int32 page_size = 1;
78 | * @return int
79 | */
80 | public function getPageSize()
81 | {
82 | return $this->page_size;
83 | }
84 |
85 | /**
86 | * Maximum number of albums to return in the response. Fewer albums might be
87 | * returned than the specified number. The default `pageSize` is 20, the
88 | * maximum is 50.
89 | *
90 | * Generated from protobuf field int32 page_size = 1;
91 | * @param int $var
92 | * @return $this
93 | */
94 | public function setPageSize($var)
95 | {
96 | GPBUtil::checkInt32($var);
97 | $this->page_size = $var;
98 |
99 | return $this;
100 | }
101 |
102 | /**
103 | * A continuation token to get the next page of the results. Adding this to
104 | * the request returns the rows after the `pageToken`. The `pageToken` should
105 | * be the value returned in the `nextPageToken` parameter in the response to
106 | * the `listAlbums` request.
107 | *
108 | * Generated from protobuf field string page_token = 2;
109 | * @return string
110 | */
111 | public function getPageToken()
112 | {
113 | return $this->page_token;
114 | }
115 |
116 | /**
117 | * A continuation token to get the next page of the results. Adding this to
118 | * the request returns the rows after the `pageToken`. The `pageToken` should
119 | * be the value returned in the `nextPageToken` parameter in the response to
120 | * the `listAlbums` request.
121 | *
122 | * Generated from protobuf field string page_token = 2;
123 | * @param string $var
124 | * @return $this
125 | */
126 | public function setPageToken($var)
127 | {
128 | GPBUtil::checkString($var, True);
129 | $this->page_token = $var;
130 |
131 | return $this;
132 | }
133 |
134 | /**
135 | * If set, the results exclude media items that were not created by this app.
136 | * Defaults to false (all albums are returned). This field is ignored if the
137 | * photoslibrary.readonly.appcreateddata scope is used.
138 | *
139 | * Generated from protobuf field bool exclude_non_app_created_data = 3;
140 | * @return bool
141 | */
142 | public function getExcludeNonAppCreatedData()
143 | {
144 | return $this->exclude_non_app_created_data;
145 | }
146 |
147 | /**
148 | * If set, the results exclude media items that were not created by this app.
149 | * Defaults to false (all albums are returned). This field is ignored if the
150 | * photoslibrary.readonly.appcreateddata scope is used.
151 | *
152 | * Generated from protobuf field bool exclude_non_app_created_data = 3;
153 | * @param bool $var
154 | * @return $this
155 | */
156 | public function setExcludeNonAppCreatedData($var)
157 | {
158 | GPBUtil::checkBool($var);
159 | $this->exclude_non_app_created_data = $var;
160 |
161 | return $this;
162 | }
163 |
164 | }
165 |
166 |
--------------------------------------------------------------------------------
/src/Google/Photos/Library/V1/ListAlbumsResponse.php:
--------------------------------------------------------------------------------
1 | google.photos.library.v1.ListAlbumsResponse
15 | */
16 | class ListAlbumsResponse extends \Google\Protobuf\Internal\Message
17 | {
18 | /**
19 | * Output only. List of albums shown in the Albums tab of the user's Google
20 | * Photos app.
21 | *
22 | * Generated from protobuf field repeated .google.photos.types.Album albums = 1;
23 | */
24 | private $albums;
25 | /**
26 | * Output only. Token to use to get the next set of albums. Populated if
27 | * there are more albums to retrieve for this request.
28 | *
29 | * Generated from protobuf field string next_page_token = 2;
30 | */
31 | protected $next_page_token = '';
32 |
33 | /**
34 | * Constructor.
35 | *
36 | * @param array $data {
37 | * Optional. Data for populating the Message object.
38 | *
39 | * @type \Google\Photos\Types\Album[]|\Google\Protobuf\Internal\RepeatedField $albums
40 | * Output only. List of albums shown in the Albums tab of the user's Google
41 | * Photos app.
42 | * @type string $next_page_token
43 | * Output only. Token to use to get the next set of albums. Populated if
44 | * there are more albums to retrieve for this request.
45 | * }
46 | */
47 | public function __construct($data = NULL) {
48 | \GPBMetadata\Google\Photos\Library\V1\PhotosLibrary::initOnce();
49 | parent::__construct($data);
50 | }
51 |
52 | /**
53 | * Output only. List of albums shown in the Albums tab of the user's Google
54 | * Photos app.
55 | *
56 | * Generated from protobuf field repeated .google.photos.types.Album albums = 1;
57 | * @return \Google\Protobuf\Internal\RepeatedField
58 | */
59 | public function getAlbums()
60 | {
61 | return $this->albums;
62 | }
63 |
64 | /**
65 | * Output only. List of albums shown in the Albums tab of the user's Google
66 | * Photos app.
67 | *
68 | * Generated from protobuf field repeated .google.photos.types.Album albums = 1;
69 | * @param \Google\Photos\Types\Album[]|\Google\Protobuf\Internal\RepeatedField $var
70 | * @return $this
71 | */
72 | public function setAlbums($var)
73 | {
74 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Photos\Types\Album::class);
75 | $this->albums = $arr;
76 |
77 | return $this;
78 | }
79 |
80 | /**
81 | * Output only. Token to use to get the next set of albums. Populated if
82 | * there are more albums to retrieve for this request.
83 | *
84 | * Generated from protobuf field string next_page_token = 2;
85 | * @return string
86 | */
87 | public function getNextPageToken()
88 | {
89 | return $this->next_page_token;
90 | }
91 |
92 | /**
93 | * Output only. Token to use to get the next set of albums. Populated if
94 | * there are more albums to retrieve for this request.
95 | *
96 | * Generated from protobuf field string next_page_token = 2;
97 | * @param string $var
98 | * @return $this
99 | */
100 | public function setNextPageToken($var)
101 | {
102 | GPBUtil::checkString($var, True);
103 | $this->next_page_token = $var;
104 |
105 | return $this;
106 | }
107 |
108 | }
109 |
110 |
--------------------------------------------------------------------------------
/src/Google/Photos/Library/V1/ListMediaItemsRequest.php:
--------------------------------------------------------------------------------
1 | google.photos.library.v1.ListMediaItemsRequest
15 | */
16 | class ListMediaItemsRequest extends \Google\Protobuf\Internal\Message
17 | {
18 | /**
19 | * Maximum number of media items to return in the response. Fewer media items
20 | * might be returned than the specified number. The default `pageSize` is 25,
21 | * the maximum is 100.
22 | *
23 | * Generated from protobuf field int32 page_size = 1;
24 | */
25 | protected $page_size = 0;
26 | /**
27 | * A continuation token to get the next page of the results. Adding this to
28 | * the request returns the rows after the `pageToken`. The `pageToken` should
29 | * be the value returned in the `nextPageToken` parameter in the response to
30 | * the `listMediaItems` request.
31 | *
32 | * Generated from protobuf field string page_token = 2;
33 | */
34 | protected $page_token = '';
35 |
36 | /**
37 | * Constructor.
38 | *
39 | * @param array $data {
40 | * Optional. Data for populating the Message object.
41 | *
42 | * @type int $page_size
43 | * Maximum number of media items to return in the response. Fewer media items
44 | * might be returned than the specified number. The default `pageSize` is 25,
45 | * the maximum is 100.
46 | * @type string $page_token
47 | * A continuation token to get the next page of the results. Adding this to
48 | * the request returns the rows after the `pageToken`. The `pageToken` should
49 | * be the value returned in the `nextPageToken` parameter in the response to
50 | * the `listMediaItems` request.
51 | * }
52 | */
53 | public function __construct($data = NULL) {
54 | \GPBMetadata\Google\Photos\Library\V1\PhotosLibrary::initOnce();
55 | parent::__construct($data);
56 | }
57 |
58 | /**
59 | * Maximum number of media items to return in the response. Fewer media items
60 | * might be returned than the specified number. The default `pageSize` is 25,
61 | * the maximum is 100.
62 | *
63 | * Generated from protobuf field int32 page_size = 1;
64 | * @return int
65 | */
66 | public function getPageSize()
67 | {
68 | return $this->page_size;
69 | }
70 |
71 | /**
72 | * Maximum number of media items to return in the response. Fewer media items
73 | * might be returned than the specified number. The default `pageSize` is 25,
74 | * the maximum is 100.
75 | *
76 | * Generated from protobuf field int32 page_size = 1;
77 | * @param int $var
78 | * @return $this
79 | */
80 | public function setPageSize($var)
81 | {
82 | GPBUtil::checkInt32($var);
83 | $this->page_size = $var;
84 |
85 | return $this;
86 | }
87 |
88 | /**
89 | * A continuation token to get the next page of the results. Adding this to
90 | * the request returns the rows after the `pageToken`. The `pageToken` should
91 | * be the value returned in the `nextPageToken` parameter in the response to
92 | * the `listMediaItems` request.
93 | *
94 | * Generated from protobuf field string page_token = 2;
95 | * @return string
96 | */
97 | public function getPageToken()
98 | {
99 | return $this->page_token;
100 | }
101 |
102 | /**
103 | * A continuation token to get the next page of the results. Adding this to
104 | * the request returns the rows after the `pageToken`. The `pageToken` should
105 | * be the value returned in the `nextPageToken` parameter in the response to
106 | * the `listMediaItems` request.
107 | *
108 | * Generated from protobuf field string page_token = 2;
109 | * @param string $var
110 | * @return $this
111 | */
112 | public function setPageToken($var)
113 | {
114 | GPBUtil::checkString($var, True);
115 | $this->page_token = $var;
116 |
117 | return $this;
118 | }
119 |
120 | }
121 |
122 |
--------------------------------------------------------------------------------
/src/Google/Photos/Library/V1/ListMediaItemsResponse.php:
--------------------------------------------------------------------------------
1 | google.photos.library.v1.ListMediaItemsResponse
15 | */
16 | class ListMediaItemsResponse extends \Google\Protobuf\Internal\Message
17 | {
18 | /**
19 | * Output only. List of media items in the user's library.
20 | *
21 | * Generated from protobuf field repeated .google.photos.types.MediaItem media_items = 1;
22 | */
23 | private $media_items;
24 | /**
25 | * Output only. Token to use to get the next set of media items. Its presence
26 | * is the only reliable indicator of more media items being available in the
27 | * next request.
28 | *
29 | * Generated from protobuf field string next_page_token = 2;
30 | */
31 | protected $next_page_token = '';
32 |
33 | /**
34 | * Constructor.
35 | *
36 | * @param array $data {
37 | * Optional. Data for populating the Message object.
38 | *
39 | * @type \Google\Photos\Types\MediaItem[]|\Google\Protobuf\Internal\RepeatedField $media_items
40 | * Output only. List of media items in the user's library.
41 | * @type string $next_page_token
42 | * Output only. Token to use to get the next set of media items. Its presence
43 | * is the only reliable indicator of more media items being available in the
44 | * next request.
45 | * }
46 | */
47 | public function __construct($data = NULL) {
48 | \GPBMetadata\Google\Photos\Library\V1\PhotosLibrary::initOnce();
49 | parent::__construct($data);
50 | }
51 |
52 | /**
53 | * Output only. List of media items in the user's library.
54 | *
55 | * Generated from protobuf field repeated .google.photos.types.MediaItem media_items = 1;
56 | * @return \Google\Protobuf\Internal\RepeatedField
57 | */
58 | public function getMediaItems()
59 | {
60 | return $this->media_items;
61 | }
62 |
63 | /**
64 | * Output only. List of media items in the user's library.
65 | *
66 | * Generated from protobuf field repeated .google.photos.types.MediaItem media_items = 1;
67 | * @param \Google\Photos\Types\MediaItem[]|\Google\Protobuf\Internal\RepeatedField $var
68 | * @return $this
69 | */
70 | public function setMediaItems($var)
71 | {
72 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Photos\Types\MediaItem::class);
73 | $this->media_items = $arr;
74 |
75 | return $this;
76 | }
77 |
78 | /**
79 | * Output only. Token to use to get the next set of media items. Its presence
80 | * is the only reliable indicator of more media items being available in the
81 | * next request.
82 | *
83 | * Generated from protobuf field string next_page_token = 2;
84 | * @return string
85 | */
86 | public function getNextPageToken()
87 | {
88 | return $this->next_page_token;
89 | }
90 |
91 | /**
92 | * Output only. Token to use to get the next set of media items. Its presence
93 | * is the only reliable indicator of more media items being available in the
94 | * next request.
95 | *
96 | * Generated from protobuf field string next_page_token = 2;
97 | * @param string $var
98 | * @return $this
99 | */
100 | public function setNextPageToken($var)
101 | {
102 | GPBUtil::checkString($var, True);
103 | $this->next_page_token = $var;
104 |
105 | return $this;
106 | }
107 |
108 | }
109 |
110 |
--------------------------------------------------------------------------------
/src/Google/Photos/Library/V1/ListSharedAlbumsRequest.php:
--------------------------------------------------------------------------------
1 | google.photos.library.v1.ListSharedAlbumsRequest
17 | */
18 | class ListSharedAlbumsRequest extends \Google\Protobuf\Internal\Message
19 | {
20 | /**
21 | * Maximum number of albums to return in the response. Fewer albums might be
22 | * returned than the specified number. The default `pageSize` is 20, the
23 | * maximum is 50.
24 | *
25 | * Generated from protobuf field int32 page_size = 1;
26 | */
27 | protected $page_size = 0;
28 | /**
29 | * A continuation token to get the next page of the results. Adding this to
30 | * the request returns the rows after the `pageToken`. The `pageToken` should
31 | * be the value returned in the `nextPageToken` parameter in the response to
32 | * the `listSharedAlbums` request.
33 | *
34 | * Generated from protobuf field string page_token = 2;
35 | */
36 | protected $page_token = '';
37 | /**
38 | * If set, the results exclude media items that were not created by this app.
39 | * Defaults to false (all albums are returned). This field is ignored if the
40 | * photoslibrary.readonly.appcreateddata scope is used.
41 | *
42 | * Generated from protobuf field bool exclude_non_app_created_data = 3;
43 | */
44 | protected $exclude_non_app_created_data = false;
45 |
46 | /**
47 | * Constructor.
48 | *
49 | * @param array $data {
50 | * Optional. Data for populating the Message object.
51 | *
52 | * @type int $page_size
53 | * Maximum number of albums to return in the response. Fewer albums might be
54 | * returned than the specified number. The default `pageSize` is 20, the
55 | * maximum is 50.
56 | * @type string $page_token
57 | * A continuation token to get the next page of the results. Adding this to
58 | * the request returns the rows after the `pageToken`. The `pageToken` should
59 | * be the value returned in the `nextPageToken` parameter in the response to
60 | * the `listSharedAlbums` request.
61 | * @type bool $exclude_non_app_created_data
62 | * If set, the results exclude media items that were not created by this app.
63 | * Defaults to false (all albums are returned). This field is ignored if the
64 | * photoslibrary.readonly.appcreateddata scope is used.
65 | * }
66 | */
67 | public function __construct($data = NULL) {
68 | \GPBMetadata\Google\Photos\Library\V1\PhotosLibrary::initOnce();
69 | parent::__construct($data);
70 | }
71 |
72 | /**
73 | * Maximum number of albums to return in the response. Fewer albums might be
74 | * returned than the specified number. The default `pageSize` is 20, the
75 | * maximum is 50.
76 | *
77 | * Generated from protobuf field int32 page_size = 1;
78 | * @return int
79 | */
80 | public function getPageSize()
81 | {
82 | return $this->page_size;
83 | }
84 |
85 | /**
86 | * Maximum number of albums to return in the response. Fewer albums might be
87 | * returned than the specified number. The default `pageSize` is 20, the
88 | * maximum is 50.
89 | *
90 | * Generated from protobuf field int32 page_size = 1;
91 | * @param int $var
92 | * @return $this
93 | */
94 | public function setPageSize($var)
95 | {
96 | GPBUtil::checkInt32($var);
97 | $this->page_size = $var;
98 |
99 | return $this;
100 | }
101 |
102 | /**
103 | * A continuation token to get the next page of the results. Adding this to
104 | * the request returns the rows after the `pageToken`. The `pageToken` should
105 | * be the value returned in the `nextPageToken` parameter in the response to
106 | * the `listSharedAlbums` request.
107 | *
108 | * Generated from protobuf field string page_token = 2;
109 | * @return string
110 | */
111 | public function getPageToken()
112 | {
113 | return $this->page_token;
114 | }
115 |
116 | /**
117 | * A continuation token to get the next page of the results. Adding this to
118 | * the request returns the rows after the `pageToken`. The `pageToken` should
119 | * be the value returned in the `nextPageToken` parameter in the response to
120 | * the `listSharedAlbums` request.
121 | *
122 | * Generated from protobuf field string page_token = 2;
123 | * @param string $var
124 | * @return $this
125 | */
126 | public function setPageToken($var)
127 | {
128 | GPBUtil::checkString($var, True);
129 | $this->page_token = $var;
130 |
131 | return $this;
132 | }
133 |
134 | /**
135 | * If set, the results exclude media items that were not created by this app.
136 | * Defaults to false (all albums are returned). This field is ignored if the
137 | * photoslibrary.readonly.appcreateddata scope is used.
138 | *
139 | * Generated from protobuf field bool exclude_non_app_created_data = 3;
140 | * @return bool
141 | */
142 | public function getExcludeNonAppCreatedData()
143 | {
144 | return $this->exclude_non_app_created_data;
145 | }
146 |
147 | /**
148 | * If set, the results exclude media items that were not created by this app.
149 | * Defaults to false (all albums are returned). This field is ignored if the
150 | * photoslibrary.readonly.appcreateddata scope is used.
151 | *
152 | * Generated from protobuf field bool exclude_non_app_created_data = 3;
153 | * @param bool $var
154 | * @return $this
155 | */
156 | public function setExcludeNonAppCreatedData($var)
157 | {
158 | GPBUtil::checkBool($var);
159 | $this->exclude_non_app_created_data = $var;
160 |
161 | return $this;
162 | }
163 |
164 | }
165 |
166 |
--------------------------------------------------------------------------------
/src/Google/Photos/Library/V1/ListSharedAlbumsResponse.php:
--------------------------------------------------------------------------------
1 | google.photos.library.v1.ListSharedAlbumsResponse
15 | */
16 | class ListSharedAlbumsResponse extends \Google\Protobuf\Internal\Message
17 | {
18 | /**
19 | * Output only. List of shared albums.
20 | *
21 | * Generated from protobuf field repeated .google.photos.types.Album shared_albums = 1;
22 | */
23 | private $shared_albums;
24 | /**
25 | * Output only. Token to use to get the next set of shared albums. Populated
26 | * if there are more shared albums to retrieve for this request.
27 | *
28 | * Generated from protobuf field string next_page_token = 2;
29 | */
30 | protected $next_page_token = '';
31 |
32 | /**
33 | * Constructor.
34 | *
35 | * @param array $data {
36 | * Optional. Data for populating the Message object.
37 | *
38 | * @type \Google\Photos\Types\Album[]|\Google\Protobuf\Internal\RepeatedField $shared_albums
39 | * Output only. List of shared albums.
40 | * @type string $next_page_token
41 | * Output only. Token to use to get the next set of shared albums. Populated
42 | * if there are more shared albums to retrieve for this request.
43 | * }
44 | */
45 | public function __construct($data = NULL) {
46 | \GPBMetadata\Google\Photos\Library\V1\PhotosLibrary::initOnce();
47 | parent::__construct($data);
48 | }
49 |
50 | /**
51 | * Output only. List of shared albums.
52 | *
53 | * Generated from protobuf field repeated .google.photos.types.Album shared_albums = 1;
54 | * @return \Google\Protobuf\Internal\RepeatedField
55 | */
56 | public function getSharedAlbums()
57 | {
58 | return $this->shared_albums;
59 | }
60 |
61 | /**
62 | * Output only. List of shared albums.
63 | *
64 | * Generated from protobuf field repeated .google.photos.types.Album shared_albums = 1;
65 | * @param \Google\Photos\Types\Album[]|\Google\Protobuf\Internal\RepeatedField $var
66 | * @return $this
67 | */
68 | public function setSharedAlbums($var)
69 | {
70 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Photos\Types\Album::class);
71 | $this->shared_albums = $arr;
72 |
73 | return $this;
74 | }
75 |
76 | /**
77 | * Output only. Token to use to get the next set of shared albums. Populated
78 | * if there are more shared albums to retrieve for this request.
79 | *
80 | * Generated from protobuf field string next_page_token = 2;
81 | * @return string
82 | */
83 | public function getNextPageToken()
84 | {
85 | return $this->next_page_token;
86 | }
87 |
88 | /**
89 | * Output only. Token to use to get the next set of shared albums. Populated
90 | * if there are more shared albums to retrieve for this request.
91 | *
92 | * Generated from protobuf field string next_page_token = 2;
93 | * @param string $var
94 | * @return $this
95 | */
96 | public function setNextPageToken($var)
97 | {
98 | GPBUtil::checkString($var, True);
99 | $this->next_page_token = $var;
100 |
101 | return $this;
102 | }
103 |
104 | }
105 |
106 |
--------------------------------------------------------------------------------
/src/Google/Photos/Library/V1/Location.php:
--------------------------------------------------------------------------------
1 | google.photos.library.v1.Location
15 | */
16 | class Location extends \Google\Protobuf\Internal\Message
17 | {
18 | /**
19 | * Name of the location to be displayed.
20 | *
21 | * Generated from protobuf field string location_name = 1;
22 | */
23 | protected $location_name = '';
24 | /**
25 | * Position of the location on the map.
26 | *
27 | * Generated from protobuf field .google.type.LatLng latlng = 2;
28 | */
29 | protected $latlng = null;
30 |
31 | /**
32 | * Constructor.
33 | *
34 | * @param array $data {
35 | * Optional. Data for populating the Message object.
36 | *
37 | * @type string $location_name
38 | * Name of the location to be displayed.
39 | * @type \Google\Type\LatLng $latlng
40 | * Position of the location on the map.
41 | * }
42 | */
43 | public function __construct($data = NULL) {
44 | \GPBMetadata\Google\Photos\Library\V1\PhotosLibrary::initOnce();
45 | parent::__construct($data);
46 | }
47 |
48 | /**
49 | * Name of the location to be displayed.
50 | *
51 | * Generated from protobuf field string location_name = 1;
52 | * @return string
53 | */
54 | public function getLocationName()
55 | {
56 | return $this->location_name;
57 | }
58 |
59 | /**
60 | * Name of the location to be displayed.
61 | *
62 | * Generated from protobuf field string location_name = 1;
63 | * @param string $var
64 | * @return $this
65 | */
66 | public function setLocationName($var)
67 | {
68 | GPBUtil::checkString($var, True);
69 | $this->location_name = $var;
70 |
71 | return $this;
72 | }
73 |
74 | /**
75 | * Position of the location on the map.
76 | *
77 | * Generated from protobuf field .google.type.LatLng latlng = 2;
78 | * @return \Google\Type\LatLng|null
79 | */
80 | public function getLatlng()
81 | {
82 | return isset($this->latlng) ? $this->latlng : null;
83 | }
84 |
85 | public function hasLatlng()
86 | {
87 | return isset($this->latlng);
88 | }
89 |
90 | public function clearLatlng()
91 | {
92 | unset($this->latlng);
93 | }
94 |
95 | /**
96 | * Position of the location on the map.
97 | *
98 | * Generated from protobuf field .google.type.LatLng latlng = 2;
99 | * @param \Google\Type\LatLng $var
100 | * @return $this
101 | */
102 | public function setLatlng($var)
103 | {
104 | GPBUtil::checkMessage($var, \Google\Type\LatLng::class);
105 | $this->latlng = $var;
106 |
107 | return $this;
108 | }
109 |
110 | }
111 |
112 |
--------------------------------------------------------------------------------
/src/Google/Photos/Library/V1/LocationEnrichment.php:
--------------------------------------------------------------------------------
1 | google.photos.library.v1.LocationEnrichment
15 | */
16 | class LocationEnrichment extends \Google\Protobuf\Internal\Message
17 | {
18 | /**
19 | * Location for this enrichment item.
20 | *
21 | * Generated from protobuf field .google.photos.library.v1.Location location = 1;
22 | */
23 | protected $location = null;
24 |
25 | /**
26 | * Constructor.
27 | *
28 | * @param array $data {
29 | * Optional. Data for populating the Message object.
30 | *
31 | * @type \Google\Photos\Library\V1\Location $location
32 | * Location for this enrichment item.
33 | * }
34 | */
35 | public function __construct($data = NULL) {
36 | \GPBMetadata\Google\Photos\Library\V1\PhotosLibrary::initOnce();
37 | parent::__construct($data);
38 | }
39 |
40 | /**
41 | * Location for this enrichment item.
42 | *
43 | * Generated from protobuf field .google.photos.library.v1.Location location = 1;
44 | * @return \Google\Photos\Library\V1\Location|null
45 | */
46 | public function getLocation()
47 | {
48 | return isset($this->location) ? $this->location : null;
49 | }
50 |
51 | public function hasLocation()
52 | {
53 | return isset($this->location);
54 | }
55 |
56 | public function clearLocation()
57 | {
58 | unset($this->location);
59 | }
60 |
61 | /**
62 | * Location for this enrichment item.
63 | *
64 | * Generated from protobuf field .google.photos.library.v1.Location location = 1;
65 | * @param \Google\Photos\Library\V1\Location $var
66 | * @return $this
67 | */
68 | public function setLocation($var)
69 | {
70 | GPBUtil::checkMessage($var, \Google\Photos\Library\V1\Location::class);
71 | $this->location = $var;
72 |
73 | return $this;
74 | }
75 |
76 | }
77 |
78 |
--------------------------------------------------------------------------------
/src/Google/Photos/Library/V1/MapEnrichment.php:
--------------------------------------------------------------------------------
1 | google.photos.library.v1.MapEnrichment
15 | */
16 | class MapEnrichment extends \Google\Protobuf\Internal\Message
17 | {
18 | /**
19 | * Origin location for this enrichment item.
20 | *
21 | * Generated from protobuf field .google.photos.library.v1.Location origin = 1;
22 | */
23 | protected $origin = null;
24 | /**
25 | * Destination location for this enrichemt item.
26 | *
27 | * Generated from protobuf field .google.photos.library.v1.Location destination = 2;
28 | */
29 | protected $destination = null;
30 |
31 | /**
32 | * Constructor.
33 | *
34 | * @param array $data {
35 | * Optional. Data for populating the Message object.
36 | *
37 | * @type \Google\Photos\Library\V1\Location $origin
38 | * Origin location for this enrichment item.
39 | * @type \Google\Photos\Library\V1\Location $destination
40 | * Destination location for this enrichemt item.
41 | * }
42 | */
43 | public function __construct($data = NULL) {
44 | \GPBMetadata\Google\Photos\Library\V1\PhotosLibrary::initOnce();
45 | parent::__construct($data);
46 | }
47 |
48 | /**
49 | * Origin location for this enrichment item.
50 | *
51 | * Generated from protobuf field .google.photos.library.v1.Location origin = 1;
52 | * @return \Google\Photos\Library\V1\Location|null
53 | */
54 | public function getOrigin()
55 | {
56 | return isset($this->origin) ? $this->origin : null;
57 | }
58 |
59 | public function hasOrigin()
60 | {
61 | return isset($this->origin);
62 | }
63 |
64 | public function clearOrigin()
65 | {
66 | unset($this->origin);
67 | }
68 |
69 | /**
70 | * Origin location for this enrichment item.
71 | *
72 | * Generated from protobuf field .google.photos.library.v1.Location origin = 1;
73 | * @param \Google\Photos\Library\V1\Location $var
74 | * @return $this
75 | */
76 | public function setOrigin($var)
77 | {
78 | GPBUtil::checkMessage($var, \Google\Photos\Library\V1\Location::class);
79 | $this->origin = $var;
80 |
81 | return $this;
82 | }
83 |
84 | /**
85 | * Destination location for this enrichemt item.
86 | *
87 | * Generated from protobuf field .google.photos.library.v1.Location destination = 2;
88 | * @return \Google\Photos\Library\V1\Location|null
89 | */
90 | public function getDestination()
91 | {
92 | return isset($this->destination) ? $this->destination : null;
93 | }
94 |
95 | public function hasDestination()
96 | {
97 | return isset($this->destination);
98 | }
99 |
100 | public function clearDestination()
101 | {
102 | unset($this->destination);
103 | }
104 |
105 | /**
106 | * Destination location for this enrichemt item.
107 | *
108 | * Generated from protobuf field .google.photos.library.v1.Location destination = 2;
109 | * @param \Google\Photos\Library\V1\Location $var
110 | * @return $this
111 | */
112 | public function setDestination($var)
113 | {
114 | GPBUtil::checkMessage($var, \Google\Photos\Library\V1\Location::class);
115 | $this->destination = $var;
116 |
117 | return $this;
118 | }
119 |
120 | }
121 |
122 |
--------------------------------------------------------------------------------
/src/Google/Photos/Library/V1/MediaItemResult.php:
--------------------------------------------------------------------------------
1 | google.photos.library.v1.MediaItemResult
15 | */
16 | class MediaItemResult extends \Google\Protobuf\Internal\Message
17 | {
18 | /**
19 | * If an error occurred while accessing this media item, this field
20 | * is populated with information related to the error. For details regarding
21 | * this field, see [Status][google.rpc.Status].
22 | *
23 | * Generated from protobuf field .google.rpc.Status status = 1;
24 | */
25 | protected $status = null;
26 | /**
27 | * Media item retrieved from the user's library. It's populated if no errors
28 | * occurred and the media item was fetched successfully.
29 | *
30 | * Generated from protobuf field .google.photos.types.MediaItem media_item = 2;
31 | */
32 | protected $media_item = null;
33 |
34 | /**
35 | * Constructor.
36 | *
37 | * @param array $data {
38 | * Optional. Data for populating the Message object.
39 | *
40 | * @type \Google\Rpc\Status $status
41 | * If an error occurred while accessing this media item, this field
42 | * is populated with information related to the error. For details regarding
43 | * this field, see [Status][google.rpc.Status].
44 | * @type \Google\Photos\Types\MediaItem $media_item
45 | * Media item retrieved from the user's library. It's populated if no errors
46 | * occurred and the media item was fetched successfully.
47 | * }
48 | */
49 | public function __construct($data = NULL) {
50 | \GPBMetadata\Google\Photos\Library\V1\PhotosLibrary::initOnce();
51 | parent::__construct($data);
52 | }
53 |
54 | /**
55 | * If an error occurred while accessing this media item, this field
56 | * is populated with information related to the error. For details regarding
57 | * this field, see [Status][google.rpc.Status].
58 | *
59 | * Generated from protobuf field .google.rpc.Status status = 1;
60 | * @return \Google\Rpc\Status|null
61 | */
62 | public function getStatus()
63 | {
64 | return isset($this->status) ? $this->status : null;
65 | }
66 |
67 | public function hasStatus()
68 | {
69 | return isset($this->status);
70 | }
71 |
72 | public function clearStatus()
73 | {
74 | unset($this->status);
75 | }
76 |
77 | /**
78 | * If an error occurred while accessing this media item, this field
79 | * is populated with information related to the error. For details regarding
80 | * this field, see [Status][google.rpc.Status].
81 | *
82 | * Generated from protobuf field .google.rpc.Status status = 1;
83 | * @param \Google\Rpc\Status $var
84 | * @return $this
85 | */
86 | public function setStatus($var)
87 | {
88 | GPBUtil::checkMessage($var, \Google\Rpc\Status::class);
89 | $this->status = $var;
90 |
91 | return $this;
92 | }
93 |
94 | /**
95 | * Media item retrieved from the user's library. It's populated if no errors
96 | * occurred and the media item was fetched successfully.
97 | *
98 | * Generated from protobuf field .google.photos.types.MediaItem media_item = 2;
99 | * @return \Google\Photos\Types\MediaItem|null
100 | */
101 | public function getMediaItem()
102 | {
103 | return isset($this->media_item) ? $this->media_item : null;
104 | }
105 |
106 | public function hasMediaItem()
107 | {
108 | return isset($this->media_item);
109 | }
110 |
111 | public function clearMediaItem()
112 | {
113 | unset($this->media_item);
114 | }
115 |
116 | /**
117 | * Media item retrieved from the user's library. It's populated if no errors
118 | * occurred and the media item was fetched successfully.
119 | *
120 | * Generated from protobuf field .google.photos.types.MediaItem media_item = 2;
121 | * @param \Google\Photos\Types\MediaItem $var
122 | * @return $this
123 | */
124 | public function setMediaItem($var)
125 | {
126 | GPBUtil::checkMessage($var, \Google\Photos\Types\MediaItem::class);
127 | $this->media_item = $var;
128 |
129 | return $this;
130 | }
131 |
132 | }
133 |
134 |
--------------------------------------------------------------------------------
/src/Google/Photos/Library/V1/MediaTypeFilter.php:
--------------------------------------------------------------------------------
1 | google.photos.library.v1.MediaTypeFilter
16 | */
17 | class MediaTypeFilter extends \Google\Protobuf\Internal\Message
18 | {
19 | /**
20 | * The types of media items to be included. This field should be populated
21 | * with only one media type. If you specify multiple media types, it results
22 | * in an error.
23 | *
24 | * Generated from protobuf field repeated .google.photos.library.v1.MediaTypeFilter.MediaType media_types = 1;
25 | */
26 | private $media_types;
27 |
28 | /**
29 | * Constructor.
30 | *
31 | * @param array $data {
32 | * Optional. Data for populating the Message object.
33 | *
34 | * @type int[]|\Google\Protobuf\Internal\RepeatedField $media_types
35 | * The types of media items to be included. This field should be populated
36 | * with only one media type. If you specify multiple media types, it results
37 | * in an error.
38 | * }
39 | */
40 | public function __construct($data = NULL) {
41 | \GPBMetadata\Google\Photos\Library\V1\PhotosLibrary::initOnce();
42 | parent::__construct($data);
43 | }
44 |
45 | /**
46 | * The types of media items to be included. This field should be populated
47 | * with only one media type. If you specify multiple media types, it results
48 | * in an error.
49 | *
50 | * Generated from protobuf field repeated .google.photos.library.v1.MediaTypeFilter.MediaType media_types = 1;
51 | * @return \Google\Protobuf\Internal\RepeatedField
52 | */
53 | public function getMediaTypes()
54 | {
55 | return $this->media_types;
56 | }
57 |
58 | /**
59 | * The types of media items to be included. This field should be populated
60 | * with only one media type. If you specify multiple media types, it results
61 | * in an error.
62 | *
63 | * Generated from protobuf field repeated .google.photos.library.v1.MediaTypeFilter.MediaType media_types = 1;
64 | * @param int[]|\Google\Protobuf\Internal\RepeatedField $var
65 | * @return $this
66 | */
67 | public function setMediaTypes($var)
68 | {
69 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Photos\Library\V1\MediaTypeFilter\MediaType::class);
70 | $this->media_types = $arr;
71 |
72 | return $this;
73 | }
74 |
75 | }
76 |
77 |
--------------------------------------------------------------------------------
/src/Google/Photos/Library/V1/MediaTypeFilter/MediaType.php:
--------------------------------------------------------------------------------
1 | google.photos.library.v1.MediaTypeFilter.MediaType
13 | */
14 | class MediaType
15 | {
16 | /**
17 | * Treated as if no filters are applied. All media types are included.
18 | *
19 | * Generated from protobuf enum ALL_MEDIA = 0;
20 | */
21 | const ALL_MEDIA = 0;
22 | /**
23 | * All media items that are considered videos.
24 | * This also includes movies the user has created using the Google Photos
25 | * app.
26 | *
27 | * Generated from protobuf enum VIDEO = 1;
28 | */
29 | const VIDEO = 1;
30 | /**
31 | * All media items that are considered photos. This includes .bmp, .gif,
32 | * .ico, .jpg (and other spellings), .tiff, .webp and special photo types
33 | * such as iOS live photos, Android motion photos, panoramas, photospheres.
34 | *
35 | * Generated from protobuf enum PHOTO = 2;
36 | */
37 | const PHOTO = 2;
38 |
39 | private static $valueToName = [
40 | self::ALL_MEDIA => 'ALL_MEDIA',
41 | self::VIDEO => 'VIDEO',
42 | self::PHOTO => 'PHOTO',
43 | ];
44 |
45 | public static function name($value)
46 | {
47 | if (!isset(self::$valueToName[$value])) {
48 | throw new UnexpectedValueException(sprintf(
49 | 'Enum %s has no name defined for value %s', __CLASS__, $value));
50 | }
51 | return self::$valueToName[$value];
52 | }
53 |
54 |
55 | public static function value($name)
56 | {
57 | $const = __CLASS__ . '::' . strtoupper($name);
58 | if (!defined($const)) {
59 | throw new UnexpectedValueException(sprintf(
60 | 'Enum %s has no value defined for name %s', __CLASS__, $name));
61 | }
62 | return constant($const);
63 | }
64 | }
65 |
66 | // Adding a class alias for backwards compatibility with the previous class name.
67 | class_alias(MediaType::class, \Google\Photos\Library\V1\MediaTypeFilter_MediaType::class);
68 |
69 |
--------------------------------------------------------------------------------
/src/Google/Photos/Library/V1/MediaTypeFilter_MediaType.php:
--------------------------------------------------------------------------------
1 | google.photos.library.v1.NewEnrichmentItem
16 | */
17 | class NewEnrichmentItem extends \Google\Protobuf\Internal\Message
18 | {
19 | protected $enrichment;
20 |
21 | /**
22 | * Constructor.
23 | *
24 | * @param array $data {
25 | * Optional. Data for populating the Message object.
26 | *
27 | * @type \Google\Photos\Library\V1\TextEnrichment $text_enrichment
28 | * Text to be added to the album.
29 | * @type \Google\Photos\Library\V1\LocationEnrichment $location_enrichment
30 | * Location to be added to the album.
31 | * @type \Google\Photos\Library\V1\MapEnrichment $map_enrichment
32 | * Map to be added to the album.
33 | * }
34 | */
35 | public function __construct($data = NULL) {
36 | \GPBMetadata\Google\Photos\Library\V1\PhotosLibrary::initOnce();
37 | parent::__construct($data);
38 | }
39 |
40 | /**
41 | * Text to be added to the album.
42 | *
43 | * Generated from protobuf field .google.photos.library.v1.TextEnrichment text_enrichment = 1;
44 | * @return \Google\Photos\Library\V1\TextEnrichment|null
45 | */
46 | public function getTextEnrichment()
47 | {
48 | return $this->readOneof(1);
49 | }
50 |
51 | public function hasTextEnrichment()
52 | {
53 | return $this->hasOneof(1);
54 | }
55 |
56 | /**
57 | * Text to be added to the album.
58 | *
59 | * Generated from protobuf field .google.photos.library.v1.TextEnrichment text_enrichment = 1;
60 | * @param \Google\Photos\Library\V1\TextEnrichment $var
61 | * @return $this
62 | */
63 | public function setTextEnrichment($var)
64 | {
65 | GPBUtil::checkMessage($var, \Google\Photos\Library\V1\TextEnrichment::class);
66 | $this->writeOneof(1, $var);
67 |
68 | return $this;
69 | }
70 |
71 | /**
72 | * Location to be added to the album.
73 | *
74 | * Generated from protobuf field .google.photos.library.v1.LocationEnrichment location_enrichment = 2;
75 | * @return \Google\Photos\Library\V1\LocationEnrichment|null
76 | */
77 | public function getLocationEnrichment()
78 | {
79 | return $this->readOneof(2);
80 | }
81 |
82 | public function hasLocationEnrichment()
83 | {
84 | return $this->hasOneof(2);
85 | }
86 |
87 | /**
88 | * Location to be added to the album.
89 | *
90 | * Generated from protobuf field .google.photos.library.v1.LocationEnrichment location_enrichment = 2;
91 | * @param \Google\Photos\Library\V1\LocationEnrichment $var
92 | * @return $this
93 | */
94 | public function setLocationEnrichment($var)
95 | {
96 | GPBUtil::checkMessage($var, \Google\Photos\Library\V1\LocationEnrichment::class);
97 | $this->writeOneof(2, $var);
98 |
99 | return $this;
100 | }
101 |
102 | /**
103 | * Map to be added to the album.
104 | *
105 | * Generated from protobuf field .google.photos.library.v1.MapEnrichment map_enrichment = 3;
106 | * @return \Google\Photos\Library\V1\MapEnrichment|null
107 | */
108 | public function getMapEnrichment()
109 | {
110 | return $this->readOneof(3);
111 | }
112 |
113 | public function hasMapEnrichment()
114 | {
115 | return $this->hasOneof(3);
116 | }
117 |
118 | /**
119 | * Map to be added to the album.
120 | *
121 | * Generated from protobuf field .google.photos.library.v1.MapEnrichment map_enrichment = 3;
122 | * @param \Google\Photos\Library\V1\MapEnrichment $var
123 | * @return $this
124 | */
125 | public function setMapEnrichment($var)
126 | {
127 | GPBUtil::checkMessage($var, \Google\Photos\Library\V1\MapEnrichment::class);
128 | $this->writeOneof(3, $var);
129 |
130 | return $this;
131 | }
132 |
133 | /**
134 | * @return string
135 | */
136 | public function getEnrichment()
137 | {
138 | return $this->whichOneof("enrichment");
139 | }
140 |
141 | }
142 |
143 |
--------------------------------------------------------------------------------
/src/Google/Photos/Library/V1/NewMediaItem.php:
--------------------------------------------------------------------------------
1 | google.photos.library.v1.NewMediaItem
15 | */
16 | class NewMediaItem extends \Google\Protobuf\Internal\Message
17 | {
18 | /**
19 | * Description of the media item. This will be shown to the user in the item's
20 | * info section in the Google Photos app.
21 | * This string shouldn't be more than 1000 characters.
22 | *
23 | * Generated from protobuf field string description = 1;
24 | */
25 | protected $description = '';
26 | protected $new_media_item_type;
27 |
28 | /**
29 | * Constructor.
30 | *
31 | * @param array $data {
32 | * Optional. Data for populating the Message object.
33 | *
34 | * @type string $description
35 | * Description of the media item. This will be shown to the user in the item's
36 | * info section in the Google Photos app.
37 | * This string shouldn't be more than 1000 characters.
38 | * @type \Google\Photos\Library\V1\SimpleMediaItem $simple_media_item
39 | * A new media item that has been uploaded via the included `uploadToken`.
40 | * }
41 | */
42 | public function __construct($data = NULL) {
43 | \GPBMetadata\Google\Photos\Library\V1\PhotosLibrary::initOnce();
44 | parent::__construct($data);
45 | }
46 |
47 | /**
48 | * Description of the media item. This will be shown to the user in the item's
49 | * info section in the Google Photos app.
50 | * This string shouldn't be more than 1000 characters.
51 | *
52 | * Generated from protobuf field string description = 1;
53 | * @return string
54 | */
55 | public function getDescription()
56 | {
57 | return $this->description;
58 | }
59 |
60 | /**
61 | * Description of the media item. This will be shown to the user in the item's
62 | * info section in the Google Photos app.
63 | * This string shouldn't be more than 1000 characters.
64 | *
65 | * Generated from protobuf field string description = 1;
66 | * @param string $var
67 | * @return $this
68 | */
69 | public function setDescription($var)
70 | {
71 | GPBUtil::checkString($var, True);
72 | $this->description = $var;
73 |
74 | return $this;
75 | }
76 |
77 | /**
78 | * A new media item that has been uploaded via the included `uploadToken`.
79 | *
80 | * Generated from protobuf field .google.photos.library.v1.SimpleMediaItem simple_media_item = 2;
81 | * @return \Google\Photos\Library\V1\SimpleMediaItem|null
82 | */
83 | public function getSimpleMediaItem()
84 | {
85 | return $this->readOneof(2);
86 | }
87 |
88 | public function hasSimpleMediaItem()
89 | {
90 | return $this->hasOneof(2);
91 | }
92 |
93 | /**
94 | * A new media item that has been uploaded via the included `uploadToken`.
95 | *
96 | * Generated from protobuf field .google.photos.library.v1.SimpleMediaItem simple_media_item = 2;
97 | * @param \Google\Photos\Library\V1\SimpleMediaItem $var
98 | * @return $this
99 | */
100 | public function setSimpleMediaItem($var)
101 | {
102 | GPBUtil::checkMessage($var, \Google\Photos\Library\V1\SimpleMediaItem::class);
103 | $this->writeOneof(2, $var);
104 |
105 | return $this;
106 | }
107 |
108 | /**
109 | * @return string
110 | */
111 | public function getNewMediaItemType()
112 | {
113 | return $this->whichOneof("new_media_item_type");
114 | }
115 |
116 | }
117 |
118 |
--------------------------------------------------------------------------------
/src/Google/Photos/Library/V1/NewMediaItemResult.php:
--------------------------------------------------------------------------------
1 | google.photos.library.v1.NewMediaItemResult
15 | */
16 | class NewMediaItemResult extends \Google\Protobuf\Internal\Message
17 | {
18 | /**
19 | * The upload token used to create this new media item.
20 | *
21 | * Generated from protobuf field string upload_token = 1;
22 | */
23 | protected $upload_token = '';
24 | /**
25 | * If an error occurred during the creation of this media item, this field
26 | * is populated with information related to the error. For details regarding
27 | * this field, see Status.
28 | *
29 | * Generated from protobuf field .google.rpc.Status status = 2;
30 | */
31 | protected $status = null;
32 | /**
33 | * Media item created with the upload token. It's populated if no errors
34 | * occurred and the media item was created successfully.
35 | *
36 | * Generated from protobuf field .google.photos.types.MediaItem media_item = 3;
37 | */
38 | protected $media_item = null;
39 |
40 | /**
41 | * Constructor.
42 | *
43 | * @param array $data {
44 | * Optional. Data for populating the Message object.
45 | *
46 | * @type string $upload_token
47 | * The upload token used to create this new media item.
48 | * @type \Google\Rpc\Status $status
49 | * If an error occurred during the creation of this media item, this field
50 | * is populated with information related to the error. For details regarding
51 | * this field, see Status.
52 | * @type \Google\Photos\Types\MediaItem $media_item
53 | * Media item created with the upload token. It's populated if no errors
54 | * occurred and the media item was created successfully.
55 | * }
56 | */
57 | public function __construct($data = NULL) {
58 | \GPBMetadata\Google\Photos\Library\V1\PhotosLibrary::initOnce();
59 | parent::__construct($data);
60 | }
61 |
62 | /**
63 | * The upload token used to create this new media item.
64 | *
65 | * Generated from protobuf field string upload_token = 1;
66 | * @return string
67 | */
68 | public function getUploadToken()
69 | {
70 | return $this->upload_token;
71 | }
72 |
73 | /**
74 | * The upload token used to create this new media item.
75 | *
76 | * Generated from protobuf field string upload_token = 1;
77 | * @param string $var
78 | * @return $this
79 | */
80 | public function setUploadToken($var)
81 | {
82 | GPBUtil::checkString($var, True);
83 | $this->upload_token = $var;
84 |
85 | return $this;
86 | }
87 |
88 | /**
89 | * If an error occurred during the creation of this media item, this field
90 | * is populated with information related to the error. For details regarding
91 | * this field, see Status.
92 | *
93 | * Generated from protobuf field .google.rpc.Status status = 2;
94 | * @return \Google\Rpc\Status|null
95 | */
96 | public function getStatus()
97 | {
98 | return isset($this->status) ? $this->status : null;
99 | }
100 |
101 | public function hasStatus()
102 | {
103 | return isset($this->status);
104 | }
105 |
106 | public function clearStatus()
107 | {
108 | unset($this->status);
109 | }
110 |
111 | /**
112 | * If an error occurred during the creation of this media item, this field
113 | * is populated with information related to the error. For details regarding
114 | * this field, see Status.
115 | *
116 | * Generated from protobuf field .google.rpc.Status status = 2;
117 | * @param \Google\Rpc\Status $var
118 | * @return $this
119 | */
120 | public function setStatus($var)
121 | {
122 | GPBUtil::checkMessage($var, \Google\Rpc\Status::class);
123 | $this->status = $var;
124 |
125 | return $this;
126 | }
127 |
128 | /**
129 | * Media item created with the upload token. It's populated if no errors
130 | * occurred and the media item was created successfully.
131 | *
132 | * Generated from protobuf field .google.photos.types.MediaItem media_item = 3;
133 | * @return \Google\Photos\Types\MediaItem|null
134 | */
135 | public function getMediaItem()
136 | {
137 | return isset($this->media_item) ? $this->media_item : null;
138 | }
139 |
140 | public function hasMediaItem()
141 | {
142 | return isset($this->media_item);
143 | }
144 |
145 | public function clearMediaItem()
146 | {
147 | unset($this->media_item);
148 | }
149 |
150 | /**
151 | * Media item created with the upload token. It's populated if no errors
152 | * occurred and the media item was created successfully.
153 | *
154 | * Generated from protobuf field .google.photos.types.MediaItem media_item = 3;
155 | * @param \Google\Photos\Types\MediaItem $var
156 | * @return $this
157 | */
158 | public function setMediaItem($var)
159 | {
160 | GPBUtil::checkMessage($var, \Google\Photos\Types\MediaItem::class);
161 | $this->media_item = $var;
162 |
163 | return $this;
164 | }
165 |
166 | }
167 |
168 |
--------------------------------------------------------------------------------
/src/Google/Photos/Library/V1/SearchMediaItemsResponse.php:
--------------------------------------------------------------------------------
1 | google.photos.library.v1.SearchMediaItemsResponse
15 | */
16 | class SearchMediaItemsResponse extends \Google\Protobuf\Internal\Message
17 | {
18 | /**
19 | * Output only. List of media items that match the search parameters.
20 | *
21 | * Generated from protobuf field repeated .google.photos.types.MediaItem media_items = 1;
22 | */
23 | private $media_items;
24 | /**
25 | * Output only. Use this token to get the next set of media items. Its
26 | * presence is the only reliable indicator of more media items being available
27 | * in the next request.
28 | *
29 | * Generated from protobuf field string next_page_token = 2;
30 | */
31 | protected $next_page_token = '';
32 |
33 | /**
34 | * Constructor.
35 | *
36 | * @param array $data {
37 | * Optional. Data for populating the Message object.
38 | *
39 | * @type \Google\Photos\Types\MediaItem[]|\Google\Protobuf\Internal\RepeatedField $media_items
40 | * Output only. List of media items that match the search parameters.
41 | * @type string $next_page_token
42 | * Output only. Use this token to get the next set of media items. Its
43 | * presence is the only reliable indicator of more media items being available
44 | * in the next request.
45 | * }
46 | */
47 | public function __construct($data = NULL) {
48 | \GPBMetadata\Google\Photos\Library\V1\PhotosLibrary::initOnce();
49 | parent::__construct($data);
50 | }
51 |
52 | /**
53 | * Output only. List of media items that match the search parameters.
54 | *
55 | * Generated from protobuf field repeated .google.photos.types.MediaItem media_items = 1;
56 | * @return \Google\Protobuf\Internal\RepeatedField
57 | */
58 | public function getMediaItems()
59 | {
60 | return $this->media_items;
61 | }
62 |
63 | /**
64 | * Output only. List of media items that match the search parameters.
65 | *
66 | * Generated from protobuf field repeated .google.photos.types.MediaItem media_items = 1;
67 | * @param \Google\Photos\Types\MediaItem[]|\Google\Protobuf\Internal\RepeatedField $var
68 | * @return $this
69 | */
70 | public function setMediaItems($var)
71 | {
72 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Photos\Types\MediaItem::class);
73 | $this->media_items = $arr;
74 |
75 | return $this;
76 | }
77 |
78 | /**
79 | * Output only. Use this token to get the next set of media items. Its
80 | * presence is the only reliable indicator of more media items being available
81 | * in the next request.
82 | *
83 | * Generated from protobuf field string next_page_token = 2;
84 | * @return string
85 | */
86 | public function getNextPageToken()
87 | {
88 | return $this->next_page_token;
89 | }
90 |
91 | /**
92 | * Output only. Use this token to get the next set of media items. Its
93 | * presence is the only reliable indicator of more media items being available
94 | * in the next request.
95 | *
96 | * Generated from protobuf field string next_page_token = 2;
97 | * @param string $var
98 | * @return $this
99 | */
100 | public function setNextPageToken($var)
101 | {
102 | GPBUtil::checkString($var, True);
103 | $this->next_page_token = $var;
104 |
105 | return $this;
106 | }
107 |
108 | }
109 |
110 |
--------------------------------------------------------------------------------
/src/Google/Photos/Library/V1/ShareAlbumRequest.php:
--------------------------------------------------------------------------------
1 | google.photos.library.v1.ShareAlbumRequest
15 | */
16 | class ShareAlbumRequest extends \Google\Protobuf\Internal\Message
17 | {
18 | /**
19 | * Required. Identifier of the album to be shared. This `albumId` must belong to an
20 | * album created by the developer.
21 | *
22 | * Generated from protobuf field string album_id = 1 [(.google.api.field_behavior) = REQUIRED];
23 | */
24 | protected $album_id = '';
25 | /**
26 | * Options to be set when converting the album to a shared album.
27 | *
28 | * Generated from protobuf field .google.photos.types.SharedAlbumOptions shared_album_options = 2;
29 | */
30 | protected $shared_album_options = null;
31 |
32 | /**
33 | * Constructor.
34 | *
35 | * @param array $data {
36 | * Optional. Data for populating the Message object.
37 | *
38 | * @type string $album_id
39 | * Required. Identifier of the album to be shared. This `albumId` must belong to an
40 | * album created by the developer.
41 | * @type \Google\Photos\Types\SharedAlbumOptions $shared_album_options
42 | * Options to be set when converting the album to a shared album.
43 | * }
44 | */
45 | public function __construct($data = NULL) {
46 | \GPBMetadata\Google\Photos\Library\V1\PhotosLibrary::initOnce();
47 | parent::__construct($data);
48 | }
49 |
50 | /**
51 | * Required. Identifier of the album to be shared. This `albumId` must belong to an
52 | * album created by the developer.
53 | *
54 | * Generated from protobuf field string album_id = 1 [(.google.api.field_behavior) = REQUIRED];
55 | * @return string
56 | */
57 | public function getAlbumId()
58 | {
59 | return $this->album_id;
60 | }
61 |
62 | /**
63 | * Required. Identifier of the album to be shared. This `albumId` must belong to an
64 | * album created by the developer.
65 | *
66 | * Generated from protobuf field string album_id = 1 [(.google.api.field_behavior) = REQUIRED];
67 | * @param string $var
68 | * @return $this
69 | */
70 | public function setAlbumId($var)
71 | {
72 | GPBUtil::checkString($var, True);
73 | $this->album_id = $var;
74 |
75 | return $this;
76 | }
77 |
78 | /**
79 | * Options to be set when converting the album to a shared album.
80 | *
81 | * Generated from protobuf field .google.photos.types.SharedAlbumOptions shared_album_options = 2;
82 | * @return \Google\Photos\Types\SharedAlbumOptions|null
83 | */
84 | public function getSharedAlbumOptions()
85 | {
86 | return isset($this->shared_album_options) ? $this->shared_album_options : null;
87 | }
88 |
89 | public function hasSharedAlbumOptions()
90 | {
91 | return isset($this->shared_album_options);
92 | }
93 |
94 | public function clearSharedAlbumOptions()
95 | {
96 | unset($this->shared_album_options);
97 | }
98 |
99 | /**
100 | * Options to be set when converting the album to a shared album.
101 | *
102 | * Generated from protobuf field .google.photos.types.SharedAlbumOptions shared_album_options = 2;
103 | * @param \Google\Photos\Types\SharedAlbumOptions $var
104 | * @return $this
105 | */
106 | public function setSharedAlbumOptions($var)
107 | {
108 | GPBUtil::checkMessage($var, \Google\Photos\Types\SharedAlbumOptions::class);
109 | $this->shared_album_options = $var;
110 |
111 | return $this;
112 | }
113 |
114 | }
115 |
116 |
--------------------------------------------------------------------------------
/src/Google/Photos/Library/V1/ShareAlbumResponse.php:
--------------------------------------------------------------------------------
1 | google.photos.library.v1.ShareAlbumResponse
15 | */
16 | class ShareAlbumResponse extends \Google\Protobuf\Internal\Message
17 | {
18 | /**
19 | * Output only. Information about the shared album.
20 | *
21 | * Generated from protobuf field .google.photos.types.ShareInfo share_info = 1;
22 | */
23 | protected $share_info = null;
24 |
25 | /**
26 | * Constructor.
27 | *
28 | * @param array $data {
29 | * Optional. Data for populating the Message object.
30 | *
31 | * @type \Google\Photos\Types\ShareInfo $share_info
32 | * Output only. Information about the shared album.
33 | * }
34 | */
35 | public function __construct($data = NULL) {
36 | \GPBMetadata\Google\Photos\Library\V1\PhotosLibrary::initOnce();
37 | parent::__construct($data);
38 | }
39 |
40 | /**
41 | * Output only. Information about the shared album.
42 | *
43 | * Generated from protobuf field .google.photos.types.ShareInfo share_info = 1;
44 | * @return \Google\Photos\Types\ShareInfo|null
45 | */
46 | public function getShareInfo()
47 | {
48 | return isset($this->share_info) ? $this->share_info : null;
49 | }
50 |
51 | public function hasShareInfo()
52 | {
53 | return isset($this->share_info);
54 | }
55 |
56 | public function clearShareInfo()
57 | {
58 | unset($this->share_info);
59 | }
60 |
61 | /**
62 | * Output only. Information about the shared album.
63 | *
64 | * Generated from protobuf field .google.photos.types.ShareInfo share_info = 1;
65 | * @param \Google\Photos\Types\ShareInfo $var
66 | * @return $this
67 | */
68 | public function setShareInfo($var)
69 | {
70 | GPBUtil::checkMessage($var, \Google\Photos\Types\ShareInfo::class);
71 | $this->share_info = $var;
72 |
73 | return $this;
74 | }
75 |
76 | }
77 |
78 |
--------------------------------------------------------------------------------
/src/Google/Photos/Library/V1/SimpleMediaItem.php:
--------------------------------------------------------------------------------
1 | google.photos.library.v1.SimpleMediaItem
15 | */
16 | class SimpleMediaItem extends \Google\Protobuf\Internal\Message
17 | {
18 | /**
19 | * Token identifying the media bytes that have been uploaded to Google.
20 | *
21 | * Generated from protobuf field string upload_token = 1;
22 | */
23 | protected $upload_token = '';
24 | /**
25 | * File name with extension of the media item. This is shown to the user in
26 | * Google Photos. The file name specified during the byte
28 | * upload process is ignored if this field is set. The file name,
29 | * including the file extension, shouldn't be more than 255 characters. This
30 | * is an optional field.
31 | *
32 | * Generated from protobuf field string file_name = 2;
33 | */
34 | protected $file_name = '';
35 |
36 | /**
37 | * Constructor.
38 | *
39 | * @param array $data {
40 | * Optional. Data for populating the Message object.
41 | *
42 | * @type string $upload_token
43 | * Token identifying the media bytes that have been uploaded to Google.
44 | * @type string $file_name
45 | * File name with extension of the media item. This is shown to the user in
46 | * Google Photos. The file name specified during the byte
48 | * upload process is ignored if this field is set. The file name,
49 | * including the file extension, shouldn't be more than 255 characters. This
50 | * is an optional field.
51 | * }
52 | */
53 | public function __construct($data = NULL) {
54 | \GPBMetadata\Google\Photos\Library\V1\PhotosLibrary::initOnce();
55 | parent::__construct($data);
56 | }
57 |
58 | /**
59 | * Token identifying the media bytes that have been uploaded to Google.
60 | *
61 | * Generated from protobuf field string upload_token = 1;
62 | * @return string
63 | */
64 | public function getUploadToken()
65 | {
66 | return $this->upload_token;
67 | }
68 |
69 | /**
70 | * Token identifying the media bytes that have been uploaded to Google.
71 | *
72 | * Generated from protobuf field string upload_token = 1;
73 | * @param string $var
74 | * @return $this
75 | */
76 | public function setUploadToken($var)
77 | {
78 | GPBUtil::checkString($var, True);
79 | $this->upload_token = $var;
80 |
81 | return $this;
82 | }
83 |
84 | /**
85 | * File name with extension of the media item. This is shown to the user in
86 | * Google Photos. The file name specified during the byte
88 | * upload process is ignored if this field is set. The file name,
89 | * including the file extension, shouldn't be more than 255 characters. This
90 | * is an optional field.
91 | *
92 | * Generated from protobuf field string file_name = 2;
93 | * @return string
94 | */
95 | public function getFileName()
96 | {
97 | return $this->file_name;
98 | }
99 |
100 | /**
101 | * File name with extension of the media item. This is shown to the user in
102 | * Google Photos. The file name specified during the byte
104 | * upload process is ignored if this field is set. The file name,
105 | * including the file extension, shouldn't be more than 255 characters. This
106 | * is an optional field.
107 | *
108 | * Generated from protobuf field string file_name = 2;
109 | * @param string $var
110 | * @return $this
111 | */
112 | public function setFileName($var)
113 | {
114 | GPBUtil::checkString($var, True);
115 | $this->file_name = $var;
116 |
117 | return $this;
118 | }
119 |
120 | }
121 |
122 |
--------------------------------------------------------------------------------
/src/Google/Photos/Library/V1/TextEnrichment.php:
--------------------------------------------------------------------------------
1 | google.photos.library.v1.TextEnrichment
15 | */
16 | class TextEnrichment extends \Google\Protobuf\Internal\Message
17 | {
18 | /**
19 | * Text for this enrichment item.
20 | *
21 | * Generated from protobuf field string text = 1;
22 | */
23 | protected $text = '';
24 |
25 | /**
26 | * Constructor.
27 | *
28 | * @param array $data {
29 | * Optional. Data for populating the Message object.
30 | *
31 | * @type string $text
32 | * Text for this enrichment item.
33 | * }
34 | */
35 | public function __construct($data = NULL) {
36 | \GPBMetadata\Google\Photos\Library\V1\PhotosLibrary::initOnce();
37 | parent::__construct($data);
38 | }
39 |
40 | /**
41 | * Text for this enrichment item.
42 | *
43 | * Generated from protobuf field string text = 1;
44 | * @return string
45 | */
46 | public function getText()
47 | {
48 | return $this->text;
49 | }
50 |
51 | /**
52 | * Text for this enrichment item.
53 | *
54 | * Generated from protobuf field string text = 1;
55 | * @param string $var
56 | * @return $this
57 | */
58 | public function setText($var)
59 | {
60 | GPBUtil::checkString($var, True);
61 | $this->text = $var;
62 |
63 | return $this;
64 | }
65 |
66 | }
67 |
68 |
--------------------------------------------------------------------------------
/src/Google/Photos/Library/V1/UnshareAlbumRequest.php:
--------------------------------------------------------------------------------
1 | google.photos.library.v1.UnshareAlbumRequest
15 | */
16 | class UnshareAlbumRequest extends \Google\Protobuf\Internal\Message
17 | {
18 | /**
19 | * Required. Identifier of the album to be unshared. This album id must belong to an
20 | * album created by the developer.
21 | *
22 | * Generated from protobuf field string album_id = 1 [(.google.api.field_behavior) = REQUIRED];
23 | */
24 | protected $album_id = '';
25 |
26 | /**
27 | * Constructor.
28 | *
29 | * @param array $data {
30 | * Optional. Data for populating the Message object.
31 | *
32 | * @type string $album_id
33 | * Required. Identifier of the album to be unshared. This album id must belong to an
34 | * album created by the developer.
35 | * }
36 | */
37 | public function __construct($data = NULL) {
38 | \GPBMetadata\Google\Photos\Library\V1\PhotosLibrary::initOnce();
39 | parent::__construct($data);
40 | }
41 |
42 | /**
43 | * Required. Identifier of the album to be unshared. This album id must belong to an
44 | * album created by the developer.
45 | *
46 | * Generated from protobuf field string album_id = 1 [(.google.api.field_behavior) = REQUIRED];
47 | * @return string
48 | */
49 | public function getAlbumId()
50 | {
51 | return $this->album_id;
52 | }
53 |
54 | /**
55 | * Required. Identifier of the album to be unshared. This album id must belong to an
56 | * album created by the developer.
57 | *
58 | * Generated from protobuf field string album_id = 1 [(.google.api.field_behavior) = REQUIRED];
59 | * @param string $var
60 | * @return $this
61 | */
62 | public function setAlbumId($var)
63 | {
64 | GPBUtil::checkString($var, True);
65 | $this->album_id = $var;
66 |
67 | return $this;
68 | }
69 |
70 | }
71 |
72 |
--------------------------------------------------------------------------------
/src/Google/Photos/Library/V1/UnshareAlbumResponse.php:
--------------------------------------------------------------------------------
1 | google.photos.library.v1.UnshareAlbumResponse
15 | */
16 | class UnshareAlbumResponse extends \Google\Protobuf\Internal\Message
17 | {
18 |
19 | /**
20 | * Constructor.
21 | *
22 | * @param array $data {
23 | * Optional. Data for populating the Message object.
24 | *
25 | * }
26 | */
27 | public function __construct($data = NULL) {
28 | \GPBMetadata\Google\Photos\Library\V1\PhotosLibrary::initOnce();
29 | parent::__construct($data);
30 | }
31 |
32 | }
33 |
34 |
--------------------------------------------------------------------------------
/src/Google/Photos/Library/V1/UpdateAlbumRequest.php:
--------------------------------------------------------------------------------
1 | google.photos.library.v1.UpdateAlbumRequest
15 | */
16 | class UpdateAlbumRequest extends \Google\Protobuf\Internal\Message
17 | {
18 | /**
19 | * Required. The [Album][google.photos.types.Album] to update.
20 | * The album’s `id` field is used to identify the album to be updated.
21 | * The album’s `title` field is used to set the new album title.
22 | * The album’s `cover_photo_media_item_id` field is used to set the new album
23 | * cover photo.
24 | *
25 | * Generated from protobuf field .google.photos.types.Album album = 1 [(.google.api.field_behavior) = REQUIRED];
26 | */
27 | protected $album = null;
28 | /**
29 | * Required. Indicate what fields in the provided album to update.
30 | * The only valid values are `title` and `cover_photo_media_item_id`.
31 | *
32 | * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];
33 | */
34 | protected $update_mask = null;
35 |
36 | /**
37 | * Constructor.
38 | *
39 | * @param array $data {
40 | * Optional. Data for populating the Message object.
41 | *
42 | * @type \Google\Photos\Types\Album $album
43 | * Required. The [Album][google.photos.types.Album] to update.
44 | * The album’s `id` field is used to identify the album to be updated.
45 | * The album’s `title` field is used to set the new album title.
46 | * The album’s `cover_photo_media_item_id` field is used to set the new album
47 | * cover photo.
48 | * @type \Google\Protobuf\FieldMask $update_mask
49 | * Required. Indicate what fields in the provided album to update.
50 | * The only valid values are `title` and `cover_photo_media_item_id`.
51 | * }
52 | */
53 | public function __construct($data = NULL) {
54 | \GPBMetadata\Google\Photos\Library\V1\PhotosLibrary::initOnce();
55 | parent::__construct($data);
56 | }
57 |
58 | /**
59 | * Required. The [Album][google.photos.types.Album] to update.
60 | * The album’s `id` field is used to identify the album to be updated.
61 | * The album’s `title` field is used to set the new album title.
62 | * The album’s `cover_photo_media_item_id` field is used to set the new album
63 | * cover photo.
64 | *
65 | * Generated from protobuf field .google.photos.types.Album album = 1 [(.google.api.field_behavior) = REQUIRED];
66 | * @return \Google\Photos\Types\Album|null
67 | */
68 | public function getAlbum()
69 | {
70 | return isset($this->album) ? $this->album : null;
71 | }
72 |
73 | public function hasAlbum()
74 | {
75 | return isset($this->album);
76 | }
77 |
78 | public function clearAlbum()
79 | {
80 | unset($this->album);
81 | }
82 |
83 | /**
84 | * Required. The [Album][google.photos.types.Album] to update.
85 | * The album’s `id` field is used to identify the album to be updated.
86 | * The album’s `title` field is used to set the new album title.
87 | * The album’s `cover_photo_media_item_id` field is used to set the new album
88 | * cover photo.
89 | *
90 | * Generated from protobuf field .google.photos.types.Album album = 1 [(.google.api.field_behavior) = REQUIRED];
91 | * @param \Google\Photos\Types\Album $var
92 | * @return $this
93 | */
94 | public function setAlbum($var)
95 | {
96 | GPBUtil::checkMessage($var, \Google\Photos\Types\Album::class);
97 | $this->album = $var;
98 |
99 | return $this;
100 | }
101 |
102 | /**
103 | * Required. Indicate what fields in the provided album to update.
104 | * The only valid values are `title` and `cover_photo_media_item_id`.
105 | *
106 | * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];
107 | * @return \Google\Protobuf\FieldMask|null
108 | */
109 | public function getUpdateMask()
110 | {
111 | return isset($this->update_mask) ? $this->update_mask : null;
112 | }
113 |
114 | public function hasUpdateMask()
115 | {
116 | return isset($this->update_mask);
117 | }
118 |
119 | public function clearUpdateMask()
120 | {
121 | unset($this->update_mask);
122 | }
123 |
124 | /**
125 | * Required. Indicate what fields in the provided album to update.
126 | * The only valid values are `title` and `cover_photo_media_item_id`.
127 | *
128 | * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];
129 | * @param \Google\Protobuf\FieldMask $var
130 | * @return $this
131 | */
132 | public function setUpdateMask($var)
133 | {
134 | GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class);
135 | $this->update_mask = $var;
136 |
137 | return $this;
138 | }
139 |
140 | }
141 |
142 |
--------------------------------------------------------------------------------
/src/Google/Photos/Library/V1/UpdateMediaItemRequest.php:
--------------------------------------------------------------------------------
1 | google.photos.library.v1.UpdateMediaItemRequest
15 | */
16 | class UpdateMediaItemRequest extends \Google\Protobuf\Internal\Message
17 | {
18 | /**
19 | * Required. The [MediaItem][google.photos.types.MediaItem] to update.
20 | * The media item's `id` field is used to identify the media item to be
21 | * updated.
22 | * The media item's `description` field is used to set the new media item
23 | * description.
24 | *
25 | * Generated from protobuf field .google.photos.types.MediaItem media_item = 1 [(.google.api.field_behavior) = REQUIRED];
26 | */
27 | protected $media_item = null;
28 | /**
29 | * Required. Indicate what fields in the provided media item to update.
30 | * The only valid value is `description`.
31 | *
32 | * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];
33 | */
34 | protected $update_mask = null;
35 |
36 | /**
37 | * Constructor.
38 | *
39 | * @param array $data {
40 | * Optional. Data for populating the Message object.
41 | *
42 | * @type \Google\Photos\Types\MediaItem $media_item
43 | * Required. The [MediaItem][google.photos.types.MediaItem] to update.
44 | * The media item's `id` field is used to identify the media item to be
45 | * updated.
46 | * The media item's `description` field is used to set the new media item
47 | * description.
48 | * @type \Google\Protobuf\FieldMask $update_mask
49 | * Required. Indicate what fields in the provided media item to update.
50 | * The only valid value is `description`.
51 | * }
52 | */
53 | public function __construct($data = NULL) {
54 | \GPBMetadata\Google\Photos\Library\V1\PhotosLibrary::initOnce();
55 | parent::__construct($data);
56 | }
57 |
58 | /**
59 | * Required. The [MediaItem][google.photos.types.MediaItem] to update.
60 | * The media item's `id` field is used to identify the media item to be
61 | * updated.
62 | * The media item's `description` field is used to set the new media item
63 | * description.
64 | *
65 | * Generated from protobuf field .google.photos.types.MediaItem media_item = 1 [(.google.api.field_behavior) = REQUIRED];
66 | * @return \Google\Photos\Types\MediaItem|null
67 | */
68 | public function getMediaItem()
69 | {
70 | return isset($this->media_item) ? $this->media_item : null;
71 | }
72 |
73 | public function hasMediaItem()
74 | {
75 | return isset($this->media_item);
76 | }
77 |
78 | public function clearMediaItem()
79 | {
80 | unset($this->media_item);
81 | }
82 |
83 | /**
84 | * Required. The [MediaItem][google.photos.types.MediaItem] to update.
85 | * The media item's `id` field is used to identify the media item to be
86 | * updated.
87 | * The media item's `description` field is used to set the new media item
88 | * description.
89 | *
90 | * Generated from protobuf field .google.photos.types.MediaItem media_item = 1 [(.google.api.field_behavior) = REQUIRED];
91 | * @param \Google\Photos\Types\MediaItem $var
92 | * @return $this
93 | */
94 | public function setMediaItem($var)
95 | {
96 | GPBUtil::checkMessage($var, \Google\Photos\Types\MediaItem::class);
97 | $this->media_item = $var;
98 |
99 | return $this;
100 | }
101 |
102 | /**
103 | * Required. Indicate what fields in the provided media item to update.
104 | * The only valid value is `description`.
105 | *
106 | * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];
107 | * @return \Google\Protobuf\FieldMask|null
108 | */
109 | public function getUpdateMask()
110 | {
111 | return isset($this->update_mask) ? $this->update_mask : null;
112 | }
113 |
114 | public function hasUpdateMask()
115 | {
116 | return isset($this->update_mask);
117 | }
118 |
119 | public function clearUpdateMask()
120 | {
121 | unset($this->update_mask);
122 | }
123 |
124 | /**
125 | * Required. Indicate what fields in the provided media item to update.
126 | * The only valid value is `description`.
127 | *
128 | * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];
129 | * @param \Google\Protobuf\FieldMask $var
130 | * @return $this
131 | */
132 | public function setUpdateMask($var)
133 | {
134 | GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class);
135 | $this->update_mask = $var;
136 |
137 | return $this;
138 | }
139 |
140 | }
141 |
142 |
--------------------------------------------------------------------------------
/src/Google/Photos/Library/V1/UploadRetrySettings.php:
--------------------------------------------------------------------------------
1 |
27 | *
string profile_picture_base_url = 1;
24 | */
25 | protected $profile_picture_base_url = '';
26 | /**
27 | * Display name of the contributor.
28 | *
29 | * Generated from protobuf field string display_name = 2;
30 | */
31 | protected $display_name = '';
32 |
33 | /**
34 | * Constructor.
35 | *
36 | * @param array $data {
37 | * Optional. Data for populating the Message object.
38 | *
39 | * @type string $profile_picture_base_url
40 | * URL to the profile picture of the contributor.
41 | * @type string $display_name
42 | * Display name of the contributor.
43 | * }
44 | */
45 | public function __construct($data = NULL) {
46 | \GPBMetadata\Google\Photos\Types\MediaItem::initOnce();
47 | parent::__construct($data);
48 | }
49 |
50 | /**
51 | * URL to the profile picture of the contributor.
52 | *
53 | * Generated from protobuf field string profile_picture_base_url = 1;
54 | * @return string
55 | */
56 | public function getProfilePictureBaseUrl()
57 | {
58 | return $this->profile_picture_base_url;
59 | }
60 |
61 | /**
62 | * URL to the profile picture of the contributor.
63 | *
64 | * Generated from protobuf field string profile_picture_base_url = 1;
65 | * @param string $var
66 | * @return $this
67 | */
68 | public function setProfilePictureBaseUrl($var)
69 | {
70 | GPBUtil::checkString($var, True);
71 | $this->profile_picture_base_url = $var;
72 |
73 | return $this;
74 | }
75 |
76 | /**
77 | * Display name of the contributor.
78 | *
79 | * Generated from protobuf field string display_name = 2;
80 | * @return string
81 | */
82 | public function getDisplayName()
83 | {
84 | return $this->display_name;
85 | }
86 |
87 | /**
88 | * Display name of the contributor.
89 | *
90 | * Generated from protobuf field string display_name = 2;
91 | * @param string $var
92 | * @return $this
93 | */
94 | public function setDisplayName($var)
95 | {
96 | GPBUtil::checkString($var, True);
97 | $this->display_name = $var;
98 |
99 | return $this;
100 | }
101 |
102 | }
103 |
104 |
--------------------------------------------------------------------------------
/src/Google/Photos/Types/DateRange.php:
--------------------------------------------------------------------------------
1 | google.photos.types.DateRange
16 | */
17 | class DateRange extends \Google\Protobuf\Internal\Message
18 | {
19 | /**
20 | * The start date (included as part of the range) in one of the formats
21 | * described.
22 | *
23 | * Generated from protobuf field .google.type.Date start_date = 1;
24 | */
25 | protected $start_date = null;
26 | /**
27 | * The end date (included as part of the range). It must be specified in the
28 | * same format as the start date.
29 | *
30 | * Generated from protobuf field .google.type.Date end_date = 2;
31 | */
32 | protected $end_date = null;
33 |
34 | /**
35 | * Constructor.
36 | *
37 | * @param array $data {
38 | * Optional. Data for populating the Message object.
39 | *
40 | * @type \Google\Type\Date $start_date
41 | * The start date (included as part of the range) in one of the formats
42 | * described.
43 | * @type \Google\Type\Date $end_date
44 | * The end date (included as part of the range). It must be specified in the
45 | * same format as the start date.
46 | * }
47 | */
48 | public function __construct($data = NULL) {
49 | \GPBMetadata\Google\Photos\Types\DateRange::initOnce();
50 | parent::__construct($data);
51 | }
52 |
53 | /**
54 | * The start date (included as part of the range) in one of the formats
55 | * described.
56 | *
57 | * Generated from protobuf field .google.type.Date start_date = 1;
58 | * @return \Google\Type\Date|null
59 | */
60 | public function getStartDate()
61 | {
62 | return isset($this->start_date) ? $this->start_date : null;
63 | }
64 |
65 | public function hasStartDate()
66 | {
67 | return isset($this->start_date);
68 | }
69 |
70 | public function clearStartDate()
71 | {
72 | unset($this->start_date);
73 | }
74 |
75 | /**
76 | * The start date (included as part of the range) in one of the formats
77 | * described.
78 | *
79 | * Generated from protobuf field .google.type.Date start_date = 1;
80 | * @param \Google\Type\Date $var
81 | * @return $this
82 | */
83 | public function setStartDate($var)
84 | {
85 | GPBUtil::checkMessage($var, \Google\Type\Date::class);
86 | $this->start_date = $var;
87 |
88 | return $this;
89 | }
90 |
91 | /**
92 | * The end date (included as part of the range). It must be specified in the
93 | * same format as the start date.
94 | *
95 | * Generated from protobuf field .google.type.Date end_date = 2;
96 | * @return \Google\Type\Date|null
97 | */
98 | public function getEndDate()
99 | {
100 | return isset($this->end_date) ? $this->end_date : null;
101 | }
102 |
103 | public function hasEndDate()
104 | {
105 | return isset($this->end_date);
106 | }
107 |
108 | public function clearEndDate()
109 | {
110 | unset($this->end_date);
111 | }
112 |
113 | /**
114 | * The end date (included as part of the range). It must be specified in the
115 | * same format as the start date.
116 | *
117 | * Generated from protobuf field .google.type.Date end_date = 2;
118 | * @param \Google\Type\Date $var
119 | * @return $this
120 | */
121 | public function setEndDate($var)
122 | {
123 | GPBUtil::checkMessage($var, \Google\Type\Date::class);
124 | $this->end_date = $var;
125 |
126 | return $this;
127 | }
128 |
129 | }
130 |
131 |
--------------------------------------------------------------------------------
/src/Google/Photos/Types/SharedAlbumOptions.php:
--------------------------------------------------------------------------------
1 | google.photos.types.SharedAlbumOptions
15 | */
16 | class SharedAlbumOptions extends \Google\Protobuf\Internal\Message
17 | {
18 | /**
19 | * True if the shared album allows collaborators (users who have joined
20 | * the album) to add media items to it. Defaults to false.
21 | *
22 | * Generated from protobuf field bool is_collaborative = 1;
23 | */
24 | protected $is_collaborative = false;
25 | /**
26 | * True if the shared album allows collaborators (users who have joined the
27 | * album) to add comments to the album. Defaults to false.
28 | *
29 | * Generated from protobuf field bool is_commentable = 2;
30 | */
31 | protected $is_commentable = false;
32 |
33 | /**
34 | * Constructor.
35 | *
36 | * @param array $data {
37 | * Optional. Data for populating the Message object.
38 | *
39 | * @type bool $is_collaborative
40 | * True if the shared album allows collaborators (users who have joined
41 | * the album) to add media items to it. Defaults to false.
42 | * @type bool $is_commentable
43 | * True if the shared album allows collaborators (users who have joined the
44 | * album) to add comments to the album. Defaults to false.
45 | * }
46 | */
47 | public function __construct($data = NULL) {
48 | \GPBMetadata\Google\Photos\Types\Album::initOnce();
49 | parent::__construct($data);
50 | }
51 |
52 | /**
53 | * True if the shared album allows collaborators (users who have joined
54 | * the album) to add media items to it. Defaults to false.
55 | *
56 | * Generated from protobuf field bool is_collaborative = 1;
57 | * @return bool
58 | */
59 | public function getIsCollaborative()
60 | {
61 | return $this->is_collaborative;
62 | }
63 |
64 | /**
65 | * True if the shared album allows collaborators (users who have joined
66 | * the album) to add media items to it. Defaults to false.
67 | *
68 | * Generated from protobuf field bool is_collaborative = 1;
69 | * @param bool $var
70 | * @return $this
71 | */
72 | public function setIsCollaborative($var)
73 | {
74 | GPBUtil::checkBool($var);
75 | $this->is_collaborative = $var;
76 |
77 | return $this;
78 | }
79 |
80 | /**
81 | * True if the shared album allows collaborators (users who have joined the
82 | * album) to add comments to the album. Defaults to false.
83 | *
84 | * Generated from protobuf field bool is_commentable = 2;
85 | * @return bool
86 | */
87 | public function getIsCommentable()
88 | {
89 | return $this->is_commentable;
90 | }
91 |
92 | /**
93 | * True if the shared album allows collaborators (users who have joined the
94 | * album) to add comments to the album. Defaults to false.
95 | *
96 | * Generated from protobuf field bool is_commentable = 2;
97 | * @param bool $var
98 | * @return $this
99 | */
100 | public function setIsCommentable($var)
101 | {
102 | GPBUtil::checkBool($var);
103 | $this->is_commentable = $var;
104 |
105 | return $this;
106 | }
107 |
108 | }
109 |
110 |
--------------------------------------------------------------------------------
/src/Google/Photos/Types/Video.php:
--------------------------------------------------------------------------------
1 | google.photos.types.Video
16 | */
17 | class Video extends \Google\Protobuf\Internal\Message
18 | {
19 | /**
20 | * Brand of the camera with which the video was taken.
21 | *
22 | * Generated from protobuf field string camera_make = 1;
23 | */
24 | protected $camera_make = '';
25 | /**
26 | * Model of the camera with which the video was taken.
27 | *
28 | * Generated from protobuf field string camera_model = 2;
29 | */
30 | protected $camera_model = '';
31 | /**
32 | * Frame rate of the video.
33 | *
34 | * Generated from protobuf field double fps = 3;
35 | */
36 | protected $fps = 0.0;
37 | /**
38 | * Processing status of the video.
39 | *
40 | * Generated from protobuf field .google.photos.types.VideoProcessingStatus status = 4;
41 | */
42 | protected $status = 0;
43 |
44 | /**
45 | * Constructor.
46 | *
47 | * @param array $data {
48 | * Optional. Data for populating the Message object.
49 | *
50 | * @type string $camera_make
51 | * Brand of the camera with which the video was taken.
52 | * @type string $camera_model
53 | * Model of the camera with which the video was taken.
54 | * @type float $fps
55 | * Frame rate of the video.
56 | * @type int $status
57 | * Processing status of the video.
58 | * }
59 | */
60 | public function __construct($data = NULL) {
61 | \GPBMetadata\Google\Photos\Types\MediaItem::initOnce();
62 | parent::__construct($data);
63 | }
64 |
65 | /**
66 | * Brand of the camera with which the video was taken.
67 | *
68 | * Generated from protobuf field string camera_make = 1;
69 | * @return string
70 | */
71 | public function getCameraMake()
72 | {
73 | return $this->camera_make;
74 | }
75 |
76 | /**
77 | * Brand of the camera with which the video was taken.
78 | *
79 | * Generated from protobuf field string camera_make = 1;
80 | * @param string $var
81 | * @return $this
82 | */
83 | public function setCameraMake($var)
84 | {
85 | GPBUtil::checkString($var, True);
86 | $this->camera_make = $var;
87 |
88 | return $this;
89 | }
90 |
91 | /**
92 | * Model of the camera with which the video was taken.
93 | *
94 | * Generated from protobuf field string camera_model = 2;
95 | * @return string
96 | */
97 | public function getCameraModel()
98 | {
99 | return $this->camera_model;
100 | }
101 |
102 | /**
103 | * Model of the camera with which the video was taken.
104 | *
105 | * Generated from protobuf field string camera_model = 2;
106 | * @param string $var
107 | * @return $this
108 | */
109 | public function setCameraModel($var)
110 | {
111 | GPBUtil::checkString($var, True);
112 | $this->camera_model = $var;
113 |
114 | return $this;
115 | }
116 |
117 | /**
118 | * Frame rate of the video.
119 | *
120 | * Generated from protobuf field double fps = 3;
121 | * @return float
122 | */
123 | public function getFps()
124 | {
125 | return $this->fps;
126 | }
127 |
128 | /**
129 | * Frame rate of the video.
130 | *
131 | * Generated from protobuf field double fps = 3;
132 | * @param float $var
133 | * @return $this
134 | */
135 | public function setFps($var)
136 | {
137 | GPBUtil::checkDouble($var);
138 | $this->fps = $var;
139 |
140 | return $this;
141 | }
142 |
143 | /**
144 | * Processing status of the video.
145 | *
146 | * Generated from protobuf field .google.photos.types.VideoProcessingStatus status = 4;
147 | * @return int
148 | */
149 | public function getStatus()
150 | {
151 | return $this->status;
152 | }
153 |
154 | /**
155 | * Processing status of the video.
156 | *
157 | * Generated from protobuf field .google.photos.types.VideoProcessingStatus status = 4;
158 | * @param int $var
159 | * @return $this
160 | */
161 | public function setStatus($var)
162 | {
163 | GPBUtil::checkEnum($var, \Google\Photos\Types\VideoProcessingStatus::class);
164 | $this->status = $var;
165 |
166 | return $this;
167 | }
168 |
169 | }
170 |
171 |
--------------------------------------------------------------------------------
/src/Google/Photos/Types/VideoProcessingStatus.php:
--------------------------------------------------------------------------------
1 | google.photos.types.VideoProcessingStatus
13 | */
14 | class VideoProcessingStatus
15 | {
16 | /**
17 | * Video processing status is unknown.
18 | *
19 | * Generated from protobuf enum UNSPECIFIED = 0;
20 | */
21 | const UNSPECIFIED = 0;
22 | /**
23 | * Video is being processed. The user sees an icon for this
24 | * video in the Google Photos app; however, it isn't playable yet.
25 | *
26 | * Generated from protobuf enum PROCESSING = 1;
27 | */
28 | const PROCESSING = 1;
29 | /**
30 | * Video processing is complete and it is now ready for viewing.
31 | * Important: attempting to download a video not in the READY state may fail.
32 | *
33 | * Generated from protobuf enum READY = 2;
34 | */
35 | const READY = 2;
36 | /**
37 | * Something has gone wrong and the video has failed to process.
38 | *
39 | * Generated from protobuf enum FAILED = 3;
40 | */
41 | const FAILED = 3;
42 |
43 | private static $valueToName = [
44 | self::UNSPECIFIED => 'UNSPECIFIED',
45 | self::PROCESSING => 'PROCESSING',
46 | self::READY => 'READY',
47 | self::FAILED => 'FAILED',
48 | ];
49 |
50 | public static function name($value)
51 | {
52 | if (!isset(self::$valueToName[$value])) {
53 | throw new UnexpectedValueException(sprintf(
54 | 'Enum %s has no name defined for value %s', __CLASS__, $value));
55 | }
56 | return self::$valueToName[$value];
57 | }
58 |
59 |
60 | public static function value($name)
61 | {
62 | $const = __CLASS__ . '::' . strtoupper($name);
63 | if (!defined($const)) {
64 | throw new UnexpectedValueException(sprintf(
65 | 'Enum %s has no value defined for name %s', __CLASS__, $name));
66 | }
67 | return constant($const);
68 | }
69 | }
70 |
71 |
--------------------------------------------------------------------------------
/tests/Unit/V1/PhotosLibraryClientWrapperTest.php:
--------------------------------------------------------------------------------
1 | mockCredentialsHandler = $this->getMockBuilder(CredentialsWrapper::class)
47 | ->disableOriginalConstructor()
48 | ->getMock();
49 | $this->mockTransport = new MockTransport();
50 | $this->mockHttpHandler = new MockHandler();
51 |
52 | $options = [
53 | 'credentials' => $this->mockCredentialsHandler,
54 | 'transport' => $this->mockTransport,
55 | 'httpClient' => new Client(['handler' => HandlerStack::create($this->mockHttpHandler)])
56 | ];
57 |
58 | $this->photosLibraryClient = new PhotosLibraryClient($options);
59 | }
60 |
61 | public function testUpload()
62 | {
63 | $this->mockHttpHandler->append(new Response(200, [], "upload token"));
64 | $this->mockCredentialsHandler->method('getBearerString')->willReturn('bearer string');
65 |
66 | $response = $this->photosLibraryClient->upload("some bytes", "my_file.png");
67 | $this->assertSame($response, "upload token");
68 |
69 | $request = $this->mockHttpHandler->getLastRequest();
70 | $this->assertSame("application/octet-stream", $request->getHeaderLine('Content-type'));
71 | $this->assertSame("my_file.png", $request->getHeaderLine('X-Goog-Upload-File-Name'));
72 | $this->assertSame("bearer string", $request->getHeaderLine('Authorization'));
73 | $this->assertSame("some bytes", (string) $request->getBody());
74 | }
75 | }
76 |
--------------------------------------------------------------------------------