com.google.cloud.video.livestream.v1.MuxStream 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;
/**
*
*
*
* Multiplexing settings for output stream.
*
*
* Protobuf type {@code google.cloud.video.livestream.v1.MuxStream}
*/
public final class MuxStream extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.video.livestream.v1.MuxStream)
MuxStreamOrBuilder {
private static final long serialVersionUID = 0L;
// Use MuxStream.newBuilder() to construct.
private MuxStream(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private MuxStream() {
key_ = "";
container_ = "";
elementaryStreams_ = com.google.protobuf.LazyStringArrayList.emptyList();
encryptionId_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new MuxStream();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.video.livestream.v1.OutputsProto
.internal_static_google_cloud_video_livestream_v1_MuxStream_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_MuxStream_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.video.livestream.v1.MuxStream.class,
com.google.cloud.video.livestream.v1.MuxStream.Builder.class);
}
private int bitField0_;
public static final int KEY_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object key_ = "";
/**
*
*
*
* A unique key for this multiplexed stream. The key must be 1-63
* characters in length. The key must begin and end with a letter (regardless
* of case) or a number, but can contain dashes or underscores in between.
*
*
* string key = 1;
*
* @return The key.
*/
@java.lang.Override
public java.lang.String getKey() {
java.lang.Object ref = key_;
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();
key_ = s;
return s;
}
}
/**
*
*
*
* A unique key for this multiplexed stream. The key must be 1-63
* characters in length. The key must begin and end with a letter (regardless
* of case) or a number, but can contain dashes or underscores in between.
*
*
* string key = 1;
*
* @return The bytes for key.
*/
@java.lang.Override
public com.google.protobuf.ByteString getKeyBytes() {
java.lang.Object ref = key_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
key_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CONTAINER_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object container_ = "";
/**
*
*
*
* The container format. The default is `fmp4`.
*
* Supported container formats:
*
* - `fmp4` - the corresponding file extension is `.m4s`
* - `ts` - the corresponding file extension is `.ts`
*
*
* string container = 3;
*
* @return The container.
*/
@java.lang.Override
public java.lang.String getContainer() {
java.lang.Object ref = container_;
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();
container_ = s;
return s;
}
}
/**
*
*
*
* The container format. The default is `fmp4`.
*
* Supported container formats:
*
* - `fmp4` - the corresponding file extension is `.m4s`
* - `ts` - the corresponding file extension is `.ts`
*
*
* string container = 3;
*
* @return The bytes for container.
*/
@java.lang.Override
public com.google.protobuf.ByteString getContainerBytes() {
java.lang.Object ref = container_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
container_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ELEMENTARY_STREAMS_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList elementaryStreams_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
*
*
* List of `ElementaryStream`
* [key][google.cloud.video.livestream.v1.ElementaryStream.key]s multiplexed
* in this stream.
*
* - For `fmp4` container, must contain either one video or one audio stream.
* - For `ts` container, must contain exactly one audio stream and up to one
* video stream.
*
*
* repeated string elementary_streams = 4;
*
* @return A list containing the elementaryStreams.
*/
public com.google.protobuf.ProtocolStringList getElementaryStreamsList() {
return elementaryStreams_;
}
/**
*
*
*
* List of `ElementaryStream`
* [key][google.cloud.video.livestream.v1.ElementaryStream.key]s multiplexed
* in this stream.
*
* - For `fmp4` container, must contain either one video or one audio stream.
* - For `ts` container, must contain exactly one audio stream and up to one
* video stream.
*
*
* repeated string elementary_streams = 4;
*
* @return The count of elementaryStreams.
*/
public int getElementaryStreamsCount() {
return elementaryStreams_.size();
}
/**
*
*
*
* List of `ElementaryStream`
* [key][google.cloud.video.livestream.v1.ElementaryStream.key]s multiplexed
* in this stream.
*
* - For `fmp4` container, must contain either one video or one audio stream.
* - For `ts` container, must contain exactly one audio stream and up to one
* video stream.
*
*
* repeated string elementary_streams = 4;
*
* @param index The index of the element to return.
* @return The elementaryStreams at the given index.
*/
public java.lang.String getElementaryStreams(int index) {
return elementaryStreams_.get(index);
}
/**
*
*
*
* List of `ElementaryStream`
* [key][google.cloud.video.livestream.v1.ElementaryStream.key]s multiplexed
* in this stream.
*
* - For `fmp4` container, must contain either one video or one audio stream.
* - For `ts` container, must contain exactly one audio stream and up to one
* video stream.
*
*
* repeated string elementary_streams = 4;
*
* @param index The index of the value to return.
* @return The bytes of the elementaryStreams at the given index.
*/
public com.google.protobuf.ByteString getElementaryStreamsBytes(int index) {
return elementaryStreams_.getByteString(index);
}
public static final int SEGMENT_SETTINGS_FIELD_NUMBER = 5;
private com.google.cloud.video.livestream.v1.SegmentSettings segmentSettings_;
/**
*
*
*
* Segment settings for `fmp4` and `ts`.
*
*
* .google.cloud.video.livestream.v1.SegmentSettings segment_settings = 5;
*
* @return Whether the segmentSettings field is set.
*/
@java.lang.Override
public boolean hasSegmentSettings() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Segment settings for `fmp4` and `ts`.
*
*
* .google.cloud.video.livestream.v1.SegmentSettings segment_settings = 5;
*
* @return The segmentSettings.
*/
@java.lang.Override
public com.google.cloud.video.livestream.v1.SegmentSettings getSegmentSettings() {
return segmentSettings_ == null
? com.google.cloud.video.livestream.v1.SegmentSettings.getDefaultInstance()
: segmentSettings_;
}
/**
*
*
*
* Segment settings for `fmp4` and `ts`.
*
*
* .google.cloud.video.livestream.v1.SegmentSettings segment_settings = 5;
*/
@java.lang.Override
public com.google.cloud.video.livestream.v1.SegmentSettingsOrBuilder
getSegmentSettingsOrBuilder() {
return segmentSettings_ == null
? com.google.cloud.video.livestream.v1.SegmentSettings.getDefaultInstance()
: segmentSettings_;
}
public static final int ENCRYPTION_ID_FIELD_NUMBER = 6;
@SuppressWarnings("serial")
private volatile java.lang.Object encryptionId_ = "";
/**
*
*
*
* Identifier of the encryption configuration to use. If omitted, output
* will be unencrypted.
*
*
* string encryption_id = 6;
*
* @return The encryptionId.
*/
@java.lang.Override
public java.lang.String getEncryptionId() {
java.lang.Object ref = encryptionId_;
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();
encryptionId_ = s;
return s;
}
}
/**
*
*
*
* Identifier of the encryption configuration to use. If omitted, output
* will be unencrypted.
*
*
* string encryption_id = 6;
*
* @return The bytes for encryptionId.
*/
@java.lang.Override
public com.google.protobuf.ByteString getEncryptionIdBytes() {
java.lang.Object ref = encryptionId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
encryptionId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
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(key_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(container_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, container_);
}
for (int i = 0; i < elementaryStreams_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, elementaryStreams_.getRaw(i));
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(5, getSegmentSettings());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(encryptionId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, encryptionId_);
}
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(key_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(container_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, container_);
}
{
int dataSize = 0;
for (int i = 0; i < elementaryStreams_.size(); i++) {
dataSize += computeStringSizeNoTag(elementaryStreams_.getRaw(i));
}
size += dataSize;
size += 1 * getElementaryStreamsList().size();
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getSegmentSettings());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(encryptionId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, encryptionId_);
}
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.MuxStream)) {
return super.equals(obj);
}
com.google.cloud.video.livestream.v1.MuxStream other =
(com.google.cloud.video.livestream.v1.MuxStream) obj;
if (!getKey().equals(other.getKey())) return false;
if (!getContainer().equals(other.getContainer())) return false;
if (!getElementaryStreamsList().equals(other.getElementaryStreamsList())) return false;
if (hasSegmentSettings() != other.hasSegmentSettings()) return false;
if (hasSegmentSettings()) {
if (!getSegmentSettings().equals(other.getSegmentSettings())) return false;
}
if (!getEncryptionId().equals(other.getEncryptionId())) 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) + KEY_FIELD_NUMBER;
hash = (53 * hash) + getKey().hashCode();
hash = (37 * hash) + CONTAINER_FIELD_NUMBER;
hash = (53 * hash) + getContainer().hashCode();
if (getElementaryStreamsCount() > 0) {
hash = (37 * hash) + ELEMENTARY_STREAMS_FIELD_NUMBER;
hash = (53 * hash) + getElementaryStreamsList().hashCode();
}
if (hasSegmentSettings()) {
hash = (37 * hash) + SEGMENT_SETTINGS_FIELD_NUMBER;
hash = (53 * hash) + getSegmentSettings().hashCode();
}
hash = (37 * hash) + ENCRYPTION_ID_FIELD_NUMBER;
hash = (53 * hash) + getEncryptionId().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.video.livestream.v1.MuxStream parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.video.livestream.v1.MuxStream 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.MuxStream parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.video.livestream.v1.MuxStream 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.MuxStream parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.video.livestream.v1.MuxStream 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.MuxStream 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.MuxStream 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.MuxStream 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.MuxStream 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.MuxStream 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.MuxStream 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.MuxStream 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;
}
/**
*
*
*
* Multiplexing settings for output stream.
*
*
* Protobuf type {@code google.cloud.video.livestream.v1.MuxStream}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.video.livestream.v1.MuxStream)
com.google.cloud.video.livestream.v1.MuxStreamOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.video.livestream.v1.OutputsProto
.internal_static_google_cloud_video_livestream_v1_MuxStream_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_MuxStream_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.video.livestream.v1.MuxStream.class,
com.google.cloud.video.livestream.v1.MuxStream.Builder.class);
}
// Construct using com.google.cloud.video.livestream.v1.MuxStream.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getSegmentSettingsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
key_ = "";
container_ = "";
elementaryStreams_ = com.google.protobuf.LazyStringArrayList.emptyList();
segmentSettings_ = null;
if (segmentSettingsBuilder_ != null) {
segmentSettingsBuilder_.dispose();
segmentSettingsBuilder_ = null;
}
encryptionId_ = "";
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_MuxStream_descriptor;
}
@java.lang.Override
public com.google.cloud.video.livestream.v1.MuxStream getDefaultInstanceForType() {
return com.google.cloud.video.livestream.v1.MuxStream.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.video.livestream.v1.MuxStream build() {
com.google.cloud.video.livestream.v1.MuxStream result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.video.livestream.v1.MuxStream buildPartial() {
com.google.cloud.video.livestream.v1.MuxStream result =
new com.google.cloud.video.livestream.v1.MuxStream(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(com.google.cloud.video.livestream.v1.MuxStream result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.key_ = key_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.container_ = container_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
elementaryStreams_.makeImmutable();
result.elementaryStreams_ = elementaryStreams_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000008) != 0)) {
result.segmentSettings_ =
segmentSettingsBuilder_ == null ? segmentSettings_ : segmentSettingsBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.encryptionId_ = encryptionId_;
}
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.MuxStream) {
return mergeFrom((com.google.cloud.video.livestream.v1.MuxStream) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.video.livestream.v1.MuxStream other) {
if (other == com.google.cloud.video.livestream.v1.MuxStream.getDefaultInstance()) return this;
if (!other.getKey().isEmpty()) {
key_ = other.key_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getContainer().isEmpty()) {
container_ = other.container_;
bitField0_ |= 0x00000002;
onChanged();
}
if (!other.elementaryStreams_.isEmpty()) {
if (elementaryStreams_.isEmpty()) {
elementaryStreams_ = other.elementaryStreams_;
bitField0_ |= 0x00000004;
} else {
ensureElementaryStreamsIsMutable();
elementaryStreams_.addAll(other.elementaryStreams_);
}
onChanged();
}
if (other.hasSegmentSettings()) {
mergeSegmentSettings(other.getSegmentSettings());
}
if (!other.getEncryptionId().isEmpty()) {
encryptionId_ = other.encryptionId_;
bitField0_ |= 0x00000010;
onChanged();
}
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:
{
key_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 26:
{
container_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 26
case 34:
{
java.lang.String s = input.readStringRequireUtf8();
ensureElementaryStreamsIsMutable();
elementaryStreams_.add(s);
break;
} // case 34
case 42:
{
input.readMessage(getSegmentSettingsFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000008;
break;
} // case 42
case 50:
{
encryptionId_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000010;
break;
} // case 50
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 key_ = "";
/**
*
*
*
* A unique key for this multiplexed stream. The key must be 1-63
* characters in length. The key must begin and end with a letter (regardless
* of case) or a number, but can contain dashes or underscores in between.
*
*
* string key = 1;
*
* @return The key.
*/
public java.lang.String getKey() {
java.lang.Object ref = key_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
key_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* A unique key for this multiplexed stream. The key must be 1-63
* characters in length. The key must begin and end with a letter (regardless
* of case) or a number, but can contain dashes or underscores in between.
*
*
* string key = 1;
*
* @return The bytes for key.
*/
public com.google.protobuf.ByteString getKeyBytes() {
java.lang.Object ref = key_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
key_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* A unique key for this multiplexed stream. The key must be 1-63
* characters in length. The key must begin and end with a letter (regardless
* of case) or a number, but can contain dashes or underscores in between.
*
*
* string key = 1;
*
* @param value The key to set.
* @return This builder for chaining.
*/
public Builder setKey(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
key_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* A unique key for this multiplexed stream. The key must be 1-63
* characters in length. The key must begin and end with a letter (regardless
* of case) or a number, but can contain dashes or underscores in between.
*
*
* string key = 1;
*
* @return This builder for chaining.
*/
public Builder clearKey() {
key_ = getDefaultInstance().getKey();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* A unique key for this multiplexed stream. The key must be 1-63
* characters in length. The key must begin and end with a letter (regardless
* of case) or a number, but can contain dashes or underscores in between.
*
*
* string key = 1;
*
* @param value The bytes for key to set.
* @return This builder for chaining.
*/
public Builder setKeyBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
key_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object container_ = "";
/**
*
*
*
* The container format. The default is `fmp4`.
*
* Supported container formats:
*
* - `fmp4` - the corresponding file extension is `.m4s`
* - `ts` - the corresponding file extension is `.ts`
*
*
* string container = 3;
*
* @return The container.
*/
public java.lang.String getContainer() {
java.lang.Object ref = container_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
container_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The container format. The default is `fmp4`.
*
* Supported container formats:
*
* - `fmp4` - the corresponding file extension is `.m4s`
* - `ts` - the corresponding file extension is `.ts`
*
*
* string container = 3;
*
* @return The bytes for container.
*/
public com.google.protobuf.ByteString getContainerBytes() {
java.lang.Object ref = container_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
container_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The container format. The default is `fmp4`.
*
* Supported container formats:
*
* - `fmp4` - the corresponding file extension is `.m4s`
* - `ts` - the corresponding file extension is `.ts`
*
*
* string container = 3;
*
* @param value The container to set.
* @return This builder for chaining.
*/
public Builder setContainer(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
container_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* The container format. The default is `fmp4`.
*
* Supported container formats:
*
* - `fmp4` - the corresponding file extension is `.m4s`
* - `ts` - the corresponding file extension is `.ts`
*
*
* string container = 3;
*
* @return This builder for chaining.
*/
public Builder clearContainer() {
container_ = getDefaultInstance().getContainer();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* The container format. The default is `fmp4`.
*
* Supported container formats:
*
* - `fmp4` - the corresponding file extension is `.m4s`
* - `ts` - the corresponding file extension is `.ts`
*
*
* string container = 3;
*
* @param value The bytes for container to set.
* @return This builder for chaining.
*/
public Builder setContainerBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
container_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList elementaryStreams_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureElementaryStreamsIsMutable() {
if (!elementaryStreams_.isModifiable()) {
elementaryStreams_ = new com.google.protobuf.LazyStringArrayList(elementaryStreams_);
}
bitField0_ |= 0x00000004;
}
/**
*
*
*
* List of `ElementaryStream`
* [key][google.cloud.video.livestream.v1.ElementaryStream.key]s multiplexed
* in this stream.
*
* - For `fmp4` container, must contain either one video or one audio stream.
* - For `ts` container, must contain exactly one audio stream and up to one
* video stream.
*
*
* repeated string elementary_streams = 4;
*
* @return A list containing the elementaryStreams.
*/
public com.google.protobuf.ProtocolStringList getElementaryStreamsList() {
elementaryStreams_.makeImmutable();
return elementaryStreams_;
}
/**
*
*
*
* List of `ElementaryStream`
* [key][google.cloud.video.livestream.v1.ElementaryStream.key]s multiplexed
* in this stream.
*
* - For `fmp4` container, must contain either one video or one audio stream.
* - For `ts` container, must contain exactly one audio stream and up to one
* video stream.
*
*
* repeated string elementary_streams = 4;
*
* @return The count of elementaryStreams.
*/
public int getElementaryStreamsCount() {
return elementaryStreams_.size();
}
/**
*
*
*
* List of `ElementaryStream`
* [key][google.cloud.video.livestream.v1.ElementaryStream.key]s multiplexed
* in this stream.
*
* - For `fmp4` container, must contain either one video or one audio stream.
* - For `ts` container, must contain exactly one audio stream and up to one
* video stream.
*
*
* repeated string elementary_streams = 4;
*
* @param index The index of the element to return.
* @return The elementaryStreams at the given index.
*/
public java.lang.String getElementaryStreams(int index) {
return elementaryStreams_.get(index);
}
/**
*
*
*
* List of `ElementaryStream`
* [key][google.cloud.video.livestream.v1.ElementaryStream.key]s multiplexed
* in this stream.
*
* - For `fmp4` container, must contain either one video or one audio stream.
* - For `ts` container, must contain exactly one audio stream and up to one
* video stream.
*
*
* repeated string elementary_streams = 4;
*
* @param index The index of the value to return.
* @return The bytes of the elementaryStreams at the given index.
*/
public com.google.protobuf.ByteString getElementaryStreamsBytes(int index) {
return elementaryStreams_.getByteString(index);
}
/**
*
*
*
* List of `ElementaryStream`
* [key][google.cloud.video.livestream.v1.ElementaryStream.key]s multiplexed
* in this stream.
*
* - For `fmp4` container, must contain either one video or one audio stream.
* - For `ts` container, must contain exactly one audio stream and up to one
* video stream.
*
*
* repeated string elementary_streams = 4;
*
* @param index The index to set the value at.
* @param value The elementaryStreams to set.
* @return This builder for chaining.
*/
public Builder setElementaryStreams(int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureElementaryStreamsIsMutable();
elementaryStreams_.set(index, value);
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* List of `ElementaryStream`
* [key][google.cloud.video.livestream.v1.ElementaryStream.key]s multiplexed
* in this stream.
*
* - For `fmp4` container, must contain either one video or one audio stream.
* - For `ts` container, must contain exactly one audio stream and up to one
* video stream.
*
*
* repeated string elementary_streams = 4;
*
* @param value The elementaryStreams to add.
* @return This builder for chaining.
*/
public Builder addElementaryStreams(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureElementaryStreamsIsMutable();
elementaryStreams_.add(value);
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* List of `ElementaryStream`
* [key][google.cloud.video.livestream.v1.ElementaryStream.key]s multiplexed
* in this stream.
*
* - For `fmp4` container, must contain either one video or one audio stream.
* - For `ts` container, must contain exactly one audio stream and up to one
* video stream.
*
*
* repeated string elementary_streams = 4;
*
* @param values The elementaryStreams to add.
* @return This builder for chaining.
*/
public Builder addAllElementaryStreams(java.lang.Iterable values) {
ensureElementaryStreamsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, elementaryStreams_);
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* List of `ElementaryStream`
* [key][google.cloud.video.livestream.v1.ElementaryStream.key]s multiplexed
* in this stream.
*
* - For `fmp4` container, must contain either one video or one audio stream.
* - For `ts` container, must contain exactly one audio stream and up to one
* video stream.
*
*
* repeated string elementary_streams = 4;
*
* @return This builder for chaining.
*/
public Builder clearElementaryStreams() {
elementaryStreams_ = com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
;
onChanged();
return this;
}
/**
*
*
*
* List of `ElementaryStream`
* [key][google.cloud.video.livestream.v1.ElementaryStream.key]s multiplexed
* in this stream.
*
* - For `fmp4` container, must contain either one video or one audio stream.
* - For `ts` container, must contain exactly one audio stream and up to one
* video stream.
*
*
* repeated string elementary_streams = 4;
*
* @param value The bytes of the elementaryStreams to add.
* @return This builder for chaining.
*/
public Builder addElementaryStreamsBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureElementaryStreamsIsMutable();
elementaryStreams_.add(value);
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private com.google.cloud.video.livestream.v1.SegmentSettings segmentSettings_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.video.livestream.v1.SegmentSettings,
com.google.cloud.video.livestream.v1.SegmentSettings.Builder,
com.google.cloud.video.livestream.v1.SegmentSettingsOrBuilder>
segmentSettingsBuilder_;
/**
*
*
*
* Segment settings for `fmp4` and `ts`.
*
*
* .google.cloud.video.livestream.v1.SegmentSettings segment_settings = 5;
*
* @return Whether the segmentSettings field is set.
*/
public boolean hasSegmentSettings() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
*
*
* Segment settings for `fmp4` and `ts`.
*
*
* .google.cloud.video.livestream.v1.SegmentSettings segment_settings = 5;
*
* @return The segmentSettings.
*/
public com.google.cloud.video.livestream.v1.SegmentSettings getSegmentSettings() {
if (segmentSettingsBuilder_ == null) {
return segmentSettings_ == null
? com.google.cloud.video.livestream.v1.SegmentSettings.getDefaultInstance()
: segmentSettings_;
} else {
return segmentSettingsBuilder_.getMessage();
}
}
/**
*
*
*
* Segment settings for `fmp4` and `ts`.
*
*
* .google.cloud.video.livestream.v1.SegmentSettings segment_settings = 5;
*/
public Builder setSegmentSettings(com.google.cloud.video.livestream.v1.SegmentSettings value) {
if (segmentSettingsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
segmentSettings_ = value;
} else {
segmentSettingsBuilder_.setMessage(value);
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Segment settings for `fmp4` and `ts`.
*
*
* .google.cloud.video.livestream.v1.SegmentSettings segment_settings = 5;
*/
public Builder setSegmentSettings(
com.google.cloud.video.livestream.v1.SegmentSettings.Builder builderForValue) {
if (segmentSettingsBuilder_ == null) {
segmentSettings_ = builderForValue.build();
} else {
segmentSettingsBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Segment settings for `fmp4` and `ts`.
*
*
* .google.cloud.video.livestream.v1.SegmentSettings segment_settings = 5;
*/
public Builder mergeSegmentSettings(
com.google.cloud.video.livestream.v1.SegmentSettings value) {
if (segmentSettingsBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0)
&& segmentSettings_ != null
&& segmentSettings_
!= com.google.cloud.video.livestream.v1.SegmentSettings.getDefaultInstance()) {
getSegmentSettingsBuilder().mergeFrom(value);
} else {
segmentSettings_ = value;
}
} else {
segmentSettingsBuilder_.mergeFrom(value);
}
if (segmentSettings_ != null) {
bitField0_ |= 0x00000008;
onChanged();
}
return this;
}
/**
*
*
*
* Segment settings for `fmp4` and `ts`.
*
*
* .google.cloud.video.livestream.v1.SegmentSettings segment_settings = 5;
*/
public Builder clearSegmentSettings() {
bitField0_ = (bitField0_ & ~0x00000008);
segmentSettings_ = null;
if (segmentSettingsBuilder_ != null) {
segmentSettingsBuilder_.dispose();
segmentSettingsBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Segment settings for `fmp4` and `ts`.
*
*
* .google.cloud.video.livestream.v1.SegmentSettings segment_settings = 5;
*/
public com.google.cloud.video.livestream.v1.SegmentSettings.Builder
getSegmentSettingsBuilder() {
bitField0_ |= 0x00000008;
onChanged();
return getSegmentSettingsFieldBuilder().getBuilder();
}
/**
*
*
*
* Segment settings for `fmp4` and `ts`.
*
*
* .google.cloud.video.livestream.v1.SegmentSettings segment_settings = 5;
*/
public com.google.cloud.video.livestream.v1.SegmentSettingsOrBuilder
getSegmentSettingsOrBuilder() {
if (segmentSettingsBuilder_ != null) {
return segmentSettingsBuilder_.getMessageOrBuilder();
} else {
return segmentSettings_ == null
? com.google.cloud.video.livestream.v1.SegmentSettings.getDefaultInstance()
: segmentSettings_;
}
}
/**
*
*
*
* Segment settings for `fmp4` and `ts`.
*
*
* .google.cloud.video.livestream.v1.SegmentSettings segment_settings = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.video.livestream.v1.SegmentSettings,
com.google.cloud.video.livestream.v1.SegmentSettings.Builder,
com.google.cloud.video.livestream.v1.SegmentSettingsOrBuilder>
getSegmentSettingsFieldBuilder() {
if (segmentSettingsBuilder_ == null) {
segmentSettingsBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.video.livestream.v1.SegmentSettings,
com.google.cloud.video.livestream.v1.SegmentSettings.Builder,
com.google.cloud.video.livestream.v1.SegmentSettingsOrBuilder>(
getSegmentSettings(), getParentForChildren(), isClean());
segmentSettings_ = null;
}
return segmentSettingsBuilder_;
}
private java.lang.Object encryptionId_ = "";
/**
*
*
*
* Identifier of the encryption configuration to use. If omitted, output
* will be unencrypted.
*
*
* string encryption_id = 6;
*
* @return The encryptionId.
*/
public java.lang.String getEncryptionId() {
java.lang.Object ref = encryptionId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
encryptionId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Identifier of the encryption configuration to use. If omitted, output
* will be unencrypted.
*
*
* string encryption_id = 6;
*
* @return The bytes for encryptionId.
*/
public com.google.protobuf.ByteString getEncryptionIdBytes() {
java.lang.Object ref = encryptionId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
encryptionId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Identifier of the encryption configuration to use. If omitted, output
* will be unencrypted.
*
*
* string encryption_id = 6;
*
* @param value The encryptionId to set.
* @return This builder for chaining.
*/
public Builder setEncryptionId(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
encryptionId_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* Identifier of the encryption configuration to use. If omitted, output
* will be unencrypted.
*
*
* string encryption_id = 6;
*
* @return This builder for chaining.
*/
public Builder clearEncryptionId() {
encryptionId_ = getDefaultInstance().getEncryptionId();
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
return this;
}
/**
*
*
*
* Identifier of the encryption configuration to use. If omitted, output
* will be unencrypted.
*
*
* string encryption_id = 6;
*
* @param value The bytes for encryptionId to set.
* @return This builder for chaining.
*/
public Builder setEncryptionIdBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
encryptionId_ = value;
bitField0_ |= 0x00000010;
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.MuxStream)
}
// @@protoc_insertion_point(class_scope:google.cloud.video.livestream.v1.MuxStream)
private static final com.google.cloud.video.livestream.v1.MuxStream DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.video.livestream.v1.MuxStream();
}
public static com.google.cloud.video.livestream.v1.MuxStream getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public MuxStream 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.MuxStream getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy