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

com.google.cloud.video.livestream.v1.AudioStreamProperty Maven / Gradle / Ivy

There is a newer version: 0.57.0
Show newest version
/*
 * 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/resources.proto

// Protobuf Java Version: 3.25.5
package com.google.cloud.video.livestream.v1;

/**
 *
 *
 * 
 * Properties of the audio stream.
 * 
* * Protobuf type {@code google.cloud.video.livestream.v1.AudioStreamProperty} */ public final class AudioStreamProperty extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.video.livestream.v1.AudioStreamProperty) AudioStreamPropertyOrBuilder { private static final long serialVersionUID = 0L; // Use AudioStreamProperty.newBuilder() to construct. private AudioStreamProperty(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private AudioStreamProperty() {} @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new AudioStreamProperty(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.video.livestream.v1.ResourcesProto .internal_static_google_cloud_video_livestream_v1_AudioStreamProperty_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.video.livestream.v1.ResourcesProto .internal_static_google_cloud_video_livestream_v1_AudioStreamProperty_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.video.livestream.v1.AudioStreamProperty.class, com.google.cloud.video.livestream.v1.AudioStreamProperty.Builder.class); } private int bitField0_; public static final int INDEX_FIELD_NUMBER = 1; private int index_ = 0; /** * * *
   * Index of this audio stream.
   * 
* * int32 index = 1; * * @return The index. */ @java.lang.Override public int getIndex() { return index_; } public static final int AUDIO_FORMAT_FIELD_NUMBER = 2; private com.google.cloud.video.livestream.v1.AudioFormat audioFormat_; /** * * *
   * Properties of the audio format.
   * 
* * .google.cloud.video.livestream.v1.AudioFormat audio_format = 2; * * @return Whether the audioFormat field is set. */ @java.lang.Override public boolean hasAudioFormat() { return ((bitField0_ & 0x00000001) != 0); } /** * * *
   * Properties of the audio format.
   * 
* * .google.cloud.video.livestream.v1.AudioFormat audio_format = 2; * * @return The audioFormat. */ @java.lang.Override public com.google.cloud.video.livestream.v1.AudioFormat getAudioFormat() { return audioFormat_ == null ? com.google.cloud.video.livestream.v1.AudioFormat.getDefaultInstance() : audioFormat_; } /** * * *
   * Properties of the audio format.
   * 
* * .google.cloud.video.livestream.v1.AudioFormat audio_format = 2; */ @java.lang.Override public com.google.cloud.video.livestream.v1.AudioFormatOrBuilder getAudioFormatOrBuilder() { return audioFormat_ == null ? com.google.cloud.video.livestream.v1.AudioFormat.getDefaultInstance() : audioFormat_; } 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 (index_ != 0) { output.writeInt32(1, index_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getAudioFormat()); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (index_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, index_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getAudioFormat()); } 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.AudioStreamProperty)) { return super.equals(obj); } com.google.cloud.video.livestream.v1.AudioStreamProperty other = (com.google.cloud.video.livestream.v1.AudioStreamProperty) obj; if (getIndex() != other.getIndex()) return false; if (hasAudioFormat() != other.hasAudioFormat()) return false; if (hasAudioFormat()) { if (!getAudioFormat().equals(other.getAudioFormat())) 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) + INDEX_FIELD_NUMBER; hash = (53 * hash) + getIndex(); if (hasAudioFormat()) { hash = (37 * hash) + AUDIO_FORMAT_FIELD_NUMBER; hash = (53 * hash) + getAudioFormat().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.video.livestream.v1.AudioStreamProperty parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.video.livestream.v1.AudioStreamProperty 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.AudioStreamProperty parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.video.livestream.v1.AudioStreamProperty 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.AudioStreamProperty parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.video.livestream.v1.AudioStreamProperty 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.AudioStreamProperty 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.AudioStreamProperty 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.AudioStreamProperty 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.AudioStreamProperty 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.AudioStreamProperty 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.AudioStreamProperty 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.AudioStreamProperty 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; } /** * * *
   * Properties of the audio stream.
   * 
* * Protobuf type {@code google.cloud.video.livestream.v1.AudioStreamProperty} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.video.livestream.v1.AudioStreamProperty) com.google.cloud.video.livestream.v1.AudioStreamPropertyOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.video.livestream.v1.ResourcesProto .internal_static_google_cloud_video_livestream_v1_AudioStreamProperty_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.video.livestream.v1.ResourcesProto .internal_static_google_cloud_video_livestream_v1_AudioStreamProperty_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.video.livestream.v1.AudioStreamProperty.class, com.google.cloud.video.livestream.v1.AudioStreamProperty.Builder.class); } // Construct using com.google.cloud.video.livestream.v1.AudioStreamProperty.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getAudioFormatFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; index_ = 0; audioFormat_ = null; if (audioFormatBuilder_ != null) { audioFormatBuilder_.dispose(); audioFormatBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.video.livestream.v1.ResourcesProto .internal_static_google_cloud_video_livestream_v1_AudioStreamProperty_descriptor; } @java.lang.Override public com.google.cloud.video.livestream.v1.AudioStreamProperty getDefaultInstanceForType() { return com.google.cloud.video.livestream.v1.AudioStreamProperty.getDefaultInstance(); } @java.lang.Override public com.google.cloud.video.livestream.v1.AudioStreamProperty build() { com.google.cloud.video.livestream.v1.AudioStreamProperty result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.video.livestream.v1.AudioStreamProperty buildPartial() { com.google.cloud.video.livestream.v1.AudioStreamProperty result = new com.google.cloud.video.livestream.v1.AudioStreamProperty(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(com.google.cloud.video.livestream.v1.AudioStreamProperty result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.index_ = index_; } int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000002) != 0)) { result.audioFormat_ = audioFormatBuilder_ == null ? audioFormat_ : audioFormatBuilder_.build(); to_bitField0_ |= 0x00000001; } 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.AudioStreamProperty) { return mergeFrom((com.google.cloud.video.livestream.v1.AudioStreamProperty) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.video.livestream.v1.AudioStreamProperty other) { if (other == com.google.cloud.video.livestream.v1.AudioStreamProperty.getDefaultInstance()) return this; if (other.getIndex() != 0) { setIndex(other.getIndex()); } if (other.hasAudioFormat()) { mergeAudioFormat(other.getAudioFormat()); } 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 8: { index_ = input.readInt32(); bitField0_ |= 0x00000001; break; } // case 8 case 18: { input.readMessage(getAudioFormatFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 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 int index_; /** * * *
     * Index of this audio stream.
     * 
* * int32 index = 1; * * @return The index. */ @java.lang.Override public int getIndex() { return index_; } /** * * *
     * Index of this audio stream.
     * 
* * int32 index = 1; * * @param value The index to set. * @return This builder for chaining. */ public Builder setIndex(int value) { index_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
     * Index of this audio stream.
     * 
* * int32 index = 1; * * @return This builder for chaining. */ public Builder clearIndex() { bitField0_ = (bitField0_ & ~0x00000001); index_ = 0; onChanged(); return this; } private com.google.cloud.video.livestream.v1.AudioFormat audioFormat_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.video.livestream.v1.AudioFormat, com.google.cloud.video.livestream.v1.AudioFormat.Builder, com.google.cloud.video.livestream.v1.AudioFormatOrBuilder> audioFormatBuilder_; /** * * *
     * Properties of the audio format.
     * 
* * .google.cloud.video.livestream.v1.AudioFormat audio_format = 2; * * @return Whether the audioFormat field is set. */ public boolean hasAudioFormat() { return ((bitField0_ & 0x00000002) != 0); } /** * * *
     * Properties of the audio format.
     * 
* * .google.cloud.video.livestream.v1.AudioFormat audio_format = 2; * * @return The audioFormat. */ public com.google.cloud.video.livestream.v1.AudioFormat getAudioFormat() { if (audioFormatBuilder_ == null) { return audioFormat_ == null ? com.google.cloud.video.livestream.v1.AudioFormat.getDefaultInstance() : audioFormat_; } else { return audioFormatBuilder_.getMessage(); } } /** * * *
     * Properties of the audio format.
     * 
* * .google.cloud.video.livestream.v1.AudioFormat audio_format = 2; */ public Builder setAudioFormat(com.google.cloud.video.livestream.v1.AudioFormat value) { if (audioFormatBuilder_ == null) { if (value == null) { throw new NullPointerException(); } audioFormat_ = value; } else { audioFormatBuilder_.setMessage(value); } bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
     * Properties of the audio format.
     * 
* * .google.cloud.video.livestream.v1.AudioFormat audio_format = 2; */ public Builder setAudioFormat( com.google.cloud.video.livestream.v1.AudioFormat.Builder builderForValue) { if (audioFormatBuilder_ == null) { audioFormat_ = builderForValue.build(); } else { audioFormatBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
     * Properties of the audio format.
     * 
* * .google.cloud.video.livestream.v1.AudioFormat audio_format = 2; */ public Builder mergeAudioFormat(com.google.cloud.video.livestream.v1.AudioFormat value) { if (audioFormatBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0) && audioFormat_ != null && audioFormat_ != com.google.cloud.video.livestream.v1.AudioFormat.getDefaultInstance()) { getAudioFormatBuilder().mergeFrom(value); } else { audioFormat_ = value; } } else { audioFormatBuilder_.mergeFrom(value); } if (audioFormat_ != null) { bitField0_ |= 0x00000002; onChanged(); } return this; } /** * * *
     * Properties of the audio format.
     * 
* * .google.cloud.video.livestream.v1.AudioFormat audio_format = 2; */ public Builder clearAudioFormat() { bitField0_ = (bitField0_ & ~0x00000002); audioFormat_ = null; if (audioFormatBuilder_ != null) { audioFormatBuilder_.dispose(); audioFormatBuilder_ = null; } onChanged(); return this; } /** * * *
     * Properties of the audio format.
     * 
* * .google.cloud.video.livestream.v1.AudioFormat audio_format = 2; */ public com.google.cloud.video.livestream.v1.AudioFormat.Builder getAudioFormatBuilder() { bitField0_ |= 0x00000002; onChanged(); return getAudioFormatFieldBuilder().getBuilder(); } /** * * *
     * Properties of the audio format.
     * 
* * .google.cloud.video.livestream.v1.AudioFormat audio_format = 2; */ public com.google.cloud.video.livestream.v1.AudioFormatOrBuilder getAudioFormatOrBuilder() { if (audioFormatBuilder_ != null) { return audioFormatBuilder_.getMessageOrBuilder(); } else { return audioFormat_ == null ? com.google.cloud.video.livestream.v1.AudioFormat.getDefaultInstance() : audioFormat_; } } /** * * *
     * Properties of the audio format.
     * 
* * .google.cloud.video.livestream.v1.AudioFormat audio_format = 2; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.video.livestream.v1.AudioFormat, com.google.cloud.video.livestream.v1.AudioFormat.Builder, com.google.cloud.video.livestream.v1.AudioFormatOrBuilder> getAudioFormatFieldBuilder() { if (audioFormatBuilder_ == null) { audioFormatBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.video.livestream.v1.AudioFormat, com.google.cloud.video.livestream.v1.AudioFormat.Builder, com.google.cloud.video.livestream.v1.AudioFormatOrBuilder>( getAudioFormat(), getParentForChildren(), isClean()); audioFormat_ = null; } return audioFormatBuilder_; } @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.AudioStreamProperty) } // @@protoc_insertion_point(class_scope:google.cloud.video.livestream.v1.AudioStreamProperty) private static final com.google.cloud.video.livestream.v1.AudioStreamProperty DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.video.livestream.v1.AudioStreamProperty(); } public static com.google.cloud.video.livestream.v1.AudioStreamProperty getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public AudioStreamProperty 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.AudioStreamProperty getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy