Class SearchMediaItemsRequest.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderType>
-
- com.google.protobuf.GeneratedMessageV3.Builder<SearchMediaItemsRequest.Builder>
-
- com.google.photos.library.v1.proto.SearchMediaItemsRequest.Builder
-
- All Implemented Interfaces:
SearchMediaItemsRequestOrBuilder
,com.google.protobuf.Message.Builder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,java.lang.Cloneable
- Enclosing class:
- SearchMediaItemsRequest
public static final class SearchMediaItemsRequest.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<SearchMediaItemsRequest.Builder> implements SearchMediaItemsRequestOrBuilder
Request to search for media items in a user's library. If the album id is specified, this call will return the list of media items in the album. If neither filters nor album id are specified, this call will return all media items in a user's Google Photos library. If filters are specified, this call will return all media items in the user's library that fulfill the filter criteria. Filters and album id must not both be set, as this will result in an invalid request.
Protobuf typegoogle.photos.library.v1.SearchMediaItemsRequest
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SearchMediaItemsRequest.Builder
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
SearchMediaItemsRequest
build()
SearchMediaItemsRequest
buildPartial()
SearchMediaItemsRequest.Builder
clear()
SearchMediaItemsRequest.Builder
clearAlbumId()
Identifier of an album.SearchMediaItemsRequest.Builder
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
SearchMediaItemsRequest.Builder
clearFilters()
Filters to apply to the request.SearchMediaItemsRequest.Builder
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
SearchMediaItemsRequest.Builder
clearOrderBy()
An optional field to specify the sort order of the search results.SearchMediaItemsRequest.Builder
clearPageSize()
Maximum number of media items to return in the response.SearchMediaItemsRequest.Builder
clearPageToken()
A continuation token to get the next page of the results.SearchMediaItemsRequest.Builder
clone()
java.lang.String
getAlbumId()
Identifier of an album.com.google.protobuf.ByteString
getAlbumIdBytes()
Identifier of an album.SearchMediaItemsRequest
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
com.google.protobuf.Descriptors.Descriptor
getDescriptorForType()
Filters
getFilters()
Filters to apply to the request.Filters.Builder
getFiltersBuilder()
Filters to apply to the request.FiltersOrBuilder
getFiltersOrBuilder()
Filters to apply to the request.java.lang.String
getOrderBy()
An optional field to specify the sort order of the search results.com.google.protobuf.ByteString
getOrderByBytes()
An optional field to specify the sort order of the search results.int
getPageSize()
Maximum number of media items to return in the response.java.lang.String
getPageToken()
A continuation token to get the next page of the results.com.google.protobuf.ByteString
getPageTokenBytes()
A continuation token to get the next page of the results.boolean
hasFilters()
Filters to apply to the request.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
SearchMediaItemsRequest.Builder
mergeFilters(Filters value)
Filters to apply to the request.SearchMediaItemsRequest.Builder
mergeFrom(SearchMediaItemsRequest other)
SearchMediaItemsRequest.Builder
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
SearchMediaItemsRequest.Builder
mergeFrom(com.google.protobuf.Message other)
SearchMediaItemsRequest.Builder
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
SearchMediaItemsRequest.Builder
setAlbumId(java.lang.String value)
Identifier of an album.SearchMediaItemsRequest.Builder
setAlbumIdBytes(com.google.protobuf.ByteString value)
Identifier of an album.SearchMediaItemsRequest.Builder
setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
SearchMediaItemsRequest.Builder
setFilters(Filters value)
Filters to apply to the request.SearchMediaItemsRequest.Builder
setFilters(Filters.Builder builderForValue)
Filters to apply to the request.SearchMediaItemsRequest.Builder
setOrderBy(java.lang.String value)
An optional field to specify the sort order of the search results.SearchMediaItemsRequest.Builder
setOrderByBytes(com.google.protobuf.ByteString value)
An optional field to specify the sort order of the search results.SearchMediaItemsRequest.Builder
setPageSize(int value)
Maximum number of media items to return in the response.SearchMediaItemsRequest.Builder
setPageToken(java.lang.String value)
A continuation token to get the next page of the results.SearchMediaItemsRequest.Builder
setPageTokenBytes(com.google.protobuf.ByteString value)
A continuation token to get the next page of the results.SearchMediaItemsRequest.Builder
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)
SearchMediaItemsRequest.Builder
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeFrom, newUninitializedMessageException
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<SearchMediaItemsRequest.Builder>
-
clear
public SearchMediaItemsRequest.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<SearchMediaItemsRequest.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<SearchMediaItemsRequest.Builder>
-
getDefaultInstanceForType
public SearchMediaItemsRequest getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public SearchMediaItemsRequest build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public SearchMediaItemsRequest buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public SearchMediaItemsRequest.Builder clone()
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<SearchMediaItemsRequest.Builder>
-
setField
public SearchMediaItemsRequest.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<SearchMediaItemsRequest.Builder>
-
clearField
public SearchMediaItemsRequest.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<SearchMediaItemsRequest.Builder>
-
clearOneof
public SearchMediaItemsRequest.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<SearchMediaItemsRequest.Builder>
-
setRepeatedField
public SearchMediaItemsRequest.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)
- Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<SearchMediaItemsRequest.Builder>
-
addRepeatedField
public SearchMediaItemsRequest.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
- Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<SearchMediaItemsRequest.Builder>
-
mergeFrom
public SearchMediaItemsRequest.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<SearchMediaItemsRequest.Builder>
-
mergeFrom
public SearchMediaItemsRequest.Builder mergeFrom(SearchMediaItemsRequest other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3.Builder<SearchMediaItemsRequest.Builder>
-
mergeFrom
public SearchMediaItemsRequest.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<SearchMediaItemsRequest.Builder>
- Throws:
java.io.IOException
-
getAlbumId
public java.lang.String getAlbumId()
Identifier of an album. If populated, lists all media items in specified album. Can't set in conjunction with any filters.
string album_id = 1;
- Specified by:
getAlbumId
in interfaceSearchMediaItemsRequestOrBuilder
- Returns:
- The albumId.
-
getAlbumIdBytes
public com.google.protobuf.ByteString getAlbumIdBytes()
Identifier of an album. If populated, lists all media items in specified album. Can't set in conjunction with any filters.
string album_id = 1;
- Specified by:
getAlbumIdBytes
in interfaceSearchMediaItemsRequestOrBuilder
- Returns:
- The bytes for albumId.
-
setAlbumId
public SearchMediaItemsRequest.Builder setAlbumId(java.lang.String value)
Identifier of an album. If populated, lists all media items in specified album. Can't set in conjunction with any filters.
string album_id = 1;
- Parameters:
value
- The albumId to set.- Returns:
- This builder for chaining.
-
clearAlbumId
public SearchMediaItemsRequest.Builder clearAlbumId()
Identifier of an album. If populated, lists all media items in specified album. Can't set in conjunction with any filters.
string album_id = 1;
- Returns:
- This builder for chaining.
-
setAlbumIdBytes
public SearchMediaItemsRequest.Builder setAlbumIdBytes(com.google.protobuf.ByteString value)
Identifier of an album. If populated, lists all media items in specified album. Can't set in conjunction with any filters.
string album_id = 1;
- Parameters:
value
- The bytes for albumId to set.- Returns:
- This builder for chaining.
-
getPageSize
public int getPageSize()
Maximum number of media items to return in the response. Fewer media items might be returned than the specified number. The default `pageSize` is 25, the maximum is 100.
int32 page_size = 2;
- Specified by:
getPageSize
in interfaceSearchMediaItemsRequestOrBuilder
- Returns:
- The pageSize.
-
setPageSize
public SearchMediaItemsRequest.Builder setPageSize(int value)
Maximum number of media items to return in the response. Fewer media items might be returned than the specified number. The default `pageSize` is 25, the maximum is 100.
int32 page_size = 2;
- Parameters:
value
- The pageSize to set.- Returns:
- This builder for chaining.
-
clearPageSize
public SearchMediaItemsRequest.Builder clearPageSize()
Maximum number of media items to return in the response. Fewer media items might be returned than the specified number. The default `pageSize` is 25, the maximum is 100.
int32 page_size = 2;
- Returns:
- This builder for chaining.
-
getPageToken
public java.lang.String getPageToken()
A continuation token to get the next page of the results. Adding this to the request returns the rows after the `pageToken`. The `pageToken` should be the value returned in the `nextPageToken` parameter in the response to the `searchMediaItems` request.
string page_token = 3;
- Specified by:
getPageToken
in interfaceSearchMediaItemsRequestOrBuilder
- Returns:
- The pageToken.
-
getPageTokenBytes
public com.google.protobuf.ByteString getPageTokenBytes()
A continuation token to get the next page of the results. Adding this to the request returns the rows after the `pageToken`. The `pageToken` should be the value returned in the `nextPageToken` parameter in the response to the `searchMediaItems` request.
string page_token = 3;
- Specified by:
getPageTokenBytes
in interfaceSearchMediaItemsRequestOrBuilder
- Returns:
- The bytes for pageToken.
-
setPageToken
public SearchMediaItemsRequest.Builder setPageToken(java.lang.String value)
A continuation token to get the next page of the results. Adding this to the request returns the rows after the `pageToken`. The `pageToken` should be the value returned in the `nextPageToken` parameter in the response to the `searchMediaItems` request.
string page_token = 3;
- Parameters:
value
- The pageToken to set.- Returns:
- This builder for chaining.
-
clearPageToken
public SearchMediaItemsRequest.Builder clearPageToken()
A continuation token to get the next page of the results. Adding this to the request returns the rows after the `pageToken`. The `pageToken` should be the value returned in the `nextPageToken` parameter in the response to the `searchMediaItems` request.
string page_token = 3;
- Returns:
- This builder for chaining.
-
setPageTokenBytes
public SearchMediaItemsRequest.Builder setPageTokenBytes(com.google.protobuf.ByteString value)
A continuation token to get the next page of the results. Adding this to the request returns the rows after the `pageToken`. The `pageToken` should be the value returned in the `nextPageToken` parameter in the response to the `searchMediaItems` request.
string page_token = 3;
- Parameters:
value
- The bytes for pageToken to set.- Returns:
- This builder for chaining.
-
hasFilters
public boolean hasFilters()
Filters to apply to the request. Can't be set in conjunction with an `albumId`.
.google.photos.library.v1.Filters filters = 4;
- Specified by:
hasFilters
in interfaceSearchMediaItemsRequestOrBuilder
- Returns:
- Whether the filters field is set.
-
getFilters
public Filters getFilters()
Filters to apply to the request. Can't be set in conjunction with an `albumId`.
.google.photos.library.v1.Filters filters = 4;
- Specified by:
getFilters
in interfaceSearchMediaItemsRequestOrBuilder
- Returns:
- The filters.
-
setFilters
public SearchMediaItemsRequest.Builder setFilters(Filters value)
Filters to apply to the request. Can't be set in conjunction with an `albumId`.
.google.photos.library.v1.Filters filters = 4;
-
setFilters
public SearchMediaItemsRequest.Builder setFilters(Filters.Builder builderForValue)
Filters to apply to the request. Can't be set in conjunction with an `albumId`.
.google.photos.library.v1.Filters filters = 4;
-
mergeFilters
public SearchMediaItemsRequest.Builder mergeFilters(Filters value)
Filters to apply to the request. Can't be set in conjunction with an `albumId`.
.google.photos.library.v1.Filters filters = 4;
-
clearFilters
public SearchMediaItemsRequest.Builder clearFilters()
Filters to apply to the request. Can't be set in conjunction with an `albumId`.
.google.photos.library.v1.Filters filters = 4;
-
getFiltersBuilder
public Filters.Builder getFiltersBuilder()
Filters to apply to the request. Can't be set in conjunction with an `albumId`.
.google.photos.library.v1.Filters filters = 4;
-
getFiltersOrBuilder
public FiltersOrBuilder getFiltersOrBuilder()
Filters to apply to the request. Can't be set in conjunction with an `albumId`.
.google.photos.library.v1.Filters filters = 4;
- Specified by:
getFiltersOrBuilder
in interfaceSearchMediaItemsRequestOrBuilder
-
getOrderBy
public java.lang.String getOrderBy()
An optional field to specify the sort order of the search results. The `orderBy` field only works when a [dateFilter][google.photos.library.v1.DateFilter] is used. When this field is not specified, results are displayed newest first, oldest last by their [creationTime][google.photos.types.MediaMetadata.creation_time]. Providing `MediaMetadata.creation_time` displays search results in the opposite order, oldest first then newest last. To display results newest first then oldest last, include the `desc` argument as follows: `MediaMetadata.creation_time desc`. The only additional filters that can be used with this parameter are [includeArchivedMedia][google.photos.library.v1.Filters.include_archived_media] and [excludeNonAppCreatedData][google.photos.library.v1.Filters.exclude_non_app_created_data]. No other filters are supported.
string order_by = 5;
- Specified by:
getOrderBy
in interfaceSearchMediaItemsRequestOrBuilder
- Returns:
- The orderBy.
-
getOrderByBytes
public com.google.protobuf.ByteString getOrderByBytes()
An optional field to specify the sort order of the search results. The `orderBy` field only works when a [dateFilter][google.photos.library.v1.DateFilter] is used. When this field is not specified, results are displayed newest first, oldest last by their [creationTime][google.photos.types.MediaMetadata.creation_time]. Providing `MediaMetadata.creation_time` displays search results in the opposite order, oldest first then newest last. To display results newest first then oldest last, include the `desc` argument as follows: `MediaMetadata.creation_time desc`. The only additional filters that can be used with this parameter are [includeArchivedMedia][google.photos.library.v1.Filters.include_archived_media] and [excludeNonAppCreatedData][google.photos.library.v1.Filters.exclude_non_app_created_data]. No other filters are supported.
string order_by = 5;
- Specified by:
getOrderByBytes
in interfaceSearchMediaItemsRequestOrBuilder
- Returns:
- The bytes for orderBy.
-
setOrderBy
public SearchMediaItemsRequest.Builder setOrderBy(java.lang.String value)
An optional field to specify the sort order of the search results. The `orderBy` field only works when a [dateFilter][google.photos.library.v1.DateFilter] is used. When this field is not specified, results are displayed newest first, oldest last by their [creationTime][google.photos.types.MediaMetadata.creation_time]. Providing `MediaMetadata.creation_time` displays search results in the opposite order, oldest first then newest last. To display results newest first then oldest last, include the `desc` argument as follows: `MediaMetadata.creation_time desc`. The only additional filters that can be used with this parameter are [includeArchivedMedia][google.photos.library.v1.Filters.include_archived_media] and [excludeNonAppCreatedData][google.photos.library.v1.Filters.exclude_non_app_created_data]. No other filters are supported.
string order_by = 5;
- Parameters:
value
- The orderBy to set.- Returns:
- This builder for chaining.
-
clearOrderBy
public SearchMediaItemsRequest.Builder clearOrderBy()
An optional field to specify the sort order of the search results. The `orderBy` field only works when a [dateFilter][google.photos.library.v1.DateFilter] is used. When this field is not specified, results are displayed newest first, oldest last by their [creationTime][google.photos.types.MediaMetadata.creation_time]. Providing `MediaMetadata.creation_time` displays search results in the opposite order, oldest first then newest last. To display results newest first then oldest last, include the `desc` argument as follows: `MediaMetadata.creation_time desc`. The only additional filters that can be used with this parameter are [includeArchivedMedia][google.photos.library.v1.Filters.include_archived_media] and [excludeNonAppCreatedData][google.photos.library.v1.Filters.exclude_non_app_created_data]. No other filters are supported.
string order_by = 5;
- Returns:
- This builder for chaining.
-
setOrderByBytes
public SearchMediaItemsRequest.Builder setOrderByBytes(com.google.protobuf.ByteString value)
An optional field to specify the sort order of the search results. The `orderBy` field only works when a [dateFilter][google.photos.library.v1.DateFilter] is used. When this field is not specified, results are displayed newest first, oldest last by their [creationTime][google.photos.types.MediaMetadata.creation_time]. Providing `MediaMetadata.creation_time` displays search results in the opposite order, oldest first then newest last. To display results newest first then oldest last, include the `desc` argument as follows: `MediaMetadata.creation_time desc`. The only additional filters that can be used with this parameter are [includeArchivedMedia][google.photos.library.v1.Filters.include_archived_media] and [excludeNonAppCreatedData][google.photos.library.v1.Filters.exclude_non_app_created_data]. No other filters are supported.
string order_by = 5;
- Parameters:
value
- The bytes for orderBy to set.- Returns:
- This builder for chaining.
-
setUnknownFields
public final SearchMediaItemsRequest.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<SearchMediaItemsRequest.Builder>
-
mergeUnknownFields
public final SearchMediaItemsRequest.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<SearchMediaItemsRequest.Builder>
-
-