1<?php
2/*
3 * Copyright 2014 Google Inc.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6 * use this file except in compliance with the License. You may obtain a copy of
7 * the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14 * License for the specific language governing permissions and limitations under
15 * the License.
16 */
17
18namespace Google\Service;
19
20use Google\Client;
21
22/**
23 * Service definition for HomeGraphService (v1).
24 *
25 * <p>
26</p>
27 *
28 * <p>
29 * For more information about this service, see the API
30 * <a href="https://developers.google.com/actions/smarthome/create-app#request-sync" target="_blank">Documentation</a>
31 * </p>
32 *
33 * @author Google, Inc.
34 */
35class HomeGraphService extends \Google\Service
36{
37  /** Private Service: https://www.googleapis.com/auth/homegraph. */
38  const HOMEGRAPH =
39      "https://www.googleapis.com/auth/homegraph";
40
41  public $agentUsers;
42  public $devices;
43
44  /**
45   * Constructs the internal representation of the HomeGraphService service.
46   *
47   * @param Client|array $clientOrConfig The client used to deliver requests, or a
48   *                                     config array to pass to a new Client instance.
49   * @param string $rootUrl The root URL used for requests to the service.
50   */
51  public function __construct($clientOrConfig = [], $rootUrl = null)
52  {
53    parent::__construct($clientOrConfig);
54    $this->rootUrl = $rootUrl ?: 'https://homegraph.googleapis.com/';
55    $this->servicePath = '';
56    $this->batchPath = 'batch';
57    $this->version = 'v1';
58    $this->serviceName = 'homegraph';
59
60    $this->agentUsers = new HomeGraphService\Resource\AgentUsers(
61        $this,
62        $this->serviceName,
63        'agentUsers',
64        [
65          'methods' => [
66            'delete' => [
67              'path' => 'v1/{+agentUserId}',
68              'httpMethod' => 'DELETE',
69              'parameters' => [
70                'agentUserId' => [
71                  'location' => 'path',
72                  'type' => 'string',
73                  'required' => true,
74                ],
75                'requestId' => [
76                  'location' => 'query',
77                  'type' => 'string',
78                ],
79              ],
80            ],
81          ]
82        ]
83    );
84    $this->devices = new HomeGraphService\Resource\Devices(
85        $this,
86        $this->serviceName,
87        'devices',
88        [
89          'methods' => [
90            'query' => [
91              'path' => 'v1/devices:query',
92              'httpMethod' => 'POST',
93              'parameters' => [],
94            ],'reportStateAndNotification' => [
95              'path' => 'v1/devices:reportStateAndNotification',
96              'httpMethod' => 'POST',
97              'parameters' => [],
98            ],'requestSync' => [
99              'path' => 'v1/devices:requestSync',
100              'httpMethod' => 'POST',
101              'parameters' => [],
102            ],'sync' => [
103              'path' => 'v1/devices:sync',
104              'httpMethod' => 'POST',
105              'parameters' => [],
106            ],
107          ]
108        ]
109    );
110  }
111}
112
113// Adding a class alias for backwards compatibility with the previous class name.
114class_alias(HomeGraphService::class, 'Google_Service_HomeGraphService');
115