All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.api.services.pubsub.model.PushConfig Maven / Gradle / Ivy

There is a newer version: v1-rev20240730-2.0.0
Show newest version
/*
 * 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.pubsub.model;

/**
 * Configuration for a push delivery endpoint.
 *
 * 

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 Cloud Pub/Sub 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 PushConfig extends com.google.api.client.json.GenericJson { /** * Optional. Endpoint configuration attributes that can be used to control different aspects of * the message delivery. The only currently supported attribute is `x-goog-version`, which you can * use to change the format of the pushed message. This attribute indicates the version of the * data expected by the endpoint. This controls the shape of the pushed message (i.e., its fields * and metadata). If not present during the `CreateSubscription` call, it will default to the * version of the Pub/Sub API used to make such call. If not present in a `ModifyPushConfig` call, * its value will not be changed. `GetSubscription` calls will always return a valid version, even * if the subscription was created without this attribute. The only supported values for the * `x-goog-version` attribute are: * `v1beta1`: uses the push format defined in the v1beta1 * Pub/Sub API. * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API. For * example: `attributes { "x-goog-version": "v1" }` * The value may be {@code null}. */ @com.google.api.client.util.Key private java.util.Map attributes; /** * Optional. When set, the payload to the push endpoint is not wrapped. * The value may be {@code null}. */ @com.google.api.client.util.Key private NoWrapper noWrapper; /** * Optional. If specified, Pub/Sub will generate and attach an OIDC JWT token as an * `Authorization` header in the HTTP request for every pushed message. * The value may be {@code null}. */ @com.google.api.client.util.Key private OidcToken oidcToken; /** * Optional. When set, the payload to the push endpoint is in the form of the JSON representation * of a PubsubMessage * (https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#pubsubmessage). * The value may be {@code null}. */ @com.google.api.client.util.Key private PubsubWrapper pubsubWrapper; /** * Optional. A URL locating the endpoint to which messages should be pushed. For example, a * Webhook endpoint might use `https://example.com/push`. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String pushEndpoint; /** * Optional. Endpoint configuration attributes that can be used to control different aspects of * the message delivery. The only currently supported attribute is `x-goog-version`, which you can * use to change the format of the pushed message. This attribute indicates the version of the * data expected by the endpoint. This controls the shape of the pushed message (i.e., its fields * and metadata). If not present during the `CreateSubscription` call, it will default to the * version of the Pub/Sub API used to make such call. If not present in a `ModifyPushConfig` call, * its value will not be changed. `GetSubscription` calls will always return a valid version, even * if the subscription was created without this attribute. The only supported values for the * `x-goog-version` attribute are: * `v1beta1`: uses the push format defined in the v1beta1 * Pub/Sub API. * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API. For * example: `attributes { "x-goog-version": "v1" }` * @return value or {@code null} for none */ public java.util.Map getAttributes() { return attributes; } /** * Optional. Endpoint configuration attributes that can be used to control different aspects of * the message delivery. The only currently supported attribute is `x-goog-version`, which you can * use to change the format of the pushed message. This attribute indicates the version of the * data expected by the endpoint. This controls the shape of the pushed message (i.e., its fields * and metadata). If not present during the `CreateSubscription` call, it will default to the * version of the Pub/Sub API used to make such call. If not present in a `ModifyPushConfig` call, * its value will not be changed. `GetSubscription` calls will always return a valid version, even * if the subscription was created without this attribute. The only supported values for the * `x-goog-version` attribute are: * `v1beta1`: uses the push format defined in the v1beta1 * Pub/Sub API. * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API. For * example: `attributes { "x-goog-version": "v1" }` * @param attributes attributes or {@code null} for none */ public PushConfig setAttributes(java.util.Map attributes) { this.attributes = attributes; return this; } /** * Optional. When set, the payload to the push endpoint is not wrapped. * @return value or {@code null} for none */ public NoWrapper getNoWrapper() { return noWrapper; } /** * Optional. When set, the payload to the push endpoint is not wrapped. * @param noWrapper noWrapper or {@code null} for none */ public PushConfig setNoWrapper(NoWrapper noWrapper) { this.noWrapper = noWrapper; return this; } /** * Optional. If specified, Pub/Sub will generate and attach an OIDC JWT token as an * `Authorization` header in the HTTP request for every pushed message. * @return value or {@code null} for none */ public OidcToken getOidcToken() { return oidcToken; } /** * Optional. If specified, Pub/Sub will generate and attach an OIDC JWT token as an * `Authorization` header in the HTTP request for every pushed message. * @param oidcToken oidcToken or {@code null} for none */ public PushConfig setOidcToken(OidcToken oidcToken) { this.oidcToken = oidcToken; return this; } /** * Optional. When set, the payload to the push endpoint is in the form of the JSON representation * of a PubsubMessage * (https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#pubsubmessage). * @return value or {@code null} for none */ public PubsubWrapper getPubsubWrapper() { return pubsubWrapper; } /** * Optional. When set, the payload to the push endpoint is in the form of the JSON representation * of a PubsubMessage * (https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#pubsubmessage). * @param pubsubWrapper pubsubWrapper or {@code null} for none */ public PushConfig setPubsubWrapper(PubsubWrapper pubsubWrapper) { this.pubsubWrapper = pubsubWrapper; return this; } /** * Optional. A URL locating the endpoint to which messages should be pushed. For example, a * Webhook endpoint might use `https://example.com/push`. * @return value or {@code null} for none */ public java.lang.String getPushEndpoint() { return pushEndpoint; } /** * Optional. A URL locating the endpoint to which messages should be pushed. For example, a * Webhook endpoint might use `https://example.com/push`. * @param pushEndpoint pushEndpoint or {@code null} for none */ public PushConfig setPushEndpoint(java.lang.String pushEndpoint) { this.pushEndpoint = pushEndpoint; return this; } @Override public PushConfig set(String fieldName, Object value) { return (PushConfig) super.set(fieldName, value); } @Override public PushConfig clone() { return (PushConfig) super.clone(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy