FetchResolvedPhotoUriRequest.Builder

public abstract class FetchResolvedPhotoUriRequest.Builder


Builder for FetchResolvedPhotoUriRequest.

Summary

Public constructors

Public methods

FetchResolvedPhotoUriRequest

Builds the FetchResolvedPhotoUriRequest.

abstract @Nullable CancellationToken

Gets the CancellationToken used by PlacesClient to cancel any queued requests.

abstract @Nullable Integer

Gets the maximum desired height, in pixels, of the image returned by the Place Photos service.

abstract @Nullable Integer

Gets the maximum desired width, in pixels, of the image returned by the Place Photos service.

abstract FetchResolvedPhotoUriRequest.Builder

Sets the CancellationToken used by PlacesClient to cancel any queued requests.

abstract FetchResolvedPhotoUriRequest.Builder
setMaxHeight(@Nullable @IntRange(from = 1, to = 4800) Integer maxHeight)

Sets the maximum desired height, in pixels, of the image returned by the Place Photos service.

abstract FetchResolvedPhotoUriRequest.Builder
setMaxWidth(@Nullable @IntRange(from = 1, to = 4800) Integer maxWidth)

Sets the maximum desired width, in pixels, of the image returned by the Place Photos service.

Public constructors

Builder

public Builder()

Public methods

getCancellationToken

public abstract @Nullable CancellationToken getCancellationToken()

Gets the CancellationToken used by PlacesClient to cancel any queued requests.

getMaxHeight

public abstract @Nullable Integer getMaxHeight()

Gets the maximum desired height, in pixels, of the image returned by the Place Photos service.

The request must include max width or max height. If both max width and max height are not set, and the PhotoMetadata contains a width or height value other than 0, the builder will use the PhotoMetadata's width or height as the max width or max height.

If the image is smaller than the values specified, the original image will be returned. If the image is larger in either dimension, it will be scaled to match the smaller of the two dimensions, restricted to its original aspect ratio. Both setMaxHeight and setMaxWidth properties should be set to an integer between 1 and 4800.

getMaxWidth

public abstract @Nullable Integer getMaxWidth()

Gets the maximum desired width, in pixels, of the image returned by the Place Photos service.

The request must include max width or max height. If both max width and max height are not set, and the PhotoMetadata contains a width or height value other than 0, the builder will use the PhotoMetadata's width or height as the max width or max height.

If the image is smaller than the values specified, the original image will be returned. If the image is larger in either dimension, it will be scaled to match the smaller of the two dimensions, restricted to its original aspect ratio. Both setMaxHeight and setMaxWidth properties should be set to an integer between 1 and 4800.

setCancellationToken

public abstract FetchResolvedPhotoUriRequest.Builder setCancellationToken(@Nullable CancellationToken cancellationToken)

Sets the CancellationToken used by PlacesClient to cancel any queued requests.

setMaxHeight

public abstract FetchResolvedPhotoUriRequest.Builder setMaxHeight(@Nullable @IntRange(from = 1, to = 4800) Integer maxHeight)

Sets the maximum desired height, in pixels, of the image returned by the Place Photos service.

The request must include max width or max height. If both max width and max height are not set, and the PhotoMetadata contains a width or height value other than 0, the builder will use the PhotoMetadata's width or height as the max width or max height.

If the image is smaller than the values specified, the original image will be returned. If the image is larger in either dimension, it will be scaled to match the smaller of the two dimensions, restricted to its original aspect ratio. Both setMaxHeight and setMaxWidth properties should be set to an integer between 1 and 4800.

setMaxWidth

public abstract FetchResolvedPhotoUriRequest.Builder setMaxWidth(@Nullable @IntRange(from = 1, to = 4800) Integer maxWidth)

Sets the maximum desired width, in pixels, of the image returned by the Place Photos service.

The request must include max width or max height. If both max width and max height are not set, and the PhotoMetadata contains a width or height value other than 0, the builder will use the PhotoMetadata's width or height as the max width or max height.

If the image is smaller than the values specified, the original image will be returned. If the image is larger in either dimension, it will be scaled to match the smaller of the two dimensions, restricted to its original aspect ratio. Both setMaxHeight and setMaxWidth properties should be set to an integer between 1 and 4800.