com.google.api.services.run.v1alpha1.model.PubSubSpec Maven / Gradle / Ivy
/*
* Copyright 2010 Google Inc.
*
* 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://code.google.com/p/google-apis-client-generator/
* (build: 2018-10-08 17:45:39 UTC)
* on 2019-11-08 at 00:46:02 UTC
* Modify at your own risk.
*/
package com.google.api.services.run.v1alpha1.model;
/**
* The desired state of the PubSub.
*
* 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 Run API. For a detailed explanation see:
* http://code.google.com/p/google-http-java-client/wiki/JSON
*
*
* @author Google, Inc.
*/
@SuppressWarnings("javadoc")
public final class PubSubSpec extends com.google.api.client.json.GenericJson {
/**
* AckDeadline is the default maximum time after a subscriber receives a message before the
* subscriber should acknowledge the message. Defaults to 30 seconds ('30s'). +optional
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String ackDeadline;
/**
* CloudEventOverrides defines overrides to control the output format and modifications of the
* event sent to the sink. +optional
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private CloudEventOverrides ceOverrides;
/**
* Project is the ID of the Google Cloud Project that the PubSub Topic exists in. If omitted,
* defaults to same as the cluster. +optional
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String project;
/**
* PubSubSecret is the credential to use to create Topic / PullSubscription resources. If omitted,
* uses Secret.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private SecretKeySelector pubsubSecret;
/**
* RetainAckedMessages defines whether to retain acknowledged messages. If true, acknowledged
* messages will not be expunged until they fall out of the RetentionDuration window.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.Boolean retainAckedMessages;
/**
* RetentionDuration defines how long to retain messages in backlog, from the time of publish. If
* RetainAckedMessages is true, this duration affects the retention of acknowledged messages,
* otherwise only unacknowledged messages are retained. Cannot be longer than 7 days or shorter
* than 10 minutes. Defaults to 7 days ('7d'). +optional
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String retentionDuration;
/**
* Secret is the credential to use to create the Scheduler Job. If not specified, defaults to:
* Name: google-cloud-key Key: key.json +optional
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private SecretKeySelector secret;
/**
* Sink is a reference to an object that will resolve to a domain name or a URI directly to use as
* the sink.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private Destination sink;
/**
* Topic is the ID of the PubSub Topic to Subscribe to. It must be in the form of the unique
* identifier within the project, not the entire name. E.g. it must be 'laconia', not 'projects
* /my-proj/topics/laconia'.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String topic;
/**
* AckDeadline is the default maximum time after a subscriber receives a message before the
* subscriber should acknowledge the message. Defaults to 30 seconds ('30s'). +optional
* @return value or {@code null} for none
*/
public java.lang.String getAckDeadline() {
return ackDeadline;
}
/**
* AckDeadline is the default maximum time after a subscriber receives a message before the
* subscriber should acknowledge the message. Defaults to 30 seconds ('30s'). +optional
* @param ackDeadline ackDeadline or {@code null} for none
*/
public PubSubSpec setAckDeadline(java.lang.String ackDeadline) {
this.ackDeadline = ackDeadline;
return this;
}
/**
* CloudEventOverrides defines overrides to control the output format and modifications of the
* event sent to the sink. +optional
* @return value or {@code null} for none
*/
public CloudEventOverrides getCeOverrides() {
return ceOverrides;
}
/**
* CloudEventOverrides defines overrides to control the output format and modifications of the
* event sent to the sink. +optional
* @param ceOverrides ceOverrides or {@code null} for none
*/
public PubSubSpec setCeOverrides(CloudEventOverrides ceOverrides) {
this.ceOverrides = ceOverrides;
return this;
}
/**
* Project is the ID of the Google Cloud Project that the PubSub Topic exists in. If omitted,
* defaults to same as the cluster. +optional
* @return value or {@code null} for none
*/
public java.lang.String getProject() {
return project;
}
/**
* Project is the ID of the Google Cloud Project that the PubSub Topic exists in. If omitted,
* defaults to same as the cluster. +optional
* @param project project or {@code null} for none
*/
public PubSubSpec setProject(java.lang.String project) {
this.project = project;
return this;
}
/**
* PubSubSecret is the credential to use to create Topic / PullSubscription resources. If omitted,
* uses Secret.
* @return value or {@code null} for none
*/
public SecretKeySelector getPubsubSecret() {
return pubsubSecret;
}
/**
* PubSubSecret is the credential to use to create Topic / PullSubscription resources. If omitted,
* uses Secret.
* @param pubsubSecret pubsubSecret or {@code null} for none
*/
public PubSubSpec setPubsubSecret(SecretKeySelector pubsubSecret) {
this.pubsubSecret = pubsubSecret;
return this;
}
/**
* RetainAckedMessages defines whether to retain acknowledged messages. If true, acknowledged
* messages will not be expunged until they fall out of the RetentionDuration window.
* @return value or {@code null} for none
*/
public java.lang.Boolean getRetainAckedMessages() {
return retainAckedMessages;
}
/**
* RetainAckedMessages defines whether to retain acknowledged messages. If true, acknowledged
* messages will not be expunged until they fall out of the RetentionDuration window.
* @param retainAckedMessages retainAckedMessages or {@code null} for none
*/
public PubSubSpec setRetainAckedMessages(java.lang.Boolean retainAckedMessages) {
this.retainAckedMessages = retainAckedMessages;
return this;
}
/**
* RetentionDuration defines how long to retain messages in backlog, from the time of publish. If
* RetainAckedMessages is true, this duration affects the retention of acknowledged messages,
* otherwise only unacknowledged messages are retained. Cannot be longer than 7 days or shorter
* than 10 minutes. Defaults to 7 days ('7d'). +optional
* @return value or {@code null} for none
*/
public java.lang.String getRetentionDuration() {
return retentionDuration;
}
/**
* RetentionDuration defines how long to retain messages in backlog, from the time of publish. If
* RetainAckedMessages is true, this duration affects the retention of acknowledged messages,
* otherwise only unacknowledged messages are retained. Cannot be longer than 7 days or shorter
* than 10 minutes. Defaults to 7 days ('7d'). +optional
* @param retentionDuration retentionDuration or {@code null} for none
*/
public PubSubSpec setRetentionDuration(java.lang.String retentionDuration) {
this.retentionDuration = retentionDuration;
return this;
}
/**
* Secret is the credential to use to create the Scheduler Job. If not specified, defaults to:
* Name: google-cloud-key Key: key.json +optional
* @return value or {@code null} for none
*/
public SecretKeySelector getSecret() {
return secret;
}
/**
* Secret is the credential to use to create the Scheduler Job. If not specified, defaults to:
* Name: google-cloud-key Key: key.json +optional
* @param secret secret or {@code null} for none
*/
public PubSubSpec setSecret(SecretKeySelector secret) {
this.secret = secret;
return this;
}
/**
* Sink is a reference to an object that will resolve to a domain name or a URI directly to use as
* the sink.
* @return value or {@code null} for none
*/
public Destination getSink() {
return sink;
}
/**
* Sink is a reference to an object that will resolve to a domain name or a URI directly to use as
* the sink.
* @param sink sink or {@code null} for none
*/
public PubSubSpec setSink(Destination sink) {
this.sink = sink;
return this;
}
/**
* Topic is the ID of the PubSub Topic to Subscribe to. It must be in the form of the unique
* identifier within the project, not the entire name. E.g. it must be 'laconia', not 'projects
* /my-proj/topics/laconia'.
* @return value or {@code null} for none
*/
public java.lang.String getTopic() {
return topic;
}
/**
* Topic is the ID of the PubSub Topic to Subscribe to. It must be in the form of the unique
* identifier within the project, not the entire name. E.g. it must be 'laconia', not 'projects
* /my-proj/topics/laconia'.
* @param topic topic or {@code null} for none
*/
public PubSubSpec setTopic(java.lang.String topic) {
this.topic = topic;
return this;
}
@Override
public PubSubSpec set(String fieldName, Object value) {
return (PubSubSpec) super.set(fieldName, value);
}
@Override
public PubSubSpec clone() {
return (PubSubSpec) super.clone();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy