source: vendor/google/apiclient-services/src/AndroidManagement/Resource/EnterprisesEnrollmentTokens.php

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

Upload project files

  • Property mode set to 100644
File size: 5.0 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\AndroidManagement\Resource;
19
20use Google\Service\AndroidManagement\AndroidmanagementEmpty;
21use Google\Service\AndroidManagement\EnrollmentToken;
22use Google\Service\AndroidManagement\ListEnrollmentTokensResponse;
23
24/**
25 * The "enrollmentTokens" collection of methods.
26 * Typical usage is:
27 * <code>
28 * $androidmanagementService = new Google\Service\AndroidManagement(...);
29 * $enrollmentTokens = $androidmanagementService->enterprises_enrollmentTokens;
30 * </code>
31 */
32class EnterprisesEnrollmentTokens extends \Google\Service\Resource
33{
34 /**
35 * Creates an enrollment token for a given enterprise. It's up to the caller's
36 * responsibility to manage the lifecycle of newly created tokens and deleting
37 * them when they're not intended to be used anymore. (enrollmentTokens.create)
38 *
39 * @param string $parent The name of the enterprise in the form
40 * enterprises/{enterpriseId}.
41 * @param EnrollmentToken $postBody
42 * @param array $optParams Optional parameters.
43 * @return EnrollmentToken
44 * @throws \Google\Service\Exception
45 */
46 public function create($parent, EnrollmentToken $postBody, $optParams = [])
47 {
48 $params = ['parent' => $parent, 'postBody' => $postBody];
49 $params = array_merge($params, $optParams);
50 return $this->call('create', [$params], EnrollmentToken::class);
51 }
52 /**
53 * Deletes an enrollment token. This operation invalidates the token, preventing
54 * its future use. (enrollmentTokens.delete)
55 *
56 * @param string $name The name of the enrollment token in the form
57 * enterprises/{enterpriseId}/enrollmentTokens/{enrollmentTokenId}.
58 * @param array $optParams Optional parameters.
59 * @return AndroidmanagementEmpty
60 * @throws \Google\Service\Exception
61 */
62 public function delete($name, $optParams = [])
63 {
64 $params = ['name' => $name];
65 $params = array_merge($params, $optParams);
66 return $this->call('delete', [$params], AndroidmanagementEmpty::class);
67 }
68 /**
69 * Gets an active, unexpired enrollment token. A partial view of the enrollment
70 * token is returned. Only the following fields are populated: name,
71 * expirationTimestamp, allowPersonalUsage, value, qrCode. This method is meant
72 * to help manage active enrollment tokens lifecycle. For security reasons, it's
73 * recommended to delete active enrollment tokens as soon as they're not
74 * intended to be used anymore. (enrollmentTokens.get)
75 *
76 * @param string $name Required. The name of the enrollment token in the form
77 * enterprises/{enterpriseId}/enrollmentTokens/{enrollmentTokenId}.
78 * @param array $optParams Optional parameters.
79 * @return EnrollmentToken
80 * @throws \Google\Service\Exception
81 */
82 public function get($name, $optParams = [])
83 {
84 $params = ['name' => $name];
85 $params = array_merge($params, $optParams);
86 return $this->call('get', [$params], EnrollmentToken::class);
87 }
88 /**
89 * Lists active, unexpired enrollment tokens for a given enterprise. The list
90 * items contain only a partial view of EnrollmentToken object. Only the
91 * following fields are populated: name, expirationTimestamp,
92 * allowPersonalUsage, value, qrCode. This method is meant to help manage active
93 * enrollment tokens lifecycle. For security reasons, it's recommended to delete
94 * active enrollment tokens as soon as they're not intended to be used anymore.
95 * (enrollmentTokens.listEnterprisesEnrollmentTokens)
96 *
97 * @param string $parent Required. The name of the enterprise in the form
98 * enterprises/{enterpriseId}.
99 * @param array $optParams Optional parameters.
100 *
101 * @opt_param int pageSize The requested page size. The service may return fewer
102 * than this value. If unspecified, at most 10 items will be returned. The
103 * maximum value is 100; values above 100 will be coerced to 100.
104 * @opt_param string pageToken A token identifying a page of results returned by
105 * the server.
106 * @return ListEnrollmentTokensResponse
107 * @throws \Google\Service\Exception
108 */
109 public function listEnterprisesEnrollmentTokens($parent, $optParams = [])
110 {
111 $params = ['parent' => $parent];
112 $params = array_merge($params, $optParams);
113 return $this->call('list', [$params], ListEnrollmentTokensResponse::class);
114 }
115}
116
117// Adding a class alias for backwards compatibility with the previous class name.
118class_alias(EnterprisesEnrollmentTokens::class, 'Google_Service_AndroidManagement_Resource_EnterprisesEnrollmentTokens');
Note: See TracBrowser for help on using the repository browser.