com.google.api.services.pubsub.model.AvroConfig Maven / Gradle / Ivy
/*
* 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 writing message data in Avro format. Message payloads and metadata will be
* written to files as an Avro binary.
*
* 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 AvroConfig extends com.google.api.client.json.GenericJson {
/**
* Optional. When true, the output Cloud Storage file will be serialized using the topic schema,
* if it exists.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.Boolean useTopicSchema;
/**
* Optional. When true, write the subscription name, message_id, publish_time, attributes, and
* ordering_key as additional fields in the output. The subscription name, message_id, and
* publish_time fields are put in their own fields while all other message properties other than
* data (for example, an ordering_key, if present) are added as entries in the attributes map.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.Boolean writeMetadata;
/**
* Optional. When true, the output Cloud Storage file will be serialized using the topic schema,
* if it exists.
* @return value or {@code null} for none
*/
public java.lang.Boolean getUseTopicSchema() {
return useTopicSchema;
}
/**
* Optional. When true, the output Cloud Storage file will be serialized using the topic schema,
* if it exists.
* @param useTopicSchema useTopicSchema or {@code null} for none
*/
public AvroConfig setUseTopicSchema(java.lang.Boolean useTopicSchema) {
this.useTopicSchema = useTopicSchema;
return this;
}
/**
* Optional. When true, write the subscription name, message_id, publish_time, attributes, and
* ordering_key as additional fields in the output. The subscription name, message_id, and
* publish_time fields are put in their own fields while all other message properties other than
* data (for example, an ordering_key, if present) are added as entries in the attributes map.
* @return value or {@code null} for none
*/
public java.lang.Boolean getWriteMetadata() {
return writeMetadata;
}
/**
* Optional. When true, write the subscription name, message_id, publish_time, attributes, and
* ordering_key as additional fields in the output. The subscription name, message_id, and
* publish_time fields are put in their own fields while all other message properties other than
* data (for example, an ordering_key, if present) are added as entries in the attributes map.
* @param writeMetadata writeMetadata or {@code null} for none
*/
public AvroConfig setWriteMetadata(java.lang.Boolean writeMetadata) {
this.writeMetadata = writeMetadata;
return this;
}
@Override
public AvroConfig set(String fieldName, Object value) {
return (AvroConfig) super.set(fieldName, value);
}
@Override
public AvroConfig clone() {
return (AvroConfig) super.clone();
}
}