{
  "parameters": {
    "quotaUser": {
      "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.",
      "type": "string",
      "location": "query"
    },
    "access_token": {
      "description": "OAuth access token.",
      "location": "query",
      "type": "string"
    },
    "$.xgafv": {
      "type": "string",
      "enum": [
        "1",
        "2"
      ],
      "location": "query",
      "enumDescriptions": [
        "v1 error format",
        "v2 error format"
      ],
      "description": "V1 error format."
    },
    "uploadType": {
      "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
      "type": "string",
      "location": "query"
    },
    "callback": {
      "description": "JSONP",
      "type": "string",
      "location": "query"
    },
    "alt": {
      "description": "Data format for response.",
      "enumDescriptions": [
        "Responses with Content-Type of application/json",
        "Media download with context-dependent Content-Type",
        "Responses with Content-Type of application/x-protobuf"
      ],
      "location": "query",
      "type": "string",
      "enum": [
        "json",
        "media",
        "proto"
      ],
      "default": "json"
    },
    "oauth_token": {
      "location": "query",
      "type": "string",
      "description": "OAuth 2.0 token for the current user."
    },
    "upload_protocol": {
      "location": "query",
      "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").",
      "type": "string"
    },
    "key": {
      "type": "string",
      "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
      "location": "query"
    },
    "prettyPrint": {
      "location": "query",
      "type": "boolean",
      "default": "true",
      "description": "Returns response with indentations and line breaks."
    },
    "fields": {
      "location": "query",
      "description": "Selector specifying which fields to include in a partial response.",
      "type": "string"
    }
  },
  "mtlsRootUrl": "https://homegraph.mtls.googleapis.com/",
  "rootUrl": "https://homegraph.googleapis.com/",
  "title": "HomeGraph API",
  "schemas": {
    "TraitData": {
      "description": "Contains the trait payload for a single trait.",
      "properties": {
        "providerUpdateTime": {
          "format": "google-datetime",
          "description": "The custom timestamp supplied by the provider during a ReportStateAndNotification update (if provided). This field is returned as part of the `QueryResponse`.",
          "type": "string"
        },
        "commitTime": {
          "format": "google-datetime",
          "description": "Other metadata for the trait. The time the client update was committed in the server.",
          "type": "string"
        },
        "trait": {
          "additionalProperties": {
            "type": "any",
            "description": "Properties of the object. Contains field @type with type URL."
          },
          "description": "The Provider Home API trait payload.",
          "type": "object"
        }
      },
      "id": "TraitData",
      "type": "object"
    },
    "DeviceNames": {
      "description": "Identifiers used to describe the device.",
      "properties": {
        "nicknames": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Additional names provided by the user for the device."
        },
        "name": {
          "type": "string",
          "description": "Primary name of the device, generally provided by the user. Names will be truncated if over the 60 Unicode code point (character) limit and no errors will be thrown. Developers are responsible for handling long names."
        },
        "defaultNames": {
          "description": "List of names provided by the manufacturer rather than the user, such as serial numbers, SKUs, etc.",
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "id": "DeviceNames",
      "type": "object"
    },
    "ReportStateAndNotificationRequest": {
      "type": "object",
      "properties": {
        "agentUserId": {
          "description": "Required. Third-party user ID.",
          "type": "string"
        },
        "payload": {
          "$ref": "StateAndNotificationPayload",
          "description": "Required. State of devices to update and notification metadata for devices."
        },
        "requestId": {
          "type": "string",
          "description": "Request ID used for debugging."
        },
        "eventId": {
          "type": "string",
          "description": "Unique identifier per event (for example, a doorbell press)."
        },
        "followUpToken": {
          "description": "Deprecated.",
          "deprecated": true,
          "type": "string"
        }
      },
      "id": "ReportStateAndNotificationRequest",
      "description": "Request type for the [`ReportStateAndNotification`](#google.home.graph.v1.HomeGraphApiService.ReportStateAndNotification) 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\" } } ] } ] } ] } } } ```"
    },
    "PersonEvent": {
      "description": "Represents a newly detected person event.",
      "id": "PersonEvent",
      "properties": {
        "zones": {
          "description": "Zones where events are detected in.",
          "type": "array",
          "items": {
            "$ref": "ZoneStruct"
          }
        },
        "zonesIsEmpty": {
          "type": "boolean",
          "description": "If set, zones is an empty list."
        },
        "commonEventData": {
          "$ref": "CommonEventDataStruct"
        }
      },
      "type": "object"
    },
    "SyncResponsePayload": {
      "type": "object",
      "description": "Payload containing device information.",
      "properties": {
        "agentUserId": {
          "description": "Third-party user ID",
          "type": "string"
        },
        "devices": {
          "type": "array",
          "description": "Devices associated with the third-party user.",
          "items": {
            "$ref": "Device"
          }
        }
      },
      "id": "SyncResponsePayload"
    },
    "SyncRequest": {
      "id": "SyncRequest",
      "properties": {
        "requestId": {
          "type": "string",
          "description": "Request ID used for debugging."
        },
        "agentUserId": {
          "description": "Required. Third-party user ID.",
          "type": "string"
        }
      },
      "type": "object",
      "description": "Request type for the [`Sync`](#google.home.graph.v1.HomeGraphApiService.Sync) call."
    },
    "StructurePresenceStateChangeReasonStruct": {
      "type": "object",
      "description": "Contains the metadata about the cause of the structure presence state change.",
      "properties": {
        "userBlame": {
          "description": "Optional. Contains metadata about the cause of presence state change attributed to a user.",
          "$ref": "UserBlameStruct"
        },
        "deviceBlame": {
          "$ref": "DeviceBlameStruct",
          "description": "Optional. Contains metadata about the cause of presence state change attributed to a device."
        }
      },
      "id": "StructurePresenceStateChangeReasonStruct"
    },
    "QueryResponsePayload": {
      "type": "object",
      "properties": {
        "devices": {
          "description": "States of the devices. Map of third-party device ID to struct of device states.",
          "type": "object",
          "additionalProperties": {
            "additionalProperties": {
              "type": "any",
              "description": "Properties of the object."
            },
            "type": "object"
          }
        },
        "homeTraitPayload": {
          "additionalProperties": {
            "$ref": "HomeTraitPayload"
          },
          "description": "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.",
          "type": "object"
        },
        "deviceMetadata": {
          "additionalProperties": {
            "$ref": "DeviceMetadata"
          },
          "description": "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.",
          "type": "object"
        }
      },
      "id": "QueryResponsePayload",
      "description": "Payload containing device states information."
    },
    "SyncResponse": {
      "description": "Response type for the [`Sync`](#google.home.graph.v1.HomeGraphApiService.Sync) call. This should follow the same format as the Google smart home `action.devices.SYNC` [response](https://developers.home.google.com/cloud-to-cloud/intents/sync). Example: ```json { \"requestId\": \"ff36a3cc-ec34-11e6-b1a0-64510650abcf\", \"payload\": { \"agentUserId\": \"1836.15267389\", \"devices\": [{ \"id\": \"123\", \"type\": \"action.devices.types.OUTLET\", \"traits\": [ \"action.devices.traits.OnOff\" ], \"name\": { \"defaultNames\": [\"My Outlet 1234\"], \"name\": \"Night light\", \"nicknames\": [\"wall plug\"] }, \"willReportState\": false, \"deviceInfo\": { \"manufacturer\": \"lights-out-inc\", \"model\": \"hs1234\", \"hwVersion\": \"3.2\", \"swVersion\": \"11.4\" }, \"customData\": { \"fooValue\": 74, \"barValue\": true, \"bazValue\": \"foo\" } }] } } ```",
      "id": "SyncResponse",
      "properties": {
        "payload": {
          "description": "Devices associated with the third-party user.",
          "$ref": "SyncResponsePayload"
        },
        "requestId": {
          "description": "Request ID used for debugging. Copied from the request.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "ReportStateAndNotificationResponse": {
      "properties": {
        "requestId": {
          "description": "Request ID copied from ReportStateAndNotificationRequest.",
          "type": "string"
        },
        "deviceResults": {
          "description": "Map from agent device ID to the result of reporting state and notifications. This is only populated for UDDM updates for now.",
          "type": "object",
          "additionalProperties": {
            "$ref": "Result"
          }
        }
      },
      "description": "Response type for the [`ReportStateAndNotification`](#google.home.graph.v1.HomeGraphApiService.ReportStateAndNotification) call.",
      "type": "object",
      "id": "ReportStateAndNotificationResponse"
    },
    "Component": {
      "type": "object",
      "properties": {
        "childComponents": {
          "items": {
            "$ref": "Component"
          },
          "description": "Optional. Child components.",
          "type": "array"
        },
        "deviceTypes": {
          "description": "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 =\u003e \"ON_OFF_LIGHT\".",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "traitData": {
          "description": "Required. List of trait data associated with the component.",
          "type": "array",
          "items": {
            "$ref": "TraitData"
          }
        },
        "id": {
          "description": "Required. ID of the component from the device provider.",
          "type": "string"
        }
      },
      "description": "Component of a provider device.",
      "id": "Component"
    },
    "CameraEventStreamTrait": {
      "description": "This cluster defines the camera event stream used by GHP for their Cloud-to-Cloud eventing flow",
      "type": "object",
      "properties": {},
      "id": "CameraEventStreamTrait"
    },
    "EventData": {
      "properties": {
        "eventId": {
          "description": "Required. The unique event ID from the device provider.",
          "type": "string"
        },
        "eventTime": {
          "type": "string",
          "format": "google-datetime",
          "description": "Required. The timestamp of the event."
        },
        "event": {
          "description": "Required. The actual event payload.",
          "type": "object",
          "additionalProperties": {
            "type": "any",
            "description": "Properties of the object. Contains field @type with type URL."
          }
        }
      },
      "id": "EventData",
      "type": "object",
      "description": "Contains the details for a single event."
    },
    "EveUtilityTrait": {
      "properties": {
        "motionSensitivity": {
          "format": "int32",
          "type": "integer"
        },
        "airPressure": {
          "format": "double",
          "type": "number",
          "readOnly": true
        },
        "watt": {
          "format": "double",
          "type": "number",
          "readOnly": true
        },
        "rloc16": {
          "type": "integer",
          "format": "int32",
          "readOnly": true
        },
        "holdPosition": {
          "type": "boolean"
        },
        "voltage": {
          "readOnly": true,
          "type": "number",
          "format": "double"
        },
        "loggingMetadata": {
          "readOnly": true,
          "format": "byte",
          "type": "string"
        },
        "openCount": {
          "format": "int64",
          "type": "string"
        },
        "obstructionDetected": {
          "type": "boolean",
          "readOnly": true
        },
        "loggingTime": {
          "format": "byte",
          "type": "string"
        },
        "getConfig": {
          "type": "string",
          "format": "byte",
          "readOnly": true
        },
        "accumulatedControlPoint": {
          "type": "string",
          "format": "int64"
        },
        "lastEventTime": {
          "readOnly": true,
          "format": "int64",
          "type": "string"
        },
        "loggingData": {
          "format": "byte",
          "type": "string",
          "readOnly": true
        },
        "acceptedCommandList": {
          "description": "Required. Output only. Accepted command list for this trait",
          "items": {
            "type": "string",
            "enum": [
              "COMMANDS_UNSPECIFIED"
            ],
            "enumDescriptions": [
              "Deprecated: This enum exists only to conform to AIP guidelines and should never be used."
            ],
            "enumDeprecated": [
              true
            ]
          },
          "readOnly": true,
          "type": "array"
        },
        "childLock": {
          "type": "boolean"
        },
        "loggingControlPoint": {
          "type": "string",
          "format": "byte"
        },
        "setConfig": {
          "type": "string",
          "format": "byte"
        },
        "wattAccumulated": {
          "type": "number",
          "readOnly": true,
          "format": "double"
        },
        "altitude": {
          "format": "double",
          "type": "number"
        },
        "statusFault": {
          "type": "integer",
          "readOnly": true,
          "format": "int32"
        },
        "current": {
          "type": "number",
          "readOnly": true,
          "format": "double"
        },
        "weatherTrend": {
          "readOnly": true,
          "type": "integer",
          "format": "int32"
        }
      },
      "type": "object",
      "id": "EveUtilityTrait"
    },
    "AgentDeviceId": {
      "properties": {
        "id": {
          "description": "Third-party device ID.",
          "type": "string"
        }
      },
      "id": "AgentDeviceId",
      "description": "Third-party device ID for one device.",
      "type": "object"
    },
    "QueryRequestInput": {
      "id": "QueryRequestInput",
      "description": "Device ID inputs to QueryRequest.",
      "type": "object",
      "properties": {
        "payload": {
          "description": "Payload containing third-party device IDs.",
          "$ref": "QueryRequestPayload"
        }
      }
    },
    "PartnerPresenceSignalTrait": {
      "properties": {},
      "id": "PartnerPresenceSignalTrait",
      "description": "Provides attributes and events related to partner presence signals. See PartnerPresenceSignal trait:",
      "type": "object"
    },
    "DeviceInfo": {
      "description": "Device information.",
      "id": "DeviceInfo",
      "type": "object",
      "properties": {
        "swVersion": {
          "description": "Device software version.",
          "type": "string"
        },
        "model": {
          "description": "Device model.",
          "type": "string"
        },
        "manufacturer": {
          "type": "string",
          "description": "Device manufacturer."
        },
        "hwVersion": {
          "description": "Device hardware version.",
          "type": "string"
        }
      }
    },
    "QueryRequestPayload": {
      "properties": {
        "devices": {
          "type": "array",
          "description": "Third-party device IDs for which to get the device states.",
          "items": {
            "$ref": "AgentDeviceId"
          }
        }
      },
      "type": "object",
      "id": "QueryRequestPayload",
      "description": "Payload containing device IDs."
    },
    "Device": {
      "id": "Device",
      "description": "Third-party device definition.",
      "properties": {
        "attributes": {
          "additionalProperties": {
            "description": "Properties of the object.",
            "type": "any"
          },
          "type": "object",
          "description": "Attributes for the traits supported by the device."
        },
        "customData": {
          "description": "Custom device attributes stored in Home Graph and provided to your smart home Action in each [QUERY](https://developers.home.google.com/cloud-to-cloud/intents/query) and [EXECUTE](https://developers.home.google.com/cloud-to-cloud/intents/execute) intent. Data in this object has a few constraints: No sensitive information, including but not limited to Personally Identifiable Information.",
          "additionalProperties": {
            "type": "any",
            "description": "Properties of the object."
          },
          "type": "object"
        },
        "deviceInfo": {
          "$ref": "DeviceInfo",
          "description": "Device manufacturer, model, hardware version, and software version."
        },
        "traits": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "description": "Traits supported by the device. See [device traits](https://developers.home.google.com/cloud-to-cloud/traits)."
        },
        "otherDeviceIds": {
          "items": {
            "$ref": "AgentOtherDeviceId"
          },
          "type": "array",
          "description": "Alternate IDs associated with this device. This is used to identify cloud synced devices enabled for [local fulfillment](https://developers.home.google.com/local-home/overview)."
        },
        "notificationSupportedByAgent": {
          "type": "boolean",
          "description": "Indicates whether your smart home Action will report notifications to Google for this device via ReportStateAndNotification. If your smart home Action enables users to control device notifications, you should update this field and call RequestSyncDevices."
        },
        "willReportState": {
          "type": "boolean",
          "description": "Indicates whether your smart home Action will report state of this device to Google via ReportStateAndNotification."
        },
        "type": {
          "type": "string",
          "description": "Hardware type of the device. See [device types](https://developers.home.google.com/cloud-to-cloud/guides)."
        },
        "name": {
          "$ref": "DeviceNames",
          "description": "Names given to this device by your smart home Action."
        },
        "roomHint": {
          "type": "string",
          "description": "Suggested name for the room where this device is installed. Google attempts to use this value during user setup."
        },
        "structureHint": {
          "description": "Suggested name for the structure where this device is installed. Google attempts to use this value during user setup.",
          "type": "string"
        },
        "id": {
          "description": "Third-party device ID.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "DeviceBlameStruct": {
      "type": "object",
      "properties": {
        "blameType": {
          "type": "string",
          "enum": [
            "DEVICE_BLAME_TYPE_ENUM_UNSPECIFIED",
            "LOCK",
            "UNLOCK",
            "MOTION_DETECTION",
            "TOUCH_INTERACTION",
            "VOICE_INTERACTION"
          ],
          "description": "Required. Specifies the device blame type.",
          "enumDescriptions": [
            "Indicates an unspecified device blame type.",
            "Indicates lock interaction.",
            "Indicates unlock interaction.",
            "Indicates motion detection.",
            "Indicates touch interaction.",
            "Indicates voice interaction."
          ]
        }
      },
      "description": "Contains metadata about the cause of presence state change attributed to a device.",
      "id": "DeviceBlameStruct"
    },
    "RequestSyncDevicesRequest": {
      "id": "RequestSyncDevicesRequest",
      "description": "Request type for the [`RequestSyncDevices`](#google.home.graph.v1.HomeGraphApiService.RequestSyncDevices) call.",
      "type": "object",
      "properties": {
        "async": {
          "type": "boolean",
          "description": "Optional. If set, the request will be added to a queue and a response will be returned immediately. This enables concurrent requests for the given `agent_user_id`, but the caller will not receive any error responses."
        },
        "agentUserId": {
          "description": "Required. Third-party user ID.",
          "type": "string"
        }
      }
    },
    "QueryRequest": {
      "description": "Request type for the [`Query`](#google.home.graph.v1.HomeGraphApiService.Query) call.",
      "properties": {
        "deviceView": {
          "type": "string",
          "enum": [
            "DEVICE_VIEW_UNSPECIFIED",
            "SMART_HOME_TRAIT_ONLY",
            "HOME_TRAIT_ONLY",
            "HOME_TRAIT_AND_SMART_HOME_TRAIT"
          ],
          "enumDescriptions": [
            "Default value. Equivalent to SMART_HOME_TRAIT_ONLY.",
            "Return only standard Smart Home traits in the `devices` map.",
            "Return only Unified Device Data Model (UDDM) traits in the `home_trait_payload` map.",
            "Return both standard Smart Home traits and UDDM traits."
          ],
          "description": "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."
        },
        "includeDeviceMetadata": {
          "description": "Optional. If true, the response will include device metadata in the device_metadata field.",
          "type": "boolean"
        },
        "agentUserId": {
          "type": "string",
          "description": "Required. Third-party user ID."
        },
        "inputs": {
          "items": {
            "$ref": "QueryRequestInput"
          },
          "type": "array",
          "description": "Required. Inputs containing third-party device IDs for which to get the device states."
        },
        "requestId": {
          "description": "Request ID used for debugging.",
          "type": "string"
        }
      },
      "id": "QueryRequest",
      "type": "object"
    },
    "StateAndNotificationPayload": {
      "type": "object",
      "id": "StateAndNotificationPayload",
      "description": "Payload containing the state and notification information for devices.",
      "properties": {
        "devices": {
          "description": "The devices for updating state and sending notifications.",
          "$ref": "ReportStateAndNotificationDevice"
        }
      }
    },
    "MotionEvent": {
      "id": "MotionEvent",
      "type": "object",
      "description": "Represents a newly detected motion event.",
      "properties": {
        "zones": {
          "type": "array",
          "description": "Zones where events are detected in.",
          "items": {
            "$ref": "ZoneStruct"
          }
        },
        "commonEventData": {
          "$ref": "CommonEventDataStruct"
        },
        "zonesIsEmpty": {
          "description": "If set, zones is an empty list.",
          "type": "boolean"
        }
      }
    },
    "ComponentTraitUpdates": {
      "description": "Contains the set of updates for a component.",
      "type": "object",
      "id": "ComponentTraitUpdates",
      "properties": {
        "componentId": {
          "type": "string",
          "description": "Required. ID of the component from the device provider."
        },
        "traitData": {
          "description": "Required. The updated trait data for the component.",
          "items": {
            "$ref": "TraitData"
          },
          "type": "array"
        }
      }
    },
    "HomeTraitUpdates": {
      "description": "Contains the set of updates for a device.",
      "properties": {
        "deviceId": {
          "type": "string",
          "description": "Required. Unique identifier for the device."
        },
        "components": {
          "type": "array",
          "items": {
            "$ref": "ComponentTraitUpdates"
          },
          "description": "Required. Trait updates for each component."
        }
      },
      "id": "HomeTraitUpdates",
      "type": "object"
    },
    "Result": {
      "properties": {
        "homeTraitCommitTime": {
          "type": "string",
          "format": "google-datetime",
          "description": "The trait commit timestamp of the state update in Home Graph."
        }
      },
      "id": "Result",
      "description": "Result of reporting state and notifications for a single device.",
      "type": "object"
    },
    "ZoneStruct": {
      "properties": {
        "zoneId": {
          "format": "int64",
          "description": "Id of the zone",
          "type": "string"
        },
        "label": {
          "description": "Name of the zone.",
          "type": "string"
        }
      },
      "id": "ZoneStruct",
      "type": "object"
    },
    "ThermostatFanControlTrait": {
      "id": "ThermostatFanControlTrait",
      "properties": {
        "timerDuration": {
          "format": "int64",
          "type": "string"
        },
        "timerEnd": {
          "type": "string",
          "format": "int64"
        },
        "timerSpeed": {
          "type": "string",
          "enum": [
            "FAN_SPEED_SETTING_ENUM_UNSPECIFIED",
            "FAN_SPEED_SETTING_OFF",
            "FAN_SPEED_SETTING_STAGE1",
            "FAN_SPEED_SETTING_STAGE2",
            "FAN_SPEED_SETTING_STAGE3",
            "FAN_SPEED_SETTING_AUTO"
          ],
          "enumDescriptions": [
            "",
            "",
            "",
            "",
            "",
            ""
          ]
        }
      },
      "description": "This cluster provides fan control capabilities for thermostats.",
      "type": "object"
    },
    "Empty": {
      "properties": {},
      "type": "object",
      "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }",
      "id": "Empty"
    },
    "QueryResponse": {
      "type": "object",
      "properties": {
        "payload": {
          "$ref": "QueryResponsePayload",
          "description": "Device states for the devices given in the request."
        },
        "requestId": {
          "description": "Request ID used for debugging. Copied from the request.",
          "type": "string"
        }
      },
      "id": "QueryResponse",
      "description": "Response type for the [`Query`](#google.home.graph.v1.HomeGraphApiService.Query) call. This should follow the same format as the Google smart home `action.devices.QUERY` [response](https://developers.home.google.com/cloud-to-cloud/intents/query). Example: ```json { \"requestId\": \"ff36a3cc-ec34-11e6-b1a0-64510650abcf\", \"payload\": { \"devices\": { \"123\": { \"on\": true, \"online\": true }, \"456\": { \"on\": true, \"online\": true, \"brightness\": 80, \"color\": { \"name\": \"cerulean\", \"spectrumRGB\": 31655 } } } } } ```"
    },
    "CommonEventDataStruct": {
      "id": "CommonEventDataStruct",
      "description": "Common camera event data.",
      "type": "object",
      "properties": {
        "mediaUrls": {
          "description": "Contains media urls for the event",
          "$ref": "MediaUrlsStruct"
        },
        "trackId": {
          "description": "Id of the track this object belongs to",
          "type": "string"
        },
        "sessionId": {
          "type": "string",
          "description": "Camera event session id. Used for identifying a unique event session"
        }
      }
    },
    "HomeEvents": {
      "properties": {
        "deviceId": {
          "description": "Required. / Unique identifier for the device.",
          "type": "string"
        },
        "events": {
          "items": {
            "$ref": "Events"
          },
          "description": "Required. List of events for the item.",
          "type": "array"
        }
      },
      "description": "Contains the set of events for an item.",
      "id": "HomeEvents",
      "type": "object"
    },
    "HomeTraitPayload": {
      "type": "object",
      "id": "HomeTraitPayload",
      "properties": {
        "rootComponent": {
          "$ref": "Component",
          "description": "The root component of the device as reported by the provider."
        }
      },
      "description": "Container for UDDM trait data associated with a device."
    },
    "UserBlameStruct": {
      "description": "Contains metadata about the cause of presence state change attributed to a user.",
      "type": "object",
      "properties": {
        "blameType": {
          "enumDescriptions": [
            "Indicates an unspecified user blame type.",
            "Indicates phone location.",
            "Indicates manual change."
          ],
          "description": "Required. Specifies the user blame type.",
          "type": "string",
          "enum": [
            "USER_BLAME_TYPE_ENUM_UNSPECIFIED",
            "PHONE_LOCATION",
            "MANUAL_CHANGE"
          ]
        },
        "userEmail": {
          "description": "Required. Specifies the email of the user.",
          "type": "string"
        }
      },
      "id": "UserBlameStruct"
    },
    "RequestSyncDevicesResponse": {
      "properties": {},
      "description": "Response type for the [`RequestSyncDevices`](#google.home.graph.v1.HomeGraphApiService.RequestSyncDevices) call. Intentionally empty upon success. An HTTP response code is returned with more details upon failure.",
      "type": "object",
      "id": "RequestSyncDevicesResponse"
    },
    "DeviceMetadata": {
      "description": "Metadata for traits of a single device.",
      "type": "object",
      "id": "DeviceMetadata",
      "properties": {
        "traitCommitTimestamps": {
          "description": "Map from the Trait ID (e.g., \"action.devices.traits.OnOff\") to its last Spanner commit timestamp.",
          "additionalProperties": {
            "type": "string",
            "format": "google-datetime"
          },
          "type": "object"
        }
      }
    },
    "MediaUrlsStruct": {
      "id": "MediaUrlsStruct",
      "type": "object",
      "properties": {
        "dashManifestUrl": {
          "description": "URL for a dash manifest for playback",
          "type": "string"
        },
        "previewUrl": {
          "description": "URL for animated preview clip representing the event session",
          "type": "string"
        },
        "thumbnailUrl": {
          "type": "string",
          "description": "URL for thumbnail image representing the event session"
        },
        "hlsMasterPlaylistUrl": {
          "type": "string",
          "description": "URL for a hls master playlist for playback"
        }
      }
    },
    "ReportStateAndNotificationDevice": {
      "type": "object",
      "id": "ReportStateAndNotificationDevice",
      "description": "The states and notifications specific to a device.",
      "properties": {
        "homeTraits": {
          "description": "Optional. UDDM/WHDM trait updates.",
          "type": "array",
          "items": {
            "$ref": "HomeTraitUpdates"
          }
        },
        "notifications": {
          "additionalProperties": {
            "type": "any",
            "description": "Properties of the object."
          },
          "description": "Notifications metadata for devices. See the **Device NOTIFICATIONS** section of the individual trait [reference guides](https://developers.home.google.com/cloud-to-cloud/traits).",
          "type": "object"
        },
        "homeEvents": {
          "description": "Optional. UDDM/WHDM trait events",
          "type": "array",
          "items": {
            "$ref": "HomeEvents"
          }
        },
        "states": {
          "type": "object",
          "additionalProperties": {
            "description": "Properties of the object.",
            "type": "any"
          },
          "description": "States of devices to update. See the **Device STATES** section of the individual trait [reference guides](https://developers.home.google.com/cloud-to-cloud/traits)."
        }
      }
    },
    "StructurePresenceStateChangeEvent": {
      "description": "Sent when the structure presence state changes.",
      "properties": {
        "presenceState": {
          "description": "Required. Specifies the presence state.",
          "enumDescriptions": [
            "Indicates an unknown presence state.",
            "Indicates home presence state.",
            "Indicates away presence state."
          ],
          "type": "string",
          "enum": [
            "STRUCTURE_PRESENCE_STATE_ENUM_UNSPECIFIED",
            "HOME",
            "AWAY"
          ]
        },
        "reason": {
          "description": "Optional. Specifies the presence state change reason.",
          "$ref": "StructurePresenceStateChangeReasonStruct"
        }
      },
      "type": "object",
      "id": "StructurePresenceStateChangeEvent"
    },
    "Events": {
      "type": "object",
      "description": "Contains a set of events for a specific component.",
      "id": "Events",
      "properties": {
        "componentId": {
          "description": "Optional. The ID of the provider component if the events are associated with a specific component. Optional for WHDM events, required for UDDM events.",
          "type": "string"
        },
        "events": {
          "description": "Required. List of events associated with the component.",
          "items": {
            "$ref": "EventData"
          },
          "type": "array"
        }
      }
    },
    "AgentOtherDeviceId": {
      "type": "object",
      "description": "Alternate third-party device ID.",
      "id": "AgentOtherDeviceId",
      "properties": {
        "deviceId": {
          "description": "Unique third-party device ID.",
          "type": "string"
        },
        "agentId": {
          "description": "Project ID for your smart home Action.",
          "type": "string"
        }
      }
    }
  },
  "version_module": true,
  "version": "v1",
  "icons": {
    "x16": "http://www.google.com/images/icons/product/search-16.gif",
    "x32": "http://www.google.com/images/icons/product/search-32.gif"
  },
  "baseUrl": "https://homegraph.googleapis.com/",
  "id": "homegraph:v1",
  "description": "",
  "servicePath": "",
  "protocol": "rest",
  "revision": "20260828",
  "canonicalName": "Home Graph Service",
  "batchPath": "batch",
  "ownerName": "Google",
  "auth": {
    "oauth2": {
      "scopes": {
        "https://www.googleapis.com/auth/homegraph": {
          "description": "Private Service: https://www.googleapis.com/auth/homegraph"
        }
      }
    }
  },
  "documentationLink": "https://developers.home.google.com/cloud-to-cloud/get-started",
  "name": "homegraph",
  "kind": "discovery#restDescription",
  "resources": {
    "devices": {
      "methods": {
        "query": {
          "id": "homegraph.devices.query",
          "parameterOrder": [],
          "scopes": [
            "https://www.googleapis.com/auth/homegraph"
          ],
          "path": "v1/devices:query",
          "httpMethod": "POST",
          "request": {
            "$ref": "QueryRequest"
          },
          "description": "Gets the current states in Home Graph for the given set of the third-party user's devices. The third-party user's identity is passed in via the `agent_user_id` (see QueryRequest). This request must be authorized using service account credentials from your Actions console project.",
          "flatPath": "v1/devices:query",
          "response": {
            "$ref": "QueryResponse"
          },
          "parameters": {}
        },
        "reportStateAndNotification": {
          "request": {
            "$ref": "ReportStateAndNotificationRequest"
          },
          "parameterOrder": [],
          "description": "Reports device state and optionally sends device notifications. Called by your smart home Action when the state of a third-party device changes or you need to send a notification about the device. See [Implement Report State](https://developers.home.google.com/cloud-to-cloud/integration/report-state) for more information. This method updates the device state according to its declared [traits](https://developers.home.google.com/cloud-to-cloud/primer/device-types-and-traits). Publishing a new state value outside of these traits will result in an `INVALID_ARGUMENT` error response. The third-party user's identity is passed in via the `agent_user_id` (see ReportStateAndNotificationRequest). This request must be authorized using service account credentials from your Actions console project.",
          "scopes": [
            "https://www.googleapis.com/auth/homegraph"
          ],
          "httpMethod": "POST",
          "parameters": {},
          "path": "v1/devices:reportStateAndNotification",
          "flatPath": "v1/devices:reportStateAndNotification",
          "response": {
            "$ref": "ReportStateAndNotificationResponse"
          },
          "id": "homegraph.devices.reportStateAndNotification"
        },
        "sync": {
          "flatPath": "v1/devices:sync",
          "response": {
            "$ref": "SyncResponse"
          },
          "path": "v1/devices:sync",
          "request": {
            "$ref": "SyncRequest"
          },
          "parameters": {},
          "parameterOrder": [],
          "scopes": [
            "https://www.googleapis.com/auth/homegraph"
          ],
          "httpMethod": "POST",
          "id": "homegraph.devices.sync",
          "description": "Gets all the devices associated with the given third-party user. The third-party user's identity is passed in via the `agent_user_id` (see SyncRequest). This request must be authorized using service account credentials from your Actions console project."
        },
        "requestSync": {
          "description": "Requests Google to send an `action.devices.SYNC` [intent](https://developers.home.google.com/cloud-to-cloud/intents/sync) to your smart home Action to update device metadata for the given user. The third-party user's identity is passed via the `agent_user_id` (see RequestSyncDevicesRequest). This request must be authorized using service account credentials from your Actions console project.",
          "flatPath": "v1/devices:requestSync",
          "response": {
            "$ref": "RequestSyncDevicesResponse"
          },
          "path": "v1/devices:requestSync",
          "request": {
            "$ref": "RequestSyncDevicesRequest"
          },
          "id": "homegraph.devices.requestSync",
          "scopes": [
            "https://www.googleapis.com/auth/homegraph"
          ],
          "parameterOrder": [],
          "parameters": {},
          "httpMethod": "POST"
        }
      }
    },
    "agentUsers": {
      "methods": {
        "delete": {
          "httpMethod": "DELETE",
          "scopes": [
            "https://www.googleapis.com/auth/homegraph"
          ],
          "parameters": {
            "requestId": {
              "location": "query",
              "type": "string",
              "description": "Request ID used for debugging."
            },
            "agentUserId": {
              "location": "path",
              "pattern": "^agentUsers/.*$",
              "description": "Required. Third-party user ID.",
              "type": "string",
              "required": true
            }
          },
          "parameterOrder": [
            "agentUserId"
          ],
          "description": "Unlinks the given third-party user from your smart home Action. All data related to this user will be deleted. For more details on how users link their accounts, see [fulfillment and authentication](https://developers.home.google.com/cloud-to-cloud/primer/fulfillment). The third-party user's identity is passed in via the `agent_user_id` (see DeleteAgentUserRequest). This request must be authorized using service account credentials from your Actions console project.",
          "path": "v1/{+agentUserId}",
          "flatPath": "v1/agentUsers/{agentUsersId}",
          "response": {
            "$ref": "Empty"
          },
          "id": "homegraph.agentUsers.delete"
        }
      }
    }
  },
  "fullyEncodeReservedExpansion": true,
  "basePath": "",
  "ownerDomain": "google.com",
  "discoveryVersion": "v1"
}
