source: vendor/google/apiclient-services/src/Dataproc/Resource/ProjectsLocationsSessionTemplates.php@ f9c482b

Last change on this file since f9c482b was f9c482b, checked in by Vlado 222039 <vlado.popovski@…>, 12 days ago

Upload new project files

  • Property mode set to 100644
File size: 4.5 KB
Line 
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\Dataproc\Resource;
19
20use Google\Service\Dataproc\DataprocEmpty;
21use Google\Service\Dataproc\ListSessionTemplatesResponse;
22use Google\Service\Dataproc\SessionTemplate;
23
24/**
25 * The "sessionTemplates" collection of methods.
26 * Typical usage is:
27 * <code>
28 * $dataprocService = new Google\Service\Dataproc(...);
29 * $sessionTemplates = $dataprocService->projects_locations_sessionTemplates;
30 * </code>
31 */
32class ProjectsLocationsSessionTemplates extends \Google\Service\Resource
33{
34 /**
35 * Create a session template synchronously. (sessionTemplates.create)
36 *
37 * @param string $parent Required. The parent resource where this session
38 * template will be created.
39 * @param SessionTemplate $postBody
40 * @param array $optParams Optional parameters.
41 * @return SessionTemplate
42 * @throws \Google\Service\Exception
43 */
44 public function create($parent, SessionTemplate $postBody, $optParams = [])
45 {
46 $params = ['parent' => $parent, 'postBody' => $postBody];
47 $params = array_merge($params, $optParams);
48 return $this->call('create', [$params], SessionTemplate::class);
49 }
50 /**
51 * Deletes a session template. (sessionTemplates.delete)
52 *
53 * @param string $name Required. The name of the session template resource to
54 * delete.
55 * @param array $optParams Optional parameters.
56 * @return DataprocEmpty
57 * @throws \Google\Service\Exception
58 */
59 public function delete($name, $optParams = [])
60 {
61 $params = ['name' => $name];
62 $params = array_merge($params, $optParams);
63 return $this->call('delete', [$params], DataprocEmpty::class);
64 }
65 /**
66 * Gets the resource representation for a session template.
67 * (sessionTemplates.get)
68 *
69 * @param string $name Required. The name of the session template to retrieve.
70 * @param array $optParams Optional parameters.
71 * @return SessionTemplate
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], SessionTemplate::class);
79 }
80 /**
81 * Lists session templates.
82 * (sessionTemplates.listProjectsLocationsSessionTemplates)
83 *
84 * @param string $parent Required. The parent that owns this collection of
85 * session templates.
86 * @param array $optParams Optional parameters.
87 *
88 * @opt_param string filter Optional. A filter for the session templates to
89 * return in the response. Filters are case sensitive and have the following
90 * syntax:field = value AND field = value ...
91 * @opt_param int pageSize Optional. The maximum number of sessions to return in
92 * each response. The service may return fewer than this value.
93 * @opt_param string pageToken Optional. A page token received from a previous
94 * ListSessions call. Provide this token to retrieve the subsequent page.
95 * @return ListSessionTemplatesResponse
96 * @throws \Google\Service\Exception
97 */
98 public function listProjectsLocationsSessionTemplates($parent, $optParams = [])
99 {
100 $params = ['parent' => $parent];
101 $params = array_merge($params, $optParams);
102 return $this->call('list', [$params], ListSessionTemplatesResponse::class);
103 }
104 /**
105 * Updates the session template synchronously. (sessionTemplates.patch)
106 *
107 * @param string $name Required. The resource name of the session template.
108 * @param SessionTemplate $postBody
109 * @param array $optParams Optional parameters.
110 * @return SessionTemplate
111 * @throws \Google\Service\Exception
112 */
113 public function patch($name, SessionTemplate $postBody, $optParams = [])
114 {
115 $params = ['name' => $name, 'postBody' => $postBody];
116 $params = array_merge($params, $optParams);
117 return $this->call('patch', [$params], SessionTemplate::class);
118 }
119}
120
121// Adding a class alias for backwards compatibility with the previous class name.
122class_alias(ProjectsLocationsSessionTemplates::class, 'Google_Service_Dataproc_Resource_ProjectsLocationsSessionTemplates');
Note: See TracBrowser for help on using the repository browser.