# FetchResolvedPhotoUriRequest.Builder

# FetchResolvedPhotoUriRequest.Builder


```
public abstract class FetchResolvedPhotoUriRequest.Builder
```

<br />

*** ** * ** ***

Builder for `https://developers.google.com/maps/documentation/places/android-sdk/reference/com/google/android/libraries/places/api/net/FetchResolvedPhotoUriRequest`.

## Summary

| ### Public constructors |
|---|
| `https://developers.google.com/maps/documentation/places/android-sdk/reference/com/google/android/libraries/places/api/net/FetchResolvedPhotoUriRequest.Builder#Builder()()` |

| ### Public methods |
|---|---|
| `https://developers.google.com/maps/documentation/places/android-sdk/reference/com/google/android/libraries/places/api/net/FetchResolvedPhotoUriRequest` | `https://developers.google.com/maps/documentation/places/android-sdk/reference/com/google/android/libraries/places/api/net/FetchResolvedPhotoUriRequest.Builder#build()()` Builds the `https://developers.google.com/maps/documentation/places/android-sdk/reference/com/google/android/libraries/places/api/net/FetchResolvedPhotoUriRequest`. |
| `abstract @https://developer.android.com/reference/androidx/annotation/Nullable.html https://developers.google.com/android/reference/com/google/android/gms/tasks/CancellationToken.html` | `https://developers.google.com/maps/documentation/places/android-sdk/reference/com/google/android/libraries/places/api/net/FetchResolvedPhotoUriRequest.Builder#getCancellationToken()()` Gets the `https://developers.google.com/android/reference/com/google/android/gms/tasks/CancellationToken.html` used by `https://developers.google.com/maps/documentation/places/android-sdk/reference/com/google/android/libraries/places/api/net/PlacesClient` to cancel any queued requests. |
| `abstract @https://developer.android.com/reference/androidx/annotation/Nullable.html https://developer.android.com/reference/java/lang/Integer.html` | `https://developers.google.com/maps/documentation/places/android-sdk/reference/com/google/android/libraries/places/api/net/FetchResolvedPhotoUriRequest.Builder#getMaxHeight()()` Gets the maximum desired height, in pixels, of the image returned by the Place Photos service. |
| `abstract @https://developer.android.com/reference/androidx/annotation/Nullable.html https://developer.android.com/reference/java/lang/Integer.html` | `https://developers.google.com/maps/documentation/places/android-sdk/reference/com/google/android/libraries/places/api/net/FetchResolvedPhotoUriRequest.Builder#getMaxWidth()()` Gets the maximum desired width, in pixels, of the image returned by the Place Photos service. |
| `abstract https://developers.google.com/maps/documentation/places/android-sdk/reference/com/google/android/libraries/places/api/net/FetchResolvedPhotoUriRequest.Builder` | `https://developers.google.com/maps/documentation/places/android-sdk/reference/com/google/android/libraries/places/api/net/FetchResolvedPhotoUriRequest.Builder#setCancellationToken(com.google.android.gms.tasks.CancellationToken)(@https://developer.android.com/reference/androidx/annotation/Nullable.html https://developers.google.com/android/reference/com/google/android/gms/tasks/CancellationToken.html cancellationToken)` Sets the `https://developers.google.com/android/reference/com/google/android/gms/tasks/CancellationToken.html` used by `https://developers.google.com/maps/documentation/places/android-sdk/reference/com/google/android/libraries/places/api/net/PlacesClient` to cancel any queued requests. |
| `abstract https://developers.google.com/maps/documentation/places/android-sdk/reference/com/google/android/libraries/places/api/net/FetchResolvedPhotoUriRequest.Builder` | `https://developers.google.com/maps/documentation/places/android-sdk/reference/com/google/android/libraries/places/api/net/FetchResolvedPhotoUriRequest.Builder#setMaxHeight(java.lang.Integer)(@https://developer.android.com/reference/androidx/annotation/Nullable.html @https://developer.android.com/reference/androidx/annotation/IntRange.html(from = 1, to = 4800) https://developer.android.com/reference/java/lang/Integer.html maxHeight)` Sets the maximum desired height, in pixels, of the image returned by the Place Photos service. |
| `abstract https://developers.google.com/maps/documentation/places/android-sdk/reference/com/google/android/libraries/places/api/net/FetchResolvedPhotoUriRequest.Builder` | `https://developers.google.com/maps/documentation/places/android-sdk/reference/com/google/android/libraries/places/api/net/FetchResolvedPhotoUriRequest.Builder#setMaxWidth(java.lang.Integer)(@https://developer.android.com/reference/androidx/annotation/Nullable.html @https://developer.android.com/reference/androidx/annotation/IntRange.html(from = 1, to = 4800) https://developer.android.com/reference/java/lang/Integer.html maxWidth)` Sets the maximum desired width, in pixels, of the image returned by the Place Photos service. |

## Public constructors

### Builder

```
public Builder()
```

## Public methods

### build

```
public FetchResolvedPhotoUriRequest build()
```

Builds the `https://developers.google.com/maps/documentation/places/android-sdk/reference/com/google/android/libraries/places/api/net/FetchResolvedPhotoUriRequest`.

### getCancellationToken

```
public abstract @Nullable CancellationToken getCancellationToken()
```

Gets the `https://developers.google.com/android/reference/com/google/android/gms/tasks/CancellationToken.html` used by `https://developers.google.com/maps/documentation/places/android-sdk/reference/com/google/android/libraries/places/api/net/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 `https://developers.google.com/maps/documentation/places/android-sdk/reference/com/google/android/libraries/places/api/net/FetchResolvedPhotoUriRequest.Builder#setMaxHeight(java.lang.Integer)` and `https://developers.google.com/maps/documentation/places/android-sdk/reference/com/google/android/libraries/places/api/net/FetchResolvedPhotoUriRequest.Builder#setMaxWidth(java.lang.Integer)` 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 `https://developers.google.com/maps/documentation/places/android-sdk/reference/com/google/android/libraries/places/api/net/FetchResolvedPhotoUriRequest.Builder#setMaxHeight(java.lang.Integer)` and `https://developers.google.com/maps/documentation/places/android-sdk/reference/com/google/android/libraries/places/api/net/FetchResolvedPhotoUriRequest.Builder#setMaxWidth(java.lang.Integer)` properties should be set to an integer between 1 and 4800.

### setCancellationToken

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

Sets the `https://developers.google.com/android/reference/com/google/android/gms/tasks/CancellationToken.html` used by `https://developers.google.com/maps/documentation/places/android-sdk/reference/com/google/android/libraries/places/api/net/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 `https://developers.google.com/maps/documentation/places/android-sdk/reference/com/google/android/libraries/places/api/net/FetchResolvedPhotoUriRequest.Builder#setMaxHeight(java.lang.Integer)` and `https://developers.google.com/maps/documentation/places/android-sdk/reference/com/google/android/libraries/places/api/net/FetchResolvedPhotoUriRequest.Builder#setMaxWidth(java.lang.Integer)` 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 `https://developers.google.com/maps/documentation/places/android-sdk/reference/com/google/android/libraries/places/api/net/FetchResolvedPhotoUriRequest.Builder#setMaxHeight(java.lang.Integer)` and `https://developers.google.com/maps/documentation/places/android-sdk/reference/com/google/android/libraries/places/api/net/FetchResolvedPhotoUriRequest.Builder#setMaxWidth(java.lang.Integer)` properties should be set to an integer between 1 and 4800.