Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions clients/google-api-services-homegraph/v1/2.0.0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Add the following lines to your `pom.xml` file:
<dependency>
<groupId>com.google.apis</groupId>
<artifactId>google-api-services-homegraph</artifactId>
<version>v1-rev20260523-2.0.0</version>
<version>v1-rev20260604-2.0.0</version>
</dependency>
</dependencies>
</project>
Expand All @@ -35,7 +35,7 @@ repositories {
mavenCentral()
}
dependencies {
implementation 'com.google.apis:google-api-services-homegraph:v1-rev20260523-2.0.0'
implementation 'com.google.apis:google-api-services-homegraph:v1-rev20260604-2.0.0'
}
```

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
/*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
/*
* This code was generated by https://github.com/googleapis/google-api-java-client-services/
* Modify at your own risk.
*/

package com.google.api.services.homegraph.v1.model;

/**
* Component of a provider device.
*
* <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
* transmitted over HTTP when working with the HomeGraph API. For a detailed explanation see:
* <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a>
* </p>
*
* @author Google, Inc.
*/
@SuppressWarnings("javadoc")
public final class Component extends com.google.api.client.json.GenericJson {

/**
* Optional. Child components.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.util.List<Component> childComponents;

/**
* Required. List of Device types associated with this component. Supported device types are
* defined in cs//depot/google3/home/homeservicelayer/uddm/types/uddm_device_types.proto and the
* type string is the enum name, for example: ON_OFF_LIGHT => "ON_OFF_LIGHT".
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.util.List<java.lang.String> deviceTypes;

/**
* Required. ID of the component from the device provider.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String id;

/**
* Required. List of trait data associated with the component.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.util.List<TraitData> traitData;

/**
* Optional. Child components.
* @return value or {@code null} for none
*/
public java.util.List<Component> getChildComponents() {
return childComponents;
}

/**
* Optional. Child components.
* @param childComponents childComponents or {@code null} for none
*/
public Component setChildComponents(java.util.List<Component> childComponents) {
this.childComponents = childComponents;
return this;
}

/**
* Required. List of Device types associated with this component. Supported device types are
* defined in cs//depot/google3/home/homeservicelayer/uddm/types/uddm_device_types.proto and the
* type string is the enum name, for example: ON_OFF_LIGHT => "ON_OFF_LIGHT".
* @return value or {@code null} for none
*/
public java.util.List<java.lang.String> getDeviceTypes() {
return deviceTypes;
}

/**
* Required. List of Device types associated with this component. Supported device types are
* defined in cs//depot/google3/home/homeservicelayer/uddm/types/uddm_device_types.proto and the
* type string is the enum name, for example: ON_OFF_LIGHT => "ON_OFF_LIGHT".
* @param deviceTypes deviceTypes or {@code null} for none
*/
public Component setDeviceTypes(java.util.List<java.lang.String> deviceTypes) {
this.deviceTypes = deviceTypes;
return this;
}

/**
* Required. ID of the component from the device provider.
* @return value or {@code null} for none
*/
public java.lang.String getId() {
return id;
}

/**
* Required. ID of the component from the device provider.
* @param id id or {@code null} for none
*/
public Component setId(java.lang.String id) {
this.id = id;
return this;
}

/**
* Required. List of trait data associated with the component.
* @return value or {@code null} for none
*/
public java.util.List<TraitData> getTraitData() {
return traitData;
}

/**
* Required. List of trait data associated with the component.
* @param traitData traitData or {@code null} for none
*/
public Component setTraitData(java.util.List<TraitData> traitData) {
this.traitData = traitData;
return this;
}

@Override
public Component set(String fieldName, Object value) {
return (Component) super.set(fieldName, value);
}

@Override
public Component clone() {
return (Component) super.clone();
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
/*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
/*
* This code was generated by https://github.com/googleapis/google-api-java-client-services/
* Modify at your own risk.
*/

package com.google.api.services.homegraph.v1.model;

/**
* Container for UDDM trait data associated with a device.
*
* <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
* transmitted over HTTP when working with the HomeGraph API. For a detailed explanation see:
* <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a>
* </p>
*
* @author Google, Inc.
*/
@SuppressWarnings("javadoc")
public final class HomeTraitPayload extends com.google.api.client.json.GenericJson {

/**
* The root component of the device as reported by the provider.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private Component rootComponent;

/**
* The root component of the device as reported by the provider.
* @return value or {@code null} for none
*/
public Component getRootComponent() {
return rootComponent;
}

/**
* The root component of the device as reported by the provider.
* @param rootComponent rootComponent or {@code null} for none
*/
public HomeTraitPayload setRootComponent(Component rootComponent) {
this.rootComponent = rootComponent;
return this;
}

@Override
public HomeTraitPayload set(String fieldName, Object value) {
return (HomeTraitPayload) super.set(fieldName, value);
}

@Override
public HomeTraitPayload clone() {
return (HomeTraitPayload) super.clone();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,15 @@ public final class QueryRequest extends com.google.api.client.json.GenericJson {
@com.google.api.client.util.Key
private java.lang.String agentUserId;

/**
* Optional. Specifies the type of device data to be returned in the response. This allows callers
* to request traditional Smart Home traits, Unified Device Data Model (UDDM) traits, or both. If
* unspecified, defaults to SMART_HOME_TRAIT_ONLY.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String deviceView;

/**
* Optional. If true, the response will include device metadata in the device_metadata field.
* The value may be {@code null}.
Expand Down Expand Up @@ -74,6 +83,27 @@ public QueryRequest setAgentUserId(java.lang.String agentUserId) {
return this;
}

/**
* Optional. Specifies the type of device data to be returned in the response. This allows callers
* to request traditional Smart Home traits, Unified Device Data Model (UDDM) traits, or both. If
* unspecified, defaults to SMART_HOME_TRAIT_ONLY.
* @return value or {@code null} for none
*/
public java.lang.String getDeviceView() {
return deviceView;
}

/**
* Optional. Specifies the type of device data to be returned in the response. This allows callers
* to request traditional Smart Home traits, Unified Device Data Model (UDDM) traits, or both. If
* unspecified, defaults to SMART_HOME_TRAIT_ONLY.
* @param deviceView deviceView or {@code null} for none
*/
public QueryRequest setDeviceView(java.lang.String deviceView) {
this.deviceView = deviceView;
return this;
}

/**
* Optional. If true, the response will include device metadata in the device_metadata field.
* @return value or {@code null} for none
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,20 @@ public final class QueryResponsePayload extends com.google.api.client.json.Gener
@com.google.api.client.util.Key
private java.util.Map<String, java.util.Map<String, java.lang.Object>> devices;

/**
* Map of device IDs to their Unified Device Data Model (UDDM) trait payloads. This field is
* populated when `device_view` is set to HOME_TRAIT_ONLY or HOME_TRAIT_AND_SMART_HOME_TRAIT.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.util.Map<String, HomeTraitPayload> homeTraitPayload;

static {
// hack to force ProGuard to consider HomeTraitPayload used, since otherwise it would be stripped out
// see https://github.com/google/google-api-java-client/issues/543
com.google.api.client.util.Data.nullOf(HomeTraitPayload.class);
}

/**
* Map from the Trait ID (e.g., "action.devices.traits.OnOff") to its last Spanner commit
* timestamp. If a trait has no recorded timestamp, it will be omitted from this map.
Expand Down Expand Up @@ -86,6 +100,25 @@ public QueryResponsePayload setDevices(java.util.Map<String, java.util.Map<Strin
return this;
}

/**
* Map of device IDs to their Unified Device Data Model (UDDM) trait payloads. This field is
* populated when `device_view` is set to HOME_TRAIT_ONLY or HOME_TRAIT_AND_SMART_HOME_TRAIT.
* @return value or {@code null} for none
*/
public java.util.Map<String, HomeTraitPayload> getHomeTraitPayload() {
return homeTraitPayload;
}

/**
* Map of device IDs to their Unified Device Data Model (UDDM) trait payloads. This field is
* populated when `device_view` is set to HOME_TRAIT_ONLY or HOME_TRAIT_AND_SMART_HOME_TRAIT.
* @param homeTraitPayload homeTraitPayload or {@code null} for none
*/
public QueryResponsePayload setHomeTraitPayload(java.util.Map<String, HomeTraitPayload> homeTraitPayload) {
this.homeTraitPayload = homeTraitPayload;
return this;
}

@Override
public QueryResponsePayload set(String fieldName, Object value) {
return (QueryResponsePayload) super.set(fieldName, value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,19 @@

/**
* Request type for the [`ReportStateAndNotification`](#google.home.graph.v1.HomeGraphApiService.Rep
* ortStateAndNotification) call. It may include states, notifications, or both. States and
* notifications are defined per `device_id` (for example, "123" and "456" in the following
* example). Example: ```json { "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf", "agentUserId":
* "1234", "payload": { "devices": { "states": { "123": { "on": true }, "456": { "on": true,
* "brightness": 10 }, }, } } } ```
* ortStateAndNotification) call. It may include states, notifications, home_traits, home_events, or
* any combination thereof. Smart Home Device Traits (SHDT) `states` and `notifications` are defined
* per `device_id` (for example, "123" and "456" in the following example). Google Home Traits
* `home_traits` and `home_events` are lists of updates or events, each associated with a
* `device_id` (for example, "789" in the following example). Example: ```json { "requestId":
* "ff36a3cc-ec34-11e6-b1a0-64510650abcf", "agentUserId": "1234", "payload": { "devices": {
* "states": { "123": { "on": true }, "456": { "on": true, "brightness": 10 }, }, "homeTraits": [ {
* "deviceId": "789", "components": [ { "componentId": "main", "traitData": [ { "trait": { "@type":
* "type.googleapis.com/home.graph.v1.OnOffTrait", "onOff": true } } ] } ] } ], "homeEvents": [ {
* "deviceId": "789", "events": [ { "componentId": "main", "events": [ { "eventId": "event-123",
* "eventTime": "2026-01-01T00:00:00Z", "event": { "@type":
* "type.googleapis.com/home.graph.v1.DoorbellPressTrait.DoorbellPressedEvent" } } ] } ] } ] } } }
* ```
*
* <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
* transmitted over HTTP when working with the HomeGraph API. For a detailed explanation see:
Expand Down
4 changes: 2 additions & 2 deletions clients/google-api-services-homegraph/v1/2.0.0/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

<groupId>com.google.apis</groupId>
<artifactId>google-api-services-homegraph</artifactId>
<version>v1-rev20260523-2.0.0</version>
<name>HomeGraph API v1-rev20260523-2.0.0</name>
<version>v1-rev20260604-2.0.0</version>
<name>HomeGraph API v1-rev20260604-2.0.0</name>
<packaging>jar</packaging>

<inceptionYear>2011</inceptionYear>
Expand Down
4 changes: 2 additions & 2 deletions clients/google-api-services-homegraph/v1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Add the following lines to your `pom.xml` file:
<dependency>
<groupId>com.google.apis</groupId>
<artifactId>google-api-services-homegraph</artifactId>
<version>v1-rev20260523-2.0.0</version>
<version>v1-rev20260604-2.0.0</version>
</dependency>
</dependencies>
</project>
Expand All @@ -35,7 +35,7 @@ repositories {
mavenCentral()
}
dependencies {
implementation 'com.google.apis:google-api-services-homegraph:v1-rev20260523-2.0.0'
implementation 'com.google.apis:google-api-services-homegraph:v1-rev20260604-2.0.0'
}
```

Expand Down