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\SASPortalTesting\Resource;
19
20use Google\Service\SASPortalTesting\SasPortalListNodesResponse;
21use Google\Service\SASPortalTesting\SasPortalNode;
22
23/**
24 * The "nodes" collection of methods.
25 * Typical usage is:
26 *  <code>
27 *   $prod_tt_sasportalService = new Google\Service\SASPortalTesting(...);
28 *   $nodes = $prod_tt_sasportalService->nodes;
29 *  </code>
30 */
31class CustomersNodesNodes extends \Google\Service\Resource
32{
33  /**
34   * Creates a new node. (nodes.create)
35   *
36   * @param string $parent Required. The parent resource name where the node is to
37   * be created.
38   * @param SasPortalNode $postBody
39   * @param array $optParams Optional parameters.
40   * @return SasPortalNode
41   */
42  public function create($parent, SasPortalNode $postBody, $optParams = [])
43  {
44    $params = ['parent' => $parent, 'postBody' => $postBody];
45    $params = array_merge($params, $optParams);
46    return $this->call('create', [$params], SasPortalNode::class);
47  }
48  /**
49   * Lists nodes. (nodes.listCustomersNodesNodes)
50   *
51   * @param string $parent Required. The parent resource name, for example,
52   * "nodes/1".
53   * @param array $optParams Optional parameters.
54   *
55   * @opt_param string filter The filter expression. The filter should have the
56   * following format: "DIRECT_CHILDREN" or format: "direct_children". The filter
57   * is case insensitive. If empty, then no nodes are filtered.
58   * @opt_param int pageSize The maximum number of nodes to return in the
59   * response.
60   * @opt_param string pageToken A pagination token returned from a previous call
61   * to ListNodes that indicates where this listing should continue from.
62   * @return SasPortalListNodesResponse
63   */
64  public function listCustomersNodesNodes($parent, $optParams = [])
65  {
66    $params = ['parent' => $parent];
67    $params = array_merge($params, $optParams);
68    return $this->call('list', [$params], SasPortalListNodesResponse::class);
69  }
70}
71
72// Adding a class alias for backwards compatibility with the previous class name.
73class_alias(CustomersNodesNodes::class, 'Google_Service_SASPortalTesting_Resource_CustomersNodesNodes');
74