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

com.google.api.services.pubsub.model.CloudStorageConfig 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 Cloud Storage subscription.
 *
 * 

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 CloudStorageConfig extends com.google.api.client.json.GenericJson { /** * Optional. If set, message data will be written to Cloud Storage in Avro format. * The value may be {@code null}. */ @com.google.api.client.util.Key private AvroConfig avroConfig; /** * Required. User-provided name for the Cloud Storage bucket. The bucket must be created by the * user. The bucket name must be without any prefix like "gs://". See the [bucket naming * requirements] (https://cloud.google.com/storage/docs/buckets#naming). * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String bucket; /** * Optional. User-provided format string specifying how to represent datetimes in Cloud Storage * filenames. See the [datetime format guidance](https://cloud.google.com/pubsub/docs/create- * cloudstorage-subscription#file_names). * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String filenameDatetimeFormat; /** * Optional. User-provided prefix for Cloud Storage filename. See the [object naming * requirements](https://cloud.google.com/storage/docs/objects#naming). * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String filenamePrefix; /** * Optional. User-provided suffix for Cloud Storage filename. See the [object naming * requirements](https://cloud.google.com/storage/docs/objects#naming). Must not end in "/". * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String filenameSuffix; /** * Optional. The maximum bytes that can be written to a Cloud Storage file before a new file is * created. Min 1 KB, max 10 GiB. The max_bytes limit may be exceeded in cases where messages are * larger than the limit. * The value may be {@code null}. */ @com.google.api.client.util.Key @com.google.api.client.json.JsonString private java.lang.Long maxBytes; /** * Optional. The maximum duration that can elapse before a new Cloud Storage file is created. Min * 1 minute, max 10 minutes, default 5 minutes. May not exceed the subscription's acknowledgement * deadline. * The value may be {@code null}. */ @com.google.api.client.util.Key private String maxDuration; /** * Optional. The maximum number of messages that can be written to a Cloud Storage file before a * new file is created. Min 1000 messages. * The value may be {@code null}. */ @com.google.api.client.util.Key @com.google.api.client.json.JsonString private java.lang.Long maxMessages; /** * Optional. The service account to use to write to Cloud Storage. The subscription creator or * updater that specifies this field must have `iam.serviceAccounts.actAs` permission on the * service account. If not specified, the Pub/Sub [service * agent](https://cloud.google.com/iam/docs/service-agents), service-{project_number}@gcp-sa- * pubsub.iam.gserviceaccount.com, is used. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String serviceAccountEmail; /** * Output only. An output-only field that indicates whether or not the subscription can receive * messages. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String state; /** * Optional. If set, message data will be written to Cloud Storage in text format. * The value may be {@code null}. */ @com.google.api.client.util.Key private TextConfig textConfig; /** * Optional. If set, message data will be written to Cloud Storage in Avro format. * @return value or {@code null} for none */ public AvroConfig getAvroConfig() { return avroConfig; } /** * Optional. If set, message data will be written to Cloud Storage in Avro format. * @param avroConfig avroConfig or {@code null} for none */ public CloudStorageConfig setAvroConfig(AvroConfig avroConfig) { this.avroConfig = avroConfig; return this; } /** * Required. User-provided name for the Cloud Storage bucket. The bucket must be created by the * user. The bucket name must be without any prefix like "gs://". See the [bucket naming * requirements] (https://cloud.google.com/storage/docs/buckets#naming). * @return value or {@code null} for none */ public java.lang.String getBucket() { return bucket; } /** * Required. User-provided name for the Cloud Storage bucket. The bucket must be created by the * user. The bucket name must be without any prefix like "gs://". See the [bucket naming * requirements] (https://cloud.google.com/storage/docs/buckets#naming). * @param bucket bucket or {@code null} for none */ public CloudStorageConfig setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** * Optional. User-provided format string specifying how to represent datetimes in Cloud Storage * filenames. See the [datetime format guidance](https://cloud.google.com/pubsub/docs/create- * cloudstorage-subscription#file_names). * @return value or {@code null} for none */ public java.lang.String getFilenameDatetimeFormat() { return filenameDatetimeFormat; } /** * Optional. User-provided format string specifying how to represent datetimes in Cloud Storage * filenames. See the [datetime format guidance](https://cloud.google.com/pubsub/docs/create- * cloudstorage-subscription#file_names). * @param filenameDatetimeFormat filenameDatetimeFormat or {@code null} for none */ public CloudStorageConfig setFilenameDatetimeFormat(java.lang.String filenameDatetimeFormat) { this.filenameDatetimeFormat = filenameDatetimeFormat; return this; } /** * Optional. User-provided prefix for Cloud Storage filename. See the [object naming * requirements](https://cloud.google.com/storage/docs/objects#naming). * @return value or {@code null} for none */ public java.lang.String getFilenamePrefix() { return filenamePrefix; } /** * Optional. User-provided prefix for Cloud Storage filename. See the [object naming * requirements](https://cloud.google.com/storage/docs/objects#naming). * @param filenamePrefix filenamePrefix or {@code null} for none */ public CloudStorageConfig setFilenamePrefix(java.lang.String filenamePrefix) { this.filenamePrefix = filenamePrefix; return this; } /** * Optional. User-provided suffix for Cloud Storage filename. See the [object naming * requirements](https://cloud.google.com/storage/docs/objects#naming). Must not end in "/". * @return value or {@code null} for none */ public java.lang.String getFilenameSuffix() { return filenameSuffix; } /** * Optional. User-provided suffix for Cloud Storage filename. See the [object naming * requirements](https://cloud.google.com/storage/docs/objects#naming). Must not end in "/". * @param filenameSuffix filenameSuffix or {@code null} for none */ public CloudStorageConfig setFilenameSuffix(java.lang.String filenameSuffix) { this.filenameSuffix = filenameSuffix; return this; } /** * Optional. The maximum bytes that can be written to a Cloud Storage file before a new file is * created. Min 1 KB, max 10 GiB. The max_bytes limit may be exceeded in cases where messages are * larger than the limit. * @return value or {@code null} for none */ public java.lang.Long getMaxBytes() { return maxBytes; } /** * Optional. The maximum bytes that can be written to a Cloud Storage file before a new file is * created. Min 1 KB, max 10 GiB. The max_bytes limit may be exceeded in cases where messages are * larger than the limit. * @param maxBytes maxBytes or {@code null} for none */ public CloudStorageConfig setMaxBytes(java.lang.Long maxBytes) { this.maxBytes = maxBytes; return this; } /** * Optional. The maximum duration that can elapse before a new Cloud Storage file is created. Min * 1 minute, max 10 minutes, default 5 minutes. May not exceed the subscription's acknowledgement * deadline. * @return value or {@code null} for none */ public String getMaxDuration() { return maxDuration; } /** * Optional. The maximum duration that can elapse before a new Cloud Storage file is created. Min * 1 minute, max 10 minutes, default 5 minutes. May not exceed the subscription's acknowledgement * deadline. * @param maxDuration maxDuration or {@code null} for none */ public CloudStorageConfig setMaxDuration(String maxDuration) { this.maxDuration = maxDuration; return this; } /** * Optional. The maximum number of messages that can be written to a Cloud Storage file before a * new file is created. Min 1000 messages. * @return value or {@code null} for none */ public java.lang.Long getMaxMessages() { return maxMessages; } /** * Optional. The maximum number of messages that can be written to a Cloud Storage file before a * new file is created. Min 1000 messages. * @param maxMessages maxMessages or {@code null} for none */ public CloudStorageConfig setMaxMessages(java.lang.Long maxMessages) { this.maxMessages = maxMessages; return this; } /** * Optional. The service account to use to write to Cloud Storage. The subscription creator or * updater that specifies this field must have `iam.serviceAccounts.actAs` permission on the * service account. If not specified, the Pub/Sub [service * agent](https://cloud.google.com/iam/docs/service-agents), service-{project_number}@gcp-sa- * pubsub.iam.gserviceaccount.com, is used. * @return value or {@code null} for none */ public java.lang.String getServiceAccountEmail() { return serviceAccountEmail; } /** * Optional. The service account to use to write to Cloud Storage. The subscription creator or * updater that specifies this field must have `iam.serviceAccounts.actAs` permission on the * service account. If not specified, the Pub/Sub [service * agent](https://cloud.google.com/iam/docs/service-agents), service-{project_number}@gcp-sa- * pubsub.iam.gserviceaccount.com, is used. * @param serviceAccountEmail serviceAccountEmail or {@code null} for none */ public CloudStorageConfig setServiceAccountEmail(java.lang.String serviceAccountEmail) { this.serviceAccountEmail = serviceAccountEmail; return this; } /** * Output only. An output-only field that indicates whether or not the subscription can receive * messages. * @return value or {@code null} for none */ public java.lang.String getState() { return state; } /** * Output only. An output-only field that indicates whether or not the subscription can receive * messages. * @param state state or {@code null} for none */ public CloudStorageConfig setState(java.lang.String state) { this.state = state; return this; } /** * Optional. If set, message data will be written to Cloud Storage in text format. * @return value or {@code null} for none */ public TextConfig getTextConfig() { return textConfig; } /** * Optional. If set, message data will be written to Cloud Storage in text format. * @param textConfig textConfig or {@code null} for none */ public CloudStorageConfig setTextConfig(TextConfig textConfig) { this.textConfig = textConfig; return this; } @Override public CloudStorageConfig set(String fieldName, Object value) { return (CloudStorageConfig) super.set(fieldName, value); } @Override public CloudStorageConfig clone() { return (CloudStorageConfig) super.clone(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy