{@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+ * 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+ * 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.ListThis 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 @@