Skip to content

Commit 78ca981

Browse files
1 parent 77e1f9a commit 78ca981

6 files changed

Lines changed: 271 additions & 0 deletions

File tree

src/ArtifactRegistry.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,16 @@ public function __construct($clientOrConfig = [], $rootUrl = null)
236236
'required' => true,
237237
],
238238
],
239+
],'exportArtifact' => [
240+
'path' => 'v1/{+repository}:exportArtifact',
241+
'httpMethod' => 'POST',
242+
'parameters' => [
243+
'repository' => [
244+
'location' => 'path',
245+
'type' => 'string',
246+
'required' => true,
247+
],
248+
],
239249
],'get' => [
240250
'path' => 'v1/{+name}',
241251
'httpMethod' => 'GET',
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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\ArtifactRegistry;
19+
20+
class ExportArtifactMetadata extends \Google\Collection
21+
{
22+
protected $collection_key = 'exportedFiles';
23+
protected $exportedFilesType = ExportedFile::class;
24+
protected $exportedFilesDataType = 'array';
25+
26+
/**
27+
* @param ExportedFile[]
28+
*/
29+
public function setExportedFiles($exportedFiles)
30+
{
31+
$this->exportedFiles = $exportedFiles;
32+
}
33+
/**
34+
* @return ExportedFile[]
35+
*/
36+
public function getExportedFiles()
37+
{
38+
return $this->exportedFiles;
39+
}
40+
}
41+
42+
// Adding a class alias for backwards compatibility with the previous class name.
43+
class_alias(ExportArtifactMetadata::class, 'Google_Service_ArtifactRegistry_ExportArtifactMetadata');
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
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\ArtifactRegistry;
19+
20+
class ExportArtifactRequest extends \Google\Model
21+
{
22+
/**
23+
* @var string
24+
*/
25+
public $gcsPath;
26+
/**
27+
* @var string
28+
*/
29+
public $sourceTag;
30+
/**
31+
* @var string
32+
*/
33+
public $sourceVersion;
34+
35+
/**
36+
* @param string
37+
*/
38+
public function setGcsPath($gcsPath)
39+
{
40+
$this->gcsPath = $gcsPath;
41+
}
42+
/**
43+
* @return string
44+
*/
45+
public function getGcsPath()
46+
{
47+
return $this->gcsPath;
48+
}
49+
/**
50+
* @param string
51+
*/
52+
public function setSourceTag($sourceTag)
53+
{
54+
$this->sourceTag = $sourceTag;
55+
}
56+
/**
57+
* @return string
58+
*/
59+
public function getSourceTag()
60+
{
61+
return $this->sourceTag;
62+
}
63+
/**
64+
* @param string
65+
*/
66+
public function setSourceVersion($sourceVersion)
67+
{
68+
$this->sourceVersion = $sourceVersion;
69+
}
70+
/**
71+
* @return string
72+
*/
73+
public function getSourceVersion()
74+
{
75+
return $this->sourceVersion;
76+
}
77+
}
78+
79+
// Adding a class alias for backwards compatibility with the previous class name.
80+
class_alias(ExportArtifactRequest::class, 'Google_Service_ArtifactRegistry_ExportArtifactRequest');
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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\ArtifactRegistry;
19+
20+
class ExportArtifactResponse extends \Google\Model
21+
{
22+
protected $exportedVersionType = Version::class;
23+
protected $exportedVersionDataType = '';
24+
25+
/**
26+
* @param Version
27+
*/
28+
public function setExportedVersion(Version $exportedVersion)
29+
{
30+
$this->exportedVersion = $exportedVersion;
31+
}
32+
/**
33+
* @return Version
34+
*/
35+
public function getExportedVersion()
36+
{
37+
return $this->exportedVersion;
38+
}
39+
}
40+
41+
// Adding a class alias for backwards compatibility with the previous class name.
42+
class_alias(ExportArtifactResponse::class, 'Google_Service_ArtifactRegistry_ExportArtifactResponse');
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
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\ArtifactRegistry;
19+
20+
class ExportedFile extends \Google\Collection
21+
{
22+
protected $collection_key = 'hashes';
23+
/**
24+
* @var string
25+
*/
26+
public $gcsObjectPath;
27+
protected $hashesType = Hash::class;
28+
protected $hashesDataType = 'array';
29+
/**
30+
* @var string
31+
*/
32+
public $name;
33+
34+
/**
35+
* @param string
36+
*/
37+
public function setGcsObjectPath($gcsObjectPath)
38+
{
39+
$this->gcsObjectPath = $gcsObjectPath;
40+
}
41+
/**
42+
* @return string
43+
*/
44+
public function getGcsObjectPath()
45+
{
46+
return $this->gcsObjectPath;
47+
}
48+
/**
49+
* @param Hash[]
50+
*/
51+
public function setHashes($hashes)
52+
{
53+
$this->hashes = $hashes;
54+
}
55+
/**
56+
* @return Hash[]
57+
*/
58+
public function getHashes()
59+
{
60+
return $this->hashes;
61+
}
62+
/**
63+
* @param string
64+
*/
65+
public function setName($name)
66+
{
67+
$this->name = $name;
68+
}
69+
/**
70+
* @return string
71+
*/
72+
public function getName()
73+
{
74+
return $this->name;
75+
}
76+
}
77+
78+
// Adding a class alias for backwards compatibility with the previous class name.
79+
class_alias(ExportedFile::class, 'Google_Service_ArtifactRegistry_ExportedFile');

src/ArtifactRegistry/Resource/ProjectsLocationsRepositories.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
namespace Google\Service\ArtifactRegistry\Resource;
1919

20+
use Google\Service\ArtifactRegistry\ExportArtifactRequest;
2021
use Google\Service\ArtifactRegistry\ListRepositoriesResponse;
2122
use Google\Service\ArtifactRegistry\Operation;
2223
use Google\Service\ArtifactRegistry\Policy;
@@ -73,6 +74,22 @@ public function delete($name, $optParams = [])
7374
$params = array_merge($params, $optParams);
7475
return $this->call('delete', [$params], Operation::class);
7576
}
77+
/**
78+
* Exports an artifact. (repositories.exportArtifact)
79+
*
80+
* @param string $repository Required. The repository of the artifact to export.
81+
* Format: projects/{project}/locations/{location}/repositories/{repository}
82+
* @param ExportArtifactRequest $postBody
83+
* @param array $optParams Optional parameters.
84+
* @return Operation
85+
* @throws \Google\Service\Exception
86+
*/
87+
public function exportArtifact($repository, ExportArtifactRequest $postBody, $optParams = [])
88+
{
89+
$params = ['repository' => $repository, 'postBody' => $postBody];
90+
$params = array_merge($params, $optParams);
91+
return $this->call('exportArtifact', [$params], Operation::class);
92+
}
7693
/**
7794
* Gets a repository. (repositories.get)
7895
*

0 commit comments

Comments
 (0)