diff --git a/clients/google-api-services-connectors/v2/2.0.0/README.md b/clients/google-api-services-connectors/v2/2.0.0/README.md index 1b0a5b63d8a..65af4b06b73 100644 --- a/clients/google-api-services-connectors/v2/2.0.0/README.md +++ b/clients/google-api-services-connectors/v2/2.0.0/README.md @@ -22,7 +22,7 @@ Add the following lines to your `pom.xml` file: com.google.apis google-api-services-connectors - v2-rev20260527-2.0.0 + v2-rev20260611-2.0.0 @@ -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' } ``` diff --git a/clients/google-api-services-connectors/v2/2.0.0/com/google/api/services/connectors/v2/Connectors.java b/clients/google-api-services-connectors/v2/2.0.0/com/google/api/services/connectors/v2/Connectors.java index b3c3cdbc305..4d5542edae5 100644 --- a/clients/google-api-services-connectors/v2/2.0.0/com/google/api/services/connectors/v2/Connectors.java +++ b/clients/google-api-services-connectors/v2/2.0.0/com/google/api/services/connectors/v2/Connectors.java @@ -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 { + + 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.

{@link ExecuteHttpRequest#initialize(com.google.api.client.googleapis.services.A + * bstractGoogleClientRequest)} must be called to initialize this instance immediately after + * invoking the constructor.

+ * + * @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 = diff --git a/clients/google-api-services-connectors/v2/2.0.0/com/google/api/services/connectors/v2/model/ExecuteHttpRequestRequest.java b/clients/google-api-services-connectors/v2/2.0.0/com/google/api/services/connectors/v2/model/ExecuteHttpRequestRequest.java new file mode 100644 index 00000000000..92bfe5811b2 --- /dev/null +++ b/clients/google-api-services-connectors/v2/2.0.0/com/google/api/services/connectors/v2/model/ExecuteHttpRequestRequest.java @@ -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. + * + *

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: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *

+ * + * @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 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 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 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() + * + *

+ * The value is encoded Base64 or {@code null} for none. + *

+ * + * @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(); + } + +} diff --git a/clients/google-api-services-connectors/v2/2.0.0/com/google/api/services/connectors/v2/model/ExecuteHttpRequestResponse.java b/clients/google-api-services-connectors/v2/2.0.0/com/google/api/services/connectors/v2/model/ExecuteHttpRequestResponse.java new file mode 100644 index 00000000000..b4690ccd8fd --- /dev/null +++ b/clients/google-api-services-connectors/v2/2.0.0/com/google/api/services/connectors/v2/model/ExecuteHttpRequestResponse.java @@ -0,0 +1,172 @@ +/* + * 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 ExecuteHttpRequestResponse. + * + *

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: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *

+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class ExecuteHttpRequestResponse extends com.google.api.client.json.GenericJson { + + /** + * The raw response body. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String body; + + /** + * HTTP headers received in the response. Order is preserved and duplicate keys are allowed (e.g., + * multiple Set-Cookie headers). + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.util.List headers; + + /** + * The HTTP status reason phrase received from the backend (e.g., "Not Found"). May be empty if + * the backend did not provide one. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String reason; + + /** + * The HTTP status code received from the backend. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.Integer statusCode; + + /** + * The raw response body. + * @see #decodeBody() + * @return value or {@code null} for none + */ + public java.lang.String getBody() { + return body; + } + + /** + * The raw response body. + * @see #getBody() + * @return Base64 decoded value or {@code null} for none + * + * @since 1.14 + */ + public byte[] decodeBody() { + return com.google.api.client.util.Base64.decodeBase64(body); + } + + /** + * The raw response body. + * @see #encodeBody() + * @param body body or {@code null} for none + */ + public ExecuteHttpRequestResponse setBody(java.lang.String body) { + this.body = body; + return this; + } + + /** + * The raw response body. + * @see #setBody() + * + *

+ * The value is encoded Base64 or {@code null} for none. + *

+ * + * @since 1.14 + */ + public ExecuteHttpRequestResponse encodeBody(byte[] body) { + this.body = com.google.api.client.util.Base64.encodeBase64URLSafeString(body); + return this; + } + + /** + * HTTP headers received in the response. Order is preserved and duplicate keys are allowed (e.g., + * multiple Set-Cookie headers). + * @return value or {@code null} for none + */ + public java.util.List getHeaders() { + return headers; + } + + /** + * HTTP headers received in the response. Order is preserved and duplicate keys are allowed (e.g., + * multiple Set-Cookie headers). + * @param headers headers or {@code null} for none + */ + public ExecuteHttpRequestResponse setHeaders(java.util.List headers) { + this.headers = headers; + return this; + } + + /** + * The HTTP status reason phrase received from the backend (e.g., "Not Found"). May be empty if + * the backend did not provide one. + * @return value or {@code null} for none + */ + public java.lang.String getReason() { + return reason; + } + + /** + * The HTTP status reason phrase received from the backend (e.g., "Not Found"). May be empty if + * the backend did not provide one. + * @param reason reason or {@code null} for none + */ + public ExecuteHttpRequestResponse setReason(java.lang.String reason) { + this.reason = reason; + return this; + } + + /** + * The HTTP status code received from the backend. + * @return value or {@code null} for none + */ + public java.lang.Integer getStatusCode() { + return statusCode; + } + + /** + * The HTTP status code received from the backend. + * @param statusCode statusCode or {@code null} for none + */ + public ExecuteHttpRequestResponse setStatusCode(java.lang.Integer statusCode) { + this.statusCode = statusCode; + return this; + } + + @Override + public ExecuteHttpRequestResponse set(String fieldName, Object value) { + return (ExecuteHttpRequestResponse) super.set(fieldName, value); + } + + @Override + public ExecuteHttpRequestResponse clone() { + return (ExecuteHttpRequestResponse) super.clone(); + } + +} diff --git a/clients/google-api-services-connectors/v2/2.0.0/com/google/api/services/connectors/v2/model/HttpHeader.java b/clients/google-api-services-connectors/v2/2.0.0/com/google/api/services/connectors/v2/model/HttpHeader.java new file mode 100644 index 00000000000..53eaf8878a4 --- /dev/null +++ b/clients/google-api-services-connectors/v2/2.0.0/com/google/api/services/connectors/v2/model/HttpHeader.java @@ -0,0 +1,91 @@ +/* + * 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; + +/** + * A single HTTP header. Keys are case-insensitive. Multiple headers with the same key may be + * present. + * + *

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: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *

+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class HttpHeader extends com.google.api.client.json.GenericJson { + + /** + * The header name. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String key; + + /** + * The header value. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String value; + + /** + * The header name. + * @return value or {@code null} for none + */ + public java.lang.String getKey() { + return key; + } + + /** + * The header name. + * @param key key or {@code null} for none + */ + public HttpHeader setKey(java.lang.String key) { + this.key = key; + return this; + } + + /** + * The header value. + * @return value or {@code null} for none + */ + public java.lang.String getValue() { + return value; + } + + /** + * The header value. + * @param value value or {@code null} for none + */ + public HttpHeader setValue(java.lang.String value) { + this.value = value; + return this; + } + + @Override + public HttpHeader set(String fieldName, Object value) { + return (HttpHeader) super.set(fieldName, value); + } + + @Override + public HttpHeader clone() { + return (HttpHeader) super.clone(); + } + +} diff --git a/clients/google-api-services-connectors/v2/2.0.0/pom.xml b/clients/google-api-services-connectors/v2/2.0.0/pom.xml index d422bf6326e..e71e5929103 100644 --- a/clients/google-api-services-connectors/v2/2.0.0/pom.xml +++ b/clients/google-api-services-connectors/v2/2.0.0/pom.xml @@ -8,8 +8,8 @@ com.google.apis google-api-services-connectors - v2-rev20260527-2.0.0 - Connectors API v2-rev20260527-2.0.0 + v2-rev20260611-2.0.0 + Connectors API v2-rev20260611-2.0.0 jar 2011 diff --git a/clients/google-api-services-connectors/v2/README.md b/clients/google-api-services-connectors/v2/README.md index 1b0a5b63d8a..65af4b06b73 100644 --- a/clients/google-api-services-connectors/v2/README.md +++ b/clients/google-api-services-connectors/v2/README.md @@ -22,7 +22,7 @@ Add the following lines to your `pom.xml` file: com.google.apis google-api-services-connectors - v2-rev20260527-2.0.0 + v2-rev20260611-2.0.0 @@ -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' } ```