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

com.google.cloud.video.livestream.v1.StaticOverlay 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;

/**
 *
 *
 * 
 * Configuration for the static overlay.
 * 
* * Protobuf type {@code google.cloud.video.livestream.v1.StaticOverlay} */ public final class StaticOverlay extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.video.livestream.v1.StaticOverlay) StaticOverlayOrBuilder { private static final long serialVersionUID = 0L; // Use StaticOverlay.newBuilder() to construct. private StaticOverlay(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private StaticOverlay() { asset_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new StaticOverlay(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.video.livestream.v1.ResourcesProto .internal_static_google_cloud_video_livestream_v1_StaticOverlay_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_StaticOverlay_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.video.livestream.v1.StaticOverlay.class, com.google.cloud.video.livestream.v1.StaticOverlay.Builder.class); } private int bitField0_; public static final int ASSET_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object asset_ = ""; /** * * *
   * Required. Asset to use for the overlaid image.
   * The asset must be represented in the form of:
   * `projects/{project}/locations/{location}/assets/{assetId}`.
   * The asset's resource type must be image.
   * 
* * * string asset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * * * @return The asset. */ @java.lang.Override public java.lang.String getAsset() { java.lang.Object ref = asset_; 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(); asset_ = s; return s; } } /** * * *
   * Required. Asset to use for the overlaid image.
   * The asset must be represented in the form of:
   * `projects/{project}/locations/{location}/assets/{assetId}`.
   * The asset's resource type must be image.
   * 
* * * string asset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * * * @return The bytes for asset. */ @java.lang.Override public com.google.protobuf.ByteString getAssetBytes() { java.lang.Object ref = asset_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); asset_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int RESOLUTION_FIELD_NUMBER = 2; private com.google.cloud.video.livestream.v1.NormalizedResolution resolution_; /** * * *
   * Optional. Normalized image resolution, based on output video resolution.
   * Valid values are [0.0, 1.0]. To respect the original image aspect ratio,
   * set either `w` or `h` to 0. To use the original image resolution, set both
   * `w` and `h` to 0. The default is {0, 0}.
   * 
* * * .google.cloud.video.livestream.v1.NormalizedResolution resolution = 2 [(.google.api.field_behavior) = OPTIONAL]; * * * @return Whether the resolution field is set. */ @java.lang.Override public boolean hasResolution() { return ((bitField0_ & 0x00000001) != 0); } /** * * *
   * Optional. Normalized image resolution, based on output video resolution.
   * Valid values are [0.0, 1.0]. To respect the original image aspect ratio,
   * set either `w` or `h` to 0. To use the original image resolution, set both
   * `w` and `h` to 0. The default is {0, 0}.
   * 
* * * .google.cloud.video.livestream.v1.NormalizedResolution resolution = 2 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The resolution. */ @java.lang.Override public com.google.cloud.video.livestream.v1.NormalizedResolution getResolution() { return resolution_ == null ? com.google.cloud.video.livestream.v1.NormalizedResolution.getDefaultInstance() : resolution_; } /** * * *
   * Optional. Normalized image resolution, based on output video resolution.
   * Valid values are [0.0, 1.0]. To respect the original image aspect ratio,
   * set either `w` or `h` to 0. To use the original image resolution, set both
   * `w` and `h` to 0. The default is {0, 0}.
   * 
* * * .google.cloud.video.livestream.v1.NormalizedResolution resolution = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override public com.google.cloud.video.livestream.v1.NormalizedResolutionOrBuilder getResolutionOrBuilder() { return resolution_ == null ? com.google.cloud.video.livestream.v1.NormalizedResolution.getDefaultInstance() : resolution_; } public static final int POSITION_FIELD_NUMBER = 3; private com.google.cloud.video.livestream.v1.NormalizedCoordinate position_; /** * * *
   * Optional. Position of the image in terms of normalized coordinates of the
   * upper-left corner of the image, based on output video resolution. For
   * example, use the x and y coordinates {0, 0} to position the top-left corner
   * of the overlay animation in the top-left corner of the output video.
   * 
* * * .google.cloud.video.livestream.v1.NormalizedCoordinate position = 3 [(.google.api.field_behavior) = OPTIONAL]; * * * @return Whether the position field is set. */ @java.lang.Override public boolean hasPosition() { return ((bitField0_ & 0x00000002) != 0); } /** * * *
   * Optional. Position of the image in terms of normalized coordinates of the
   * upper-left corner of the image, based on output video resolution. For
   * example, use the x and y coordinates {0, 0} to position the top-left corner
   * of the overlay animation in the top-left corner of the output video.
   * 
* * * .google.cloud.video.livestream.v1.NormalizedCoordinate position = 3 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The position. */ @java.lang.Override public com.google.cloud.video.livestream.v1.NormalizedCoordinate getPosition() { return position_ == null ? com.google.cloud.video.livestream.v1.NormalizedCoordinate.getDefaultInstance() : position_; } /** * * *
   * Optional. Position of the image in terms of normalized coordinates of the
   * upper-left corner of the image, based on output video resolution. For
   * example, use the x and y coordinates {0, 0} to position the top-left corner
   * of the overlay animation in the top-left corner of the output video.
   * 
* * * .google.cloud.video.livestream.v1.NormalizedCoordinate position = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override public com.google.cloud.video.livestream.v1.NormalizedCoordinateOrBuilder getPositionOrBuilder() { return position_ == null ? com.google.cloud.video.livestream.v1.NormalizedCoordinate.getDefaultInstance() : position_; } public static final int OPACITY_FIELD_NUMBER = 4; private double opacity_ = 0D; /** * * *
   * Optional. Target image opacity. Valid values are from `1.0` (solid,
   * default) to `0.0` (transparent), exclusive. Set this to a value greater
   * than `0.0`.
   * 
* * double opacity = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The opacity. */ @java.lang.Override public double getOpacity() { return opacity_; } 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(asset_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, asset_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getResolution()); } if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(3, getPosition()); } if (java.lang.Double.doubleToRawLongBits(opacity_) != 0) { output.writeDouble(4, opacity_); } 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(asset_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, asset_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getResolution()); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getPosition()); } if (java.lang.Double.doubleToRawLongBits(opacity_) != 0) { size += com.google.protobuf.CodedOutputStream.computeDoubleSize(4, opacity_); } 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.StaticOverlay)) { return super.equals(obj); } com.google.cloud.video.livestream.v1.StaticOverlay other = (com.google.cloud.video.livestream.v1.StaticOverlay) obj; if (!getAsset().equals(other.getAsset())) return false; if (hasResolution() != other.hasResolution()) return false; if (hasResolution()) { if (!getResolution().equals(other.getResolution())) return false; } if (hasPosition() != other.hasPosition()) return false; if (hasPosition()) { if (!getPosition().equals(other.getPosition())) return false; } if (java.lang.Double.doubleToLongBits(getOpacity()) != java.lang.Double.doubleToLongBits(other.getOpacity())) 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) + ASSET_FIELD_NUMBER; hash = (53 * hash) + getAsset().hashCode(); if (hasResolution()) { hash = (37 * hash) + RESOLUTION_FIELD_NUMBER; hash = (53 * hash) + getResolution().hashCode(); } if (hasPosition()) { hash = (37 * hash) + POSITION_FIELD_NUMBER; hash = (53 * hash) + getPosition().hashCode(); } hash = (37 * hash) + OPACITY_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( java.lang.Double.doubleToLongBits(getOpacity())); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.video.livestream.v1.StaticOverlay parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.video.livestream.v1.StaticOverlay 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.StaticOverlay parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.video.livestream.v1.StaticOverlay 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.StaticOverlay parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.video.livestream.v1.StaticOverlay 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.StaticOverlay 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.StaticOverlay 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.StaticOverlay 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.StaticOverlay 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.StaticOverlay 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.StaticOverlay 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.StaticOverlay 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; } /** * * *
   * Configuration for the static overlay.
   * 
* * Protobuf type {@code google.cloud.video.livestream.v1.StaticOverlay} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.video.livestream.v1.StaticOverlay) com.google.cloud.video.livestream.v1.StaticOverlayOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.video.livestream.v1.ResourcesProto .internal_static_google_cloud_video_livestream_v1_StaticOverlay_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_StaticOverlay_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.video.livestream.v1.StaticOverlay.class, com.google.cloud.video.livestream.v1.StaticOverlay.Builder.class); } // Construct using com.google.cloud.video.livestream.v1.StaticOverlay.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getResolutionFieldBuilder(); getPositionFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; asset_ = ""; resolution_ = null; if (resolutionBuilder_ != null) { resolutionBuilder_.dispose(); resolutionBuilder_ = null; } position_ = null; if (positionBuilder_ != null) { positionBuilder_.dispose(); positionBuilder_ = null; } opacity_ = 0D; 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_StaticOverlay_descriptor; } @java.lang.Override public com.google.cloud.video.livestream.v1.StaticOverlay getDefaultInstanceForType() { return com.google.cloud.video.livestream.v1.StaticOverlay.getDefaultInstance(); } @java.lang.Override public com.google.cloud.video.livestream.v1.StaticOverlay build() { com.google.cloud.video.livestream.v1.StaticOverlay result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.video.livestream.v1.StaticOverlay buildPartial() { com.google.cloud.video.livestream.v1.StaticOverlay result = new com.google.cloud.video.livestream.v1.StaticOverlay(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(com.google.cloud.video.livestream.v1.StaticOverlay result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.asset_ = asset_; } int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000002) != 0)) { result.resolution_ = resolutionBuilder_ == null ? resolution_ : resolutionBuilder_.build(); to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000004) != 0)) { result.position_ = positionBuilder_ == null ? position_ : positionBuilder_.build(); to_bitField0_ |= 0x00000002; } if (((from_bitField0_ & 0x00000008) != 0)) { result.opacity_ = opacity_; } 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.StaticOverlay) { return mergeFrom((com.google.cloud.video.livestream.v1.StaticOverlay) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.video.livestream.v1.StaticOverlay other) { if (other == com.google.cloud.video.livestream.v1.StaticOverlay.getDefaultInstance()) return this; if (!other.getAsset().isEmpty()) { asset_ = other.asset_; bitField0_ |= 0x00000001; onChanged(); } if (other.hasResolution()) { mergeResolution(other.getResolution()); } if (other.hasPosition()) { mergePosition(other.getPosition()); } if (other.getOpacity() != 0D) { setOpacity(other.getOpacity()); } 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: { asset_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 18: { input.readMessage(getResolutionFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 26: { input.readMessage(getPositionFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 case 33: { opacity_ = input.readDouble(); bitField0_ |= 0x00000008; break; } // case 33 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 asset_ = ""; /** * * *
     * Required. Asset to use for the overlaid image.
     * The asset must be represented in the form of:
     * `projects/{project}/locations/{location}/assets/{assetId}`.
     * The asset's resource type must be image.
     * 
* * * string asset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * * * @return The asset. */ public java.lang.String getAsset() { java.lang.Object ref = asset_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); asset_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Required. Asset to use for the overlaid image.
     * The asset must be represented in the form of:
     * `projects/{project}/locations/{location}/assets/{assetId}`.
     * The asset's resource type must be image.
     * 
* * * string asset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * * * @return The bytes for asset. */ public com.google.protobuf.ByteString getAssetBytes() { java.lang.Object ref = asset_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); asset_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Required. Asset to use for the overlaid image.
     * The asset must be represented in the form of:
     * `projects/{project}/locations/{location}/assets/{assetId}`.
     * The asset's resource type must be image.
     * 
* * * string asset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * * * @param value The asset to set. * @return This builder for chaining. */ public Builder setAsset(java.lang.String value) { if (value == null) { throw new NullPointerException(); } asset_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
     * Required. Asset to use for the overlaid image.
     * The asset must be represented in the form of:
     * `projects/{project}/locations/{location}/assets/{assetId}`.
     * The asset's resource type must be image.
     * 
* * * string asset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * * * @return This builder for chaining. */ public Builder clearAsset() { asset_ = getDefaultInstance().getAsset(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * * *
     * Required. Asset to use for the overlaid image.
     * The asset must be represented in the form of:
     * `projects/{project}/locations/{location}/assets/{assetId}`.
     * The asset's resource type must be image.
     * 
* * * string asset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * * * @param value The bytes for asset to set. * @return This builder for chaining. */ public Builder setAssetBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); asset_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } private com.google.cloud.video.livestream.v1.NormalizedResolution resolution_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.video.livestream.v1.NormalizedResolution, com.google.cloud.video.livestream.v1.NormalizedResolution.Builder, com.google.cloud.video.livestream.v1.NormalizedResolutionOrBuilder> resolutionBuilder_; /** * * *
     * Optional. Normalized image resolution, based on output video resolution.
     * Valid values are [0.0, 1.0]. To respect the original image aspect ratio,
     * set either `w` or `h` to 0. To use the original image resolution, set both
     * `w` and `h` to 0. The default is {0, 0}.
     * 
* * * .google.cloud.video.livestream.v1.NormalizedResolution resolution = 2 [(.google.api.field_behavior) = OPTIONAL]; * * * @return Whether the resolution field is set. */ public boolean hasResolution() { return ((bitField0_ & 0x00000002) != 0); } /** * * *
     * Optional. Normalized image resolution, based on output video resolution.
     * Valid values are [0.0, 1.0]. To respect the original image aspect ratio,
     * set either `w` or `h` to 0. To use the original image resolution, set both
     * `w` and `h` to 0. The default is {0, 0}.
     * 
* * * .google.cloud.video.livestream.v1.NormalizedResolution resolution = 2 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The resolution. */ public com.google.cloud.video.livestream.v1.NormalizedResolution getResolution() { if (resolutionBuilder_ == null) { return resolution_ == null ? com.google.cloud.video.livestream.v1.NormalizedResolution.getDefaultInstance() : resolution_; } else { return resolutionBuilder_.getMessage(); } } /** * * *
     * Optional. Normalized image resolution, based on output video resolution.
     * Valid values are [0.0, 1.0]. To respect the original image aspect ratio,
     * set either `w` or `h` to 0. To use the original image resolution, set both
     * `w` and `h` to 0. The default is {0, 0}.
     * 
* * * .google.cloud.video.livestream.v1.NormalizedResolution resolution = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder setResolution(com.google.cloud.video.livestream.v1.NormalizedResolution value) { if (resolutionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } resolution_ = value; } else { resolutionBuilder_.setMessage(value); } bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
     * Optional. Normalized image resolution, based on output video resolution.
     * Valid values are [0.0, 1.0]. To respect the original image aspect ratio,
     * set either `w` or `h` to 0. To use the original image resolution, set both
     * `w` and `h` to 0. The default is {0, 0}.
     * 
* * * .google.cloud.video.livestream.v1.NormalizedResolution resolution = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder setResolution( com.google.cloud.video.livestream.v1.NormalizedResolution.Builder builderForValue) { if (resolutionBuilder_ == null) { resolution_ = builderForValue.build(); } else { resolutionBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
     * Optional. Normalized image resolution, based on output video resolution.
     * Valid values are [0.0, 1.0]. To respect the original image aspect ratio,
     * set either `w` or `h` to 0. To use the original image resolution, set both
     * `w` and `h` to 0. The default is {0, 0}.
     * 
* * * .google.cloud.video.livestream.v1.NormalizedResolution resolution = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder mergeResolution( com.google.cloud.video.livestream.v1.NormalizedResolution value) { if (resolutionBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0) && resolution_ != null && resolution_ != com.google.cloud.video.livestream.v1.NormalizedResolution.getDefaultInstance()) { getResolutionBuilder().mergeFrom(value); } else { resolution_ = value; } } else { resolutionBuilder_.mergeFrom(value); } if (resolution_ != null) { bitField0_ |= 0x00000002; onChanged(); } return this; } /** * * *
     * Optional. Normalized image resolution, based on output video resolution.
     * Valid values are [0.0, 1.0]. To respect the original image aspect ratio,
     * set either `w` or `h` to 0. To use the original image resolution, set both
     * `w` and `h` to 0. The default is {0, 0}.
     * 
* * * .google.cloud.video.livestream.v1.NormalizedResolution resolution = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder clearResolution() { bitField0_ = (bitField0_ & ~0x00000002); resolution_ = null; if (resolutionBuilder_ != null) { resolutionBuilder_.dispose(); resolutionBuilder_ = null; } onChanged(); return this; } /** * * *
     * Optional. Normalized image resolution, based on output video resolution.
     * Valid values are [0.0, 1.0]. To respect the original image aspect ratio,
     * set either `w` or `h` to 0. To use the original image resolution, set both
     * `w` and `h` to 0. The default is {0, 0}.
     * 
* * * .google.cloud.video.livestream.v1.NormalizedResolution resolution = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.cloud.video.livestream.v1.NormalizedResolution.Builder getResolutionBuilder() { bitField0_ |= 0x00000002; onChanged(); return getResolutionFieldBuilder().getBuilder(); } /** * * *
     * Optional. Normalized image resolution, based on output video resolution.
     * Valid values are [0.0, 1.0]. To respect the original image aspect ratio,
     * set either `w` or `h` to 0. To use the original image resolution, set both
     * `w` and `h` to 0. The default is {0, 0}.
     * 
* * * .google.cloud.video.livestream.v1.NormalizedResolution resolution = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.cloud.video.livestream.v1.NormalizedResolutionOrBuilder getResolutionOrBuilder() { if (resolutionBuilder_ != null) { return resolutionBuilder_.getMessageOrBuilder(); } else { return resolution_ == null ? com.google.cloud.video.livestream.v1.NormalizedResolution.getDefaultInstance() : resolution_; } } /** * * *
     * Optional. Normalized image resolution, based on output video resolution.
     * Valid values are [0.0, 1.0]. To respect the original image aspect ratio,
     * set either `w` or `h` to 0. To use the original image resolution, set both
     * `w` and `h` to 0. The default is {0, 0}.
     * 
* * * .google.cloud.video.livestream.v1.NormalizedResolution resolution = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.video.livestream.v1.NormalizedResolution, com.google.cloud.video.livestream.v1.NormalizedResolution.Builder, com.google.cloud.video.livestream.v1.NormalizedResolutionOrBuilder> getResolutionFieldBuilder() { if (resolutionBuilder_ == null) { resolutionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.video.livestream.v1.NormalizedResolution, com.google.cloud.video.livestream.v1.NormalizedResolution.Builder, com.google.cloud.video.livestream.v1.NormalizedResolutionOrBuilder>( getResolution(), getParentForChildren(), isClean()); resolution_ = null; } return resolutionBuilder_; } private com.google.cloud.video.livestream.v1.NormalizedCoordinate position_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.video.livestream.v1.NormalizedCoordinate, com.google.cloud.video.livestream.v1.NormalizedCoordinate.Builder, com.google.cloud.video.livestream.v1.NormalizedCoordinateOrBuilder> positionBuilder_; /** * * *
     * Optional. Position of the image in terms of normalized coordinates of the
     * upper-left corner of the image, based on output video resolution. For
     * example, use the x and y coordinates {0, 0} to position the top-left corner
     * of the overlay animation in the top-left corner of the output video.
     * 
* * * .google.cloud.video.livestream.v1.NormalizedCoordinate position = 3 [(.google.api.field_behavior) = OPTIONAL]; * * * @return Whether the position field is set. */ public boolean hasPosition() { return ((bitField0_ & 0x00000004) != 0); } /** * * *
     * Optional. Position of the image in terms of normalized coordinates of the
     * upper-left corner of the image, based on output video resolution. For
     * example, use the x and y coordinates {0, 0} to position the top-left corner
     * of the overlay animation in the top-left corner of the output video.
     * 
* * * .google.cloud.video.livestream.v1.NormalizedCoordinate position = 3 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The position. */ public com.google.cloud.video.livestream.v1.NormalizedCoordinate getPosition() { if (positionBuilder_ == null) { return position_ == null ? com.google.cloud.video.livestream.v1.NormalizedCoordinate.getDefaultInstance() : position_; } else { return positionBuilder_.getMessage(); } } /** * * *
     * Optional. Position of the image in terms of normalized coordinates of the
     * upper-left corner of the image, based on output video resolution. For
     * example, use the x and y coordinates {0, 0} to position the top-left corner
     * of the overlay animation in the top-left corner of the output video.
     * 
* * * .google.cloud.video.livestream.v1.NormalizedCoordinate position = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder setPosition(com.google.cloud.video.livestream.v1.NormalizedCoordinate value) { if (positionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } position_ = value; } else { positionBuilder_.setMessage(value); } bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * Optional. Position of the image in terms of normalized coordinates of the
     * upper-left corner of the image, based on output video resolution. For
     * example, use the x and y coordinates {0, 0} to position the top-left corner
     * of the overlay animation in the top-left corner of the output video.
     * 
* * * .google.cloud.video.livestream.v1.NormalizedCoordinate position = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder setPosition( com.google.cloud.video.livestream.v1.NormalizedCoordinate.Builder builderForValue) { if (positionBuilder_ == null) { position_ = builderForValue.build(); } else { positionBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * Optional. Position of the image in terms of normalized coordinates of the
     * upper-left corner of the image, based on output video resolution. For
     * example, use the x and y coordinates {0, 0} to position the top-left corner
     * of the overlay animation in the top-left corner of the output video.
     * 
* * * .google.cloud.video.livestream.v1.NormalizedCoordinate position = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder mergePosition(com.google.cloud.video.livestream.v1.NormalizedCoordinate value) { if (positionBuilder_ == null) { if (((bitField0_ & 0x00000004) != 0) && position_ != null && position_ != com.google.cloud.video.livestream.v1.NormalizedCoordinate.getDefaultInstance()) { getPositionBuilder().mergeFrom(value); } else { position_ = value; } } else { positionBuilder_.mergeFrom(value); } if (position_ != null) { bitField0_ |= 0x00000004; onChanged(); } return this; } /** * * *
     * Optional. Position of the image in terms of normalized coordinates of the
     * upper-left corner of the image, based on output video resolution. For
     * example, use the x and y coordinates {0, 0} to position the top-left corner
     * of the overlay animation in the top-left corner of the output video.
     * 
* * * .google.cloud.video.livestream.v1.NormalizedCoordinate position = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder clearPosition() { bitField0_ = (bitField0_ & ~0x00000004); position_ = null; if (positionBuilder_ != null) { positionBuilder_.dispose(); positionBuilder_ = null; } onChanged(); return this; } /** * * *
     * Optional. Position of the image in terms of normalized coordinates of the
     * upper-left corner of the image, based on output video resolution. For
     * example, use the x and y coordinates {0, 0} to position the top-left corner
     * of the overlay animation in the top-left corner of the output video.
     * 
* * * .google.cloud.video.livestream.v1.NormalizedCoordinate position = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.cloud.video.livestream.v1.NormalizedCoordinate.Builder getPositionBuilder() { bitField0_ |= 0x00000004; onChanged(); return getPositionFieldBuilder().getBuilder(); } /** * * *
     * Optional. Position of the image in terms of normalized coordinates of the
     * upper-left corner of the image, based on output video resolution. For
     * example, use the x and y coordinates {0, 0} to position the top-left corner
     * of the overlay animation in the top-left corner of the output video.
     * 
* * * .google.cloud.video.livestream.v1.NormalizedCoordinate position = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.cloud.video.livestream.v1.NormalizedCoordinateOrBuilder getPositionOrBuilder() { if (positionBuilder_ != null) { return positionBuilder_.getMessageOrBuilder(); } else { return position_ == null ? com.google.cloud.video.livestream.v1.NormalizedCoordinate.getDefaultInstance() : position_; } } /** * * *
     * Optional. Position of the image in terms of normalized coordinates of the
     * upper-left corner of the image, based on output video resolution. For
     * example, use the x and y coordinates {0, 0} to position the top-left corner
     * of the overlay animation in the top-left corner of the output video.
     * 
* * * .google.cloud.video.livestream.v1.NormalizedCoordinate position = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.video.livestream.v1.NormalizedCoordinate, com.google.cloud.video.livestream.v1.NormalizedCoordinate.Builder, com.google.cloud.video.livestream.v1.NormalizedCoordinateOrBuilder> getPositionFieldBuilder() { if (positionBuilder_ == null) { positionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.video.livestream.v1.NormalizedCoordinate, com.google.cloud.video.livestream.v1.NormalizedCoordinate.Builder, com.google.cloud.video.livestream.v1.NormalizedCoordinateOrBuilder>( getPosition(), getParentForChildren(), isClean()); position_ = null; } return positionBuilder_; } private double opacity_; /** * * *
     * Optional. Target image opacity. Valid values are from `1.0` (solid,
     * default) to `0.0` (transparent), exclusive. Set this to a value greater
     * than `0.0`.
     * 
* * double opacity = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The opacity. */ @java.lang.Override public double getOpacity() { return opacity_; } /** * * *
     * Optional. Target image opacity. Valid values are from `1.0` (solid,
     * default) to `0.0` (transparent), exclusive. Set this to a value greater
     * than `0.0`.
     * 
* * double opacity = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The opacity to set. * @return This builder for chaining. */ public Builder setOpacity(double value) { opacity_ = value; bitField0_ |= 0x00000008; onChanged(); return this; } /** * * *
     * Optional. Target image opacity. Valid values are from `1.0` (solid,
     * default) to `0.0` (transparent), exclusive. Set this to a value greater
     * than `0.0`.
     * 
* * double opacity = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ public Builder clearOpacity() { bitField0_ = (bitField0_ & ~0x00000008); opacity_ = 0D; 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.StaticOverlay) } // @@protoc_insertion_point(class_scope:google.cloud.video.livestream.v1.StaticOverlay) private static final com.google.cloud.video.livestream.v1.StaticOverlay DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.video.livestream.v1.StaticOverlay(); } public static com.google.cloud.video.livestream.v1.StaticOverlay getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public StaticOverlay 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.StaticOverlay getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy