Skip to content

Commit 673ea73

Browse files
1 parent 4bab16a commit 673ea73

File tree

4 files changed

+183
-0
lines changed

4 files changed

+183
-0
lines changed

src/ContainerAnalysis/ContaineranalysisGoogleDevtoolsCloudbuildV1Artifacts.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ class ContaineranalysisGoogleDevtoolsCloudbuildV1Artifacts extends \Google\Colle
3838
protected $npmPackagesDataType = 'array';
3939
protected $objectsType = ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsArtifactObjects::class;
4040
protected $objectsDataType = '';
41+
protected $ociType = ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsOci::class;
42+
protected $ociDataType = 'array';
4143
protected $pythonPackagesType = ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsPythonPackage::class;
4244
protected $pythonPackagesDataType = 'array';
4345

@@ -140,6 +142,26 @@ public function getObjects()
140142
{
141143
return $this->objects;
142144
}
145+
/**
146+
* Optional. A list of OCI images to be uploaded to Artifact Registry upon
147+
* successful completion of all build steps. OCI images in the specified paths
148+
* will be uploaded to the specified Artifact Registry repository using the
149+
* builder service account's credentials. If any images fail to be pushed, the
150+
* build is marked FAILURE.
151+
*
152+
* @param ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsOci[] $oci
153+
*/
154+
public function setOci($oci)
155+
{
156+
$this->oci = $oci;
157+
}
158+
/**
159+
* @return ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsOci[]
160+
*/
161+
public function getOci()
162+
{
163+
return $this->oci;
164+
}
143165
/**
144166
* A list of Python packages to be uploaded to Artifact Registry upon
145167
* successful completion of all build steps. The build service account
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
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\ContainerAnalysis;
19+
20+
class ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsOci extends \Google\Collection
21+
{
22+
protected $collection_key = 'tags';
23+
/**
24+
* Required. Path on the local file system where to find the container to
25+
* upload. e.g. /workspace/my-image.tar
26+
*
27+
* @var string
28+
*/
29+
public $file;
30+
/**
31+
* Required. Registry path to upload the container to. e.g. us-
32+
* east1-docker.pkg.dev/my-project/my-repo/my-image
33+
*
34+
* @var string
35+
*/
36+
public $registryPath;
37+
/**
38+
* Optional. Tags to apply to the uploaded image. e.g. latest, 1.0.0
39+
*
40+
* @var string[]
41+
*/
42+
public $tags;
43+
44+
/**
45+
* Required. Path on the local file system where to find the container to
46+
* upload. e.g. /workspace/my-image.tar
47+
*
48+
* @param string $file
49+
*/
50+
public function setFile($file)
51+
{
52+
$this->file = $file;
53+
}
54+
/**
55+
* @return string
56+
*/
57+
public function getFile()
58+
{
59+
return $this->file;
60+
}
61+
/**
62+
* Required. Registry path to upload the container to. e.g. us-
63+
* east1-docker.pkg.dev/my-project/my-repo/my-image
64+
*
65+
* @param string $registryPath
66+
*/
67+
public function setRegistryPath($registryPath)
68+
{
69+
$this->registryPath = $registryPath;
70+
}
71+
/**
72+
* @return string
73+
*/
74+
public function getRegistryPath()
75+
{
76+
return $this->registryPath;
77+
}
78+
/**
79+
* Optional. Tags to apply to the uploaded image. e.g. latest, 1.0.0
80+
*
81+
* @param string[] $tags
82+
*/
83+
public function setTags($tags)
84+
{
85+
$this->tags = $tags;
86+
}
87+
/**
88+
* @return string[]
89+
*/
90+
public function getTags()
91+
{
92+
return $this->tags;
93+
}
94+
}
95+
96+
// Adding a class alias for backwards compatibility with the previous class name.
97+
class_alias(ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsOci::class, 'Google_Service_ContainerAnalysis_ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsOci');

src/ContainerAnalysis/ContaineranalysisGoogleDevtoolsCloudbuildV1BuiltImage.php

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,20 @@
1919

2020
class ContaineranalysisGoogleDevtoolsCloudbuildV1BuiltImage extends \Google\Model
2121
{
22+
/**
23+
* Default value.
24+
*/
25+
public const OCI_MEDIA_TYPE_OCI_MEDIA_TYPE_UNSPECIFIED = 'OCI_MEDIA_TYPE_UNSPECIFIED';
26+
/**
27+
* The artifact is an image manifest, which represents a single image with all
28+
* its layers.
29+
*/
30+
public const OCI_MEDIA_TYPE_IMAGE_MANIFEST = 'IMAGE_MANIFEST';
31+
/**
32+
* The artifact is an image index, which can contain a list of image
33+
* manifests.
34+
*/
35+
public const OCI_MEDIA_TYPE_IMAGE_INDEX = 'IMAGE_INDEX';
2236
/**
2337
* Output only. Path to the artifact in Artifact Registry.
2438
*
@@ -38,6 +52,13 @@ class ContaineranalysisGoogleDevtoolsCloudbuildV1BuiltImage extends \Google\Mode
3852
* @var string
3953
*/
4054
public $name;
55+
/**
56+
* Output only. The OCI media type of the artifact. Non-OCI images, such as
57+
* Docker images, will have an unspecified value.
58+
*
59+
* @var string
60+
*/
61+
public $ociMediaType;
4162
protected $pushTimingType = ContaineranalysisGoogleDevtoolsCloudbuildV1TimeSpan::class;
4263
protected $pushTimingDataType = '';
4364

@@ -90,6 +111,25 @@ public function getName()
90111
{
91112
return $this->name;
92113
}
114+
/**
115+
* Output only. The OCI media type of the artifact. Non-OCI images, such as
116+
* Docker images, will have an unspecified value.
117+
*
118+
* Accepted values: OCI_MEDIA_TYPE_UNSPECIFIED, IMAGE_MANIFEST, IMAGE_INDEX
119+
*
120+
* @param self::OCI_MEDIA_TYPE_* $ociMediaType
121+
*/
122+
public function setOciMediaType($ociMediaType)
123+
{
124+
$this->ociMediaType = $ociMediaType;
125+
}
126+
/**
127+
* @return self::OCI_MEDIA_TYPE_*
128+
*/
129+
public function getOciMediaType()
130+
{
131+
return $this->ociMediaType;
132+
}
93133
/**
94134
* Output only. Stores timing information for pushing the specified image.
95135
*

src/ContainerAnalysis/GrafeasV1FileLocation.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ class GrafeasV1FileLocation extends \Google\Model
2828
public $filePath;
2929
protected $layerDetailsType = LayerDetails::class;
3030
protected $layerDetailsDataType = '';
31+
/**
32+
* Line number in the file where the package was found. Optional field that
33+
* only applies to source repository scanning.
34+
*
35+
* @var int
36+
*/
37+
public $lineNumber;
3138

3239
/**
3340
* For jars that are contained inside .war files, this filepath can indicate
@@ -63,6 +70,23 @@ public function getLayerDetails()
6370
{
6471
return $this->layerDetails;
6572
}
73+
/**
74+
* Line number in the file where the package was found. Optional field that
75+
* only applies to source repository scanning.
76+
*
77+
* @param int $lineNumber
78+
*/
79+
public function setLineNumber($lineNumber)
80+
{
81+
$this->lineNumber = $lineNumber;
82+
}
83+
/**
84+
* @return int
85+
*/
86+
public function getLineNumber()
87+
{
88+
return $this->lineNumber;
89+
}
6690
}
6791

6892
// Adding a class alias for backwards compatibility with the previous class name.

0 commit comments

Comments
 (0)