
com.google.api.services.pubsub.model.Subscription 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: 2017-02-15 17:18:02 UTC)
* on 2017-08-08 at 23:36:27 UTC
* Modify at your own risk.
*/
package com.google.api.services.pubsub.model;
/**
* A subscription resource.
*
* 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 Google Cloud Pub/Sub 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 Subscription extends com.google.api.client.json.GenericJson {
/**
* For either push or pull delivery, the value is the maximum time after a subscriber receives a
* message before the subscriber should acknowledge or Nack the message. If the Ack deadline for a
* message passes without an Ack or a Nack, the Pub/Sub system will eventually redeliver the
* message. If a subscriber acknowledges after the deadline, the Pub/Sub system may accept the
* Ack, but it is possible that the message has been already delivered again. Multiple Acks to the
* message are allowed and will succeed.
*
* For push delivery, this value is used to set the request timeout for the call to the push
* endpoint.
*
* For pull delivery, this value is used as the initial value for the Ack deadline. It may be
* overridden for each message using its corresponding ack_id with ModifyAckDeadline. While a
* message is outstanding (i.e. it has been delivered to a pull subscriber and the subscriber has
* not yet Acked or Nacked), the Pub/Sub system will not deliver that message to another pull
* subscriber (on a best-effort basis).
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.Integer ackDeadlineSeconds;
/**
* Name of the subscription.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/**
* If push delivery is used with this subscription, this field is used to configure it.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private PushConfig pushConfig;
/**
* The name of the topic from which this subscription is receiving messages.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String topic;
/**
* For either push or pull delivery, the value is the maximum time after a subscriber receives a
* message before the subscriber should acknowledge or Nack the message. If the Ack deadline for a
* message passes without an Ack or a Nack, the Pub/Sub system will eventually redeliver the
* message. If a subscriber acknowledges after the deadline, the Pub/Sub system may accept the
* Ack, but it is possible that the message has been already delivered again. Multiple Acks to the
* message are allowed and will succeed.
*
* For push delivery, this value is used to set the request timeout for the call to the push
* endpoint.
*
* For pull delivery, this value is used as the initial value for the Ack deadline. It may be
* overridden for each message using its corresponding ack_id with ModifyAckDeadline. While a
* message is outstanding (i.e. it has been delivered to a pull subscriber and the subscriber has
* not yet Acked or Nacked), the Pub/Sub system will not deliver that message to another pull
* subscriber (on a best-effort basis).
* @return value or {@code null} for none
*/
public java.lang.Integer getAckDeadlineSeconds() {
return ackDeadlineSeconds;
}
/**
* For either push or pull delivery, the value is the maximum time after a subscriber receives a
* message before the subscriber should acknowledge or Nack the message. If the Ack deadline for a
* message passes without an Ack or a Nack, the Pub/Sub system will eventually redeliver the
* message. If a subscriber acknowledges after the deadline, the Pub/Sub system may accept the
* Ack, but it is possible that the message has been already delivered again. Multiple Acks to the
* message are allowed and will succeed.
*
* For push delivery, this value is used to set the request timeout for the call to the push
* endpoint.
*
* For pull delivery, this value is used as the initial value for the Ack deadline. It may be
* overridden for each message using its corresponding ack_id with ModifyAckDeadline. While a
* message is outstanding (i.e. it has been delivered to a pull subscriber and the subscriber has
* not yet Acked or Nacked), the Pub/Sub system will not deliver that message to another pull
* subscriber (on a best-effort basis).
* @param ackDeadlineSeconds ackDeadlineSeconds or {@code null} for none
*/
public Subscription setAckDeadlineSeconds(java.lang.Integer ackDeadlineSeconds) {
this.ackDeadlineSeconds = ackDeadlineSeconds;
return this;
}
/**
* Name of the subscription.
* @return value or {@code null} for none
*/
public java.lang.String getName() {
return name;
}
/**
* Name of the subscription.
* @param name name or {@code null} for none
*/
public Subscription setName(java.lang.String name) {
this.name = name;
return this;
}
/**
* If push delivery is used with this subscription, this field is used to configure it.
* @return value or {@code null} for none
*/
public PushConfig getPushConfig() {
return pushConfig;
}
/**
* If push delivery is used with this subscription, this field is used to configure it.
* @param pushConfig pushConfig or {@code null} for none
*/
public Subscription setPushConfig(PushConfig pushConfig) {
this.pushConfig = pushConfig;
return this;
}
/**
* The name of the topic from which this subscription is receiving messages.
* @return value or {@code null} for none
*/
public java.lang.String getTopic() {
return topic;
}
/**
* The name of the topic from which this subscription is receiving messages.
* @param topic topic or {@code null} for none
*/
public Subscription setTopic(java.lang.String topic) {
this.topic = topic;
return this;
}
@Override
public Subscription set(String fieldName, Object value) {
return (Subscription) super.set(fieldName, value);
}
@Override
public Subscription clone() {
return (Subscription) super.clone();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy