Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions clients/google-api-services-connectors/v2/2.0.0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Add the following lines to your `pom.xml` file:
<dependency>
<groupId>com.google.apis</groupId>
<artifactId>google-api-services-connectors</artifactId>
<version>v2-rev20260527-2.0.0</version>
<version>v2-rev20260611-2.0.0</version>
</dependency>
</dependencies>
</project>
Expand All @@ -35,7 +35,7 @@ repositories {
mavenCentral()
}
dependencies {
implementation 'com.google.apis:google-api-services-connectors:v2-rev20260527-2.0.0'
implementation 'com.google.apis:google-api-services-connectors:v2-rev20260611-2.0.0'
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,148 @@ public ExchangeAuthCode set(String parameterName, Object value) {
return (ExchangeAuthCode) super.set(parameterName, value);
}
}
/**
* Executes a generic HTTP request. This supports all payload formats including REST/JSON, GraphQL,
* XML, SOAP, and Multipart by passing the rendered payload as raw bytes.
*
* Create a request for the method "connections.executeHttpRequest".
*
* This request holds the parameters needed by the connectors server. After setting any optional
* parameters, call the {@link ExecuteHttpRequest#execute()} method to invoke the remote operation.
*
* @param name Required. Resource name of the Connection. Format:
* projects/{project}/locations/{location}/connections/{connection}
* @param content the {@link com.google.api.services.connectors.v2.model.ExecuteHttpRequestRequest}
* @return the request
*/
public ExecuteHttpRequest executeHttpRequest(java.lang.String name, com.google.api.services.connectors.v2.model.ExecuteHttpRequestRequest content) throws java.io.IOException {
ExecuteHttpRequest result = new ExecuteHttpRequest(name, content);
initialize(result);
return result;
}

public class ExecuteHttpRequest extends ConnectorsRequest<com.google.api.services.connectors.v2.model.ExecuteHttpRequestResponse> {

private static final String REST_PATH = "v2/{+name}:executeHttpRequest";

private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/connections/[^/]+$");

/**
* Executes a generic HTTP request. This supports all payload formats including REST/JSON,
* GraphQL, XML, SOAP, and Multipart by passing the rendered payload as raw bytes.
*
* Create a request for the method "connections.executeHttpRequest".
*
* This request holds the parameters needed by the the connectors server. After setting any
* optional parameters, call the {@link ExecuteHttpRequest#execute()} method to invoke the remote
* operation. <p> {@link ExecuteHttpRequest#initialize(com.google.api.client.googleapis.services.A
* bstractGoogleClientRequest)} must be called to initialize this instance immediately after
* invoking the constructor. </p>
*
* @param name Required. Resource name of the Connection. Format:
* projects/{project}/locations/{location}/connections/{connection}
* @param content the {@link com.google.api.services.connectors.v2.model.ExecuteHttpRequestRequest}
* @since 1.13
*/
protected ExecuteHttpRequest(java.lang.String name, com.google.api.services.connectors.v2.model.ExecuteHttpRequestRequest content) {
super(Connectors.this, "POST", REST_PATH, content, com.google.api.services.connectors.v2.model.ExecuteHttpRequestResponse.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/connections/[^/]+$");
}
}

@Override
public ExecuteHttpRequest set$Xgafv(java.lang.String $Xgafv) {
return (ExecuteHttpRequest) super.set$Xgafv($Xgafv);
}

@Override
public ExecuteHttpRequest setAccessToken(java.lang.String accessToken) {
return (ExecuteHttpRequest) super.setAccessToken(accessToken);
}

@Override
public ExecuteHttpRequest setAlt(java.lang.String alt) {
return (ExecuteHttpRequest) super.setAlt(alt);
}

@Override
public ExecuteHttpRequest setCallback(java.lang.String callback) {
return (ExecuteHttpRequest) super.setCallback(callback);
}

@Override
public ExecuteHttpRequest setFields(java.lang.String fields) {
return (ExecuteHttpRequest) super.setFields(fields);
}

@Override
public ExecuteHttpRequest setKey(java.lang.String key) {
return (ExecuteHttpRequest) super.setKey(key);
}

@Override
public ExecuteHttpRequest setOauthToken(java.lang.String oauthToken) {
return (ExecuteHttpRequest) super.setOauthToken(oauthToken);
}

@Override
public ExecuteHttpRequest setPrettyPrint(java.lang.Boolean prettyPrint) {
return (ExecuteHttpRequest) super.setPrettyPrint(prettyPrint);
}

@Override
public ExecuteHttpRequest setQuotaUser(java.lang.String quotaUser) {
return (ExecuteHttpRequest) super.setQuotaUser(quotaUser);
}

@Override
public ExecuteHttpRequest setUploadType(java.lang.String uploadType) {
return (ExecuteHttpRequest) super.setUploadType(uploadType);
}

@Override
public ExecuteHttpRequest setUploadProtocol(java.lang.String uploadProtocol) {
return (ExecuteHttpRequest) super.setUploadProtocol(uploadProtocol);
}

/**
* Required. Resource name of the Connection. Format:
* projects/{project}/locations/{location}/connections/{connection}
*/
@com.google.api.client.util.Key
private java.lang.String name;

/** Required. Resource name of the Connection. Format:
projects/{project}/locations/{location}/connections/{connection}
*/
public java.lang.String getName() {
return name;
}

/**
* Required. Resource name of the Connection. Format:
* projects/{project}/locations/{location}/connections/{connection}
*/
public ExecuteHttpRequest setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/connections/[^/]+$");
}
this.name = name;
return this;
}

@Override
public ExecuteHttpRequest set(String parameterName, Object value) {
return (ExecuteHttpRequest) super.set(parameterName, value);
}
}
/**
* Executes a SQL statement specified in the body of the request. An example of this SQL statement
* in the case of Salesforce connector would be 'select * from Account a, Order o where a.Id =
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
/*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
/*
* This code was generated by https://github.com/googleapis/google-api-java-client-services/
* Modify at your own risk.
*/

package com.google.api.services.connectors.v2.model;

/**
* Model definition for ExecuteHttpRequestRequest.
*
* <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
* transmitted over HTTP when working with the Connectors API. For a detailed explanation see:
* <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>
* </p>
*
* @author Google, Inc.
*/
@SuppressWarnings("javadoc")
public final class ExecuteHttpRequestRequest extends com.google.api.client.json.GenericJson {

/**
* HTTP headers to send with the request (e.g., Content-Type: application/json). Order is
* preserved and duplicate keys are allowed.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.util.List<HttpHeader> headers;

/**
* Required. The HTTP method to use for the request.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String httpMethod;

/**
* Raw byte payload. Used for all pre-serialized formats including JSON, XML, GraphQL, and
* Multipart.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String rawBody;

/**
* Required. The fully resolved absolute target URL. Callers must pre-encode any query parameters.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String url;

/**
* HTTP headers to send with the request (e.g., Content-Type: application/json). Order is
* preserved and duplicate keys are allowed.
* @return value or {@code null} for none
*/
public java.util.List<HttpHeader> getHeaders() {
return headers;
}

/**
* HTTP headers to send with the request (e.g., Content-Type: application/json). Order is
* preserved and duplicate keys are allowed.
* @param headers headers or {@code null} for none
*/
public ExecuteHttpRequestRequest setHeaders(java.util.List<HttpHeader> headers) {
this.headers = headers;
return this;
}

/**
* Required. The HTTP method to use for the request.
* @return value or {@code null} for none
*/
public java.lang.String getHttpMethod() {
return httpMethod;
}

/**
* Required. The HTTP method to use for the request.
* @param httpMethod httpMethod or {@code null} for none
*/
public ExecuteHttpRequestRequest setHttpMethod(java.lang.String httpMethod) {
this.httpMethod = httpMethod;
return this;
}

/**
* Raw byte payload. Used for all pre-serialized formats including JSON, XML, GraphQL, and
* Multipart.
* @see #decodeRawBody()
* @return value or {@code null} for none
*/
public java.lang.String getRawBody() {
return rawBody;
}

/**
* Raw byte payload. Used for all pre-serialized formats including JSON, XML, GraphQL, and
* Multipart.
* @see #getRawBody()
* @return Base64 decoded value or {@code null} for none
*
* @since 1.14
*/
public byte[] decodeRawBody() {
return com.google.api.client.util.Base64.decodeBase64(rawBody);
}

/**
* Raw byte payload. Used for all pre-serialized formats including JSON, XML, GraphQL, and
* Multipart.
* @see #encodeRawBody()
* @param rawBody rawBody or {@code null} for none
*/
public ExecuteHttpRequestRequest setRawBody(java.lang.String rawBody) {
this.rawBody = rawBody;
return this;
}

/**
* Raw byte payload. Used for all pre-serialized formats including JSON, XML, GraphQL, and
* Multipart.
* @see #setRawBody()
*
* <p>
* The value is encoded Base64 or {@code null} for none.
* </p>
*
* @since 1.14
*/
public ExecuteHttpRequestRequest encodeRawBody(byte[] rawBody) {
this.rawBody = com.google.api.client.util.Base64.encodeBase64URLSafeString(rawBody);
return this;
}

/**
* Required. The fully resolved absolute target URL. Callers must pre-encode any query parameters.
* @return value or {@code null} for none
*/
public java.lang.String getUrl() {
return url;
}

/**
* Required. The fully resolved absolute target URL. Callers must pre-encode any query parameters.
* @param url url or {@code null} for none
*/
public ExecuteHttpRequestRequest setUrl(java.lang.String url) {
this.url = url;
return this;
}

@Override
public ExecuteHttpRequestRequest set(String fieldName, Object value) {
return (ExecuteHttpRequestRequest) super.set(fieldName, value);
}

@Override
public ExecuteHttpRequestRequest clone() {
return (ExecuteHttpRequestRequest) super.clone();
}

}
Loading
Loading