Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 

1260 wiersze
53 KiB

  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: google/home/graph/v1/homegraph.proto
  3. package graph // import "google.golang.org/genproto/googleapis/home/graph/v1"
  4. import proto "github.com/golang/protobuf/proto"
  5. import fmt "fmt"
  6. import math "math"
  7. import empty "github.com/golang/protobuf/ptypes/empty"
  8. import _struct "github.com/golang/protobuf/ptypes/struct"
  9. import _ "google.golang.org/genproto/googleapis/api/annotations"
  10. import (
  11. context "golang.org/x/net/context"
  12. grpc "google.golang.org/grpc"
  13. )
  14. // Reference imports to suppress errors if they are not otherwise used.
  15. var _ = proto.Marshal
  16. var _ = fmt.Errorf
  17. var _ = math.Inf
  18. // This is a compile-time assertion to ensure that this generated file
  19. // is compatible with the proto package it is being compiled against.
  20. // A compilation error at this line likely means your copy of the
  21. // proto package needs to be updated.
  22. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  23. // Request type for RequestSyncDevices call.
  24. type RequestSyncDevicesRequest struct {
  25. // Required. Third-party user id issued by agent's third-party identity
  26. // provider.
  27. AgentUserId string `protobuf:"bytes,1,opt,name=agent_user_id,json=agentUserId,proto3" json:"agent_user_id,omitempty"`
  28. // Optional. If set, the request will be added to a queue and a response will
  29. // be returned immediately. The queue allows for de-duplication of
  30. // simultaneous requests.
  31. Async bool `protobuf:"varint,2,opt,name=async,proto3" json:"async,omitempty"`
  32. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  33. XXX_unrecognized []byte `json:"-"`
  34. XXX_sizecache int32 `json:"-"`
  35. }
  36. func (m *RequestSyncDevicesRequest) Reset() { *m = RequestSyncDevicesRequest{} }
  37. func (m *RequestSyncDevicesRequest) String() string { return proto.CompactTextString(m) }
  38. func (*RequestSyncDevicesRequest) ProtoMessage() {}
  39. func (*RequestSyncDevicesRequest) Descriptor() ([]byte, []int) {
  40. return fileDescriptor_homegraph_b6eae4d48cf76516, []int{0}
  41. }
  42. func (m *RequestSyncDevicesRequest) XXX_Unmarshal(b []byte) error {
  43. return xxx_messageInfo_RequestSyncDevicesRequest.Unmarshal(m, b)
  44. }
  45. func (m *RequestSyncDevicesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  46. return xxx_messageInfo_RequestSyncDevicesRequest.Marshal(b, m, deterministic)
  47. }
  48. func (dst *RequestSyncDevicesRequest) XXX_Merge(src proto.Message) {
  49. xxx_messageInfo_RequestSyncDevicesRequest.Merge(dst, src)
  50. }
  51. func (m *RequestSyncDevicesRequest) XXX_Size() int {
  52. return xxx_messageInfo_RequestSyncDevicesRequest.Size(m)
  53. }
  54. func (m *RequestSyncDevicesRequest) XXX_DiscardUnknown() {
  55. xxx_messageInfo_RequestSyncDevicesRequest.DiscardUnknown(m)
  56. }
  57. var xxx_messageInfo_RequestSyncDevicesRequest proto.InternalMessageInfo
  58. func (m *RequestSyncDevicesRequest) GetAgentUserId() string {
  59. if m != nil {
  60. return m.AgentUserId
  61. }
  62. return ""
  63. }
  64. func (m *RequestSyncDevicesRequest) GetAsync() bool {
  65. if m != nil {
  66. return m.Async
  67. }
  68. return false
  69. }
  70. // Response type for RequestSyncDevices call. Intentionally empty upon success.
  71. // An HTTP response code is returned with more details upon failure.
  72. type RequestSyncDevicesResponse struct {
  73. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  74. XXX_unrecognized []byte `json:"-"`
  75. XXX_sizecache int32 `json:"-"`
  76. }
  77. func (m *RequestSyncDevicesResponse) Reset() { *m = RequestSyncDevicesResponse{} }
  78. func (m *RequestSyncDevicesResponse) String() string { return proto.CompactTextString(m) }
  79. func (*RequestSyncDevicesResponse) ProtoMessage() {}
  80. func (*RequestSyncDevicesResponse) Descriptor() ([]byte, []int) {
  81. return fileDescriptor_homegraph_b6eae4d48cf76516, []int{1}
  82. }
  83. func (m *RequestSyncDevicesResponse) XXX_Unmarshal(b []byte) error {
  84. return xxx_messageInfo_RequestSyncDevicesResponse.Unmarshal(m, b)
  85. }
  86. func (m *RequestSyncDevicesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  87. return xxx_messageInfo_RequestSyncDevicesResponse.Marshal(b, m, deterministic)
  88. }
  89. func (dst *RequestSyncDevicesResponse) XXX_Merge(src proto.Message) {
  90. xxx_messageInfo_RequestSyncDevicesResponse.Merge(dst, src)
  91. }
  92. func (m *RequestSyncDevicesResponse) XXX_Size() int {
  93. return xxx_messageInfo_RequestSyncDevicesResponse.Size(m)
  94. }
  95. func (m *RequestSyncDevicesResponse) XXX_DiscardUnknown() {
  96. xxx_messageInfo_RequestSyncDevicesResponse.DiscardUnknown(m)
  97. }
  98. var xxx_messageInfo_RequestSyncDevicesResponse proto.InternalMessageInfo
  99. // Sample ReportStateAndNotificationRequest, with states and notifications
  100. // defined per device_id (eg: "123" and "456" in the following example):
  101. // {
  102. // "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  103. // "agentUserId": "1234",
  104. // "payload": {
  105. // "devices": {
  106. // "states": {
  107. // "123": {
  108. // "on": true
  109. // },
  110. // "456": {
  111. // "on": true,
  112. // "brightness": 10
  113. // }
  114. // },
  115. // "notifications": {
  116. // "123": {
  117. // "ObjectDetected": {
  118. // "priority": 0,
  119. // "objects": {
  120. // "NAMED": ["Alice", "Bob", "Carol", "Eve"]
  121. // }
  122. // },
  123. // "DoorUnlocked": {
  124. // "priority": 0,
  125. // "keyUsed": {
  126. // "keyName": "Wife's key"
  127. // }
  128. // }
  129. // },
  130. // "456": {
  131. // "SprinklersOn": {
  132. // "priority": 0,
  133. // "timeStarted": "1513792702"
  134. // }
  135. // }
  136. // }
  137. // }
  138. // }
  139. // }
  140. // Request type for ReportStateAndNotification call. It may include States,
  141. // Notifications, or both. This request uses globally unique flattened state
  142. // names instead of namespaces based on traits to align with the existing QUERY
  143. // and EXECUTE APIs implemented by 90+ Smart Home partners.
  144. // Next tag: 6.
  145. type ReportStateAndNotificationRequest struct {
  146. // Request id used for debugging.
  147. RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
  148. // Unique identifier per event (eg: doorbell press).
  149. EventId string `protobuf:"bytes,4,opt,name=event_id,json=eventId,proto3" json:"event_id,omitempty"`
  150. // Required. Third-party user id.
  151. AgentUserId string `protobuf:"bytes,2,opt,name=agent_user_id,json=agentUserId,proto3" json:"agent_user_id,omitempty"`
  152. // Token to maintain state in the follow up notification response.
  153. FollowUpToken string `protobuf:"bytes,5,opt,name=follow_up_token,json=followUpToken,proto3" json:"follow_up_token,omitempty"`
  154. // State of devices to update and notification metadata for devices. For
  155. // example, if a user turns a light on manually, a State update should be
  156. // sent so that the information is always the current status of the device.
  157. // Notifications are independent from the state and its piece of the payload
  158. // should contain everything necessary to notify the user. Although it may be
  159. // related to a state change, it does not need to be. For example, if a
  160. // device can turn on/off and change temperature, the states reported would
  161. // include both "on" and "70 degrees" but the 3p may choose not to send any
  162. // notification for that, or to only say that the "the room is heating up",
  163. // keeping state and notification independent.
  164. Payload *StateAndNotificationPayload `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"`
  165. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  166. XXX_unrecognized []byte `json:"-"`
  167. XXX_sizecache int32 `json:"-"`
  168. }
  169. func (m *ReportStateAndNotificationRequest) Reset() { *m = ReportStateAndNotificationRequest{} }
  170. func (m *ReportStateAndNotificationRequest) String() string { return proto.CompactTextString(m) }
  171. func (*ReportStateAndNotificationRequest) ProtoMessage() {}
  172. func (*ReportStateAndNotificationRequest) Descriptor() ([]byte, []int) {
  173. return fileDescriptor_homegraph_b6eae4d48cf76516, []int{2}
  174. }
  175. func (m *ReportStateAndNotificationRequest) XXX_Unmarshal(b []byte) error {
  176. return xxx_messageInfo_ReportStateAndNotificationRequest.Unmarshal(m, b)
  177. }
  178. func (m *ReportStateAndNotificationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  179. return xxx_messageInfo_ReportStateAndNotificationRequest.Marshal(b, m, deterministic)
  180. }
  181. func (dst *ReportStateAndNotificationRequest) XXX_Merge(src proto.Message) {
  182. xxx_messageInfo_ReportStateAndNotificationRequest.Merge(dst, src)
  183. }
  184. func (m *ReportStateAndNotificationRequest) XXX_Size() int {
  185. return xxx_messageInfo_ReportStateAndNotificationRequest.Size(m)
  186. }
  187. func (m *ReportStateAndNotificationRequest) XXX_DiscardUnknown() {
  188. xxx_messageInfo_ReportStateAndNotificationRequest.DiscardUnknown(m)
  189. }
  190. var xxx_messageInfo_ReportStateAndNotificationRequest proto.InternalMessageInfo
  191. func (m *ReportStateAndNotificationRequest) GetRequestId() string {
  192. if m != nil {
  193. return m.RequestId
  194. }
  195. return ""
  196. }
  197. func (m *ReportStateAndNotificationRequest) GetEventId() string {
  198. if m != nil {
  199. return m.EventId
  200. }
  201. return ""
  202. }
  203. func (m *ReportStateAndNotificationRequest) GetAgentUserId() string {
  204. if m != nil {
  205. return m.AgentUserId
  206. }
  207. return ""
  208. }
  209. func (m *ReportStateAndNotificationRequest) GetFollowUpToken() string {
  210. if m != nil {
  211. return m.FollowUpToken
  212. }
  213. return ""
  214. }
  215. func (m *ReportStateAndNotificationRequest) GetPayload() *StateAndNotificationPayload {
  216. if m != nil {
  217. return m.Payload
  218. }
  219. return nil
  220. }
  221. // Response type for ReportStateAndNotification call.
  222. type ReportStateAndNotificationResponse struct {
  223. // Request id copied from ReportStateAndNotificationRequest.
  224. RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
  225. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  226. XXX_unrecognized []byte `json:"-"`
  227. XXX_sizecache int32 `json:"-"`
  228. }
  229. func (m *ReportStateAndNotificationResponse) Reset() { *m = ReportStateAndNotificationResponse{} }
  230. func (m *ReportStateAndNotificationResponse) String() string { return proto.CompactTextString(m) }
  231. func (*ReportStateAndNotificationResponse) ProtoMessage() {}
  232. func (*ReportStateAndNotificationResponse) Descriptor() ([]byte, []int) {
  233. return fileDescriptor_homegraph_b6eae4d48cf76516, []int{3}
  234. }
  235. func (m *ReportStateAndNotificationResponse) XXX_Unmarshal(b []byte) error {
  236. return xxx_messageInfo_ReportStateAndNotificationResponse.Unmarshal(m, b)
  237. }
  238. func (m *ReportStateAndNotificationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  239. return xxx_messageInfo_ReportStateAndNotificationResponse.Marshal(b, m, deterministic)
  240. }
  241. func (dst *ReportStateAndNotificationResponse) XXX_Merge(src proto.Message) {
  242. xxx_messageInfo_ReportStateAndNotificationResponse.Merge(dst, src)
  243. }
  244. func (m *ReportStateAndNotificationResponse) XXX_Size() int {
  245. return xxx_messageInfo_ReportStateAndNotificationResponse.Size(m)
  246. }
  247. func (m *ReportStateAndNotificationResponse) XXX_DiscardUnknown() {
  248. xxx_messageInfo_ReportStateAndNotificationResponse.DiscardUnknown(m)
  249. }
  250. var xxx_messageInfo_ReportStateAndNotificationResponse proto.InternalMessageInfo
  251. func (m *ReportStateAndNotificationResponse) GetRequestId() string {
  252. if m != nil {
  253. return m.RequestId
  254. }
  255. return ""
  256. }
  257. // Payload containing the State and Notification information for devices.
  258. type StateAndNotificationPayload struct {
  259. // The devices for updating State and sending Notifications.
  260. Devices *ReportStateAndNotificationDevice `protobuf:"bytes,1,opt,name=devices,proto3" json:"devices,omitempty"`
  261. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  262. XXX_unrecognized []byte `json:"-"`
  263. XXX_sizecache int32 `json:"-"`
  264. }
  265. func (m *StateAndNotificationPayload) Reset() { *m = StateAndNotificationPayload{} }
  266. func (m *StateAndNotificationPayload) String() string { return proto.CompactTextString(m) }
  267. func (*StateAndNotificationPayload) ProtoMessage() {}
  268. func (*StateAndNotificationPayload) Descriptor() ([]byte, []int) {
  269. return fileDescriptor_homegraph_b6eae4d48cf76516, []int{4}
  270. }
  271. func (m *StateAndNotificationPayload) XXX_Unmarshal(b []byte) error {
  272. return xxx_messageInfo_StateAndNotificationPayload.Unmarshal(m, b)
  273. }
  274. func (m *StateAndNotificationPayload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  275. return xxx_messageInfo_StateAndNotificationPayload.Marshal(b, m, deterministic)
  276. }
  277. func (dst *StateAndNotificationPayload) XXX_Merge(src proto.Message) {
  278. xxx_messageInfo_StateAndNotificationPayload.Merge(dst, src)
  279. }
  280. func (m *StateAndNotificationPayload) XXX_Size() int {
  281. return xxx_messageInfo_StateAndNotificationPayload.Size(m)
  282. }
  283. func (m *StateAndNotificationPayload) XXX_DiscardUnknown() {
  284. xxx_messageInfo_StateAndNotificationPayload.DiscardUnknown(m)
  285. }
  286. var xxx_messageInfo_StateAndNotificationPayload proto.InternalMessageInfo
  287. func (m *StateAndNotificationPayload) GetDevices() *ReportStateAndNotificationDevice {
  288. if m != nil {
  289. return m.Devices
  290. }
  291. return nil
  292. }
  293. // The States and Notifications specific to a device.
  294. type ReportStateAndNotificationDevice struct {
  295. // States of devices to update.
  296. States *_struct.Struct `protobuf:"bytes,1,opt,name=states,proto3" json:"states,omitempty"`
  297. // Notifications metadata for devices.
  298. Notifications *_struct.Struct `protobuf:"bytes,2,opt,name=notifications,proto3" json:"notifications,omitempty"`
  299. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  300. XXX_unrecognized []byte `json:"-"`
  301. XXX_sizecache int32 `json:"-"`
  302. }
  303. func (m *ReportStateAndNotificationDevice) Reset() { *m = ReportStateAndNotificationDevice{} }
  304. func (m *ReportStateAndNotificationDevice) String() string { return proto.CompactTextString(m) }
  305. func (*ReportStateAndNotificationDevice) ProtoMessage() {}
  306. func (*ReportStateAndNotificationDevice) Descriptor() ([]byte, []int) {
  307. return fileDescriptor_homegraph_b6eae4d48cf76516, []int{5}
  308. }
  309. func (m *ReportStateAndNotificationDevice) XXX_Unmarshal(b []byte) error {
  310. return xxx_messageInfo_ReportStateAndNotificationDevice.Unmarshal(m, b)
  311. }
  312. func (m *ReportStateAndNotificationDevice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  313. return xxx_messageInfo_ReportStateAndNotificationDevice.Marshal(b, m, deterministic)
  314. }
  315. func (dst *ReportStateAndNotificationDevice) XXX_Merge(src proto.Message) {
  316. xxx_messageInfo_ReportStateAndNotificationDevice.Merge(dst, src)
  317. }
  318. func (m *ReportStateAndNotificationDevice) XXX_Size() int {
  319. return xxx_messageInfo_ReportStateAndNotificationDevice.Size(m)
  320. }
  321. func (m *ReportStateAndNotificationDevice) XXX_DiscardUnknown() {
  322. xxx_messageInfo_ReportStateAndNotificationDevice.DiscardUnknown(m)
  323. }
  324. var xxx_messageInfo_ReportStateAndNotificationDevice proto.InternalMessageInfo
  325. func (m *ReportStateAndNotificationDevice) GetStates() *_struct.Struct {
  326. if m != nil {
  327. return m.States
  328. }
  329. return nil
  330. }
  331. func (m *ReportStateAndNotificationDevice) GetNotifications() *_struct.Struct {
  332. if m != nil {
  333. return m.Notifications
  334. }
  335. return nil
  336. }
  337. // Request type for DeleteAgentUser call.
  338. type DeleteAgentUserRequest struct {
  339. // Request id used for debugging.
  340. RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
  341. // Required. Third-party user id.
  342. AgentUserId string `protobuf:"bytes,2,opt,name=agent_user_id,json=agentUserId,proto3" json:"agent_user_id,omitempty"`
  343. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  344. XXX_unrecognized []byte `json:"-"`
  345. XXX_sizecache int32 `json:"-"`
  346. }
  347. func (m *DeleteAgentUserRequest) Reset() { *m = DeleteAgentUserRequest{} }
  348. func (m *DeleteAgentUserRequest) String() string { return proto.CompactTextString(m) }
  349. func (*DeleteAgentUserRequest) ProtoMessage() {}
  350. func (*DeleteAgentUserRequest) Descriptor() ([]byte, []int) {
  351. return fileDescriptor_homegraph_b6eae4d48cf76516, []int{6}
  352. }
  353. func (m *DeleteAgentUserRequest) XXX_Unmarshal(b []byte) error {
  354. return xxx_messageInfo_DeleteAgentUserRequest.Unmarshal(m, b)
  355. }
  356. func (m *DeleteAgentUserRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  357. return xxx_messageInfo_DeleteAgentUserRequest.Marshal(b, m, deterministic)
  358. }
  359. func (dst *DeleteAgentUserRequest) XXX_Merge(src proto.Message) {
  360. xxx_messageInfo_DeleteAgentUserRequest.Merge(dst, src)
  361. }
  362. func (m *DeleteAgentUserRequest) XXX_Size() int {
  363. return xxx_messageInfo_DeleteAgentUserRequest.Size(m)
  364. }
  365. func (m *DeleteAgentUserRequest) XXX_DiscardUnknown() {
  366. xxx_messageInfo_DeleteAgentUserRequest.DiscardUnknown(m)
  367. }
  368. var xxx_messageInfo_DeleteAgentUserRequest proto.InternalMessageInfo
  369. func (m *DeleteAgentUserRequest) GetRequestId() string {
  370. if m != nil {
  371. return m.RequestId
  372. }
  373. return ""
  374. }
  375. func (m *DeleteAgentUserRequest) GetAgentUserId() string {
  376. if m != nil {
  377. return m.AgentUserId
  378. }
  379. return ""
  380. }
  381. // Request type for Query call. This should be the same format as the AoG
  382. // action.devices.QUERY request
  383. // (https://developers.google.com/actions/smarthome/create-app#actiondevicesquery)
  384. // with the exception of the extra "agent_user_id" and no "intent" and
  385. // "customData" field.
  386. type QueryRequest struct {
  387. // Request ID used for debugging.
  388. RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
  389. // Required. Third-party user ID.
  390. AgentUserId string `protobuf:"bytes,2,opt,name=agent_user_id,json=agentUserId,proto3" json:"agent_user_id,omitempty"`
  391. // Required. Inputs containing third-party partner's device IDs for which to
  392. // get the device states.
  393. Inputs []*QueryRequestInput `protobuf:"bytes,3,rep,name=inputs,proto3" json:"inputs,omitempty"`
  394. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  395. XXX_unrecognized []byte `json:"-"`
  396. XXX_sizecache int32 `json:"-"`
  397. }
  398. func (m *QueryRequest) Reset() { *m = QueryRequest{} }
  399. func (m *QueryRequest) String() string { return proto.CompactTextString(m) }
  400. func (*QueryRequest) ProtoMessage() {}
  401. func (*QueryRequest) Descriptor() ([]byte, []int) {
  402. return fileDescriptor_homegraph_b6eae4d48cf76516, []int{7}
  403. }
  404. func (m *QueryRequest) XXX_Unmarshal(b []byte) error {
  405. return xxx_messageInfo_QueryRequest.Unmarshal(m, b)
  406. }
  407. func (m *QueryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  408. return xxx_messageInfo_QueryRequest.Marshal(b, m, deterministic)
  409. }
  410. func (dst *QueryRequest) XXX_Merge(src proto.Message) {
  411. xxx_messageInfo_QueryRequest.Merge(dst, src)
  412. }
  413. func (m *QueryRequest) XXX_Size() int {
  414. return xxx_messageInfo_QueryRequest.Size(m)
  415. }
  416. func (m *QueryRequest) XXX_DiscardUnknown() {
  417. xxx_messageInfo_QueryRequest.DiscardUnknown(m)
  418. }
  419. var xxx_messageInfo_QueryRequest proto.InternalMessageInfo
  420. func (m *QueryRequest) GetRequestId() string {
  421. if m != nil {
  422. return m.RequestId
  423. }
  424. return ""
  425. }
  426. func (m *QueryRequest) GetAgentUserId() string {
  427. if m != nil {
  428. return m.AgentUserId
  429. }
  430. return ""
  431. }
  432. func (m *QueryRequest) GetInputs() []*QueryRequestInput {
  433. if m != nil {
  434. return m.Inputs
  435. }
  436. return nil
  437. }
  438. // Device ID inputs to QueryRequest.
  439. type QueryRequestInput struct {
  440. // Payload containing third-party partner's device IDs.
  441. Payload *QueryRequestPayload `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
  442. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  443. XXX_unrecognized []byte `json:"-"`
  444. XXX_sizecache int32 `json:"-"`
  445. }
  446. func (m *QueryRequestInput) Reset() { *m = QueryRequestInput{} }
  447. func (m *QueryRequestInput) String() string { return proto.CompactTextString(m) }
  448. func (*QueryRequestInput) ProtoMessage() {}
  449. func (*QueryRequestInput) Descriptor() ([]byte, []int) {
  450. return fileDescriptor_homegraph_b6eae4d48cf76516, []int{8}
  451. }
  452. func (m *QueryRequestInput) XXX_Unmarshal(b []byte) error {
  453. return xxx_messageInfo_QueryRequestInput.Unmarshal(m, b)
  454. }
  455. func (m *QueryRequestInput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  456. return xxx_messageInfo_QueryRequestInput.Marshal(b, m, deterministic)
  457. }
  458. func (dst *QueryRequestInput) XXX_Merge(src proto.Message) {
  459. xxx_messageInfo_QueryRequestInput.Merge(dst, src)
  460. }
  461. func (m *QueryRequestInput) XXX_Size() int {
  462. return xxx_messageInfo_QueryRequestInput.Size(m)
  463. }
  464. func (m *QueryRequestInput) XXX_DiscardUnknown() {
  465. xxx_messageInfo_QueryRequestInput.DiscardUnknown(m)
  466. }
  467. var xxx_messageInfo_QueryRequestInput proto.InternalMessageInfo
  468. func (m *QueryRequestInput) GetPayload() *QueryRequestPayload {
  469. if m != nil {
  470. return m.Payload
  471. }
  472. return nil
  473. }
  474. // Payload containing device IDs.
  475. type QueryRequestPayload struct {
  476. // Third-party partner's device IDs to get device states for.
  477. Devices []*AgentDeviceId `protobuf:"bytes,1,rep,name=devices,proto3" json:"devices,omitempty"`
  478. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  479. XXX_unrecognized []byte `json:"-"`
  480. XXX_sizecache int32 `json:"-"`
  481. }
  482. func (m *QueryRequestPayload) Reset() { *m = QueryRequestPayload{} }
  483. func (m *QueryRequestPayload) String() string { return proto.CompactTextString(m) }
  484. func (*QueryRequestPayload) ProtoMessage() {}
  485. func (*QueryRequestPayload) Descriptor() ([]byte, []int) {
  486. return fileDescriptor_homegraph_b6eae4d48cf76516, []int{9}
  487. }
  488. func (m *QueryRequestPayload) XXX_Unmarshal(b []byte) error {
  489. return xxx_messageInfo_QueryRequestPayload.Unmarshal(m, b)
  490. }
  491. func (m *QueryRequestPayload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  492. return xxx_messageInfo_QueryRequestPayload.Marshal(b, m, deterministic)
  493. }
  494. func (dst *QueryRequestPayload) XXX_Merge(src proto.Message) {
  495. xxx_messageInfo_QueryRequestPayload.Merge(dst, src)
  496. }
  497. func (m *QueryRequestPayload) XXX_Size() int {
  498. return xxx_messageInfo_QueryRequestPayload.Size(m)
  499. }
  500. func (m *QueryRequestPayload) XXX_DiscardUnknown() {
  501. xxx_messageInfo_QueryRequestPayload.DiscardUnknown(m)
  502. }
  503. var xxx_messageInfo_QueryRequestPayload proto.InternalMessageInfo
  504. func (m *QueryRequestPayload) GetDevices() []*AgentDeviceId {
  505. if m != nil {
  506. return m.Devices
  507. }
  508. return nil
  509. }
  510. // Third-party partner's device ID for one device.
  511. type AgentDeviceId struct {
  512. // Third-party partner's device ID.
  513. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
  514. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  515. XXX_unrecognized []byte `json:"-"`
  516. XXX_sizecache int32 `json:"-"`
  517. }
  518. func (m *AgentDeviceId) Reset() { *m = AgentDeviceId{} }
  519. func (m *AgentDeviceId) String() string { return proto.CompactTextString(m) }
  520. func (*AgentDeviceId) ProtoMessage() {}
  521. func (*AgentDeviceId) Descriptor() ([]byte, []int) {
  522. return fileDescriptor_homegraph_b6eae4d48cf76516, []int{10}
  523. }
  524. func (m *AgentDeviceId) XXX_Unmarshal(b []byte) error {
  525. return xxx_messageInfo_AgentDeviceId.Unmarshal(m, b)
  526. }
  527. func (m *AgentDeviceId) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  528. return xxx_messageInfo_AgentDeviceId.Marshal(b, m, deterministic)
  529. }
  530. func (dst *AgentDeviceId) XXX_Merge(src proto.Message) {
  531. xxx_messageInfo_AgentDeviceId.Merge(dst, src)
  532. }
  533. func (m *AgentDeviceId) XXX_Size() int {
  534. return xxx_messageInfo_AgentDeviceId.Size(m)
  535. }
  536. func (m *AgentDeviceId) XXX_DiscardUnknown() {
  537. xxx_messageInfo_AgentDeviceId.DiscardUnknown(m)
  538. }
  539. var xxx_messageInfo_AgentDeviceId proto.InternalMessageInfo
  540. func (m *AgentDeviceId) GetId() string {
  541. if m != nil {
  542. return m.Id
  543. }
  544. return ""
  545. }
  546. // Response type for Query call. This should follow the same format as AoG
  547. // action.devices.QUERY response
  548. // (https://developers.google.com/actions/smarthome/create-app#actiondevicesquery).
  549. type QueryResponse struct {
  550. // Request ID used for debugging. Copied from the request.
  551. RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
  552. // Device states for the devices given in the request.
  553. Payload *QueryResponsePayload `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
  554. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  555. XXX_unrecognized []byte `json:"-"`
  556. XXX_sizecache int32 `json:"-"`
  557. }
  558. func (m *QueryResponse) Reset() { *m = QueryResponse{} }
  559. func (m *QueryResponse) String() string { return proto.CompactTextString(m) }
  560. func (*QueryResponse) ProtoMessage() {}
  561. func (*QueryResponse) Descriptor() ([]byte, []int) {
  562. return fileDescriptor_homegraph_b6eae4d48cf76516, []int{11}
  563. }
  564. func (m *QueryResponse) XXX_Unmarshal(b []byte) error {
  565. return xxx_messageInfo_QueryResponse.Unmarshal(m, b)
  566. }
  567. func (m *QueryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  568. return xxx_messageInfo_QueryResponse.Marshal(b, m, deterministic)
  569. }
  570. func (dst *QueryResponse) XXX_Merge(src proto.Message) {
  571. xxx_messageInfo_QueryResponse.Merge(dst, src)
  572. }
  573. func (m *QueryResponse) XXX_Size() int {
  574. return xxx_messageInfo_QueryResponse.Size(m)
  575. }
  576. func (m *QueryResponse) XXX_DiscardUnknown() {
  577. xxx_messageInfo_QueryResponse.DiscardUnknown(m)
  578. }
  579. var xxx_messageInfo_QueryResponse proto.InternalMessageInfo
  580. func (m *QueryResponse) GetRequestId() string {
  581. if m != nil {
  582. return m.RequestId
  583. }
  584. return ""
  585. }
  586. func (m *QueryResponse) GetPayload() *QueryResponsePayload {
  587. if m != nil {
  588. return m.Payload
  589. }
  590. return nil
  591. }
  592. // Payload containing device states information.
  593. type QueryResponsePayload struct {
  594. // States of the devices. Map of third-party device ID to struct of device
  595. // states.
  596. Devices map[string]*_struct.Struct `protobuf:"bytes,1,rep,name=devices,proto3" json:"devices,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
  597. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  598. XXX_unrecognized []byte `json:"-"`
  599. XXX_sizecache int32 `json:"-"`
  600. }
  601. func (m *QueryResponsePayload) Reset() { *m = QueryResponsePayload{} }
  602. func (m *QueryResponsePayload) String() string { return proto.CompactTextString(m) }
  603. func (*QueryResponsePayload) ProtoMessage() {}
  604. func (*QueryResponsePayload) Descriptor() ([]byte, []int) {
  605. return fileDescriptor_homegraph_b6eae4d48cf76516, []int{12}
  606. }
  607. func (m *QueryResponsePayload) XXX_Unmarshal(b []byte) error {
  608. return xxx_messageInfo_QueryResponsePayload.Unmarshal(m, b)
  609. }
  610. func (m *QueryResponsePayload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  611. return xxx_messageInfo_QueryResponsePayload.Marshal(b, m, deterministic)
  612. }
  613. func (dst *QueryResponsePayload) XXX_Merge(src proto.Message) {
  614. xxx_messageInfo_QueryResponsePayload.Merge(dst, src)
  615. }
  616. func (m *QueryResponsePayload) XXX_Size() int {
  617. return xxx_messageInfo_QueryResponsePayload.Size(m)
  618. }
  619. func (m *QueryResponsePayload) XXX_DiscardUnknown() {
  620. xxx_messageInfo_QueryResponsePayload.DiscardUnknown(m)
  621. }
  622. var xxx_messageInfo_QueryResponsePayload proto.InternalMessageInfo
  623. func (m *QueryResponsePayload) GetDevices() map[string]*_struct.Struct {
  624. if m != nil {
  625. return m.Devices
  626. }
  627. return nil
  628. }
  629. // Request type for Sync call. This should follow the same format as AoG
  630. // action.devices.SYNC request
  631. // (https://developers.google.com/actions/smarthome/create-app#actiondevicessync)
  632. // with the exception of the extra "agent_user_id" and no "intent" field.
  633. type SyncRequest struct {
  634. // Request ID used for debugging.
  635. RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
  636. // Required. Third-party user ID.
  637. AgentUserId string `protobuf:"bytes,2,opt,name=agent_user_id,json=agentUserId,proto3" json:"agent_user_id,omitempty"`
  638. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  639. XXX_unrecognized []byte `json:"-"`
  640. XXX_sizecache int32 `json:"-"`
  641. }
  642. func (m *SyncRequest) Reset() { *m = SyncRequest{} }
  643. func (m *SyncRequest) String() string { return proto.CompactTextString(m) }
  644. func (*SyncRequest) ProtoMessage() {}
  645. func (*SyncRequest) Descriptor() ([]byte, []int) {
  646. return fileDescriptor_homegraph_b6eae4d48cf76516, []int{13}
  647. }
  648. func (m *SyncRequest) XXX_Unmarshal(b []byte) error {
  649. return xxx_messageInfo_SyncRequest.Unmarshal(m, b)
  650. }
  651. func (m *SyncRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  652. return xxx_messageInfo_SyncRequest.Marshal(b, m, deterministic)
  653. }
  654. func (dst *SyncRequest) XXX_Merge(src proto.Message) {
  655. xxx_messageInfo_SyncRequest.Merge(dst, src)
  656. }
  657. func (m *SyncRequest) XXX_Size() int {
  658. return xxx_messageInfo_SyncRequest.Size(m)
  659. }
  660. func (m *SyncRequest) XXX_DiscardUnknown() {
  661. xxx_messageInfo_SyncRequest.DiscardUnknown(m)
  662. }
  663. var xxx_messageInfo_SyncRequest proto.InternalMessageInfo
  664. func (m *SyncRequest) GetRequestId() string {
  665. if m != nil {
  666. return m.RequestId
  667. }
  668. return ""
  669. }
  670. func (m *SyncRequest) GetAgentUserId() string {
  671. if m != nil {
  672. return m.AgentUserId
  673. }
  674. return ""
  675. }
  676. // Example SyncResponse:
  677. // {
  678. // "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  679. // "payload": {
  680. // "agentUserId": "1836.15267389",
  681. // "devices": [{
  682. // "id": "123",
  683. // "type": "action.devices.types.OUTLET",
  684. // "traits": [
  685. // "action.devices.traits.OnOff"
  686. // ],
  687. // "name": {
  688. // "defaultNames": ["My Outlet 1234"],
  689. // "name": "Night light",
  690. // "nicknames": ["wall plug"]
  691. // },
  692. // "willReportState": false,
  693. // "deviceInfo": {
  694. // "manufacturer": "lights-out-inc",
  695. // "model": "hs1234",
  696. // "hwVersion": "3.2",
  697. // "swVersion": "11.4"
  698. // },
  699. // "customData": {
  700. // "fooValue": 74,
  701. // "barValue": true,
  702. // "bazValue": "foo"
  703. // }
  704. // }]
  705. // }
  706. // }
  707. //
  708. // Response type for Sync call. This should follow the same format as AoG
  709. // action.devices.SYNC response
  710. // (https://developers.google.com/actions/smarthome/create-app#actiondevicessync).
  711. type SyncResponse struct {
  712. // Request ID used for debugging. Copied from the request.
  713. RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
  714. // Devices associated with the third-party user.
  715. Payload *SyncResponsePayload `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
  716. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  717. XXX_unrecognized []byte `json:"-"`
  718. XXX_sizecache int32 `json:"-"`
  719. }
  720. func (m *SyncResponse) Reset() { *m = SyncResponse{} }
  721. func (m *SyncResponse) String() string { return proto.CompactTextString(m) }
  722. func (*SyncResponse) ProtoMessage() {}
  723. func (*SyncResponse) Descriptor() ([]byte, []int) {
  724. return fileDescriptor_homegraph_b6eae4d48cf76516, []int{14}
  725. }
  726. func (m *SyncResponse) XXX_Unmarshal(b []byte) error {
  727. return xxx_messageInfo_SyncResponse.Unmarshal(m, b)
  728. }
  729. func (m *SyncResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  730. return xxx_messageInfo_SyncResponse.Marshal(b, m, deterministic)
  731. }
  732. func (dst *SyncResponse) XXX_Merge(src proto.Message) {
  733. xxx_messageInfo_SyncResponse.Merge(dst, src)
  734. }
  735. func (m *SyncResponse) XXX_Size() int {
  736. return xxx_messageInfo_SyncResponse.Size(m)
  737. }
  738. func (m *SyncResponse) XXX_DiscardUnknown() {
  739. xxx_messageInfo_SyncResponse.DiscardUnknown(m)
  740. }
  741. var xxx_messageInfo_SyncResponse proto.InternalMessageInfo
  742. func (m *SyncResponse) GetRequestId() string {
  743. if m != nil {
  744. return m.RequestId
  745. }
  746. return ""
  747. }
  748. func (m *SyncResponse) GetPayload() *SyncResponsePayload {
  749. if m != nil {
  750. return m.Payload
  751. }
  752. return nil
  753. }
  754. // Payload containing device information.
  755. type SyncResponsePayload struct {
  756. // Third-party user ID
  757. AgentUserId string `protobuf:"bytes,1,opt,name=agent_user_id,json=agentUserId,proto3" json:"agent_user_id,omitempty"`
  758. // Devices associated with the third-party user.
  759. Devices []*Device `protobuf:"bytes,2,rep,name=devices,proto3" json:"devices,omitempty"`
  760. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  761. XXX_unrecognized []byte `json:"-"`
  762. XXX_sizecache int32 `json:"-"`
  763. }
  764. func (m *SyncResponsePayload) Reset() { *m = SyncResponsePayload{} }
  765. func (m *SyncResponsePayload) String() string { return proto.CompactTextString(m) }
  766. func (*SyncResponsePayload) ProtoMessage() {}
  767. func (*SyncResponsePayload) Descriptor() ([]byte, []int) {
  768. return fileDescriptor_homegraph_b6eae4d48cf76516, []int{15}
  769. }
  770. func (m *SyncResponsePayload) XXX_Unmarshal(b []byte) error {
  771. return xxx_messageInfo_SyncResponsePayload.Unmarshal(m, b)
  772. }
  773. func (m *SyncResponsePayload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  774. return xxx_messageInfo_SyncResponsePayload.Marshal(b, m, deterministic)
  775. }
  776. func (dst *SyncResponsePayload) XXX_Merge(src proto.Message) {
  777. xxx_messageInfo_SyncResponsePayload.Merge(dst, src)
  778. }
  779. func (m *SyncResponsePayload) XXX_Size() int {
  780. return xxx_messageInfo_SyncResponsePayload.Size(m)
  781. }
  782. func (m *SyncResponsePayload) XXX_DiscardUnknown() {
  783. xxx_messageInfo_SyncResponsePayload.DiscardUnknown(m)
  784. }
  785. var xxx_messageInfo_SyncResponsePayload proto.InternalMessageInfo
  786. func (m *SyncResponsePayload) GetAgentUserId() string {
  787. if m != nil {
  788. return m.AgentUserId
  789. }
  790. return ""
  791. }
  792. func (m *SyncResponsePayload) GetDevices() []*Device {
  793. if m != nil {
  794. return m.Devices
  795. }
  796. return nil
  797. }
  798. func init() {
  799. proto.RegisterType((*RequestSyncDevicesRequest)(nil), "google.home.graph.v1.RequestSyncDevicesRequest")
  800. proto.RegisterType((*RequestSyncDevicesResponse)(nil), "google.home.graph.v1.RequestSyncDevicesResponse")
  801. proto.RegisterType((*ReportStateAndNotificationRequest)(nil), "google.home.graph.v1.ReportStateAndNotificationRequest")
  802. proto.RegisterType((*ReportStateAndNotificationResponse)(nil), "google.home.graph.v1.ReportStateAndNotificationResponse")
  803. proto.RegisterType((*StateAndNotificationPayload)(nil), "google.home.graph.v1.StateAndNotificationPayload")
  804. proto.RegisterType((*ReportStateAndNotificationDevice)(nil), "google.home.graph.v1.ReportStateAndNotificationDevice")
  805. proto.RegisterType((*DeleteAgentUserRequest)(nil), "google.home.graph.v1.DeleteAgentUserRequest")
  806. proto.RegisterType((*QueryRequest)(nil), "google.home.graph.v1.QueryRequest")
  807. proto.RegisterType((*QueryRequestInput)(nil), "google.home.graph.v1.QueryRequestInput")
  808. proto.RegisterType((*QueryRequestPayload)(nil), "google.home.graph.v1.QueryRequestPayload")
  809. proto.RegisterType((*AgentDeviceId)(nil), "google.home.graph.v1.AgentDeviceId")
  810. proto.RegisterType((*QueryResponse)(nil), "google.home.graph.v1.QueryResponse")
  811. proto.RegisterType((*QueryResponsePayload)(nil), "google.home.graph.v1.QueryResponsePayload")
  812. proto.RegisterMapType((map[string]*_struct.Struct)(nil), "google.home.graph.v1.QueryResponsePayload.DevicesEntry")
  813. proto.RegisterType((*SyncRequest)(nil), "google.home.graph.v1.SyncRequest")
  814. proto.RegisterType((*SyncResponse)(nil), "google.home.graph.v1.SyncResponse")
  815. proto.RegisterType((*SyncResponsePayload)(nil), "google.home.graph.v1.SyncResponsePayload")
  816. }
  817. // Reference imports to suppress errors if they are not otherwise used.
  818. var _ context.Context
  819. var _ grpc.ClientConn
  820. // This is a compile-time assertion to ensure that this generated file
  821. // is compatible with the grpc package it is being compiled against.
  822. const _ = grpc.SupportPackageIsVersion4
  823. // HomeGraphApiServiceClient is the client API for HomeGraphApiService service.
  824. //
  825. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  826. type HomeGraphApiServiceClient interface {
  827. // Requests a Sync call from Google to a 3p partner's home control agent for
  828. // a user.
  829. //
  830. //
  831. // Third-party user's identity is passed in as agent_user_id.
  832. // (see
  833. // [RequestSyncDevicesRequest][google.home.graph.v1.RequestSyncDevicesRequest])
  834. // and forwarded back to the agent. Agent is identified by the API key or JWT
  835. // signed by the partner's service account.
  836. RequestSyncDevices(ctx context.Context, in *RequestSyncDevicesRequest, opts ...grpc.CallOption) (*RequestSyncDevicesResponse, error)
  837. // Reports device state and optionally sends device notifications. Called by
  838. // an agent when the device state of a third-party changes or the agent wants
  839. // to send a notification about the device.
  840. // This method updates a predefined set of States for a device, which all
  841. // devices have (for example a light will have OnOff, Color, Brightness).
  842. // A new State may not be created and an INVALID_ARGUMENT code will be thrown
  843. // if so. It also optionally takes in a list of Notifications that may be
  844. // created, which are associated to this State change.
  845. //
  846. // Third-party user's identity is passed in as agent_user_id.
  847. // Agent is identified by the JWT signed by the partner's service account.
  848. ReportStateAndNotification(ctx context.Context, in *ReportStateAndNotificationRequest, opts ...grpc.CallOption) (*ReportStateAndNotificationResponse, error)
  849. // Unlink an agent user from Google. As result, all data related to this user
  850. // will be deleted.
  851. //
  852. // Here is how the agent user is created in Google:
  853. // When users open their Google Home App, they can begin linking a 3p
  854. // partner. User is guided through the OAuth process. After entering the 3p
  855. // credentials, Google gets the 3p OAuth token, and uses it to make a
  856. // Sync call to the 3p partner and gets back all the user's data, including
  857. // agent_user_id and devices.
  858. // Google then creates the agent user and stores a mapping from the
  859. // agent_user_id -> Google ID mapping. Google also stores all user's devices
  860. // under that Google ID.
  861. // The mapping from agent_user_id -> Google ID is many to many, since one
  862. // Google user can have multiple 3p accounts, and multiple Google users can
  863. // map to one agent_user_id (e.g. husband and wife share one Nest account
  864. // username/password).
  865. //
  866. // Third-party user's identity is passed in as agent_user_id
  867. // Agent is identified by the JWT signed by the partner's service account.
  868. //
  869. // Note: Special characters (except "/") in agent_user_id must be URL encoded.
  870. DeleteAgentUser(ctx context.Context, in *DeleteAgentUserRequest, opts ...grpc.CallOption) (*empty.Empty, error)
  871. // Gets the device states for the devices in QueryRequest.
  872. // Third-party user's identity is passed in as agent_user_id. Agent is
  873. // identified by the JWT signed by the third-party partner's service account.
  874. Query(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error)
  875. // Gets all the devices associated with the given third-party user.
  876. // Third-party user's identity is passed in as agent_user_id. Agent is
  877. // identified by the JWT signed by the third-party partner's service account.
  878. Sync(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (*SyncResponse, error)
  879. }
  880. type homeGraphApiServiceClient struct {
  881. cc *grpc.ClientConn
  882. }
  883. func NewHomeGraphApiServiceClient(cc *grpc.ClientConn) HomeGraphApiServiceClient {
  884. return &homeGraphApiServiceClient{cc}
  885. }
  886. func (c *homeGraphApiServiceClient) RequestSyncDevices(ctx context.Context, in *RequestSyncDevicesRequest, opts ...grpc.CallOption) (*RequestSyncDevicesResponse, error) {
  887. out := new(RequestSyncDevicesResponse)
  888. err := c.cc.Invoke(ctx, "/google.home.graph.v1.HomeGraphApiService/RequestSyncDevices", in, out, opts...)
  889. if err != nil {
  890. return nil, err
  891. }
  892. return out, nil
  893. }
  894. func (c *homeGraphApiServiceClient) ReportStateAndNotification(ctx context.Context, in *ReportStateAndNotificationRequest, opts ...grpc.CallOption) (*ReportStateAndNotificationResponse, error) {
  895. out := new(ReportStateAndNotificationResponse)
  896. err := c.cc.Invoke(ctx, "/google.home.graph.v1.HomeGraphApiService/ReportStateAndNotification", in, out, opts...)
  897. if err != nil {
  898. return nil, err
  899. }
  900. return out, nil
  901. }
  902. func (c *homeGraphApiServiceClient) DeleteAgentUser(ctx context.Context, in *DeleteAgentUserRequest, opts ...grpc.CallOption) (*empty.Empty, error) {
  903. out := new(empty.Empty)
  904. err := c.cc.Invoke(ctx, "/google.home.graph.v1.HomeGraphApiService/DeleteAgentUser", in, out, opts...)
  905. if err != nil {
  906. return nil, err
  907. }
  908. return out, nil
  909. }
  910. func (c *homeGraphApiServiceClient) Query(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) {
  911. out := new(QueryResponse)
  912. err := c.cc.Invoke(ctx, "/google.home.graph.v1.HomeGraphApiService/Query", in, out, opts...)
  913. if err != nil {
  914. return nil, err
  915. }
  916. return out, nil
  917. }
  918. func (c *homeGraphApiServiceClient) Sync(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (*SyncResponse, error) {
  919. out := new(SyncResponse)
  920. err := c.cc.Invoke(ctx, "/google.home.graph.v1.HomeGraphApiService/Sync", in, out, opts...)
  921. if err != nil {
  922. return nil, err
  923. }
  924. return out, nil
  925. }
  926. // HomeGraphApiServiceServer is the server API for HomeGraphApiService service.
  927. type HomeGraphApiServiceServer interface {
  928. // Requests a Sync call from Google to a 3p partner's home control agent for
  929. // a user.
  930. //
  931. //
  932. // Third-party user's identity is passed in as agent_user_id.
  933. // (see
  934. // [RequestSyncDevicesRequest][google.home.graph.v1.RequestSyncDevicesRequest])
  935. // and forwarded back to the agent. Agent is identified by the API key or JWT
  936. // signed by the partner's service account.
  937. RequestSyncDevices(context.Context, *RequestSyncDevicesRequest) (*RequestSyncDevicesResponse, error)
  938. // Reports device state and optionally sends device notifications. Called by
  939. // an agent when the device state of a third-party changes or the agent wants
  940. // to send a notification about the device.
  941. // This method updates a predefined set of States for a device, which all
  942. // devices have (for example a light will have OnOff, Color, Brightness).
  943. // A new State may not be created and an INVALID_ARGUMENT code will be thrown
  944. // if so. It also optionally takes in a list of Notifications that may be
  945. // created, which are associated to this State change.
  946. //
  947. // Third-party user's identity is passed in as agent_user_id.
  948. // Agent is identified by the JWT signed by the partner's service account.
  949. ReportStateAndNotification(context.Context, *ReportStateAndNotificationRequest) (*ReportStateAndNotificationResponse, error)
  950. // Unlink an agent user from Google. As result, all data related to this user
  951. // will be deleted.
  952. //
  953. // Here is how the agent user is created in Google:
  954. // When users open their Google Home App, they can begin linking a 3p
  955. // partner. User is guided through the OAuth process. After entering the 3p
  956. // credentials, Google gets the 3p OAuth token, and uses it to make a
  957. // Sync call to the 3p partner and gets back all the user's data, including
  958. // agent_user_id and devices.
  959. // Google then creates the agent user and stores a mapping from the
  960. // agent_user_id -> Google ID mapping. Google also stores all user's devices
  961. // under that Google ID.
  962. // The mapping from agent_user_id -> Google ID is many to many, since one
  963. // Google user can have multiple 3p accounts, and multiple Google users can
  964. // map to one agent_user_id (e.g. husband and wife share one Nest account
  965. // username/password).
  966. //
  967. // Third-party user's identity is passed in as agent_user_id
  968. // Agent is identified by the JWT signed by the partner's service account.
  969. //
  970. // Note: Special characters (except "/") in agent_user_id must be URL encoded.
  971. DeleteAgentUser(context.Context, *DeleteAgentUserRequest) (*empty.Empty, error)
  972. // Gets the device states for the devices in QueryRequest.
  973. // Third-party user's identity is passed in as agent_user_id. Agent is
  974. // identified by the JWT signed by the third-party partner's service account.
  975. Query(context.Context, *QueryRequest) (*QueryResponse, error)
  976. // Gets all the devices associated with the given third-party user.
  977. // Third-party user's identity is passed in as agent_user_id. Agent is
  978. // identified by the JWT signed by the third-party partner's service account.
  979. Sync(context.Context, *SyncRequest) (*SyncResponse, error)
  980. }
  981. func RegisterHomeGraphApiServiceServer(s *grpc.Server, srv HomeGraphApiServiceServer) {
  982. s.RegisterService(&_HomeGraphApiService_serviceDesc, srv)
  983. }
  984. func _HomeGraphApiService_RequestSyncDevices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  985. in := new(RequestSyncDevicesRequest)
  986. if err := dec(in); err != nil {
  987. return nil, err
  988. }
  989. if interceptor == nil {
  990. return srv.(HomeGraphApiServiceServer).RequestSyncDevices(ctx, in)
  991. }
  992. info := &grpc.UnaryServerInfo{
  993. Server: srv,
  994. FullMethod: "/google.home.graph.v1.HomeGraphApiService/RequestSyncDevices",
  995. }
  996. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  997. return srv.(HomeGraphApiServiceServer).RequestSyncDevices(ctx, req.(*RequestSyncDevicesRequest))
  998. }
  999. return interceptor(ctx, in, info, handler)
  1000. }
  1001. func _HomeGraphApiService_ReportStateAndNotification_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  1002. in := new(ReportStateAndNotificationRequest)
  1003. if err := dec(in); err != nil {
  1004. return nil, err
  1005. }
  1006. if interceptor == nil {
  1007. return srv.(HomeGraphApiServiceServer).ReportStateAndNotification(ctx, in)
  1008. }
  1009. info := &grpc.UnaryServerInfo{
  1010. Server: srv,
  1011. FullMethod: "/google.home.graph.v1.HomeGraphApiService/ReportStateAndNotification",
  1012. }
  1013. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1014. return srv.(HomeGraphApiServiceServer).ReportStateAndNotification(ctx, req.(*ReportStateAndNotificationRequest))
  1015. }
  1016. return interceptor(ctx, in, info, handler)
  1017. }
  1018. func _HomeGraphApiService_DeleteAgentUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  1019. in := new(DeleteAgentUserRequest)
  1020. if err := dec(in); err != nil {
  1021. return nil, err
  1022. }
  1023. if interceptor == nil {
  1024. return srv.(HomeGraphApiServiceServer).DeleteAgentUser(ctx, in)
  1025. }
  1026. info := &grpc.UnaryServerInfo{
  1027. Server: srv,
  1028. FullMethod: "/google.home.graph.v1.HomeGraphApiService/DeleteAgentUser",
  1029. }
  1030. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1031. return srv.(HomeGraphApiServiceServer).DeleteAgentUser(ctx, req.(*DeleteAgentUserRequest))
  1032. }
  1033. return interceptor(ctx, in, info, handler)
  1034. }
  1035. func _HomeGraphApiService_Query_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  1036. in := new(QueryRequest)
  1037. if err := dec(in); err != nil {
  1038. return nil, err
  1039. }
  1040. if interceptor == nil {
  1041. return srv.(HomeGraphApiServiceServer).Query(ctx, in)
  1042. }
  1043. info := &grpc.UnaryServerInfo{
  1044. Server: srv,
  1045. FullMethod: "/google.home.graph.v1.HomeGraphApiService/Query",
  1046. }
  1047. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1048. return srv.(HomeGraphApiServiceServer).Query(ctx, req.(*QueryRequest))
  1049. }
  1050. return interceptor(ctx, in, info, handler)
  1051. }
  1052. func _HomeGraphApiService_Sync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  1053. in := new(SyncRequest)
  1054. if err := dec(in); err != nil {
  1055. return nil, err
  1056. }
  1057. if interceptor == nil {
  1058. return srv.(HomeGraphApiServiceServer).Sync(ctx, in)
  1059. }
  1060. info := &grpc.UnaryServerInfo{
  1061. Server: srv,
  1062. FullMethod: "/google.home.graph.v1.HomeGraphApiService/Sync",
  1063. }
  1064. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1065. return srv.(HomeGraphApiServiceServer).Sync(ctx, req.(*SyncRequest))
  1066. }
  1067. return interceptor(ctx, in, info, handler)
  1068. }
  1069. var _HomeGraphApiService_serviceDesc = grpc.ServiceDesc{
  1070. ServiceName: "google.home.graph.v1.HomeGraphApiService",
  1071. HandlerType: (*HomeGraphApiServiceServer)(nil),
  1072. Methods: []grpc.MethodDesc{
  1073. {
  1074. MethodName: "RequestSyncDevices",
  1075. Handler: _HomeGraphApiService_RequestSyncDevices_Handler,
  1076. },
  1077. {
  1078. MethodName: "ReportStateAndNotification",
  1079. Handler: _HomeGraphApiService_ReportStateAndNotification_Handler,
  1080. },
  1081. {
  1082. MethodName: "DeleteAgentUser",
  1083. Handler: _HomeGraphApiService_DeleteAgentUser_Handler,
  1084. },
  1085. {
  1086. MethodName: "Query",
  1087. Handler: _HomeGraphApiService_Query_Handler,
  1088. },
  1089. {
  1090. MethodName: "Sync",
  1091. Handler: _HomeGraphApiService_Sync_Handler,
  1092. },
  1093. },
  1094. Streams: []grpc.StreamDesc{},
  1095. Metadata: "google/home/graph/v1/homegraph.proto",
  1096. }
  1097. func init() {
  1098. proto.RegisterFile("google/home/graph/v1/homegraph.proto", fileDescriptor_homegraph_b6eae4d48cf76516)
  1099. }
  1100. var fileDescriptor_homegraph_b6eae4d48cf76516 = []byte{
  1101. // 879 bytes of a gzipped FileDescriptorProto
  1102. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x4f, 0x8f, 0xdb, 0x44,
  1103. 0x14, 0x97, 0x93, 0x66, 0xb7, 0x7d, 0xd9, 0xd0, 0x76, 0x76, 0xd9, 0xba, 0xd9, 0x20, 0x92, 0x59,
  1104. 0x54, 0xd2, 0x00, 0x36, 0x09, 0x52, 0x5b, 0x16, 0xad, 0xd0, 0x76, 0xb7, 0x82, 0x08, 0x09, 0xa5,
  1105. 0x4e, 0x57, 0x42, 0x70, 0x88, 0xdc, 0x78, 0xd6, 0x35, 0x4d, 0x3c, 0x5e, 0xcf, 0x38, 0x28, 0x42,
  1106. 0x5c, 0xfa, 0x11, 0xe0, 0xc8, 0x77, 0xe1, 0xc0, 0x57, 0xe0, 0xc4, 0x9d, 0xcf, 0xc0, 0xb9, 0x9a,
  1107. 0x19, 0x7b, 0xf3, 0xc7, 0x4e, 0xe2, 0x4a, 0x7b, 0xf3, 0xcc, 0xfb, 0xbd, 0xdf, 0x7b, 0x6f, 0xde,
  1108. 0x6f, 0xde, 0x18, 0x3e, 0x72, 0x29, 0x75, 0x47, 0xc4, 0x7c, 0x45, 0xc7, 0xc4, 0x74, 0x43, 0x3b,
  1109. 0x78, 0x65, 0x4e, 0xda, 0x72, 0x25, 0x17, 0x46, 0x10, 0x52, 0x4e, 0xd1, 0x9e, 0x42, 0x19, 0x62,
  1110. 0xdf, 0x50, 0x86, 0x49, 0xbb, 0x5a, 0x8b, 0x7d, 0xed, 0xc0, 0x33, 0x6d, 0xdf, 0xa7, 0xdc, 0xe6,
  1111. 0x1e, 0xf5, 0x99, 0xf2, 0xa9, 0x36, 0x32, 0x99, 0x1d, 0x32, 0xf1, 0x86, 0x24, 0x86, 0x1c, 0xc4,
  1112. 0x10, 0xb9, 0x7a, 0x19, 0x5d, 0x98, 0x64, 0x1c, 0xf0, 0x69, 0x6c, 0xac, 0x2d, 0x1b, 0x19, 0x0f,
  1113. 0xa3, 0x21, 0x57, 0x56, 0x7c, 0x0e, 0xf7, 0x2d, 0x72, 0x19, 0x11, 0xc6, 0xfb, 0x53, 0x7f, 0x78,
  1114. 0x26, 0x59, 0x59, 0xbc, 0x83, 0x30, 0x54, 0x6c, 0x97, 0xf8, 0x7c, 0x10, 0x31, 0x12, 0x0e, 0x3c,
  1115. 0x47, 0xd7, 0xea, 0x5a, 0xf3, 0x96, 0x55, 0x96, 0x9b, 0xe7, 0x8c, 0x84, 0x5d, 0x07, 0xed, 0x41,
  1116. 0xc9, 0x66, 0x53, 0x7f, 0xa8, 0x17, 0xea, 0x5a, 0xf3, 0xa6, 0xa5, 0x16, 0xb8, 0x06, 0xd5, 0x2c,
  1117. 0x5a, 0x16, 0x50, 0x9f, 0x11, 0xfc, 0xbf, 0x06, 0x0d, 0x8b, 0x04, 0x34, 0xe4, 0x7d, 0x6e, 0x73,
  1118. 0x72, 0xe2, 0x3b, 0xdf, 0x53, 0xee, 0x5d, 0x78, 0x43, 0x59, 0x78, 0x12, 0xfd, 0x03, 0x80, 0x50,
  1119. 0x7d, 0xce, 0x42, 0xdf, 0x8a, 0x77, 0xba, 0x0e, 0xba, 0x0f, 0x37, 0xc9, 0x44, 0x24, 0xe7, 0x39,
  1120. 0xfa, 0x0d, 0x69, 0xdc, 0x96, 0xeb, 0xae, 0x93, 0xce, 0xbb, 0x90, 0xce, 0xfb, 0x01, 0xdc, 0xbe,
  1121. 0xa0, 0xa3, 0x11, 0xfd, 0x65, 0x10, 0x05, 0x03, 0x4e, 0x5f, 0x13, 0x5f, 0x2f, 0x49, 0x54, 0x45,
  1122. 0x6d, 0x9f, 0x07, 0x2f, 0xc4, 0x26, 0xfa, 0x0e, 0xb6, 0x03, 0x7b, 0x3a, 0xa2, 0xb6, 0xa3, 0x17,
  1123. 0xeb, 0x5a, 0xb3, 0xdc, 0x69, 0x1b, 0x59, 0x4d, 0x34, 0xb2, 0x2a, 0xe9, 0x29, 0x47, 0x2b, 0x61,
  1124. 0xc0, 0xa7, 0x80, 0xd7, 0xd5, 0xad, 0x8e, 0x67, 0x43, 0xe1, 0x98, 0xc2, 0xc1, 0x9a, 0x60, 0xa8,
  1125. 0x07, 0xdb, 0x4a, 0x1c, 0x4c, 0xba, 0x96, 0x3b, 0x8f, 0xb2, 0x13, 0x5e, 0x9d, 0x88, 0x6a, 0x97,
  1126. 0x95, 0xd0, 0xe0, 0xdf, 0x35, 0xa8, 0x6f, 0x42, 0x23, 0x13, 0xb6, 0x98, 0xb0, 0x26, 0x51, 0xef,
  1127. 0x25, 0x51, 0x13, 0xdd, 0x19, 0x7d, 0xa9, 0x3b, 0x2b, 0x86, 0xa1, 0x63, 0xa8, 0xf8, 0x73, 0x34,
  1128. 0x4c, 0x36, 0x69, 0x8d, 0xdf, 0x22, 0x1a, 0xff, 0x04, 0xfb, 0x67, 0x64, 0x44, 0x38, 0x39, 0x49,
  1129. 0x9a, 0x9a, 0x53, 0x37, 0x39, 0xc4, 0x21, 0x2a, 0xde, 0x79, 0x1e, 0x91, 0x70, 0x7a, 0x7d, 0x9c,
  1130. 0xe8, 0x6b, 0xd8, 0xf2, 0xfc, 0x20, 0xe2, 0x4c, 0x2f, 0xd6, 0x8b, 0xcd, 0x72, 0xe7, 0xe3, 0xec,
  1131. 0xb6, 0xcc, 0x87, 0xed, 0x0a, 0xbc, 0x15, 0xbb, 0xe1, 0x1f, 0xe0, 0x6e, 0xca, 0x88, 0x4e, 0x67,
  1132. 0xf2, 0x54, 0xe7, 0xfe, 0x70, 0x33, 0x6d, 0x4a, 0x96, 0x2f, 0x60, 0x37, 0xc3, 0x8e, 0x8e, 0xe7,
  1133. 0x95, 0x24, 0x52, 0x3e, 0xcc, 0xe6, 0x96, 0x1d, 0x50, 0x32, 0xe8, 0x3a, 0x33, 0xd9, 0x7c, 0x08,
  1134. 0x95, 0x05, 0x0b, 0x7a, 0x0f, 0x0a, 0x57, 0x87, 0x57, 0xf0, 0x1c, 0xcc, 0xa1, 0x12, 0x87, 0xcd,
  1135. 0x25, 0x7c, 0x74, 0x36, 0xab, 0x55, 0x69, 0xa5, 0xb5, 0xb6, 0x56, 0x45, 0x9a, 0x2a, 0xf6, 0x2f,
  1136. 0x0d, 0xf6, 0xb2, 0x10, 0xe8, 0xf9, 0x72, 0xb9, 0x8f, 0xf3, 0xd3, 0x1b, 0xf1, 0x88, 0x7b, 0xe6,
  1137. 0xf3, 0x70, 0x7a, 0x75, 0x04, 0xd5, 0x3e, 0xec, 0xcc, 0x1b, 0xd0, 0x1d, 0x28, 0xbe, 0x26, 0xd3,
  1138. 0xb8, 0x32, 0xf1, 0x89, 0x3e, 0x83, 0xd2, 0xc4, 0x1e, 0x45, 0x64, 0x93, 0xfa, 0x15, 0xea, 0xa8,
  1139. 0xf0, 0x44, 0xc3, 0x3d, 0x28, 0x8b, 0xa1, 0x7a, 0x8d, 0x72, 0x0f, 0x61, 0x47, 0x31, 0xe6, 0xeb,
  1140. 0xc3, 0xe9, 0x72, 0x1f, 0x56, 0x68, 0x6e, 0x9e, 0x33, 0xd5, 0x86, 0x4b, 0xd8, 0xcd, 0xb0, 0xe7,
  1141. 0x7a, 0x72, 0x1e, 0xcd, 0x1a, 0x55, 0x90, 0x8d, 0xaa, 0x65, 0xc7, 0x5f, 0x9a, 0x63, 0x9d, 0x7f,
  1142. 0x4b, 0xb0, 0xfb, 0x2d, 0x1d, 0x93, 0x6f, 0x04, 0xe0, 0x24, 0xf0, 0xfa, 0x24, 0x94, 0xa3, 0xeb,
  1143. 0x4f, 0x0d, 0x50, 0xfa, 0xb5, 0x42, 0xe6, 0xaa, 0xb9, 0xb9, 0xe2, 0xb9, 0xac, 0x7e, 0x9e, 0xdf,
  1144. 0x21, 0x7e, 0x08, 0xf1, 0x9b, 0x7f, 0xfe, 0xfb, 0xa3, 0x50, 0xc3, 0xf7, 0x66, 0x4f, 0x3a, 0x3b,
  1145. 0x0a, 0x67, 0xf8, 0x23, 0xad, 0x85, 0xfe, 0xd6, 0xc4, 0x5b, 0xba, 0x6a, 0xfa, 0xa2, 0xc7, 0xef,
  1146. 0x3a, 0xdd, 0x93, 0x6c, 0x9f, 0xbc, 0xbb, 0x63, 0x9c, 0x75, 0x5b, 0x66, 0xfd, 0x09, 0x7e, 0xb0,
  1147. 0x98, 0xf5, 0x2a, 0x3f, 0x51, 0xc4, 0x1b, 0x0d, 0x6e, 0x2f, 0x8d, 0x6b, 0xf4, 0xe9, 0xaa, 0xae,
  1148. 0x65, 0x4d, 0xf5, 0xea, 0x7e, 0xea, 0x66, 0x3c, 0x13, 0x3f, 0x39, 0xf8, 0xa1, 0x4c, 0xe6, 0xb0,
  1149. 0xd5, 0x10, 0xc9, 0xfc, 0xba, 0xa0, 0x9d, 0xe3, 0x2b, 0xd1, 0x30, 0xb3, 0xd5, 0xfa, 0x0d, 0xf9,
  1150. 0x50, 0x92, 0x77, 0x17, 0xe1, 0xcd, 0x33, 0xb2, 0x7a, 0x98, 0xe3, 0xf2, 0xe3, 0x9a, 0x0c, 0xbe,
  1151. 0x8f, 0xef, 0xce, 0x9f, 0xc4, 0xa5, 0x80, 0x88, 0xa2, 0x7f, 0x86, 0x1b, 0xa2, 0x89, 0xa8, 0xb1,
  1152. 0xee, 0x7a, 0xa8, 0x68, 0x78, 0xf3, 0x0d, 0xc2, 0x07, 0x32, 0xd8, 0xfb, 0xf8, 0xce, 0x7c, 0x30,
  1153. 0xa6, 0x54, 0xf2, 0x94, 0x82, 0x3e, 0xa4, 0xe3, 0x4c, 0x96, 0xa7, 0x7a, 0x86, 0xe8, 0x7b, 0xe2,
  1154. 0x14, 0x7f, 0xfc, 0x32, 0xc6, 0xbb, 0x74, 0x64, 0xfb, 0xae, 0x41, 0x43, 0xd7, 0x74, 0x89, 0x2f,
  1155. 0x4f, 0xd8, 0x54, 0x26, 0x3b, 0xf0, 0xd8, 0xe2, 0xaf, 0xe7, 0x57, 0xf2, 0xe3, 0xe5, 0x96, 0x44,
  1156. 0x7d, 0xf1, 0x36, 0x00, 0x00, 0xff, 0xff, 0x5b, 0x87, 0x36, 0x9c, 0xf9, 0x0a, 0x00, 0x00,
  1157. }