com.google.cloud.video.livestream.v1.SpriteSheet Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of proto-google-cloud-live-stream-v1 Show documentation
Show all versions of proto-google-cloud-live-stream-v1 Show documentation
Proto library for google-cloud-live-stream
/*
* Copyright 2024 Google LLC
*
* 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
*
* https://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.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/video/livestream/v1/outputs.proto
// Protobuf Java Version: 3.25.5
package com.google.cloud.video.livestream.v1;
/**
*
*
*
* Sprite sheet configuration.
*
*
* Protobuf type {@code google.cloud.video.livestream.v1.SpriteSheet}
*/
public final class SpriteSheet extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.video.livestream.v1.SpriteSheet)
SpriteSheetOrBuilder {
private static final long serialVersionUID = 0L;
// Use SpriteSheet.newBuilder() to construct.
private SpriteSheet(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private SpriteSheet() {
format_ = "";
filePrefix_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new SpriteSheet();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.video.livestream.v1.OutputsProto
.internal_static_google_cloud_video_livestream_v1_SpriteSheet_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.video.livestream.v1.OutputsProto
.internal_static_google_cloud_video_livestream_v1_SpriteSheet_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.video.livestream.v1.SpriteSheet.class,
com.google.cloud.video.livestream.v1.SpriteSheet.Builder.class);
}
private int bitField0_;
public static final int FORMAT_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object format_ = "";
/**
*
*
*
* Format type. The default is `jpeg`.
*
* Supported formats:
*
* - `jpeg`
*
*
* string format = 1;
*
* @return The format.
*/
@java.lang.Override
public java.lang.String getFormat() {
java.lang.Object ref = format_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
format_ = s;
return s;
}
}
/**
*
*
*
* Format type. The default is `jpeg`.
*
* Supported formats:
*
* - `jpeg`
*
*
* string format = 1;
*
* @return The bytes for format.
*/
@java.lang.Override
public com.google.protobuf.ByteString getFormatBytes() {
java.lang.Object ref = format_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
format_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int FILE_PREFIX_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object filePrefix_ = "";
/**
*
*
*
* Required. File name prefix for the generated sprite sheets. If multiple
* sprite sheets are added to the channel, each must have a unique file
* prefix.
* Each sprite sheet has an incremental 10-digit zero-padded suffix starting
* from 0 before the extension, such as `sprite_sheet0000000123.jpeg`.
*
*
* string file_prefix = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The filePrefix.
*/
@java.lang.Override
public java.lang.String getFilePrefix() {
java.lang.Object ref = filePrefix_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
filePrefix_ = s;
return s;
}
}
/**
*
*
*
* Required. File name prefix for the generated sprite sheets. If multiple
* sprite sheets are added to the channel, each must have a unique file
* prefix.
* Each sprite sheet has an incremental 10-digit zero-padded suffix starting
* from 0 before the extension, such as `sprite_sheet0000000123.jpeg`.
*
*
* string file_prefix = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for filePrefix.
*/
@java.lang.Override
public com.google.protobuf.ByteString getFilePrefixBytes() {
java.lang.Object ref = filePrefix_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
filePrefix_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int SPRITE_WIDTH_PIXELS_FIELD_NUMBER = 3;
private int spriteWidthPixels_ = 0;
/**
*
*
*
* Required. The width of the sprite in pixels. Must be an even integer.
*
*
* int32 sprite_width_pixels = 3 [(.google.api.field_behavior) = REQUIRED];
*
* @return The spriteWidthPixels.
*/
@java.lang.Override
public int getSpriteWidthPixels() {
return spriteWidthPixels_;
}
public static final int SPRITE_HEIGHT_PIXELS_FIELD_NUMBER = 4;
private int spriteHeightPixels_ = 0;
/**
*
*
*
* Required. The height of the sprite in pixels. Must be an even integer.
*
*
* int32 sprite_height_pixels = 4 [(.google.api.field_behavior) = REQUIRED];
*
* @return The spriteHeightPixels.
*/
@java.lang.Override
public int getSpriteHeightPixels() {
return spriteHeightPixels_;
}
public static final int COLUMN_COUNT_FIELD_NUMBER = 5;
private int columnCount_ = 0;
/**
*
*
*
* The maximum number of sprites per row in a sprite sheet. Valid range is
* [1, 10] and the default value is 1.
*
*
* int32 column_count = 5;
*
* @return The columnCount.
*/
@java.lang.Override
public int getColumnCount() {
return columnCount_;
}
public static final int ROW_COUNT_FIELD_NUMBER = 6;
private int rowCount_ = 0;
/**
*
*
*
* The maximum number of rows per sprite sheet. When the sprite sheet is full,
* a new sprite sheet is created. Valid range is [1, 10] and the default value
* is 1.
*
*
* int32 row_count = 6;
*
* @return The rowCount.
*/
@java.lang.Override
public int getRowCount() {
return rowCount_;
}
public static final int INTERVAL_FIELD_NUMBER = 7;
private com.google.protobuf.Duration interval_;
/**
*
*
*
* Create sprites at regular intervals. Valid range is [1 second, 1 hour] and
* the default value is `10s`.
*
*
* .google.protobuf.Duration interval = 7;
*
* @return Whether the interval field is set.
*/
@java.lang.Override
public boolean hasInterval() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Create sprites at regular intervals. Valid range is [1 second, 1 hour] and
* the default value is `10s`.
*
*
* .google.protobuf.Duration interval = 7;
*
* @return The interval.
*/
@java.lang.Override
public com.google.protobuf.Duration getInterval() {
return interval_ == null ? com.google.protobuf.Duration.getDefaultInstance() : interval_;
}
/**
*
*
*
* Create sprites at regular intervals. Valid range is [1 second, 1 hour] and
* the default value is `10s`.
*
*
* .google.protobuf.Duration interval = 7;
*/
@java.lang.Override
public com.google.protobuf.DurationOrBuilder getIntervalOrBuilder() {
return interval_ == null ? com.google.protobuf.Duration.getDefaultInstance() : interval_;
}
public static final int QUALITY_FIELD_NUMBER = 8;
private int quality_ = 0;
/**
*
*
*
* The quality of the generated sprite sheet. Enter a value between 1
* and 100, where 1 is the lowest quality and 100 is the highest quality.
* The default is 100. A high quality value corresponds to a low image data
* compression ratio.
*
*
* int32 quality = 8;
*
* @return The quality.
*/
@java.lang.Override
public int getQuality() {
return quality_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(format_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, format_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filePrefix_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filePrefix_);
}
if (spriteWidthPixels_ != 0) {
output.writeInt32(3, spriteWidthPixels_);
}
if (spriteHeightPixels_ != 0) {
output.writeInt32(4, spriteHeightPixels_);
}
if (columnCount_ != 0) {
output.writeInt32(5, columnCount_);
}
if (rowCount_ != 0) {
output.writeInt32(6, rowCount_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(7, getInterval());
}
if (quality_ != 0) {
output.writeInt32(8, quality_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(format_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, format_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filePrefix_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filePrefix_);
}
if (spriteWidthPixels_ != 0) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, spriteWidthPixels_);
}
if (spriteHeightPixels_ != 0) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, spriteHeightPixels_);
}
if (columnCount_ != 0) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, columnCount_);
}
if (rowCount_ != 0) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(6, rowCount_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getInterval());
}
if (quality_ != 0) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(8, quality_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.cloud.video.livestream.v1.SpriteSheet)) {
return super.equals(obj);
}
com.google.cloud.video.livestream.v1.SpriteSheet other =
(com.google.cloud.video.livestream.v1.SpriteSheet) obj;
if (!getFormat().equals(other.getFormat())) return false;
if (!getFilePrefix().equals(other.getFilePrefix())) return false;
if (getSpriteWidthPixels() != other.getSpriteWidthPixels()) return false;
if (getSpriteHeightPixels() != other.getSpriteHeightPixels()) return false;
if (getColumnCount() != other.getColumnCount()) return false;
if (getRowCount() != other.getRowCount()) return false;
if (hasInterval() != other.hasInterval()) return false;
if (hasInterval()) {
if (!getInterval().equals(other.getInterval())) return false;
}
if (getQuality() != other.getQuality()) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + FORMAT_FIELD_NUMBER;
hash = (53 * hash) + getFormat().hashCode();
hash = (37 * hash) + FILE_PREFIX_FIELD_NUMBER;
hash = (53 * hash) + getFilePrefix().hashCode();
hash = (37 * hash) + SPRITE_WIDTH_PIXELS_FIELD_NUMBER;
hash = (53 * hash) + getSpriteWidthPixels();
hash = (37 * hash) + SPRITE_HEIGHT_PIXELS_FIELD_NUMBER;
hash = (53 * hash) + getSpriteHeightPixels();
hash = (37 * hash) + COLUMN_COUNT_FIELD_NUMBER;
hash = (53 * hash) + getColumnCount();
hash = (37 * hash) + ROW_COUNT_FIELD_NUMBER;
hash = (53 * hash) + getRowCount();
if (hasInterval()) {
hash = (37 * hash) + INTERVAL_FIELD_NUMBER;
hash = (53 * hash) + getInterval().hashCode();
}
hash = (37 * hash) + QUALITY_FIELD_NUMBER;
hash = (53 * hash) + getQuality();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.video.livestream.v1.SpriteSheet parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.video.livestream.v1.SpriteSheet parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.video.livestream.v1.SpriteSheet parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.video.livestream.v1.SpriteSheet parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.video.livestream.v1.SpriteSheet parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.video.livestream.v1.SpriteSheet parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.video.livestream.v1.SpriteSheet parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.video.livestream.v1.SpriteSheet parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.cloud.video.livestream.v1.SpriteSheet parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.video.livestream.v1.SpriteSheet parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.cloud.video.livestream.v1.SpriteSheet parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.video.livestream.v1.SpriteSheet parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.cloud.video.livestream.v1.SpriteSheet prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* Sprite sheet configuration.
*
*
* Protobuf type {@code google.cloud.video.livestream.v1.SpriteSheet}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.video.livestream.v1.SpriteSheet)
com.google.cloud.video.livestream.v1.SpriteSheetOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.video.livestream.v1.OutputsProto
.internal_static_google_cloud_video_livestream_v1_SpriteSheet_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.video.livestream.v1.OutputsProto
.internal_static_google_cloud_video_livestream_v1_SpriteSheet_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.video.livestream.v1.SpriteSheet.class,
com.google.cloud.video.livestream.v1.SpriteSheet.Builder.class);
}
// Construct using com.google.cloud.video.livestream.v1.SpriteSheet.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getIntervalFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
format_ = "";
filePrefix_ = "";
spriteWidthPixels_ = 0;
spriteHeightPixels_ = 0;
columnCount_ = 0;
rowCount_ = 0;
interval_ = null;
if (intervalBuilder_ != null) {
intervalBuilder_.dispose();
intervalBuilder_ = null;
}
quality_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.video.livestream.v1.OutputsProto
.internal_static_google_cloud_video_livestream_v1_SpriteSheet_descriptor;
}
@java.lang.Override
public com.google.cloud.video.livestream.v1.SpriteSheet getDefaultInstanceForType() {
return com.google.cloud.video.livestream.v1.SpriteSheet.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.video.livestream.v1.SpriteSheet build() {
com.google.cloud.video.livestream.v1.SpriteSheet result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.video.livestream.v1.SpriteSheet buildPartial() {
com.google.cloud.video.livestream.v1.SpriteSheet result =
new com.google.cloud.video.livestream.v1.SpriteSheet(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(com.google.cloud.video.livestream.v1.SpriteSheet result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.format_ = format_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.filePrefix_ = filePrefix_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.spriteWidthPixels_ = spriteWidthPixels_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.spriteHeightPixels_ = spriteHeightPixels_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.columnCount_ = columnCount_;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.rowCount_ = rowCount_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000040) != 0)) {
result.interval_ = intervalBuilder_ == null ? interval_ : intervalBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000080) != 0)) {
result.quality_ = quality_;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.video.livestream.v1.SpriteSheet) {
return mergeFrom((com.google.cloud.video.livestream.v1.SpriteSheet) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.video.livestream.v1.SpriteSheet other) {
if (other == com.google.cloud.video.livestream.v1.SpriteSheet.getDefaultInstance())
return this;
if (!other.getFormat().isEmpty()) {
format_ = other.format_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getFilePrefix().isEmpty()) {
filePrefix_ = other.filePrefix_;
bitField0_ |= 0x00000002;
onChanged();
}
if (other.getSpriteWidthPixels() != 0) {
setSpriteWidthPixels(other.getSpriteWidthPixels());
}
if (other.getSpriteHeightPixels() != 0) {
setSpriteHeightPixels(other.getSpriteHeightPixels());
}
if (other.getColumnCount() != 0) {
setColumnCount(other.getColumnCount());
}
if (other.getRowCount() != 0) {
setRowCount(other.getRowCount());
}
if (other.hasInterval()) {
mergeInterval(other.getInterval());
}
if (other.getQuality() != 0) {
setQuality(other.getQuality());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
format_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
filePrefix_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 24:
{
spriteWidthPixels_ = input.readInt32();
bitField0_ |= 0x00000004;
break;
} // case 24
case 32:
{
spriteHeightPixels_ = input.readInt32();
bitField0_ |= 0x00000008;
break;
} // case 32
case 40:
{
columnCount_ = input.readInt32();
bitField0_ |= 0x00000010;
break;
} // case 40
case 48:
{
rowCount_ = input.readInt32();
bitField0_ |= 0x00000020;
break;
} // case 48
case 58:
{
input.readMessage(getIntervalFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000040;
break;
} // case 58
case 64:
{
quality_ = input.readInt32();
bitField0_ |= 0x00000080;
break;
} // case 64
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object format_ = "";
/**
*
*
*
* Format type. The default is `jpeg`.
*
* Supported formats:
*
* - `jpeg`
*
*
* string format = 1;
*
* @return The format.
*/
public java.lang.String getFormat() {
java.lang.Object ref = format_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
format_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Format type. The default is `jpeg`.
*
* Supported formats:
*
* - `jpeg`
*
*
* string format = 1;
*
* @return The bytes for format.
*/
public com.google.protobuf.ByteString getFormatBytes() {
java.lang.Object ref = format_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
format_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Format type. The default is `jpeg`.
*
* Supported formats:
*
* - `jpeg`
*
*
* string format = 1;
*
* @param value The format to set.
* @return This builder for chaining.
*/
public Builder setFormat(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
format_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Format type. The default is `jpeg`.
*
* Supported formats:
*
* - `jpeg`
*
*
* string format = 1;
*
* @return This builder for chaining.
*/
public Builder clearFormat() {
format_ = getDefaultInstance().getFormat();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Format type. The default is `jpeg`.
*
* Supported formats:
*
* - `jpeg`
*
*
* string format = 1;
*
* @param value The bytes for format to set.
* @return This builder for chaining.
*/
public Builder setFormatBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
format_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object filePrefix_ = "";
/**
*
*
*
* Required. File name prefix for the generated sprite sheets. If multiple
* sprite sheets are added to the channel, each must have a unique file
* prefix.
* Each sprite sheet has an incremental 10-digit zero-padded suffix starting
* from 0 before the extension, such as `sprite_sheet0000000123.jpeg`.
*
*
* string file_prefix = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The filePrefix.
*/
public java.lang.String getFilePrefix() {
java.lang.Object ref = filePrefix_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
filePrefix_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Required. File name prefix for the generated sprite sheets. If multiple
* sprite sheets are added to the channel, each must have a unique file
* prefix.
* Each sprite sheet has an incremental 10-digit zero-padded suffix starting
* from 0 before the extension, such as `sprite_sheet0000000123.jpeg`.
*
*
* string file_prefix = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for filePrefix.
*/
public com.google.protobuf.ByteString getFilePrefixBytes() {
java.lang.Object ref = filePrefix_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
filePrefix_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Required. File name prefix for the generated sprite sheets. If multiple
* sprite sheets are added to the channel, each must have a unique file
* prefix.
* Each sprite sheet has an incremental 10-digit zero-padded suffix starting
* from 0 before the extension, such as `sprite_sheet0000000123.jpeg`.
*
*
* string file_prefix = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The filePrefix to set.
* @return This builder for chaining.
*/
public Builder setFilePrefix(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
filePrefix_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Required. File name prefix for the generated sprite sheets. If multiple
* sprite sheets are added to the channel, each must have a unique file
* prefix.
* Each sprite sheet has an incremental 10-digit zero-padded suffix starting
* from 0 before the extension, such as `sprite_sheet0000000123.jpeg`.
*
*
* string file_prefix = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return This builder for chaining.
*/
public Builder clearFilePrefix() {
filePrefix_ = getDefaultInstance().getFilePrefix();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* Required. File name prefix for the generated sprite sheets. If multiple
* sprite sheets are added to the channel, each must have a unique file
* prefix.
* Each sprite sheet has an incremental 10-digit zero-padded suffix starting
* from 0 before the extension, such as `sprite_sheet0000000123.jpeg`.
*
*
* string file_prefix = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The bytes for filePrefix to set.
* @return This builder for chaining.
*/
public Builder setFilePrefixBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
filePrefix_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private int spriteWidthPixels_;
/**
*
*
*
* Required. The width of the sprite in pixels. Must be an even integer.
*
*
* int32 sprite_width_pixels = 3 [(.google.api.field_behavior) = REQUIRED];
*
* @return The spriteWidthPixels.
*/
@java.lang.Override
public int getSpriteWidthPixels() {
return spriteWidthPixels_;
}
/**
*
*
*
* Required. The width of the sprite in pixels. Must be an even integer.
*
*
* int32 sprite_width_pixels = 3 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The spriteWidthPixels to set.
* @return This builder for chaining.
*/
public Builder setSpriteWidthPixels(int value) {
spriteWidthPixels_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Required. The width of the sprite in pixels. Must be an even integer.
*
*
* int32 sprite_width_pixels = 3 [(.google.api.field_behavior) = REQUIRED];
*
* @return This builder for chaining.
*/
public Builder clearSpriteWidthPixels() {
bitField0_ = (bitField0_ & ~0x00000004);
spriteWidthPixels_ = 0;
onChanged();
return this;
}
private int spriteHeightPixels_;
/**
*
*
*
* Required. The height of the sprite in pixels. Must be an even integer.
*
*
* int32 sprite_height_pixels = 4 [(.google.api.field_behavior) = REQUIRED];
*
* @return The spriteHeightPixels.
*/
@java.lang.Override
public int getSpriteHeightPixels() {
return spriteHeightPixels_;
}
/**
*
*
*
* Required. The height of the sprite in pixels. Must be an even integer.
*
*
* int32 sprite_height_pixels = 4 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The spriteHeightPixels to set.
* @return This builder for chaining.
*/
public Builder setSpriteHeightPixels(int value) {
spriteHeightPixels_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Required. The height of the sprite in pixels. Must be an even integer.
*
*
* int32 sprite_height_pixels = 4 [(.google.api.field_behavior) = REQUIRED];
*
* @return This builder for chaining.
*/
public Builder clearSpriteHeightPixels() {
bitField0_ = (bitField0_ & ~0x00000008);
spriteHeightPixels_ = 0;
onChanged();
return this;
}
private int columnCount_;
/**
*
*
*
* The maximum number of sprites per row in a sprite sheet. Valid range is
* [1, 10] and the default value is 1.
*
*
* int32 column_count = 5;
*
* @return The columnCount.
*/
@java.lang.Override
public int getColumnCount() {
return columnCount_;
}
/**
*
*
*
* The maximum number of sprites per row in a sprite sheet. Valid range is
* [1, 10] and the default value is 1.
*
*
* int32 column_count = 5;
*
* @param value The columnCount to set.
* @return This builder for chaining.
*/
public Builder setColumnCount(int value) {
columnCount_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* The maximum number of sprites per row in a sprite sheet. Valid range is
* [1, 10] and the default value is 1.
*
*
* int32 column_count = 5;
*
* @return This builder for chaining.
*/
public Builder clearColumnCount() {
bitField0_ = (bitField0_ & ~0x00000010);
columnCount_ = 0;
onChanged();
return this;
}
private int rowCount_;
/**
*
*
*
* The maximum number of rows per sprite sheet. When the sprite sheet is full,
* a new sprite sheet is created. Valid range is [1, 10] and the default value
* is 1.
*
*
* int32 row_count = 6;
*
* @return The rowCount.
*/
@java.lang.Override
public int getRowCount() {
return rowCount_;
}
/**
*
*
*
* The maximum number of rows per sprite sheet. When the sprite sheet is full,
* a new sprite sheet is created. Valid range is [1, 10] and the default value
* is 1.
*
*
* int32 row_count = 6;
*
* @param value The rowCount to set.
* @return This builder for chaining.
*/
public Builder setRowCount(int value) {
rowCount_ = value;
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* The maximum number of rows per sprite sheet. When the sprite sheet is full,
* a new sprite sheet is created. Valid range is [1, 10] and the default value
* is 1.
*
*
* int32 row_count = 6;
*
* @return This builder for chaining.
*/
public Builder clearRowCount() {
bitField0_ = (bitField0_ & ~0x00000020);
rowCount_ = 0;
onChanged();
return this;
}
private com.google.protobuf.Duration interval_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration,
com.google.protobuf.Duration.Builder,
com.google.protobuf.DurationOrBuilder>
intervalBuilder_;
/**
*
*
*
* Create sprites at regular intervals. Valid range is [1 second, 1 hour] and
* the default value is `10s`.
*
*
* .google.protobuf.Duration interval = 7;
*
* @return Whether the interval field is set.
*/
public boolean hasInterval() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
*
*
*
* Create sprites at regular intervals. Valid range is [1 second, 1 hour] and
* the default value is `10s`.
*
*
* .google.protobuf.Duration interval = 7;
*
* @return The interval.
*/
public com.google.protobuf.Duration getInterval() {
if (intervalBuilder_ == null) {
return interval_ == null ? com.google.protobuf.Duration.getDefaultInstance() : interval_;
} else {
return intervalBuilder_.getMessage();
}
}
/**
*
*
*
* Create sprites at regular intervals. Valid range is [1 second, 1 hour] and
* the default value is `10s`.
*
*
* .google.protobuf.Duration interval = 7;
*/
public Builder setInterval(com.google.protobuf.Duration value) {
if (intervalBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
interval_ = value;
} else {
intervalBuilder_.setMessage(value);
}
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*
*
* Create sprites at regular intervals. Valid range is [1 second, 1 hour] and
* the default value is `10s`.
*
*
* .google.protobuf.Duration interval = 7;
*/
public Builder setInterval(com.google.protobuf.Duration.Builder builderForValue) {
if (intervalBuilder_ == null) {
interval_ = builderForValue.build();
} else {
intervalBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*
*
* Create sprites at regular intervals. Valid range is [1 second, 1 hour] and
* the default value is `10s`.
*
*
* .google.protobuf.Duration interval = 7;
*/
public Builder mergeInterval(com.google.protobuf.Duration value) {
if (intervalBuilder_ == null) {
if (((bitField0_ & 0x00000040) != 0)
&& interval_ != null
&& interval_ != com.google.protobuf.Duration.getDefaultInstance()) {
getIntervalBuilder().mergeFrom(value);
} else {
interval_ = value;
}
} else {
intervalBuilder_.mergeFrom(value);
}
if (interval_ != null) {
bitField0_ |= 0x00000040;
onChanged();
}
return this;
}
/**
*
*
*
* Create sprites at regular intervals. Valid range is [1 second, 1 hour] and
* the default value is `10s`.
*
*
* .google.protobuf.Duration interval = 7;
*/
public Builder clearInterval() {
bitField0_ = (bitField0_ & ~0x00000040);
interval_ = null;
if (intervalBuilder_ != null) {
intervalBuilder_.dispose();
intervalBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Create sprites at regular intervals. Valid range is [1 second, 1 hour] and
* the default value is `10s`.
*
*
* .google.protobuf.Duration interval = 7;
*/
public com.google.protobuf.Duration.Builder getIntervalBuilder() {
bitField0_ |= 0x00000040;
onChanged();
return getIntervalFieldBuilder().getBuilder();
}
/**
*
*
*
* Create sprites at regular intervals. Valid range is [1 second, 1 hour] and
* the default value is `10s`.
*
*
* .google.protobuf.Duration interval = 7;
*/
public com.google.protobuf.DurationOrBuilder getIntervalOrBuilder() {
if (intervalBuilder_ != null) {
return intervalBuilder_.getMessageOrBuilder();
} else {
return interval_ == null ? com.google.protobuf.Duration.getDefaultInstance() : interval_;
}
}
/**
*
*
*
* Create sprites at regular intervals. Valid range is [1 second, 1 hour] and
* the default value is `10s`.
*
*
* .google.protobuf.Duration interval = 7;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration,
com.google.protobuf.Duration.Builder,
com.google.protobuf.DurationOrBuilder>
getIntervalFieldBuilder() {
if (intervalBuilder_ == null) {
intervalBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration,
com.google.protobuf.Duration.Builder,
com.google.protobuf.DurationOrBuilder>(
getInterval(), getParentForChildren(), isClean());
interval_ = null;
}
return intervalBuilder_;
}
private int quality_;
/**
*
*
*
* The quality of the generated sprite sheet. Enter a value between 1
* and 100, where 1 is the lowest quality and 100 is the highest quality.
* The default is 100. A high quality value corresponds to a low image data
* compression ratio.
*
*
* int32 quality = 8;
*
* @return The quality.
*/
@java.lang.Override
public int getQuality() {
return quality_;
}
/**
*
*
*
* The quality of the generated sprite sheet. Enter a value between 1
* and 100, where 1 is the lowest quality and 100 is the highest quality.
* The default is 100. A high quality value corresponds to a low image data
* compression ratio.
*
*
* int32 quality = 8;
*
* @param value The quality to set.
* @return This builder for chaining.
*/
public Builder setQuality(int value) {
quality_ = value;
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
*
*
* The quality of the generated sprite sheet. Enter a value between 1
* and 100, where 1 is the lowest quality and 100 is the highest quality.
* The default is 100. A high quality value corresponds to a low image data
* compression ratio.
*
*
* int32 quality = 8;
*
* @return This builder for chaining.
*/
public Builder clearQuality() {
bitField0_ = (bitField0_ & ~0x00000080);
quality_ = 0;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.video.livestream.v1.SpriteSheet)
}
// @@protoc_insertion_point(class_scope:google.cloud.video.livestream.v1.SpriteSheet)
private static final com.google.cloud.video.livestream.v1.SpriteSheet DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.video.livestream.v1.SpriteSheet();
}
public static com.google.cloud.video.livestream.v1.SpriteSheet getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public SpriteSheet parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.video.livestream.v1.SpriteSheet getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy