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 |
|
---|
18 | namespace Google\Service\SASPortalTesting\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\SASPortalTesting\SasPortalEmpty;
|
---|
21 | use Google\Service\SASPortalTesting\SasPortalListNodesResponse;
|
---|
22 | use Google\Service\SASPortalTesting\SasPortalMoveNodeRequest;
|
---|
23 | use Google\Service\SASPortalTesting\SasPortalNode;
|
---|
24 | use Google\Service\SASPortalTesting\SasPortalOperation;
|
---|
25 |
|
---|
26 | /**
|
---|
27 | * The "nodes" collection of methods.
|
---|
28 | * Typical usage is:
|
---|
29 | * <code>
|
---|
30 | * $prod_tt_sasportalService = new Google\Service\SASPortalTesting(...);
|
---|
31 | * $nodes = $prod_tt_sasportalService->customers_nodes;
|
---|
32 | * </code>
|
---|
33 | */
|
---|
34 | class CustomersNodes extends \Google\Service\Resource
|
---|
35 | {
|
---|
36 | /**
|
---|
37 | * Creates a new node. (nodes.create)
|
---|
38 | *
|
---|
39 | * @param string $parent Required. The parent resource name where the node is to
|
---|
40 | * be created.
|
---|
41 | * @param SasPortalNode $postBody
|
---|
42 | * @param array $optParams Optional parameters.
|
---|
43 | * @return SasPortalNode
|
---|
44 | * @throws \Google\Service\Exception
|
---|
45 | */
|
---|
46 | public function create($parent, SasPortalNode $postBody, $optParams = [])
|
---|
47 | {
|
---|
48 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
49 | $params = array_merge($params, $optParams);
|
---|
50 | return $this->call('create', [$params], SasPortalNode::class);
|
---|
51 | }
|
---|
52 | /**
|
---|
53 | * Deletes a node. (nodes.delete)
|
---|
54 | *
|
---|
55 | * @param string $name Required. The name of the node.
|
---|
56 | * @param array $optParams Optional parameters.
|
---|
57 | * @return SasPortalEmpty
|
---|
58 | * @throws \Google\Service\Exception
|
---|
59 | */
|
---|
60 | public function delete($name, $optParams = [])
|
---|
61 | {
|
---|
62 | $params = ['name' => $name];
|
---|
63 | $params = array_merge($params, $optParams);
|
---|
64 | return $this->call('delete', [$params], SasPortalEmpty::class);
|
---|
65 | }
|
---|
66 | /**
|
---|
67 | * Returns a requested node. (nodes.get)
|
---|
68 | *
|
---|
69 | * @param string $name Required. The name of the node.
|
---|
70 | * @param array $optParams Optional parameters.
|
---|
71 | * @return SasPortalNode
|
---|
72 | * @throws \Google\Service\Exception
|
---|
73 | */
|
---|
74 | public function get($name, $optParams = [])
|
---|
75 | {
|
---|
76 | $params = ['name' => $name];
|
---|
77 | $params = array_merge($params, $optParams);
|
---|
78 | return $this->call('get', [$params], SasPortalNode::class);
|
---|
79 | }
|
---|
80 | /**
|
---|
81 | * Lists nodes. (nodes.listCustomersNodes)
|
---|
82 | *
|
---|
83 | * @param string $parent Required. The parent resource name, for example,
|
---|
84 | * "nodes/1".
|
---|
85 | * @param array $optParams Optional parameters.
|
---|
86 | *
|
---|
87 | * @opt_param string filter The filter expression. The filter should have the
|
---|
88 | * following format: "DIRECT_CHILDREN" or format: "direct_children". The filter
|
---|
89 | * is case insensitive. If empty, then no nodes are filtered.
|
---|
90 | * @opt_param int pageSize The maximum number of nodes to return in the
|
---|
91 | * response.
|
---|
92 | * @opt_param string pageToken A pagination token returned from a previous call
|
---|
93 | * to ListNodes that indicates where this listing should continue from.
|
---|
94 | * @return SasPortalListNodesResponse
|
---|
95 | * @throws \Google\Service\Exception
|
---|
96 | */
|
---|
97 | public function listCustomersNodes($parent, $optParams = [])
|
---|
98 | {
|
---|
99 | $params = ['parent' => $parent];
|
---|
100 | $params = array_merge($params, $optParams);
|
---|
101 | return $this->call('list', [$params], SasPortalListNodesResponse::class);
|
---|
102 | }
|
---|
103 | /**
|
---|
104 | * Moves a node under another node or customer. (nodes.move)
|
---|
105 | *
|
---|
106 | * @param string $name Required. The name of the node to move.
|
---|
107 | * @param SasPortalMoveNodeRequest $postBody
|
---|
108 | * @param array $optParams Optional parameters.
|
---|
109 | * @return SasPortalOperation
|
---|
110 | * @throws \Google\Service\Exception
|
---|
111 | */
|
---|
112 | public function move($name, SasPortalMoveNodeRequest $postBody, $optParams = [])
|
---|
113 | {
|
---|
114 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
115 | $params = array_merge($params, $optParams);
|
---|
116 | return $this->call('move', [$params], SasPortalOperation::class);
|
---|
117 | }
|
---|
118 | /**
|
---|
119 | * Updates an existing node. (nodes.patch)
|
---|
120 | *
|
---|
121 | * @param string $name Output only. Resource name.
|
---|
122 | * @param SasPortalNode $postBody
|
---|
123 | * @param array $optParams Optional parameters.
|
---|
124 | *
|
---|
125 | * @opt_param string updateMask Fields to be updated.
|
---|
126 | * @return SasPortalNode
|
---|
127 | * @throws \Google\Service\Exception
|
---|
128 | */
|
---|
129 | public function patch($name, SasPortalNode $postBody, $optParams = [])
|
---|
130 | {
|
---|
131 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
132 | $params = array_merge($params, $optParams);
|
---|
133 | return $this->call('patch', [$params], SasPortalNode::class);
|
---|
134 | }
|
---|
135 | }
|
---|
136 |
|
---|
137 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
138 | class_alias(CustomersNodes::class, 'Google_Service_SASPortalTesting_Resource_CustomersNodes');
|
---|