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\ApigeeRegistry\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\ApigeeRegistry\ApigeeregistryEmpty;
|
---|
21 | use Google\Service\ApigeeRegistry\Artifact;
|
---|
22 | use Google\Service\ApigeeRegistry\HttpBody;
|
---|
23 | use Google\Service\ApigeeRegistry\ListArtifactsResponse;
|
---|
24 |
|
---|
25 | /**
|
---|
26 | * The "artifacts" collection of methods.
|
---|
27 | * Typical usage is:
|
---|
28 | * <code>
|
---|
29 | * $apigeeregistryService = new Google\Service\ApigeeRegistry(...);
|
---|
30 | * $artifacts = $apigeeregistryService->projects_locations_apis_deployments_artifacts;
|
---|
31 | * </code>
|
---|
32 | */
|
---|
33 | class ProjectsLocationsApisDeploymentsArtifacts extends \Google\Service\Resource
|
---|
34 | {
|
---|
35 | /**
|
---|
36 | * Creates a specified artifact. (artifacts.create)
|
---|
37 | *
|
---|
38 | * @param string $parent Required. The parent, which owns this collection of
|
---|
39 | * artifacts. Format: `{parent}`
|
---|
40 | * @param Artifact $postBody
|
---|
41 | * @param array $optParams Optional parameters.
|
---|
42 | *
|
---|
43 | * @opt_param string artifactId Required. The ID to use for the artifact, which
|
---|
44 | * will become the final component of the artifact's resource name. This value
|
---|
45 | * should be 4-63 characters, and valid characters are /a-z-/. Following
|
---|
46 | * AIP-162, IDs must not have the form of a UUID.
|
---|
47 | * @return Artifact
|
---|
48 | * @throws \Google\Service\Exception
|
---|
49 | */
|
---|
50 | public function create($parent, Artifact $postBody, $optParams = [])
|
---|
51 | {
|
---|
52 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
53 | $params = array_merge($params, $optParams);
|
---|
54 | return $this->call('create', [$params], Artifact::class);
|
---|
55 | }
|
---|
56 | /**
|
---|
57 | * Removes a specified artifact. (artifacts.delete)
|
---|
58 | *
|
---|
59 | * @param string $name Required. The name of the artifact to delete. Format:
|
---|
60 | * `{parent}/artifacts`
|
---|
61 | * @param array $optParams Optional parameters.
|
---|
62 | * @return ApigeeregistryEmpty
|
---|
63 | * @throws \Google\Service\Exception
|
---|
64 | */
|
---|
65 | public function delete($name, $optParams = [])
|
---|
66 | {
|
---|
67 | $params = ['name' => $name];
|
---|
68 | $params = array_merge($params, $optParams);
|
---|
69 | return $this->call('delete', [$params], ApigeeregistryEmpty::class);
|
---|
70 | }
|
---|
71 | /**
|
---|
72 | * Returns a specified artifact. (artifacts.get)
|
---|
73 | *
|
---|
74 | * @param string $name Required. The name of the artifact to retrieve. Format:
|
---|
75 | * `{parent}/artifacts`
|
---|
76 | * @param array $optParams Optional parameters.
|
---|
77 | * @return Artifact
|
---|
78 | * @throws \Google\Service\Exception
|
---|
79 | */
|
---|
80 | public function get($name, $optParams = [])
|
---|
81 | {
|
---|
82 | $params = ['name' => $name];
|
---|
83 | $params = array_merge($params, $optParams);
|
---|
84 | return $this->call('get', [$params], Artifact::class);
|
---|
85 | }
|
---|
86 | /**
|
---|
87 | * Returns the contents of a specified artifact. If artifacts are stored with
|
---|
88 | * GZip compression, the default behavior is to return the artifact uncompressed
|
---|
89 | * (the mime_type response field indicates the exact format returned).
|
---|
90 | * (artifacts.getContents)
|
---|
91 | *
|
---|
92 | * @param string $name Required. The name of the artifact whose contents should
|
---|
93 | * be retrieved. Format: `{parent}/artifacts`
|
---|
94 | * @param array $optParams Optional parameters.
|
---|
95 | * @return HttpBody
|
---|
96 | * @throws \Google\Service\Exception
|
---|
97 | */
|
---|
98 | public function getContents($name, $optParams = [])
|
---|
99 | {
|
---|
100 | $params = ['name' => $name];
|
---|
101 | $params = array_merge($params, $optParams);
|
---|
102 | return $this->call('getContents', [$params], HttpBody::class);
|
---|
103 | }
|
---|
104 | /**
|
---|
105 | * Returns matching artifacts.
|
---|
106 | * (artifacts.listProjectsLocationsApisDeploymentsArtifacts)
|
---|
107 | *
|
---|
108 | * @param string $parent Required. The parent, which owns this collection of
|
---|
109 | * artifacts. Format: `{parent}`
|
---|
110 | * @param array $optParams Optional parameters.
|
---|
111 | *
|
---|
112 | * @opt_param string filter An expression that can be used to filter the list.
|
---|
113 | * Filters use the Common Expression Language and can refer to all message
|
---|
114 | * fields except contents.
|
---|
115 | * @opt_param string orderBy A comma-separated list of fields, e.g. "foo,bar"
|
---|
116 | * Fields can be sorted in descending order using the "desc" identifier, e.g.
|
---|
117 | * "foo desc,bar"
|
---|
118 | * @opt_param int pageSize The maximum number of artifacts to return. The
|
---|
119 | * service may return fewer than this value. If unspecified, at most 50 values
|
---|
120 | * will be returned. The maximum is 1000; values above 1000 will be coerced to
|
---|
121 | * 1000.
|
---|
122 | * @opt_param string pageToken A page token, received from a previous
|
---|
123 | * `ListArtifacts` call. Provide this to retrieve the subsequent page. When
|
---|
124 | * paginating, all other parameters provided to `ListArtifacts` must match the
|
---|
125 | * call that provided the page token.
|
---|
126 | * @return ListArtifactsResponse
|
---|
127 | * @throws \Google\Service\Exception
|
---|
128 | */
|
---|
129 | public function listProjectsLocationsApisDeploymentsArtifacts($parent, $optParams = [])
|
---|
130 | {
|
---|
131 | $params = ['parent' => $parent];
|
---|
132 | $params = array_merge($params, $optParams);
|
---|
133 | return $this->call('list', [$params], ListArtifactsResponse::class);
|
---|
134 | }
|
---|
135 | /**
|
---|
136 | * Used to replace a specified artifact. (artifacts.replaceArtifact)
|
---|
137 | *
|
---|
138 | * @param string $name Resource name.
|
---|
139 | * @param Artifact $postBody
|
---|
140 | * @param array $optParams Optional parameters.
|
---|
141 | * @return Artifact
|
---|
142 | * @throws \Google\Service\Exception
|
---|
143 | */
|
---|
144 | public function replaceArtifact($name, Artifact $postBody, $optParams = [])
|
---|
145 | {
|
---|
146 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
147 | $params = array_merge($params, $optParams);
|
---|
148 | return $this->call('replaceArtifact', [$params], Artifact::class);
|
---|
149 | }
|
---|
150 | }
|
---|
151 |
|
---|
152 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
153 | class_alias(ProjectsLocationsApisDeploymentsArtifacts::class, 'Google_Service_ApigeeRegistry_Resource_ProjectsLocationsApisDeploymentsArtifacts');
|
---|