source: vendor/google/apiclient-services/src/VMMigrationService/Resource/ProjectsLocationsSourcesUtilizationReports.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: 6.3 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\VMMigrationService\Resource;
19
20use Google\Service\VMMigrationService\ListUtilizationReportsResponse;
21use Google\Service\VMMigrationService\Operation;
22use Google\Service\VMMigrationService\UtilizationReport;
23
24/**
25 * The "utilizationReports" collection of methods.
26 * Typical usage is:
27 * <code>
28 * $vmmigrationService = new Google\Service\VMMigrationService(...);
29 * $utilizationReports = $vmmigrationService->projects_locations_sources_utilizationReports;
30 * </code>
31 */
32class ProjectsLocationsSourcesUtilizationReports extends \Google\Service\Resource
33{
34 /**
35 * Creates a new UtilizationReport. (utilizationReports.create)
36 *
37 * @param string $parent Required. The Utilization Report's parent.
38 * @param UtilizationReport $postBody
39 * @param array $optParams Optional parameters.
40 *
41 * @opt_param string requestId A request ID to identify requests. Specify a
42 * unique request ID so that if you must retry your request, the server will
43 * know to ignore the request if it has already been completed. The server will
44 * guarantee that for at least 60 minutes since the first request. For example,
45 * consider a situation where you make an initial request and the request times
46 * out. If you make the request again with the same request ID, the server can
47 * check if original operation with the same request ID was received, and if so,
48 * will ignore the second request. This prevents clients from accidentally
49 * creating duplicate commitments. The request ID must be a valid UUID with the
50 * exception that zero UUID is not supported
51 * (00000000-0000-0000-0000-000000000000).
52 * @opt_param string utilizationReportId Required. The ID to use for the report,
53 * which will become the final component of the reports's resource name. This
54 * value maximum length is 63 characters, and valid characters are /a-z-/. It
55 * must start with an english letter and must not end with a hyphen.
56 * @return Operation
57 * @throws \Google\Service\Exception
58 */
59 public function create($parent, UtilizationReport $postBody, $optParams = [])
60 {
61 $params = ['parent' => $parent, 'postBody' => $postBody];
62 $params = array_merge($params, $optParams);
63 return $this->call('create', [$params], Operation::class);
64 }
65 /**
66 * Deletes a single Utilization Report. (utilizationReports.delete)
67 *
68 * @param string $name Required. The Utilization Report name.
69 * @param array $optParams Optional parameters.
70 *
71 * @opt_param string requestId Optional. A request ID to identify requests.
72 * Specify a unique request ID so that if you must retry your request, the
73 * server will know to ignore the request if it has already been completed. The
74 * server will guarantee that for at least 60 minutes after the first request.
75 * For example, consider a situation where you make an initial request and the
76 * request times out. If you make the request again with the same request ID,
77 * the server can check if original operation with the same request ID was
78 * received, and if so, will ignore the second request. This prevents clients
79 * from accidentally creating duplicate commitments. The request ID must be a
80 * valid UUID with the exception that zero UUID is not supported
81 * (00000000-0000-0000-0000-000000000000).
82 * @return Operation
83 * @throws \Google\Service\Exception
84 */
85 public function delete($name, $optParams = [])
86 {
87 $params = ['name' => $name];
88 $params = array_merge($params, $optParams);
89 return $this->call('delete', [$params], Operation::class);
90 }
91 /**
92 * Gets a single Utilization Report. (utilizationReports.get)
93 *
94 * @param string $name Required. The Utilization Report name.
95 * @param array $optParams Optional parameters.
96 *
97 * @opt_param string view Optional. The level of details of the report. Defaults
98 * to FULL
99 * @return UtilizationReport
100 * @throws \Google\Service\Exception
101 */
102 public function get($name, $optParams = [])
103 {
104 $params = ['name' => $name];
105 $params = array_merge($params, $optParams);
106 return $this->call('get', [$params], UtilizationReport::class);
107 }
108 /**
109 * Lists Utilization Reports of the given Source.
110 * (utilizationReports.listProjectsLocationsSourcesUtilizationReports)
111 *
112 * @param string $parent Required. The Utilization Reports parent.
113 * @param array $optParams Optional parameters.
114 *
115 * @opt_param string filter Optional. The filter request.
116 * @opt_param string orderBy Optional. the order by fields for the result.
117 * @opt_param int pageSize Optional. The maximum number of reports to return.
118 * The service may return fewer than this value. If unspecified, at most 500
119 * reports will be returned. The maximum value is 1000; values above 1000 will
120 * be coerced to 1000.
121 * @opt_param string pageToken Required. A page token, received from a previous
122 * `ListUtilizationReports` call. Provide this to retrieve the subsequent page.
123 * When paginating, all other parameters provided to `ListUtilizationReports`
124 * must match the call that provided the page token.
125 * @opt_param string view Optional. The level of details of each report.
126 * Defaults to BASIC.
127 * @return ListUtilizationReportsResponse
128 * @throws \Google\Service\Exception
129 */
130 public function listProjectsLocationsSourcesUtilizationReports($parent, $optParams = [])
131 {
132 $params = ['parent' => $parent];
133 $params = array_merge($params, $optParams);
134 return $this->call('list', [$params], ListUtilizationReportsResponse::class);
135 }
136}
137
138// Adding a class alias for backwards compatibility with the previous class name.
139class_alias(ProjectsLocationsSourcesUtilizationReports::class, 'Google_Service_VMMigrationService_Resource_ProjectsLocationsSourcesUtilizationReports');
Note: See TracBrowser for help on using the repository browser.