Skip to content

Commit e28cc1f

Browse files
1 parent bd22c25 commit e28cc1f

File tree

10 files changed

+861
-21
lines changed

10 files changed

+861
-21
lines changed

clients/google-api-services-run/v2/2.0.0/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Add the following lines to your `pom.xml` file:
2222
<dependency>
2323
<groupId>com.google.apis</groupId>
2424
<artifactId>google-api-services-run</artifactId>
25-
<version>v2-rev20240802-2.0.0</version>
25+
<version>v2-rev20240809-2.0.0</version>
2626
</dependency>
2727
</dependencies>
2828
</project>
@@ -35,7 +35,7 @@ repositories {
3535
mavenCentral()
3636
}
3737
dependencies {
38-
implementation 'com.google.apis:google-api-services-run:v2-rev20240802-2.0.0'
38+
implementation 'com.google.apis:google-api-services-run:v2-rev20240809-2.0.0'
3939
}
4040
```
4141

clients/google-api-services-run/v2/2.0.0/com/google/api/services/run/v2/CloudRun.java

Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -806,6 +806,171 @@ public ExportProjectMetadata set(String parameterName, Object value) {
806806
}
807807
}
808808

809+
/**
810+
* An accessor for creating requests from the Builds collection.
811+
*
812+
* <p>The typical use is:</p>
813+
* <pre>
814+
* {@code CloudRun run = new CloudRun(...);}
815+
* {@code CloudRun.Builds.List request = run.builds().list(parameters ...)}
816+
* </pre>
817+
*
818+
* @return the resource collection
819+
*/
820+
public Builds builds() {
821+
return new Builds();
822+
}
823+
824+
/**
825+
* The "builds" collection of methods.
826+
*/
827+
public class Builds {
828+
829+
/**
830+
* Submits a build in a given project.
831+
*
832+
* Create a request for the method "builds.submit".
833+
*
834+
* This request holds the parameters needed by the run server. After setting any optional
835+
* parameters, call the {@link Submit#execute()} method to invoke the remote operation.
836+
*
837+
* @param parent Required. The project and location to build in. Location must be a region, e.g., 'us-central1' or
838+
* 'global' if the global builder is to be used. Format:
839+
* projects/{project}/locations/{location}
840+
* @param content the {@link com.google.api.services.run.v2.model.GoogleCloudRunV2SubmitBuildRequest}
841+
* @return the request
842+
*/
843+
public Submit submit(java.lang.String parent, com.google.api.services.run.v2.model.GoogleCloudRunV2SubmitBuildRequest content) throws java.io.IOException {
844+
Submit result = new Submit(parent, content);
845+
initialize(result);
846+
return result;
847+
}
848+
849+
public class Submit extends CloudRunRequest<com.google.api.services.run.v2.model.GoogleCloudRunV2SubmitBuildResponse> {
850+
851+
private static final String REST_PATH = "v2/{+parent}/builds:submit";
852+
853+
private final java.util.regex.Pattern PARENT_PATTERN =
854+
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+$");
855+
856+
/**
857+
* Submits a build in a given project.
858+
*
859+
* Create a request for the method "builds.submit".
860+
*
861+
* This request holds the parameters needed by the the run server. After setting any optional
862+
* parameters, call the {@link Submit#execute()} method to invoke the remote operation. <p> {@link
863+
* Submit#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
864+
* be called to initialize this instance immediately after invoking the constructor. </p>
865+
*
866+
* @param parent Required. The project and location to build in. Location must be a region, e.g., 'us-central1' or
867+
* 'global' if the global builder is to be used. Format:
868+
* projects/{project}/locations/{location}
869+
* @param content the {@link com.google.api.services.run.v2.model.GoogleCloudRunV2SubmitBuildRequest}
870+
* @since 1.13
871+
*/
872+
protected Submit(java.lang.String parent, com.google.api.services.run.v2.model.GoogleCloudRunV2SubmitBuildRequest content) {
873+
super(CloudRun.this, "POST", REST_PATH, content, com.google.api.services.run.v2.model.GoogleCloudRunV2SubmitBuildResponse.class);
874+
this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified.");
875+
if (!getSuppressPatternChecks()) {
876+
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
877+
"Parameter parent must conform to the pattern " +
878+
"^projects/[^/]+/locations/[^/]+$");
879+
}
880+
}
881+
882+
@Override
883+
public Submit set$Xgafv(java.lang.String $Xgafv) {
884+
return (Submit) super.set$Xgafv($Xgafv);
885+
}
886+
887+
@Override
888+
public Submit setAccessToken(java.lang.String accessToken) {
889+
return (Submit) super.setAccessToken(accessToken);
890+
}
891+
892+
@Override
893+
public Submit setAlt(java.lang.String alt) {
894+
return (Submit) super.setAlt(alt);
895+
}
896+
897+
@Override
898+
public Submit setCallback(java.lang.String callback) {
899+
return (Submit) super.setCallback(callback);
900+
}
901+
902+
@Override
903+
public Submit setFields(java.lang.String fields) {
904+
return (Submit) super.setFields(fields);
905+
}
906+
907+
@Override
908+
public Submit setKey(java.lang.String key) {
909+
return (Submit) super.setKey(key);
910+
}
911+
912+
@Override
913+
public Submit setOauthToken(java.lang.String oauthToken) {
914+
return (Submit) super.setOauthToken(oauthToken);
915+
}
916+
917+
@Override
918+
public Submit setPrettyPrint(java.lang.Boolean prettyPrint) {
919+
return (Submit) super.setPrettyPrint(prettyPrint);
920+
}
921+
922+
@Override
923+
public Submit setQuotaUser(java.lang.String quotaUser) {
924+
return (Submit) super.setQuotaUser(quotaUser);
925+
}
926+
927+
@Override
928+
public Submit setUploadType(java.lang.String uploadType) {
929+
return (Submit) super.setUploadType(uploadType);
930+
}
931+
932+
@Override
933+
public Submit setUploadProtocol(java.lang.String uploadProtocol) {
934+
return (Submit) super.setUploadProtocol(uploadProtocol);
935+
}
936+
937+
/**
938+
* Required. The project and location to build in. Location must be a region, e.g., 'us-
939+
* central1' or 'global' if the global builder is to be used. Format:
940+
* projects/{project}/locations/{location}
941+
*/
942+
@com.google.api.client.util.Key
943+
private java.lang.String parent;
944+
945+
/** Required. The project and location to build in. Location must be a region, e.g., 'us-central1' or
946+
'global' if the global builder is to be used. Format: projects/{project}/locations/{location}
947+
*/
948+
public java.lang.String getParent() {
949+
return parent;
950+
}
951+
952+
/**
953+
* Required. The project and location to build in. Location must be a region, e.g., 'us-
954+
* central1' or 'global' if the global builder is to be used. Format:
955+
* projects/{project}/locations/{location}
956+
*/
957+
public Submit setParent(java.lang.String parent) {
958+
if (!getSuppressPatternChecks()) {
959+
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
960+
"Parameter parent must conform to the pattern " +
961+
"^projects/[^/]+/locations/[^/]+$");
962+
}
963+
this.parent = parent;
964+
return this;
965+
}
966+
967+
@Override
968+
public Submit set(String parameterName, Object value) {
969+
return (Submit) super.set(parameterName, value);
970+
}
971+
}
972+
973+
}
809974
/**
810975
* An accessor for creating requests from the Jobs collection.
811976
*
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,204 @@
1+
/*
2+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
3+
* in compliance with the License. You may obtain a copy of the License at
4+
*
5+
* http://www.apache.org/licenses/LICENSE-2.0
6+
*
7+
* Unless required by applicable law or agreed to in writing, software distributed under the License
8+
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
9+
* or implied. See the License for the specific language governing permissions and limitations under
10+
* the License.
11+
*/
12+
/*
13+
* This code was generated by https://github.com/googleapis/google-api-java-client-services/
14+
* Modify at your own risk.
15+
*/
16+
17+
package com.google.api.services.run.v2.model;
18+
19+
/**
20+
* Build the source using Buildpacks.
21+
*
22+
* <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
23+
* transmitted over HTTP when working with the Cloud Run Admin API. For a detailed explanation see:
24+
* <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a>
25+
* </p>
26+
*
27+
* @author Google, Inc.
28+
*/
29+
@SuppressWarnings("javadoc")
30+
public final class GoogleCloudRunV2BuildpacksBuild extends com.google.api.client.json.GenericJson {
31+
32+
/**
33+
* Optional. The base image used to opt into automatic base image updates.
34+
* The value may be {@code null}.
35+
*/
36+
@com.google.api.client.util.Key
37+
private java.lang.String baseImage;
38+
39+
/**
40+
* Optional. cache_image_uri is the GCR/AR URL where the cache image will be stored.
41+
* cache_image_uri is optional and omitting it will disable caching. This URL must be stable
42+
* across builds. It is used to derive a build-specific temporary URL by substituting the tag with
43+
* the build ID. The build will clean up the temporary image on a best-effort basis.
44+
* The value may be {@code null}.
45+
*/
46+
@com.google.api.client.util.Key
47+
private java.lang.String cacheImageUri;
48+
49+
/**
50+
* Optional. Whether or not the application container will be enrolled in automatic base image
51+
* updates. When true, the application will be built on a scratch base image, so the base layers
52+
* can be appended at run time.
53+
* The value may be {@code null}.
54+
*/
55+
@com.google.api.client.util.Key
56+
private java.lang.Boolean enableAutomaticUpdates;
57+
58+
/**
59+
* Optional. User-provided build-time environment variables.
60+
* The value may be {@code null}.
61+
*/
62+
@com.google.api.client.util.Key
63+
private java.util.Map<String, java.lang.String> environmentVariables;
64+
65+
/**
66+
* Optional. Name of the function target if the source is a function source. Required for function
67+
* builds.
68+
* The value may be {@code null}.
69+
*/
70+
@com.google.api.client.util.Key
71+
private java.lang.String functionTarget;
72+
73+
/**
74+
* The runtime name, e.g. 'go113'. Leave blank for generic builds.
75+
* The value may be {@code null}.
76+
*/
77+
@com.google.api.client.util.Key
78+
private java.lang.String runtime;
79+
80+
/**
81+
* Optional. The base image used to opt into automatic base image updates.
82+
* @return value or {@code null} for none
83+
*/
84+
public java.lang.String getBaseImage() {
85+
return baseImage;
86+
}
87+
88+
/**
89+
* Optional. The base image used to opt into automatic base image updates.
90+
* @param baseImage baseImage or {@code null} for none
91+
*/
92+
public GoogleCloudRunV2BuildpacksBuild setBaseImage(java.lang.String baseImage) {
93+
this.baseImage = baseImage;
94+
return this;
95+
}
96+
97+
/**
98+
* Optional. cache_image_uri is the GCR/AR URL where the cache image will be stored.
99+
* cache_image_uri is optional and omitting it will disable caching. This URL must be stable
100+
* across builds. It is used to derive a build-specific temporary URL by substituting the tag with
101+
* the build ID. The build will clean up the temporary image on a best-effort basis.
102+
* @return value or {@code null} for none
103+
*/
104+
public java.lang.String getCacheImageUri() {
105+
return cacheImageUri;
106+
}
107+
108+
/**
109+
* Optional. cache_image_uri is the GCR/AR URL where the cache image will be stored.
110+
* cache_image_uri is optional and omitting it will disable caching. This URL must be stable
111+
* across builds. It is used to derive a build-specific temporary URL by substituting the tag with
112+
* the build ID. The build will clean up the temporary image on a best-effort basis.
113+
* @param cacheImageUri cacheImageUri or {@code null} for none
114+
*/
115+
public GoogleCloudRunV2BuildpacksBuild setCacheImageUri(java.lang.String cacheImageUri) {
116+
this.cacheImageUri = cacheImageUri;
117+
return this;
118+
}
119+
120+
/**
121+
* Optional. Whether or not the application container will be enrolled in automatic base image
122+
* updates. When true, the application will be built on a scratch base image, so the base layers
123+
* can be appended at run time.
124+
* @return value or {@code null} for none
125+
*/
126+
public java.lang.Boolean getEnableAutomaticUpdates() {
127+
return enableAutomaticUpdates;
128+
}
129+
130+
/**
131+
* Optional. Whether or not the application container will be enrolled in automatic base image
132+
* updates. When true, the application will be built on a scratch base image, so the base layers
133+
* can be appended at run time.
134+
* @param enableAutomaticUpdates enableAutomaticUpdates or {@code null} for none
135+
*/
136+
public GoogleCloudRunV2BuildpacksBuild setEnableAutomaticUpdates(java.lang.Boolean enableAutomaticUpdates) {
137+
this.enableAutomaticUpdates = enableAutomaticUpdates;
138+
return this;
139+
}
140+
141+
/**
142+
* Optional. User-provided build-time environment variables.
143+
* @return value or {@code null} for none
144+
*/
145+
public java.util.Map<String, java.lang.String> getEnvironmentVariables() {
146+
return environmentVariables;
147+
}
148+
149+
/**
150+
* Optional. User-provided build-time environment variables.
151+
* @param environmentVariables environmentVariables or {@code null} for none
152+
*/
153+
public GoogleCloudRunV2BuildpacksBuild setEnvironmentVariables(java.util.Map<String, java.lang.String> environmentVariables) {
154+
this.environmentVariables = environmentVariables;
155+
return this;
156+
}
157+
158+
/**
159+
* Optional. Name of the function target if the source is a function source. Required for function
160+
* builds.
161+
* @return value or {@code null} for none
162+
*/
163+
public java.lang.String getFunctionTarget() {
164+
return functionTarget;
165+
}
166+
167+
/**
168+
* Optional. Name of the function target if the source is a function source. Required for function
169+
* builds.
170+
* @param functionTarget functionTarget or {@code null} for none
171+
*/
172+
public GoogleCloudRunV2BuildpacksBuild setFunctionTarget(java.lang.String functionTarget) {
173+
this.functionTarget = functionTarget;
174+
return this;
175+
}
176+
177+
/**
178+
* The runtime name, e.g. 'go113'. Leave blank for generic builds.
179+
* @return value or {@code null} for none
180+
*/
181+
public java.lang.String getRuntime() {
182+
return runtime;
183+
}
184+
185+
/**
186+
* The runtime name, e.g. 'go113'. Leave blank for generic builds.
187+
* @param runtime runtime or {@code null} for none
188+
*/
189+
public GoogleCloudRunV2BuildpacksBuild setRuntime(java.lang.String runtime) {
190+
this.runtime = runtime;
191+
return this;
192+
}
193+
194+
@Override
195+
public GoogleCloudRunV2BuildpacksBuild set(String fieldName, Object value) {
196+
return (GoogleCloudRunV2BuildpacksBuild) super.set(fieldName, value);
197+
}
198+
199+
@Override
200+
public GoogleCloudRunV2BuildpacksBuild clone() {
201+
return (GoogleCloudRunV2BuildpacksBuild) super.clone();
202+
}
203+
204+
}

0 commit comments

Comments
 (0)