# ClimateStateRequest.Builder

Artifact: [androidx.car.app:app](https://developer.android.com/jetpack/androidx/releases/car-app) [View Source](https://cs.android.com/search?q=file:androidx/car/app/hardware/climate/ClimateStateRequest.java+class:androidx.car.app.hardware.climate.ClimateStateRequest.Builder) Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.3.0)

*** ** * ** ***


```
public final class ClimateStateRequest.Builder<T>
```

<br />

*** ** * ** ***

A builder of `https://developer.android.com/reference/androidx/car/app/hardware/climate/ClimateStateRequest`

| Parameters |
|---|---|
| `<T>` | data type of request value |

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/car/app/hardware/climate/ClimateStateRequest.Builder#Builder(int,T)(int requestedFeature, T requestedValue)` Creates an instance of `https://developer.android.com/reference/androidx/car/app/hardware/climate/ClimateStateRequest.Builder`. |

| ### Public methods |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/hardware/climate/ClimateStateRequest.Builder<T>` | `https://developer.android.com/reference/androidx/car/app/hardware/climate/ClimateStateRequest.Builder#addCarZones(androidx.car.app.hardware.common.CarZone)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/hardware/common/CarZone carZone)` Adds CarZone into `https://developer.android.com/reference/androidx/car/app/hardware/climate/ClimateStateRequest`. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/hardware/climate/ClimateStateRequest<T>` | `https://developer.android.com/reference/androidx/car/app/hardware/climate/ClimateStateRequest.Builder#build()()` Constructs a `https://developer.android.com/reference/androidx/car/app/hardware/climate/ClimateStateRequest` defined by this builder |

## Public constructors

### Builder

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.3.0)

```
public Builder(int requestedFeature, T requestedValue)
```

Creates an instance of `https://developer.android.com/reference/androidx/car/app/hardware/climate/ClimateStateRequest.Builder`.

| Parameters |
|---|---|
| `int requestedFeature` | one of integer flags in ClimateProfileRequest.ClimateProfileFeature |
| `T requestedValue` | the requested value for the feature |

## Public methods

### addCarZones

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.3.0)

```
public @NonNull ClimateStateRequest.Builder<T> addCarZones(@NonNull CarZone carZone)
```

Adds CarZone into `https://developer.android.com/reference/androidx/car/app/hardware/climate/ClimateStateRequest`.

Without calling this method, the request will contain CarZone#CAR_ZONE_GLOBAL.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/hardware/common/CarZone carZone` | the CarZone which the set operation will be applied |

### build

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.3.0)

```
public @NonNull ClimateStateRequest<T> build()
```

Constructs a `https://developer.android.com/reference/androidx/car/app/hardware/climate/ClimateStateRequest` defined by this builder