graph

package
v0.0.0-...-6ceb2ff Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_google_home_graph_v1_device_proto protoreflect.FileDescriptor
View Source
var File_google_home_graph_v1_homegraph_proto protoreflect.FileDescriptor

Functions

func RegisterHomeGraphApiServiceServer

func RegisterHomeGraphApiServiceServer(s *grpc.Server, srv HomeGraphApiServiceServer)

Types

type AgentDeviceId

type AgentDeviceId struct {

	// Third-party device ID.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

Third-party device ID for one device.

func (*AgentDeviceId) Descriptor deprecated

func (*AgentDeviceId) Descriptor() ([]byte, []int)

Deprecated: Use AgentDeviceId.ProtoReflect.Descriptor instead.

func (*AgentDeviceId) GetId

func (x *AgentDeviceId) GetId() string

func (*AgentDeviceId) ProtoMessage

func (*AgentDeviceId) ProtoMessage()

func (*AgentDeviceId) ProtoReflect

func (x *AgentDeviceId) ProtoReflect() protoreflect.Message

func (*AgentDeviceId) Reset

func (x *AgentDeviceId) Reset()

func (*AgentDeviceId) String

func (x *AgentDeviceId) String() string

type AgentOtherDeviceId

type AgentOtherDeviceId struct {

	// Project ID for your smart home Action.
	AgentId string `protobuf:"bytes,1,opt,name=agent_id,json=agentId,proto3" json:"agent_id,omitempty"`
	// Unique third-party device ID.
	DeviceId string `protobuf:"bytes,2,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"`
	// contains filtered or unexported fields
}

Alternate third-party device ID.

func (*AgentOtherDeviceId) Descriptor deprecated

func (*AgentOtherDeviceId) Descriptor() ([]byte, []int)

Deprecated: Use AgentOtherDeviceId.ProtoReflect.Descriptor instead.

func (*AgentOtherDeviceId) GetAgentId

func (x *AgentOtherDeviceId) GetAgentId() string

func (*AgentOtherDeviceId) GetDeviceId

func (x *AgentOtherDeviceId) GetDeviceId() string

func (*AgentOtherDeviceId) ProtoMessage

func (*AgentOtherDeviceId) ProtoMessage()

func (*AgentOtherDeviceId) ProtoReflect

func (x *AgentOtherDeviceId) ProtoReflect() protoreflect.Message

func (*AgentOtherDeviceId) Reset

func (x *AgentOtherDeviceId) Reset()

func (*AgentOtherDeviceId) String

func (x *AgentOtherDeviceId) String() string

type DeleteAgentUserRequest

type DeleteAgentUserRequest struct {

	// Request ID used for debugging.
	RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
	// Required. Third-party user ID.
	AgentUserId string `protobuf:"bytes,2,opt,name=agent_user_id,json=agentUserId,proto3" json:"agent_user_id,omitempty"`
	// contains filtered or unexported fields
}

Request type for the [`DeleteAgentUser`](#google.home.graph.v1.HomeGraphApiService.DeleteAgentUser) call.

func (*DeleteAgentUserRequest) Descriptor deprecated

func (*DeleteAgentUserRequest) Descriptor() ([]byte, []int)

Deprecated: Use DeleteAgentUserRequest.ProtoReflect.Descriptor instead.

func (*DeleteAgentUserRequest) GetAgentUserId

func (x *DeleteAgentUserRequest) GetAgentUserId() string

func (*DeleteAgentUserRequest) GetRequestId

func (x *DeleteAgentUserRequest) GetRequestId() string

func (*DeleteAgentUserRequest) ProtoMessage

func (*DeleteAgentUserRequest) ProtoMessage()

func (*DeleteAgentUserRequest) ProtoReflect

func (x *DeleteAgentUserRequest) ProtoReflect() protoreflect.Message

func (*DeleteAgentUserRequest) Reset

func (x *DeleteAgentUserRequest) Reset()

func (*DeleteAgentUserRequest) String

func (x *DeleteAgentUserRequest) String() string

type Device

type Device struct {

	// Third-party device ID.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Hardware type of the device.
	// See [device
	// types](https://developers.home.google.com/cloud-to-cloud/guides).
	Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	// Traits supported by the device.
	// See [device
	// traits](https://developers.home.google.com/cloud-to-cloud/traits).
	Traits []string `protobuf:"bytes,3,rep,name=traits,proto3" json:"traits,omitempty"`
	// Names given to this device by your smart home Action.
	Name *DeviceNames `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
	// Indicates whether your smart home Action will report state of this device
	// to Google via
	// [ReportStateAndNotification][google.home.graph.v1.HomeGraphApiService.ReportStateAndNotification].
	WillReportState bool `protobuf:"varint,5,opt,name=will_report_state,json=willReportState,proto3" json:"will_report_state,omitempty"`
	// Suggested name for the room where this device is installed.
	// Google attempts to use this value during user setup.
	RoomHint string `protobuf:"bytes,6,opt,name=room_hint,json=roomHint,proto3" json:"room_hint,omitempty"`
	// Suggested name for the structure where this device is installed.
	// Google attempts to use this value during user setup.
	StructureHint string `protobuf:"bytes,7,opt,name=structure_hint,json=structureHint,proto3" json:"structure_hint,omitempty"`
	// Device manufacturer, model, hardware version, and software version.
	DeviceInfo *DeviceInfo `protobuf:"bytes,8,opt,name=device_info,json=deviceInfo,proto3" json:"device_info,omitempty"`
	// Attributes for the traits supported by the device.
	Attributes *structpb.Struct `protobuf:"bytes,9,opt,name=attributes,proto3" json:"attributes,omitempty"`
	// 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.
	CustomData *structpb.Struct `protobuf:"bytes,10,opt,name=custom_data,json=customData,proto3" json:"custom_data,omitempty"`
	// 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).
	OtherDeviceIds []*AgentOtherDeviceId `protobuf:"bytes,11,rep,name=other_device_ids,json=otherDeviceIds,proto3" json:"other_device_ids,omitempty"`
	// Indicates whether your smart home Action will report notifications
	// to Google for this device via
	// [ReportStateAndNotification][google.home.graph.v1.HomeGraphApiService.ReportStateAndNotification].
	//
	// If your smart home Action enables users to control device notifications,
	// you should update this field and call
	// [RequestSyncDevices][google.home.graph.v1.HomeGraphApiService.RequestSyncDevices].
	NotificationSupportedByAgent bool `` /* 151-byte string literal not displayed */
	// contains filtered or unexported fields
}

Third-party device definition.

func (*Device) Descriptor deprecated

func (*Device) Descriptor() ([]byte, []int)

Deprecated: Use Device.ProtoReflect.Descriptor instead.

func (*Device) GetAttributes

func (x *Device) GetAttributes() *structpb.Struct

func (*Device) GetCustomData

func (x *Device) GetCustomData() *structpb.Struct

func (*Device) GetDeviceInfo

func (x *Device) GetDeviceInfo() *DeviceInfo

func (*Device) GetId

func (x *Device) GetId() string

func (*Device) GetName

func (x *Device) GetName() *DeviceNames

func (*Device) GetNotificationSupportedByAgent

func (x *Device) GetNotificationSupportedByAgent() bool

func (*Device) GetOtherDeviceIds

func (x *Device) GetOtherDeviceIds() []*AgentOtherDeviceId

func (*Device) GetRoomHint

func (x *Device) GetRoomHint() string

func (*Device) GetStructureHint

func (x *Device) GetStructureHint() string

func (*Device) GetTraits

func (x *Device) GetTraits() []string

func (*Device) GetType

func (x *Device) GetType() string

func (*Device) GetWillReportState

func (x *Device) GetWillReportState() bool

func (*Device) ProtoMessage

func (*Device) ProtoMessage()

func (*Device) ProtoReflect

func (x *Device) ProtoReflect() protoreflect.Message

func (*Device) Reset

func (x *Device) Reset()

func (*Device) String

func (x *Device) String() string

type DeviceInfo

type DeviceInfo struct {

	// Device manufacturer.
	Manufacturer string `protobuf:"bytes,1,opt,name=manufacturer,proto3" json:"manufacturer,omitempty"`
	// Device model.
	Model string `protobuf:"bytes,2,opt,name=model,proto3" json:"model,omitempty"`
	// Device hardware version.
	HwVersion string `protobuf:"bytes,3,opt,name=hw_version,json=hwVersion,proto3" json:"hw_version,omitempty"`
	// Device software version.
	SwVersion string `protobuf:"bytes,4,opt,name=sw_version,json=swVersion,proto3" json:"sw_version,omitempty"`
	// contains filtered or unexported fields
}

Device information.

func (*DeviceInfo) Descriptor deprecated

func (*DeviceInfo) Descriptor() ([]byte, []int)

Deprecated: Use DeviceInfo.ProtoReflect.Descriptor instead.

func (*DeviceInfo) GetHwVersion

func (x *DeviceInfo) GetHwVersion() string

func (*DeviceInfo) GetManufacturer

func (x *DeviceInfo) GetManufacturer() string

func (*DeviceInfo) GetModel

func (x *DeviceInfo) GetModel() string

func (*DeviceInfo) GetSwVersion

func (x *DeviceInfo) GetSwVersion() string

func (*DeviceInfo) ProtoMessage

func (*DeviceInfo) ProtoMessage()

func (*DeviceInfo) ProtoReflect

func (x *DeviceInfo) ProtoReflect() protoreflect.Message

func (*DeviceInfo) Reset

func (x *DeviceInfo) Reset()

func (*DeviceInfo) String

func (x *DeviceInfo) String() string

type DeviceNames

type DeviceNames struct {

	// Primary name of the device, generally provided by the user.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Additional names provided by the user for the device.
	Nicknames []string `protobuf:"bytes,2,rep,name=nicknames,proto3" json:"nicknames,omitempty"`
	// List of names provided by the manufacturer rather than the user, such as
	// serial numbers, SKUs, etc.
	DefaultNames []string `protobuf:"bytes,3,rep,name=default_names,json=defaultNames,proto3" json:"default_names,omitempty"`
	// contains filtered or unexported fields
}

Identifiers used to describe the device.

func (*DeviceNames) Descriptor deprecated

func (*DeviceNames) Descriptor() ([]byte, []int)

Deprecated: Use DeviceNames.ProtoReflect.Descriptor instead.

func (*DeviceNames) GetDefaultNames

func (x *DeviceNames) GetDefaultNames() []string

func (*DeviceNames) GetName

func (x *DeviceNames) GetName() string

func (*DeviceNames) GetNicknames

func (x *DeviceNames) GetNicknames() []string

func (*DeviceNames) ProtoMessage

func (*DeviceNames) ProtoMessage()

func (*DeviceNames) ProtoReflect

func (x *DeviceNames) ProtoReflect() protoreflect.Message

func (*DeviceNames) Reset

func (x *DeviceNames) Reset()

func (*DeviceNames) String

func (x *DeviceNames) String() string

type HomeGraphApiServiceClient

type HomeGraphApiServiceClient interface {
	// 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][google.home.graph.v1.RequestSyncDevicesRequest]).
	// This request must be authorized using service account credentials from your
	// Actions console project.
	RequestSyncDevices(ctx context.Context, in *RequestSyncDevicesRequest, opts ...grpc.CallOption) (*RequestSyncDevicesResponse, error)
	// 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][google.home.graph.v1.ReportStateAndNotificationRequest]).
	// This request must be authorized using service account credentials from your
	// Actions console project.
	ReportStateAndNotification(ctx context.Context, in *ReportStateAndNotificationRequest, opts ...grpc.CallOption) (*ReportStateAndNotificationResponse, error)
	// 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][google.home.graph.v1.DeleteAgentUserRequest]).
	// This request must be authorized using service account credentials from your
	// Actions console project.
	DeleteAgentUser(ctx context.Context, in *DeleteAgentUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// 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][google.home.graph.v1.QueryRequest]).
	// This request must be authorized using service account credentials from your
	// Actions console project.
	Query(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error)
	// 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][google.home.graph.v1.SyncRequest]).
	// This request must be authorized using service account credentials from your
	// Actions console project.
	Sync(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (*SyncResponse, error)
}

HomeGraphApiServiceClient is the client API for HomeGraphApiService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

type HomeGraphApiServiceServer

type HomeGraphApiServiceServer interface {
	// 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][google.home.graph.v1.RequestSyncDevicesRequest]).
	// This request must be authorized using service account credentials from your
	// Actions console project.
	RequestSyncDevices(context.Context, *RequestSyncDevicesRequest) (*RequestSyncDevicesResponse, error)
	// 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][google.home.graph.v1.ReportStateAndNotificationRequest]).
	// This request must be authorized using service account credentials from your
	// Actions console project.
	ReportStateAndNotification(context.Context, *ReportStateAndNotificationRequest) (*ReportStateAndNotificationResponse, error)
	// 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][google.home.graph.v1.DeleteAgentUserRequest]).
	// This request must be authorized using service account credentials from your
	// Actions console project.
	DeleteAgentUser(context.Context, *DeleteAgentUserRequest) (*emptypb.Empty, error)
	// 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][google.home.graph.v1.QueryRequest]).
	// This request must be authorized using service account credentials from your
	// Actions console project.
	Query(context.Context, *QueryRequest) (*QueryResponse, error)
	// 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][google.home.graph.v1.SyncRequest]).
	// This request must be authorized using service account credentials from your
	// Actions console project.
	Sync(context.Context, *SyncRequest) (*SyncResponse, error)
}

HomeGraphApiServiceServer is the server API for HomeGraphApiService service.

type QueryRequest

type QueryRequest struct {

	// Request ID used for debugging.
	RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
	// Required. Third-party user ID.
	AgentUserId string `protobuf:"bytes,2,opt,name=agent_user_id,json=agentUserId,proto3" json:"agent_user_id,omitempty"`
	// Required. Inputs containing third-party device IDs for which to
	// get the device states.
	Inputs []*QueryRequestInput `protobuf:"bytes,3,rep,name=inputs,proto3" json:"inputs,omitempty"`
	// contains filtered or unexported fields
}

Request type for the [`Query`](#google.home.graph.v1.HomeGraphApiService.Query) call.

func (*QueryRequest) Descriptor deprecated

func (*QueryRequest) Descriptor() ([]byte, []int)

Deprecated: Use QueryRequest.ProtoReflect.Descriptor instead.

func (*QueryRequest) GetAgentUserId

func (x *QueryRequest) GetAgentUserId() string

func (*QueryRequest) GetInputs

func (x *QueryRequest) GetInputs() []*QueryRequestInput

func (*QueryRequest) GetRequestId

func (x *QueryRequest) GetRequestId() string

func (*QueryRequest) ProtoMessage

func (*QueryRequest) ProtoMessage()

func (*QueryRequest) ProtoReflect

func (x *QueryRequest) ProtoReflect() protoreflect.Message

func (*QueryRequest) Reset

func (x *QueryRequest) Reset()

func (*QueryRequest) String

func (x *QueryRequest) String() string

type QueryRequestInput

type QueryRequestInput struct {

	// Payload containing third-party device IDs.
	Payload *QueryRequestPayload `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
	// contains filtered or unexported fields
}

Device ID inputs to QueryRequest[google.home.graph.v1.QueryRequest].

func (*QueryRequestInput) Descriptor deprecated

func (*QueryRequestInput) Descriptor() ([]byte, []int)

Deprecated: Use QueryRequestInput.ProtoReflect.Descriptor instead.

func (*QueryRequestInput) GetPayload

func (x *QueryRequestInput) GetPayload() *QueryRequestPayload

func (*QueryRequestInput) ProtoMessage

func (*QueryRequestInput) ProtoMessage()

func (*QueryRequestInput) ProtoReflect

func (x *QueryRequestInput) ProtoReflect() protoreflect.Message

func (*QueryRequestInput) Reset

func (x *QueryRequestInput) Reset()

func (*QueryRequestInput) String

func (x *QueryRequestInput) String() string

type QueryRequestPayload

type QueryRequestPayload struct {

	// Third-party device IDs for which to get the device states.
	Devices []*AgentDeviceId `protobuf:"bytes,1,rep,name=devices,proto3" json:"devices,omitempty"`
	// contains filtered or unexported fields
}

Payload containing device IDs.

func (*QueryRequestPayload) Descriptor deprecated

func (*QueryRequestPayload) Descriptor() ([]byte, []int)

Deprecated: Use QueryRequestPayload.ProtoReflect.Descriptor instead.

func (*QueryRequestPayload) GetDevices

func (x *QueryRequestPayload) GetDevices() []*AgentDeviceId

func (*QueryRequestPayload) ProtoMessage

func (*QueryRequestPayload) ProtoMessage()

func (*QueryRequestPayload) ProtoReflect

func (x *QueryRequestPayload) ProtoReflect() protoreflect.Message

func (*QueryRequestPayload) Reset

func (x *QueryRequestPayload) Reset()

func (*QueryRequestPayload) String

func (x *QueryRequestPayload) String() string

type QueryResponse

type QueryResponse struct {

	// Request ID used for debugging. Copied from the request.
	RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
	// Device states for the devices given in the request.
	Payload *QueryResponsePayload `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
	// contains filtered or unexported fields
}

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
        }
      }
    }
  }
}

```

func (*QueryResponse) Descriptor deprecated

func (*QueryResponse) Descriptor() ([]byte, []int)

Deprecated: Use QueryResponse.ProtoReflect.Descriptor instead.

func (*QueryResponse) GetPayload

func (x *QueryResponse) GetPayload() *QueryResponsePayload

func (*QueryResponse) GetRequestId

func (x *QueryResponse) GetRequestId() string

func (*QueryResponse) ProtoMessage

func (*QueryResponse) ProtoMessage()

func (*QueryResponse) ProtoReflect

func (x *QueryResponse) ProtoReflect() protoreflect.Message

func (*QueryResponse) Reset

func (x *QueryResponse) Reset()

func (*QueryResponse) String

func (x *QueryResponse) String() string

type QueryResponsePayload

type QueryResponsePayload struct {

	// States of the devices. Map of third-party device ID to struct of device
	// states.
	Devices map[string]*structpb.Struct `` /* 155-byte string literal not displayed */
	// contains filtered or unexported fields
}

Payload containing device states information.

func (*QueryResponsePayload) Descriptor deprecated

func (*QueryResponsePayload) Descriptor() ([]byte, []int)

Deprecated: Use QueryResponsePayload.ProtoReflect.Descriptor instead.

func (*QueryResponsePayload) GetDevices

func (x *QueryResponsePayload) GetDevices() map[string]*structpb.Struct

func (*QueryResponsePayload) ProtoMessage

func (*QueryResponsePayload) ProtoMessage()

func (*QueryResponsePayload) ProtoReflect

func (x *QueryResponsePayload) ProtoReflect() protoreflect.Message

func (*QueryResponsePayload) Reset

func (x *QueryResponsePayload) Reset()

func (*QueryResponsePayload) String

func (x *QueryResponsePayload) String() string

type ReportStateAndNotificationDevice

type ReportStateAndNotificationDevice struct {

	// 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).
	States *structpb.Struct `protobuf:"bytes,1,opt,name=states,proto3" json:"states,omitempty"`
	// Notifications metadata for devices. See the **Device NOTIFICATIONS**
	// section of the individual trait [reference
	// guides](https://developers.home.google.com/cloud-to-cloud/traits).
	Notifications *structpb.Struct `protobuf:"bytes,2,opt,name=notifications,proto3" json:"notifications,omitempty"`
	// contains filtered or unexported fields
}

The states and notifications specific to a device.

func (*ReportStateAndNotificationDevice) Descriptor deprecated

func (*ReportStateAndNotificationDevice) Descriptor() ([]byte, []int)

Deprecated: Use ReportStateAndNotificationDevice.ProtoReflect.Descriptor instead.

func (*ReportStateAndNotificationDevice) GetNotifications

func (x *ReportStateAndNotificationDevice) GetNotifications() *structpb.Struct

func (*ReportStateAndNotificationDevice) GetStates

func (*ReportStateAndNotificationDevice) ProtoMessage

func (*ReportStateAndNotificationDevice) ProtoMessage()

func (*ReportStateAndNotificationDevice) ProtoReflect

func (*ReportStateAndNotificationDevice) Reset

func (*ReportStateAndNotificationDevice) String

type ReportStateAndNotificationRequest

type ReportStateAndNotificationRequest struct {

	// Request ID used for debugging.
	RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
	// Unique identifier per event (for example, a doorbell press).
	EventId string `protobuf:"bytes,4,opt,name=event_id,json=eventId,proto3" json:"event_id,omitempty"`
	// Required. Third-party user ID.
	AgentUserId string `protobuf:"bytes,2,opt,name=agent_user_id,json=agentUserId,proto3" json:"agent_user_id,omitempty"`
	// Deprecated.
	//
	// Deprecated: Do not use.
	FollowUpToken string `protobuf:"bytes,5,opt,name=follow_up_token,json=followUpToken,proto3" json:"follow_up_token,omitempty"`
	// Required. State of devices to update and notification metadata for devices.
	Payload *StateAndNotificationPayload `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"`
	// contains filtered or unexported fields
}

Request type for the [`ReportStateAndNotification`](#google.home.graph.v1.HomeGraphApiService.ReportStateAndNotification) 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
        }
      },
    }
  }
}

```

func (*ReportStateAndNotificationRequest) Descriptor deprecated

func (*ReportStateAndNotificationRequest) Descriptor() ([]byte, []int)

Deprecated: Use ReportStateAndNotificationRequest.ProtoReflect.Descriptor instead.

func (*ReportStateAndNotificationRequest) GetAgentUserId

func (x *ReportStateAndNotificationRequest) GetAgentUserId() string

func (*ReportStateAndNotificationRequest) GetEventId

func (x *ReportStateAndNotificationRequest) GetEventId() string

func (*ReportStateAndNotificationRequest) GetFollowUpToken deprecated

func (x *ReportStateAndNotificationRequest) GetFollowUpToken() string

Deprecated: Do not use.

func (*ReportStateAndNotificationRequest) GetPayload

func (*ReportStateAndNotificationRequest) GetRequestId

func (x *ReportStateAndNotificationRequest) GetRequestId() string

func (*ReportStateAndNotificationRequest) ProtoMessage

func (*ReportStateAndNotificationRequest) ProtoMessage()

func (*ReportStateAndNotificationRequest) ProtoReflect

func (*ReportStateAndNotificationRequest) Reset

func (*ReportStateAndNotificationRequest) String

type ReportStateAndNotificationResponse

type ReportStateAndNotificationResponse struct {

	// Request ID copied from
	// [ReportStateAndNotificationRequest][google.home.graph.v1.ReportStateAndNotificationRequest].
	RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
	// contains filtered or unexported fields
}

Response type for the [`ReportStateAndNotification`](#google.home.graph.v1.HomeGraphApiService.ReportStateAndNotification) call.

func (*ReportStateAndNotificationResponse) Descriptor deprecated

func (*ReportStateAndNotificationResponse) Descriptor() ([]byte, []int)

Deprecated: Use ReportStateAndNotificationResponse.ProtoReflect.Descriptor instead.

func (*ReportStateAndNotificationResponse) GetRequestId

func (x *ReportStateAndNotificationResponse) GetRequestId() string

func (*ReportStateAndNotificationResponse) ProtoMessage

func (*ReportStateAndNotificationResponse) ProtoMessage()

func (*ReportStateAndNotificationResponse) ProtoReflect

func (*ReportStateAndNotificationResponse) Reset

func (*ReportStateAndNotificationResponse) String

type RequestSyncDevicesRequest

type RequestSyncDevicesRequest struct {

	// Required. Third-party user ID.
	AgentUserId string `protobuf:"bytes,1,opt,name=agent_user_id,json=agentUserId,proto3" json:"agent_user_id,omitempty"`
	// 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.
	Async bool `protobuf:"varint,2,opt,name=async,proto3" json:"async,omitempty"`
	// contains filtered or unexported fields
}

Request type for the [`RequestSyncDevices`](#google.home.graph.v1.HomeGraphApiService.RequestSyncDevices) call.

func (*RequestSyncDevicesRequest) Descriptor deprecated

func (*RequestSyncDevicesRequest) Descriptor() ([]byte, []int)

Deprecated: Use RequestSyncDevicesRequest.ProtoReflect.Descriptor instead.

func (*RequestSyncDevicesRequest) GetAgentUserId

func (x *RequestSyncDevicesRequest) GetAgentUserId() string

func (*RequestSyncDevicesRequest) GetAsync

func (x *RequestSyncDevicesRequest) GetAsync() bool

func (*RequestSyncDevicesRequest) ProtoMessage

func (*RequestSyncDevicesRequest) ProtoMessage()

func (*RequestSyncDevicesRequest) ProtoReflect

func (*RequestSyncDevicesRequest) Reset

func (x *RequestSyncDevicesRequest) Reset()

func (*RequestSyncDevicesRequest) String

func (x *RequestSyncDevicesRequest) String() string

type RequestSyncDevicesResponse

type RequestSyncDevicesResponse struct {
	// contains filtered or unexported fields
}

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.

func (*RequestSyncDevicesResponse) Descriptor deprecated

func (*RequestSyncDevicesResponse) Descriptor() ([]byte, []int)

Deprecated: Use RequestSyncDevicesResponse.ProtoReflect.Descriptor instead.

func (*RequestSyncDevicesResponse) ProtoMessage

func (*RequestSyncDevicesResponse) ProtoMessage()

func (*RequestSyncDevicesResponse) ProtoReflect

func (*RequestSyncDevicesResponse) Reset

func (x *RequestSyncDevicesResponse) Reset()

func (*RequestSyncDevicesResponse) String

func (x *RequestSyncDevicesResponse) String() string

type StateAndNotificationPayload

type StateAndNotificationPayload struct {

	// The devices for updating state and sending notifications.
	Devices *ReportStateAndNotificationDevice `protobuf:"bytes,1,opt,name=devices,proto3" json:"devices,omitempty"`
	// contains filtered or unexported fields
}

Payload containing the state and notification information for devices.

func (*StateAndNotificationPayload) Descriptor deprecated

func (*StateAndNotificationPayload) Descriptor() ([]byte, []int)

Deprecated: Use StateAndNotificationPayload.ProtoReflect.Descriptor instead.

func (*StateAndNotificationPayload) GetDevices

func (*StateAndNotificationPayload) ProtoMessage

func (*StateAndNotificationPayload) ProtoMessage()

func (*StateAndNotificationPayload) ProtoReflect

func (*StateAndNotificationPayload) Reset

func (x *StateAndNotificationPayload) Reset()

func (*StateAndNotificationPayload) String

func (x *StateAndNotificationPayload) String() string

type SyncRequest

type SyncRequest struct {

	// Request ID used for debugging.
	RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
	// Required. Third-party user ID.
	AgentUserId string `protobuf:"bytes,2,opt,name=agent_user_id,json=agentUserId,proto3" json:"agent_user_id,omitempty"`
	// contains filtered or unexported fields
}

Request type for the [`Sync`](#google.home.graph.v1.HomeGraphApiService.Sync) call.

func (*SyncRequest) Descriptor deprecated

func (*SyncRequest) Descriptor() ([]byte, []int)

Deprecated: Use SyncRequest.ProtoReflect.Descriptor instead.

func (*SyncRequest) GetAgentUserId

func (x *SyncRequest) GetAgentUserId() string

func (*SyncRequest) GetRequestId

func (x *SyncRequest) GetRequestId() string

func (*SyncRequest) ProtoMessage

func (*SyncRequest) ProtoMessage()

func (*SyncRequest) ProtoReflect

func (x *SyncRequest) ProtoReflect() protoreflect.Message

func (*SyncRequest) Reset

func (x *SyncRequest) Reset()

func (*SyncRequest) String

func (x *SyncRequest) String() string

type SyncResponse

type SyncResponse struct {

	// Request ID used for debugging. Copied from the request.
	RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
	// Devices associated with the third-party user.
	Payload *SyncResponsePayload `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
	// contains filtered or unexported fields
}

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"
      }
    }]
  }
}

```

func (*SyncResponse) Descriptor deprecated

func (*SyncResponse) Descriptor() ([]byte, []int)

Deprecated: Use SyncResponse.ProtoReflect.Descriptor instead.

func (*SyncResponse) GetPayload

func (x *SyncResponse) GetPayload() *SyncResponsePayload

func (*SyncResponse) GetRequestId

func (x *SyncResponse) GetRequestId() string

func (*SyncResponse) ProtoMessage

func (*SyncResponse) ProtoMessage()

func (*SyncResponse) ProtoReflect

func (x *SyncResponse) ProtoReflect() protoreflect.Message

func (*SyncResponse) Reset

func (x *SyncResponse) Reset()

func (*SyncResponse) String

func (x *SyncResponse) String() string

type SyncResponsePayload

type SyncResponsePayload struct {

	// Third-party user ID
	AgentUserId string `protobuf:"bytes,1,opt,name=agent_user_id,json=agentUserId,proto3" json:"agent_user_id,omitempty"`
	// Devices associated with the third-party user.
	Devices []*Device `protobuf:"bytes,2,rep,name=devices,proto3" json:"devices,omitempty"`
	// contains filtered or unexported fields
}

Payload containing device information.

func (*SyncResponsePayload) Descriptor deprecated

func (*SyncResponsePayload) Descriptor() ([]byte, []int)

Deprecated: Use SyncResponsePayload.ProtoReflect.Descriptor instead.

func (*SyncResponsePayload) GetAgentUserId

func (x *SyncResponsePayload) GetAgentUserId() string

func (*SyncResponsePayload) GetDevices

func (x *SyncResponsePayload) GetDevices() []*Device

func (*SyncResponsePayload) ProtoMessage

func (*SyncResponsePayload) ProtoMessage()

func (*SyncResponsePayload) ProtoReflect

func (x *SyncResponsePayload) ProtoReflect() protoreflect.Message

func (*SyncResponsePayload) Reset

func (x *SyncResponsePayload) Reset()

func (*SyncResponsePayload) String

func (x *SyncResponsePayload) String() string

type UnimplementedHomeGraphApiServiceServer

type UnimplementedHomeGraphApiServiceServer struct {
}

UnimplementedHomeGraphApiServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedHomeGraphApiServiceServer) DeleteAgentUser

func (*UnimplementedHomeGraphApiServiceServer) Query

func (*UnimplementedHomeGraphApiServiceServer) RequestSyncDevices

func (*UnimplementedHomeGraphApiServiceServer) Sync

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL