Skip to content

Commit fec37de

Browse files
1 parent 2007bf4 commit fec37de

7 files changed

Lines changed: 585 additions & 6 deletions

File tree

clients/google-api-services-connectors/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-connectors</artifactId>
25-
<version>v2-rev20260527-2.0.0</version>
25+
<version>v2-rev20260611-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-connectors:v2-rev20260527-2.0.0'
38+
implementation 'com.google.apis:google-api-services-connectors:v2-rev20260611-2.0.0'
3939
}
4040
```
4141

clients/google-api-services-connectors/v2/2.0.0/com/google/api/services/connectors/v2/Connectors.java

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -634,6 +634,148 @@ public ExchangeAuthCode set(String parameterName, Object value) {
634634
return (ExchangeAuthCode) super.set(parameterName, value);
635635
}
636636
}
637+
/**
638+
* Executes a generic HTTP request. This supports all payload formats including REST/JSON, GraphQL,
639+
* XML, SOAP, and Multipart by passing the rendered payload as raw bytes.
640+
*
641+
* Create a request for the method "connections.executeHttpRequest".
642+
*
643+
* This request holds the parameters needed by the connectors server. After setting any optional
644+
* parameters, call the {@link ExecuteHttpRequest#execute()} method to invoke the remote operation.
645+
*
646+
* @param name Required. Resource name of the Connection. Format:
647+
* projects/{project}/locations/{location}/connections/{connection}
648+
* @param content the {@link com.google.api.services.connectors.v2.model.ExecuteHttpRequestRequest}
649+
* @return the request
650+
*/
651+
public ExecuteHttpRequest executeHttpRequest(java.lang.String name, com.google.api.services.connectors.v2.model.ExecuteHttpRequestRequest content) throws java.io.IOException {
652+
ExecuteHttpRequest result = new ExecuteHttpRequest(name, content);
653+
initialize(result);
654+
return result;
655+
}
656+
657+
public class ExecuteHttpRequest extends ConnectorsRequest<com.google.api.services.connectors.v2.model.ExecuteHttpRequestResponse> {
658+
659+
private static final String REST_PATH = "v2/{+name}:executeHttpRequest";
660+
661+
private final java.util.regex.Pattern NAME_PATTERN =
662+
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/connections/[^/]+$");
663+
664+
/**
665+
* Executes a generic HTTP request. This supports all payload formats including REST/JSON,
666+
* GraphQL, XML, SOAP, and Multipart by passing the rendered payload as raw bytes.
667+
*
668+
* Create a request for the method "connections.executeHttpRequest".
669+
*
670+
* This request holds the parameters needed by the the connectors server. After setting any
671+
* optional parameters, call the {@link ExecuteHttpRequest#execute()} method to invoke the remote
672+
* operation. <p> {@link ExecuteHttpRequest#initialize(com.google.api.client.googleapis.services.A
673+
* bstractGoogleClientRequest)} must be called to initialize this instance immediately after
674+
* invoking the constructor. </p>
675+
*
676+
* @param name Required. Resource name of the Connection. Format:
677+
* projects/{project}/locations/{location}/connections/{connection}
678+
* @param content the {@link com.google.api.services.connectors.v2.model.ExecuteHttpRequestRequest}
679+
* @since 1.13
680+
*/
681+
protected ExecuteHttpRequest(java.lang.String name, com.google.api.services.connectors.v2.model.ExecuteHttpRequestRequest content) {
682+
super(Connectors.this, "POST", REST_PATH, content, com.google.api.services.connectors.v2.model.ExecuteHttpRequestResponse.class);
683+
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
684+
if (!getSuppressPatternChecks()) {
685+
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
686+
"Parameter name must conform to the pattern " +
687+
"^projects/[^/]+/locations/[^/]+/connections/[^/]+$");
688+
}
689+
}
690+
691+
@Override
692+
public ExecuteHttpRequest set$Xgafv(java.lang.String $Xgafv) {
693+
return (ExecuteHttpRequest) super.set$Xgafv($Xgafv);
694+
}
695+
696+
@Override
697+
public ExecuteHttpRequest setAccessToken(java.lang.String accessToken) {
698+
return (ExecuteHttpRequest) super.setAccessToken(accessToken);
699+
}
700+
701+
@Override
702+
public ExecuteHttpRequest setAlt(java.lang.String alt) {
703+
return (ExecuteHttpRequest) super.setAlt(alt);
704+
}
705+
706+
@Override
707+
public ExecuteHttpRequest setCallback(java.lang.String callback) {
708+
return (ExecuteHttpRequest) super.setCallback(callback);
709+
}
710+
711+
@Override
712+
public ExecuteHttpRequest setFields(java.lang.String fields) {
713+
return (ExecuteHttpRequest) super.setFields(fields);
714+
}
715+
716+
@Override
717+
public ExecuteHttpRequest setKey(java.lang.String key) {
718+
return (ExecuteHttpRequest) super.setKey(key);
719+
}
720+
721+
@Override
722+
public ExecuteHttpRequest setOauthToken(java.lang.String oauthToken) {
723+
return (ExecuteHttpRequest) super.setOauthToken(oauthToken);
724+
}
725+
726+
@Override
727+
public ExecuteHttpRequest setPrettyPrint(java.lang.Boolean prettyPrint) {
728+
return (ExecuteHttpRequest) super.setPrettyPrint(prettyPrint);
729+
}
730+
731+
@Override
732+
public ExecuteHttpRequest setQuotaUser(java.lang.String quotaUser) {
733+
return (ExecuteHttpRequest) super.setQuotaUser(quotaUser);
734+
}
735+
736+
@Override
737+
public ExecuteHttpRequest setUploadType(java.lang.String uploadType) {
738+
return (ExecuteHttpRequest) super.setUploadType(uploadType);
739+
}
740+
741+
@Override
742+
public ExecuteHttpRequest setUploadProtocol(java.lang.String uploadProtocol) {
743+
return (ExecuteHttpRequest) super.setUploadProtocol(uploadProtocol);
744+
}
745+
746+
/**
747+
* Required. Resource name of the Connection. Format:
748+
* projects/{project}/locations/{location}/connections/{connection}
749+
*/
750+
@com.google.api.client.util.Key
751+
private java.lang.String name;
752+
753+
/** Required. Resource name of the Connection. Format:
754+
projects/{project}/locations/{location}/connections/{connection}
755+
*/
756+
public java.lang.String getName() {
757+
return name;
758+
}
759+
760+
/**
761+
* Required. Resource name of the Connection. Format:
762+
* projects/{project}/locations/{location}/connections/{connection}
763+
*/
764+
public ExecuteHttpRequest setName(java.lang.String name) {
765+
if (!getSuppressPatternChecks()) {
766+
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
767+
"Parameter name must conform to the pattern " +
768+
"^projects/[^/]+/locations/[^/]+/connections/[^/]+$");
769+
}
770+
this.name = name;
771+
return this;
772+
}
773+
774+
@Override
775+
public ExecuteHttpRequest set(String parameterName, Object value) {
776+
return (ExecuteHttpRequest) super.set(parameterName, value);
777+
}
778+
}
637779
/**
638780
* Executes a SQL statement specified in the body of the request. An example of this SQL statement
639781
* in the case of Salesforce connector would be 'select * from Account a, Order o where a.Id =
Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
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.connectors.v2.model;
18+
19+
/**
20+
* Model definition for ExecuteHttpRequestRequest.
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 Connectors 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 ExecuteHttpRequestRequest extends com.google.api.client.json.GenericJson {
31+
32+
/**
33+
* HTTP headers to send with the request (e.g., Content-Type: application/json). Order is
34+
* preserved and duplicate keys are allowed.
35+
* The value may be {@code null}.
36+
*/
37+
@com.google.api.client.util.Key
38+
private java.util.List<HttpHeader> headers;
39+
40+
/**
41+
* Required. The HTTP method to use for the request.
42+
* The value may be {@code null}.
43+
*/
44+
@com.google.api.client.util.Key
45+
private java.lang.String httpMethod;
46+
47+
/**
48+
* Raw byte payload. Used for all pre-serialized formats including JSON, XML, GraphQL, and
49+
* Multipart.
50+
* The value may be {@code null}.
51+
*/
52+
@com.google.api.client.util.Key
53+
private java.lang.String rawBody;
54+
55+
/**
56+
* Required. The fully resolved absolute target URL. Callers must pre-encode any query parameters.
57+
* The value may be {@code null}.
58+
*/
59+
@com.google.api.client.util.Key
60+
private java.lang.String url;
61+
62+
/**
63+
* HTTP headers to send with the request (e.g., Content-Type: application/json). Order is
64+
* preserved and duplicate keys are allowed.
65+
* @return value or {@code null} for none
66+
*/
67+
public java.util.List<HttpHeader> getHeaders() {
68+
return headers;
69+
}
70+
71+
/**
72+
* HTTP headers to send with the request (e.g., Content-Type: application/json). Order is
73+
* preserved and duplicate keys are allowed.
74+
* @param headers headers or {@code null} for none
75+
*/
76+
public ExecuteHttpRequestRequest setHeaders(java.util.List<HttpHeader> headers) {
77+
this.headers = headers;
78+
return this;
79+
}
80+
81+
/**
82+
* Required. The HTTP method to use for the request.
83+
* @return value or {@code null} for none
84+
*/
85+
public java.lang.String getHttpMethod() {
86+
return httpMethod;
87+
}
88+
89+
/**
90+
* Required. The HTTP method to use for the request.
91+
* @param httpMethod httpMethod or {@code null} for none
92+
*/
93+
public ExecuteHttpRequestRequest setHttpMethod(java.lang.String httpMethod) {
94+
this.httpMethod = httpMethod;
95+
return this;
96+
}
97+
98+
/**
99+
* Raw byte payload. Used for all pre-serialized formats including JSON, XML, GraphQL, and
100+
* Multipart.
101+
* @see #decodeRawBody()
102+
* @return value or {@code null} for none
103+
*/
104+
public java.lang.String getRawBody() {
105+
return rawBody;
106+
}
107+
108+
/**
109+
* Raw byte payload. Used for all pre-serialized formats including JSON, XML, GraphQL, and
110+
* Multipart.
111+
* @see #getRawBody()
112+
* @return Base64 decoded value or {@code null} for none
113+
*
114+
* @since 1.14
115+
*/
116+
public byte[] decodeRawBody() {
117+
return com.google.api.client.util.Base64.decodeBase64(rawBody);
118+
}
119+
120+
/**
121+
* Raw byte payload. Used for all pre-serialized formats including JSON, XML, GraphQL, and
122+
* Multipart.
123+
* @see #encodeRawBody()
124+
* @param rawBody rawBody or {@code null} for none
125+
*/
126+
public ExecuteHttpRequestRequest setRawBody(java.lang.String rawBody) {
127+
this.rawBody = rawBody;
128+
return this;
129+
}
130+
131+
/**
132+
* Raw byte payload. Used for all pre-serialized formats including JSON, XML, GraphQL, and
133+
* Multipart.
134+
* @see #setRawBody()
135+
*
136+
* <p>
137+
* The value is encoded Base64 or {@code null} for none.
138+
* </p>
139+
*
140+
* @since 1.14
141+
*/
142+
public ExecuteHttpRequestRequest encodeRawBody(byte[] rawBody) {
143+
this.rawBody = com.google.api.client.util.Base64.encodeBase64URLSafeString(rawBody);
144+
return this;
145+
}
146+
147+
/**
148+
* Required. The fully resolved absolute target URL. Callers must pre-encode any query parameters.
149+
* @return value or {@code null} for none
150+
*/
151+
public java.lang.String getUrl() {
152+
return url;
153+
}
154+
155+
/**
156+
* Required. The fully resolved absolute target URL. Callers must pre-encode any query parameters.
157+
* @param url url or {@code null} for none
158+
*/
159+
public ExecuteHttpRequestRequest setUrl(java.lang.String url) {
160+
this.url = url;
161+
return this;
162+
}
163+
164+
@Override
165+
public ExecuteHttpRequestRequest set(String fieldName, Object value) {
166+
return (ExecuteHttpRequestRequest) super.set(fieldName, value);
167+
}
168+
169+
@Override
170+
public ExecuteHttpRequestRequest clone() {
171+
return (ExecuteHttpRequestRequest) super.clone();
172+
}
173+
174+
}

0 commit comments

Comments
 (0)