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

com.google.cloud.videointelligence.v1p1beta1.AnnotateVideoRequest Maven / Gradle / Ivy

There is a newer version: 0.143.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/videointelligence/v1p1beta1/video_intelligence.proto

// Protobuf Java Version: 3.25.5
package com.google.cloud.videointelligence.v1p1beta1;

/**
 *
 *
 * 
 * Video annotation request.
 * 
* * Protobuf type {@code google.cloud.videointelligence.v1p1beta1.AnnotateVideoRequest} */ public final class AnnotateVideoRequest extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.videointelligence.v1p1beta1.AnnotateVideoRequest) AnnotateVideoRequestOrBuilder { private static final long serialVersionUID = 0L; // Use AnnotateVideoRequest.newBuilder() to construct. private AnnotateVideoRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private AnnotateVideoRequest() { inputUri_ = ""; inputContent_ = com.google.protobuf.ByteString.EMPTY; features_ = java.util.Collections.emptyList(); outputUri_ = ""; locationId_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new AnnotateVideoRequest(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.videointelligence.v1p1beta1.VideoIntelligenceServiceProto .internal_static_google_cloud_videointelligence_v1p1beta1_AnnotateVideoRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.videointelligence.v1p1beta1.VideoIntelligenceServiceProto .internal_static_google_cloud_videointelligence_v1p1beta1_AnnotateVideoRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.videointelligence.v1p1beta1.AnnotateVideoRequest.class, com.google.cloud.videointelligence.v1p1beta1.AnnotateVideoRequest.Builder.class); } private int bitField0_; public static final int INPUT_URI_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object inputUri_ = ""; /** * * *
   * Input video location. Currently, only
   * [Google Cloud Storage](https://cloud.google.com/storage/) URIs are
   * supported, which must be specified in the following format:
   * `gs://bucket-id/object-id` (other URI formats return
   * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For
   * more information, see [Request
   * URIs](https://cloud.google.com/storage/docs/request-endpoints). A video URI
   * may include wildcards in `object-id`, and thus identify multiple videos.
   * Supported wildcards: '*' to match 0 or more characters;
   * '?' to match 1 character. If unset, the input video should be embedded
   * in the request as `input_content`. If set, `input_content` should be unset.
   * 
* * string input_uri = 1; * * @return The inputUri. */ @java.lang.Override public java.lang.String getInputUri() { java.lang.Object ref = inputUri_; 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(); inputUri_ = s; return s; } } /** * * *
   * Input video location. Currently, only
   * [Google Cloud Storage](https://cloud.google.com/storage/) URIs are
   * supported, which must be specified in the following format:
   * `gs://bucket-id/object-id` (other URI formats return
   * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For
   * more information, see [Request
   * URIs](https://cloud.google.com/storage/docs/request-endpoints). A video URI
   * may include wildcards in `object-id`, and thus identify multiple videos.
   * Supported wildcards: '*' to match 0 or more characters;
   * '?' to match 1 character. If unset, the input video should be embedded
   * in the request as `input_content`. If set, `input_content` should be unset.
   * 
* * string input_uri = 1; * * @return The bytes for inputUri. */ @java.lang.Override public com.google.protobuf.ByteString getInputUriBytes() { java.lang.Object ref = inputUri_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); inputUri_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int INPUT_CONTENT_FIELD_NUMBER = 6; private com.google.protobuf.ByteString inputContent_ = com.google.protobuf.ByteString.EMPTY; /** * * *
   * The video data bytes.
   * If unset, the input video(s) should be specified via `input_uri`.
   * If set, `input_uri` should be unset.
   * 
* * bytes input_content = 6; * * @return The inputContent. */ @java.lang.Override public com.google.protobuf.ByteString getInputContent() { return inputContent_; } public static final int FEATURES_FIELD_NUMBER = 2; @SuppressWarnings("serial") private java.util.List features_; private static final com.google.protobuf.Internal.ListAdapter.Converter< java.lang.Integer, com.google.cloud.videointelligence.v1p1beta1.Feature> features_converter_ = new com.google.protobuf.Internal.ListAdapter.Converter< java.lang.Integer, com.google.cloud.videointelligence.v1p1beta1.Feature>() { public com.google.cloud.videointelligence.v1p1beta1.Feature convert( java.lang.Integer from) { com.google.cloud.videointelligence.v1p1beta1.Feature result = com.google.cloud.videointelligence.v1p1beta1.Feature.forNumber(from); return result == null ? com.google.cloud.videointelligence.v1p1beta1.Feature.UNRECOGNIZED : result; } }; /** * * *
   * Required. Requested video annotation features.
   * 
* * * repeated .google.cloud.videointelligence.v1p1beta1.Feature features = 2 [(.google.api.field_behavior) = REQUIRED]; * * * @return A list containing the features. */ @java.lang.Override public java.util.List getFeaturesList() { return new com.google.protobuf.Internal.ListAdapter< java.lang.Integer, com.google.cloud.videointelligence.v1p1beta1.Feature>( features_, features_converter_); } /** * * *
   * Required. Requested video annotation features.
   * 
* * * repeated .google.cloud.videointelligence.v1p1beta1.Feature features = 2 [(.google.api.field_behavior) = REQUIRED]; * * * @return The count of features. */ @java.lang.Override public int getFeaturesCount() { return features_.size(); } /** * * *
   * Required. Requested video annotation features.
   * 
* * * repeated .google.cloud.videointelligence.v1p1beta1.Feature features = 2 [(.google.api.field_behavior) = REQUIRED]; * * * @param index The index of the element to return. * @return The features at the given index. */ @java.lang.Override public com.google.cloud.videointelligence.v1p1beta1.Feature getFeatures(int index) { return features_converter_.convert(features_.get(index)); } /** * * *
   * Required. Requested video annotation features.
   * 
* * * repeated .google.cloud.videointelligence.v1p1beta1.Feature features = 2 [(.google.api.field_behavior) = REQUIRED]; * * * @return A list containing the enum numeric values on the wire for features. */ @java.lang.Override public java.util.List getFeaturesValueList() { return features_; } /** * * *
   * Required. Requested video annotation features.
   * 
* * * repeated .google.cloud.videointelligence.v1p1beta1.Feature features = 2 [(.google.api.field_behavior) = REQUIRED]; * * * @param index The index of the value to return. * @return The enum numeric value on the wire of features at the given index. */ @java.lang.Override public int getFeaturesValue(int index) { return features_.get(index); } private int featuresMemoizedSerializedSize; public static final int VIDEO_CONTEXT_FIELD_NUMBER = 3; private com.google.cloud.videointelligence.v1p1beta1.VideoContext videoContext_; /** * * *
   * Additional video context and/or feature-specific parameters.
   * 
* * .google.cloud.videointelligence.v1p1beta1.VideoContext video_context = 3; * * @return Whether the videoContext field is set. */ @java.lang.Override public boolean hasVideoContext() { return ((bitField0_ & 0x00000001) != 0); } /** * * *
   * Additional video context and/or feature-specific parameters.
   * 
* * .google.cloud.videointelligence.v1p1beta1.VideoContext video_context = 3; * * @return The videoContext. */ @java.lang.Override public com.google.cloud.videointelligence.v1p1beta1.VideoContext getVideoContext() { return videoContext_ == null ? com.google.cloud.videointelligence.v1p1beta1.VideoContext.getDefaultInstance() : videoContext_; } /** * * *
   * Additional video context and/or feature-specific parameters.
   * 
* * .google.cloud.videointelligence.v1p1beta1.VideoContext video_context = 3; */ @java.lang.Override public com.google.cloud.videointelligence.v1p1beta1.VideoContextOrBuilder getVideoContextOrBuilder() { return videoContext_ == null ? com.google.cloud.videointelligence.v1p1beta1.VideoContext.getDefaultInstance() : videoContext_; } public static final int OUTPUT_URI_FIELD_NUMBER = 4; @SuppressWarnings("serial") private volatile java.lang.Object outputUri_ = ""; /** * * *
   * Optional. Location where the output (in JSON format) should be stored.
   * Currently, only [Google Cloud Storage](https://cloud.google.com/storage/)
   * URIs are supported, which must be specified in the following format:
   * `gs://bucket-id/object-id` (other URI formats return
   * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For
   * more information, see [Request
   * URIs](https://cloud.google.com/storage/docs/request-endpoints).
   * 
* * string output_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The outputUri. */ @java.lang.Override public java.lang.String getOutputUri() { java.lang.Object ref = outputUri_; 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(); outputUri_ = s; return s; } } /** * * *
   * Optional. Location where the output (in JSON format) should be stored.
   * Currently, only [Google Cloud Storage](https://cloud.google.com/storage/)
   * URIs are supported, which must be specified in the following format:
   * `gs://bucket-id/object-id` (other URI formats return
   * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For
   * more information, see [Request
   * URIs](https://cloud.google.com/storage/docs/request-endpoints).
   * 
* * string output_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for outputUri. */ @java.lang.Override public com.google.protobuf.ByteString getOutputUriBytes() { java.lang.Object ref = outputUri_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); outputUri_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int LOCATION_ID_FIELD_NUMBER = 5; @SuppressWarnings("serial") private volatile java.lang.Object locationId_ = ""; /** * * *
   * Optional. Cloud region where annotation should take place. Supported cloud
   * regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region
   * is specified, a region will be determined based on video file location.
   * 
* * string location_id = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The locationId. */ @java.lang.Override public java.lang.String getLocationId() { java.lang.Object ref = locationId_; 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(); locationId_ = s; return s; } } /** * * *
   * Optional. Cloud region where annotation should take place. Supported cloud
   * regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region
   * is specified, a region will be determined based on video file location.
   * 
* * string location_id = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for locationId. */ @java.lang.Override public com.google.protobuf.ByteString getLocationIdBytes() { java.lang.Object ref = locationId_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); locationId_ = 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 { getSerializedSize(); if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(inputUri_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, inputUri_); } if (getFeaturesList().size() > 0) { output.writeUInt32NoTag(18); output.writeUInt32NoTag(featuresMemoizedSerializedSize); } for (int i = 0; i < features_.size(); i++) { output.writeEnumNoTag(features_.get(i)); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(3, getVideoContext()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(outputUri_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, outputUri_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, locationId_); } if (!inputContent_.isEmpty()) { output.writeBytes(6, inputContent_); } 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(inputUri_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, inputUri_); } { int dataSize = 0; for (int i = 0; i < features_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(features_.get(i)); } size += dataSize; if (!getFeaturesList().isEmpty()) { size += 1; size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); } featuresMemoizedSerializedSize = dataSize; } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getVideoContext()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(outputUri_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, outputUri_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, locationId_); } if (!inputContent_.isEmpty()) { size += com.google.protobuf.CodedOutputStream.computeBytesSize(6, inputContent_); } 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.videointelligence.v1p1beta1.AnnotateVideoRequest)) { return super.equals(obj); } com.google.cloud.videointelligence.v1p1beta1.AnnotateVideoRequest other = (com.google.cloud.videointelligence.v1p1beta1.AnnotateVideoRequest) obj; if (!getInputUri().equals(other.getInputUri())) return false; if (!getInputContent().equals(other.getInputContent())) return false; if (!features_.equals(other.features_)) return false; if (hasVideoContext() != other.hasVideoContext()) return false; if (hasVideoContext()) { if (!getVideoContext().equals(other.getVideoContext())) return false; } if (!getOutputUri().equals(other.getOutputUri())) return false; if (!getLocationId().equals(other.getLocationId())) 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) + INPUT_URI_FIELD_NUMBER; hash = (53 * hash) + getInputUri().hashCode(); hash = (37 * hash) + INPUT_CONTENT_FIELD_NUMBER; hash = (53 * hash) + getInputContent().hashCode(); if (getFeaturesCount() > 0) { hash = (37 * hash) + FEATURES_FIELD_NUMBER; hash = (53 * hash) + features_.hashCode(); } if (hasVideoContext()) { hash = (37 * hash) + VIDEO_CONTEXT_FIELD_NUMBER; hash = (53 * hash) + getVideoContext().hashCode(); } hash = (37 * hash) + OUTPUT_URI_FIELD_NUMBER; hash = (53 * hash) + getOutputUri().hashCode(); hash = (37 * hash) + LOCATION_ID_FIELD_NUMBER; hash = (53 * hash) + getLocationId().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.videointelligence.v1p1beta1.AnnotateVideoRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.videointelligence.v1p1beta1.AnnotateVideoRequest 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.videointelligence.v1p1beta1.AnnotateVideoRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.videointelligence.v1p1beta1.AnnotateVideoRequest 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.videointelligence.v1p1beta1.AnnotateVideoRequest parseFrom( byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.videointelligence.v1p1beta1.AnnotateVideoRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.videointelligence.v1p1beta1.AnnotateVideoRequest parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.videointelligence.v1p1beta1.AnnotateVideoRequest 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.videointelligence.v1p1beta1.AnnotateVideoRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.videointelligence.v1p1beta1.AnnotateVideoRequest 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.videointelligence.v1p1beta1.AnnotateVideoRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.videointelligence.v1p1beta1.AnnotateVideoRequest 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.videointelligence.v1p1beta1.AnnotateVideoRequest 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; } /** * * *
   * Video annotation request.
   * 
* * Protobuf type {@code google.cloud.videointelligence.v1p1beta1.AnnotateVideoRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.videointelligence.v1p1beta1.AnnotateVideoRequest) com.google.cloud.videointelligence.v1p1beta1.AnnotateVideoRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.videointelligence.v1p1beta1.VideoIntelligenceServiceProto .internal_static_google_cloud_videointelligence_v1p1beta1_AnnotateVideoRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.videointelligence.v1p1beta1.VideoIntelligenceServiceProto .internal_static_google_cloud_videointelligence_v1p1beta1_AnnotateVideoRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.videointelligence.v1p1beta1.AnnotateVideoRequest.class, com.google.cloud.videointelligence.v1p1beta1.AnnotateVideoRequest.Builder.class); } // Construct using // com.google.cloud.videointelligence.v1p1beta1.AnnotateVideoRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getVideoContextFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; inputUri_ = ""; inputContent_ = com.google.protobuf.ByteString.EMPTY; features_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000004); videoContext_ = null; if (videoContextBuilder_ != null) { videoContextBuilder_.dispose(); videoContextBuilder_ = null; } outputUri_ = ""; locationId_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.videointelligence.v1p1beta1.VideoIntelligenceServiceProto .internal_static_google_cloud_videointelligence_v1p1beta1_AnnotateVideoRequest_descriptor; } @java.lang.Override public com.google.cloud.videointelligence.v1p1beta1.AnnotateVideoRequest getDefaultInstanceForType() { return com.google.cloud.videointelligence.v1p1beta1.AnnotateVideoRequest.getDefaultInstance(); } @java.lang.Override public com.google.cloud.videointelligence.v1p1beta1.AnnotateVideoRequest build() { com.google.cloud.videointelligence.v1p1beta1.AnnotateVideoRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.videointelligence.v1p1beta1.AnnotateVideoRequest buildPartial() { com.google.cloud.videointelligence.v1p1beta1.AnnotateVideoRequest result = new com.google.cloud.videointelligence.v1p1beta1.AnnotateVideoRequest(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartialRepeatedFields( com.google.cloud.videointelligence.v1p1beta1.AnnotateVideoRequest result) { if (((bitField0_ & 0x00000004) != 0)) { features_ = java.util.Collections.unmodifiableList(features_); bitField0_ = (bitField0_ & ~0x00000004); } result.features_ = features_; } private void buildPartial0( com.google.cloud.videointelligence.v1p1beta1.AnnotateVideoRequest result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.inputUri_ = inputUri_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.inputContent_ = inputContent_; } int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000008) != 0)) { result.videoContext_ = videoContextBuilder_ == null ? videoContext_ : videoContextBuilder_.build(); to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000010) != 0)) { result.outputUri_ = outputUri_; } if (((from_bitField0_ & 0x00000020) != 0)) { result.locationId_ = locationId_; } 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.videointelligence.v1p1beta1.AnnotateVideoRequest) { return mergeFrom((com.google.cloud.videointelligence.v1p1beta1.AnnotateVideoRequest) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom( com.google.cloud.videointelligence.v1p1beta1.AnnotateVideoRequest other) { if (other == com.google.cloud.videointelligence.v1p1beta1.AnnotateVideoRequest.getDefaultInstance()) return this; if (!other.getInputUri().isEmpty()) { inputUri_ = other.inputUri_; bitField0_ |= 0x00000001; onChanged(); } if (other.getInputContent() != com.google.protobuf.ByteString.EMPTY) { setInputContent(other.getInputContent()); } if (!other.features_.isEmpty()) { if (features_.isEmpty()) { features_ = other.features_; bitField0_ = (bitField0_ & ~0x00000004); } else { ensureFeaturesIsMutable(); features_.addAll(other.features_); } onChanged(); } if (other.hasVideoContext()) { mergeVideoContext(other.getVideoContext()); } if (!other.getOutputUri().isEmpty()) { outputUri_ = other.outputUri_; bitField0_ |= 0x00000010; onChanged(); } if (!other.getLocationId().isEmpty()) { locationId_ = other.locationId_; bitField0_ |= 0x00000020; 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: { inputUri_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 16: { int tmpRaw = input.readEnum(); ensureFeaturesIsMutable(); features_.add(tmpRaw); break; } // case 16 case 18: { int length = input.readRawVarint32(); int oldLimit = input.pushLimit(length); while (input.getBytesUntilLimit() > 0) { int tmpRaw = input.readEnum(); ensureFeaturesIsMutable(); features_.add(tmpRaw); } input.popLimit(oldLimit); break; } // case 18 case 26: { input.readMessage(getVideoContextFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 26 case 34: { outputUri_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000010; break; } // case 34 case 42: { locationId_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000020; break; } // case 42 case 50: { inputContent_ = input.readBytes(); bitField0_ |= 0x00000002; 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 inputUri_ = ""; /** * * *
     * Input video location. Currently, only
     * [Google Cloud Storage](https://cloud.google.com/storage/) URIs are
     * supported, which must be specified in the following format:
     * `gs://bucket-id/object-id` (other URI formats return
     * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For
     * more information, see [Request
     * URIs](https://cloud.google.com/storage/docs/request-endpoints). A video URI
     * may include wildcards in `object-id`, and thus identify multiple videos.
     * Supported wildcards: '*' to match 0 or more characters;
     * '?' to match 1 character. If unset, the input video should be embedded
     * in the request as `input_content`. If set, `input_content` should be unset.
     * 
* * string input_uri = 1; * * @return The inputUri. */ public java.lang.String getInputUri() { java.lang.Object ref = inputUri_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); inputUri_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Input video location. Currently, only
     * [Google Cloud Storage](https://cloud.google.com/storage/) URIs are
     * supported, which must be specified in the following format:
     * `gs://bucket-id/object-id` (other URI formats return
     * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For
     * more information, see [Request
     * URIs](https://cloud.google.com/storage/docs/request-endpoints). A video URI
     * may include wildcards in `object-id`, and thus identify multiple videos.
     * Supported wildcards: '*' to match 0 or more characters;
     * '?' to match 1 character. If unset, the input video should be embedded
     * in the request as `input_content`. If set, `input_content` should be unset.
     * 
* * string input_uri = 1; * * @return The bytes for inputUri. */ public com.google.protobuf.ByteString getInputUriBytes() { java.lang.Object ref = inputUri_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); inputUri_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Input video location. Currently, only
     * [Google Cloud Storage](https://cloud.google.com/storage/) URIs are
     * supported, which must be specified in the following format:
     * `gs://bucket-id/object-id` (other URI formats return
     * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For
     * more information, see [Request
     * URIs](https://cloud.google.com/storage/docs/request-endpoints). A video URI
     * may include wildcards in `object-id`, and thus identify multiple videos.
     * Supported wildcards: '*' to match 0 or more characters;
     * '?' to match 1 character. If unset, the input video should be embedded
     * in the request as `input_content`. If set, `input_content` should be unset.
     * 
* * string input_uri = 1; * * @param value The inputUri to set. * @return This builder for chaining. */ public Builder setInputUri(java.lang.String value) { if (value == null) { throw new NullPointerException(); } inputUri_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
     * Input video location. Currently, only
     * [Google Cloud Storage](https://cloud.google.com/storage/) URIs are
     * supported, which must be specified in the following format:
     * `gs://bucket-id/object-id` (other URI formats return
     * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For
     * more information, see [Request
     * URIs](https://cloud.google.com/storage/docs/request-endpoints). A video URI
     * may include wildcards in `object-id`, and thus identify multiple videos.
     * Supported wildcards: '*' to match 0 or more characters;
     * '?' to match 1 character. If unset, the input video should be embedded
     * in the request as `input_content`. If set, `input_content` should be unset.
     * 
* * string input_uri = 1; * * @return This builder for chaining. */ public Builder clearInputUri() { inputUri_ = getDefaultInstance().getInputUri(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * * *
     * Input video location. Currently, only
     * [Google Cloud Storage](https://cloud.google.com/storage/) URIs are
     * supported, which must be specified in the following format:
     * `gs://bucket-id/object-id` (other URI formats return
     * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For
     * more information, see [Request
     * URIs](https://cloud.google.com/storage/docs/request-endpoints). A video URI
     * may include wildcards in `object-id`, and thus identify multiple videos.
     * Supported wildcards: '*' to match 0 or more characters;
     * '?' to match 1 character. If unset, the input video should be embedded
     * in the request as `input_content`. If set, `input_content` should be unset.
     * 
* * string input_uri = 1; * * @param value The bytes for inputUri to set. * @return This builder for chaining. */ public Builder setInputUriBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); inputUri_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } private com.google.protobuf.ByteString inputContent_ = com.google.protobuf.ByteString.EMPTY; /** * * *
     * The video data bytes.
     * If unset, the input video(s) should be specified via `input_uri`.
     * If set, `input_uri` should be unset.
     * 
* * bytes input_content = 6; * * @return The inputContent. */ @java.lang.Override public com.google.protobuf.ByteString getInputContent() { return inputContent_; } /** * * *
     * The video data bytes.
     * If unset, the input video(s) should be specified via `input_uri`.
     * If set, `input_uri` should be unset.
     * 
* * bytes input_content = 6; * * @param value The inputContent to set. * @return This builder for chaining. */ public Builder setInputContent(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } inputContent_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
     * The video data bytes.
     * If unset, the input video(s) should be specified via `input_uri`.
     * If set, `input_uri` should be unset.
     * 
* * bytes input_content = 6; * * @return This builder for chaining. */ public Builder clearInputContent() { bitField0_ = (bitField0_ & ~0x00000002); inputContent_ = getDefaultInstance().getInputContent(); onChanged(); return this; } private java.util.List features_ = java.util.Collections.emptyList(); private void ensureFeaturesIsMutable() { if (!((bitField0_ & 0x00000004) != 0)) { features_ = new java.util.ArrayList(features_); bitField0_ |= 0x00000004; } } /** * * *
     * Required. Requested video annotation features.
     * 
* * * repeated .google.cloud.videointelligence.v1p1beta1.Feature features = 2 [(.google.api.field_behavior) = REQUIRED]; * * * @return A list containing the features. */ public java.util.List getFeaturesList() { return new com.google.protobuf.Internal.ListAdapter< java.lang.Integer, com.google.cloud.videointelligence.v1p1beta1.Feature>( features_, features_converter_); } /** * * *
     * Required. Requested video annotation features.
     * 
* * * repeated .google.cloud.videointelligence.v1p1beta1.Feature features = 2 [(.google.api.field_behavior) = REQUIRED]; * * * @return The count of features. */ public int getFeaturesCount() { return features_.size(); } /** * * *
     * Required. Requested video annotation features.
     * 
* * * repeated .google.cloud.videointelligence.v1p1beta1.Feature features = 2 [(.google.api.field_behavior) = REQUIRED]; * * * @param index The index of the element to return. * @return The features at the given index. */ public com.google.cloud.videointelligence.v1p1beta1.Feature getFeatures(int index) { return features_converter_.convert(features_.get(index)); } /** * * *
     * Required. Requested video annotation features.
     * 
* * * repeated .google.cloud.videointelligence.v1p1beta1.Feature features = 2 [(.google.api.field_behavior) = REQUIRED]; * * * @param index The index to set the value at. * @param value The features to set. * @return This builder for chaining. */ public Builder setFeatures( int index, com.google.cloud.videointelligence.v1p1beta1.Feature value) { if (value == null) { throw new NullPointerException(); } ensureFeaturesIsMutable(); features_.set(index, value.getNumber()); onChanged(); return this; } /** * * *
     * Required. Requested video annotation features.
     * 
* * * repeated .google.cloud.videointelligence.v1p1beta1.Feature features = 2 [(.google.api.field_behavior) = REQUIRED]; * * * @param value The features to add. * @return This builder for chaining. */ public Builder addFeatures(com.google.cloud.videointelligence.v1p1beta1.Feature value) { if (value == null) { throw new NullPointerException(); } ensureFeaturesIsMutable(); features_.add(value.getNumber()); onChanged(); return this; } /** * * *
     * Required. Requested video annotation features.
     * 
* * * repeated .google.cloud.videointelligence.v1p1beta1.Feature features = 2 [(.google.api.field_behavior) = REQUIRED]; * * * @param values The features to add. * @return This builder for chaining. */ public Builder addAllFeatures( java.lang.Iterable values) { ensureFeaturesIsMutable(); for (com.google.cloud.videointelligence.v1p1beta1.Feature value : values) { features_.add(value.getNumber()); } onChanged(); return this; } /** * * *
     * Required. Requested video annotation features.
     * 
* * * repeated .google.cloud.videointelligence.v1p1beta1.Feature features = 2 [(.google.api.field_behavior) = REQUIRED]; * * * @return This builder for chaining. */ public Builder clearFeatures() { features_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } /** * * *
     * Required. Requested video annotation features.
     * 
* * * repeated .google.cloud.videointelligence.v1p1beta1.Feature features = 2 [(.google.api.field_behavior) = REQUIRED]; * * * @return A list containing the enum numeric values on the wire for features. */ public java.util.List getFeaturesValueList() { return java.util.Collections.unmodifiableList(features_); } /** * * *
     * Required. Requested video annotation features.
     * 
* * * repeated .google.cloud.videointelligence.v1p1beta1.Feature features = 2 [(.google.api.field_behavior) = REQUIRED]; * * * @param index The index of the value to return. * @return The enum numeric value on the wire of features at the given index. */ public int getFeaturesValue(int index) { return features_.get(index); } /** * * *
     * Required. Requested video annotation features.
     * 
* * * repeated .google.cloud.videointelligence.v1p1beta1.Feature features = 2 [(.google.api.field_behavior) = REQUIRED]; * * * @param index The index to set the value at. * @param value The enum numeric value on the wire for features to set. * @return This builder for chaining. */ public Builder setFeaturesValue(int index, int value) { ensureFeaturesIsMutable(); features_.set(index, value); onChanged(); return this; } /** * * *
     * Required. Requested video annotation features.
     * 
* * * repeated .google.cloud.videointelligence.v1p1beta1.Feature features = 2 [(.google.api.field_behavior) = REQUIRED]; * * * @param value The enum numeric value on the wire for features to add. * @return This builder for chaining. */ public Builder addFeaturesValue(int value) { ensureFeaturesIsMutable(); features_.add(value); onChanged(); return this; } /** * * *
     * Required. Requested video annotation features.
     * 
* * * repeated .google.cloud.videointelligence.v1p1beta1.Feature features = 2 [(.google.api.field_behavior) = REQUIRED]; * * * @param values The enum numeric values on the wire for features to add. * @return This builder for chaining. */ public Builder addAllFeaturesValue(java.lang.Iterable values) { ensureFeaturesIsMutable(); for (int value : values) { features_.add(value); } onChanged(); return this; } private com.google.cloud.videointelligence.v1p1beta1.VideoContext videoContext_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.videointelligence.v1p1beta1.VideoContext, com.google.cloud.videointelligence.v1p1beta1.VideoContext.Builder, com.google.cloud.videointelligence.v1p1beta1.VideoContextOrBuilder> videoContextBuilder_; /** * * *
     * Additional video context and/or feature-specific parameters.
     * 
* * .google.cloud.videointelligence.v1p1beta1.VideoContext video_context = 3; * * @return Whether the videoContext field is set. */ public boolean hasVideoContext() { return ((bitField0_ & 0x00000008) != 0); } /** * * *
     * Additional video context and/or feature-specific parameters.
     * 
* * .google.cloud.videointelligence.v1p1beta1.VideoContext video_context = 3; * * @return The videoContext. */ public com.google.cloud.videointelligence.v1p1beta1.VideoContext getVideoContext() { if (videoContextBuilder_ == null) { return videoContext_ == null ? com.google.cloud.videointelligence.v1p1beta1.VideoContext.getDefaultInstance() : videoContext_; } else { return videoContextBuilder_.getMessage(); } } /** * * *
     * Additional video context and/or feature-specific parameters.
     * 
* * .google.cloud.videointelligence.v1p1beta1.VideoContext video_context = 3; */ public Builder setVideoContext( com.google.cloud.videointelligence.v1p1beta1.VideoContext value) { if (videoContextBuilder_ == null) { if (value == null) { throw new NullPointerException(); } videoContext_ = value; } else { videoContextBuilder_.setMessage(value); } bitField0_ |= 0x00000008; onChanged(); return this; } /** * * *
     * Additional video context and/or feature-specific parameters.
     * 
* * .google.cloud.videointelligence.v1p1beta1.VideoContext video_context = 3; */ public Builder setVideoContext( com.google.cloud.videointelligence.v1p1beta1.VideoContext.Builder builderForValue) { if (videoContextBuilder_ == null) { videoContext_ = builderForValue.build(); } else { videoContextBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000008; onChanged(); return this; } /** * * *
     * Additional video context and/or feature-specific parameters.
     * 
* * .google.cloud.videointelligence.v1p1beta1.VideoContext video_context = 3; */ public Builder mergeVideoContext( com.google.cloud.videointelligence.v1p1beta1.VideoContext value) { if (videoContextBuilder_ == null) { if (((bitField0_ & 0x00000008) != 0) && videoContext_ != null && videoContext_ != com.google.cloud.videointelligence.v1p1beta1.VideoContext.getDefaultInstance()) { getVideoContextBuilder().mergeFrom(value); } else { videoContext_ = value; } } else { videoContextBuilder_.mergeFrom(value); } if (videoContext_ != null) { bitField0_ |= 0x00000008; onChanged(); } return this; } /** * * *
     * Additional video context and/or feature-specific parameters.
     * 
* * .google.cloud.videointelligence.v1p1beta1.VideoContext video_context = 3; */ public Builder clearVideoContext() { bitField0_ = (bitField0_ & ~0x00000008); videoContext_ = null; if (videoContextBuilder_ != null) { videoContextBuilder_.dispose(); videoContextBuilder_ = null; } onChanged(); return this; } /** * * *
     * Additional video context and/or feature-specific parameters.
     * 
* * .google.cloud.videointelligence.v1p1beta1.VideoContext video_context = 3; */ public com.google.cloud.videointelligence.v1p1beta1.VideoContext.Builder getVideoContextBuilder() { bitField0_ |= 0x00000008; onChanged(); return getVideoContextFieldBuilder().getBuilder(); } /** * * *
     * Additional video context and/or feature-specific parameters.
     * 
* * .google.cloud.videointelligence.v1p1beta1.VideoContext video_context = 3; */ public com.google.cloud.videointelligence.v1p1beta1.VideoContextOrBuilder getVideoContextOrBuilder() { if (videoContextBuilder_ != null) { return videoContextBuilder_.getMessageOrBuilder(); } else { return videoContext_ == null ? com.google.cloud.videointelligence.v1p1beta1.VideoContext.getDefaultInstance() : videoContext_; } } /** * * *
     * Additional video context and/or feature-specific parameters.
     * 
* * .google.cloud.videointelligence.v1p1beta1.VideoContext video_context = 3; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.videointelligence.v1p1beta1.VideoContext, com.google.cloud.videointelligence.v1p1beta1.VideoContext.Builder, com.google.cloud.videointelligence.v1p1beta1.VideoContextOrBuilder> getVideoContextFieldBuilder() { if (videoContextBuilder_ == null) { videoContextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.videointelligence.v1p1beta1.VideoContext, com.google.cloud.videointelligence.v1p1beta1.VideoContext.Builder, com.google.cloud.videointelligence.v1p1beta1.VideoContextOrBuilder>( getVideoContext(), getParentForChildren(), isClean()); videoContext_ = null; } return videoContextBuilder_; } private java.lang.Object outputUri_ = ""; /** * * *
     * Optional. Location where the output (in JSON format) should be stored.
     * Currently, only [Google Cloud Storage](https://cloud.google.com/storage/)
     * URIs are supported, which must be specified in the following format:
     * `gs://bucket-id/object-id` (other URI formats return
     * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For
     * more information, see [Request
     * URIs](https://cloud.google.com/storage/docs/request-endpoints).
     * 
* * string output_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The outputUri. */ public java.lang.String getOutputUri() { java.lang.Object ref = outputUri_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); outputUri_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Optional. Location where the output (in JSON format) should be stored.
     * Currently, only [Google Cloud Storage](https://cloud.google.com/storage/)
     * URIs are supported, which must be specified in the following format:
     * `gs://bucket-id/object-id` (other URI formats return
     * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For
     * more information, see [Request
     * URIs](https://cloud.google.com/storage/docs/request-endpoints).
     * 
* * string output_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for outputUri. */ public com.google.protobuf.ByteString getOutputUriBytes() { java.lang.Object ref = outputUri_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); outputUri_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Optional. Location where the output (in JSON format) should be stored.
     * Currently, only [Google Cloud Storage](https://cloud.google.com/storage/)
     * URIs are supported, which must be specified in the following format:
     * `gs://bucket-id/object-id` (other URI formats return
     * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For
     * more information, see [Request
     * URIs](https://cloud.google.com/storage/docs/request-endpoints).
     * 
* * string output_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The outputUri to set. * @return This builder for chaining. */ public Builder setOutputUri(java.lang.String value) { if (value == null) { throw new NullPointerException(); } outputUri_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } /** * * *
     * Optional. Location where the output (in JSON format) should be stored.
     * Currently, only [Google Cloud Storage](https://cloud.google.com/storage/)
     * URIs are supported, which must be specified in the following format:
     * `gs://bucket-id/object-id` (other URI formats return
     * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For
     * more information, see [Request
     * URIs](https://cloud.google.com/storage/docs/request-endpoints).
     * 
* * string output_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ public Builder clearOutputUri() { outputUri_ = getDefaultInstance().getOutputUri(); bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; } /** * * *
     * Optional. Location where the output (in JSON format) should be stored.
     * Currently, only [Google Cloud Storage](https://cloud.google.com/storage/)
     * URIs are supported, which must be specified in the following format:
     * `gs://bucket-id/object-id` (other URI formats return
     * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For
     * more information, see [Request
     * URIs](https://cloud.google.com/storage/docs/request-endpoints).
     * 
* * string output_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for outputUri to set. * @return This builder for chaining. */ public Builder setOutputUriBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); outputUri_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } private java.lang.Object locationId_ = ""; /** * * *
     * Optional. Cloud region where annotation should take place. Supported cloud
     * regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region
     * is specified, a region will be determined based on video file location.
     * 
* * string location_id = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The locationId. */ public java.lang.String getLocationId() { java.lang.Object ref = locationId_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); locationId_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Optional. Cloud region where annotation should take place. Supported cloud
     * regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region
     * is specified, a region will be determined based on video file location.
     * 
* * string location_id = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for locationId. */ public com.google.protobuf.ByteString getLocationIdBytes() { java.lang.Object ref = locationId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); locationId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Optional. Cloud region where annotation should take place. Supported cloud
     * regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region
     * is specified, a region will be determined based on video file location.
     * 
* * string location_id = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The locationId to set. * @return This builder for chaining. */ public Builder setLocationId(java.lang.String value) { if (value == null) { throw new NullPointerException(); } locationId_ = value; bitField0_ |= 0x00000020; onChanged(); return this; } /** * * *
     * Optional. Cloud region where annotation should take place. Supported cloud
     * regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region
     * is specified, a region will be determined based on video file location.
     * 
* * string location_id = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ public Builder clearLocationId() { locationId_ = getDefaultInstance().getLocationId(); bitField0_ = (bitField0_ & ~0x00000020); onChanged(); return this; } /** * * *
     * Optional. Cloud region where annotation should take place. Supported cloud
     * regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region
     * is specified, a region will be determined based on video file location.
     * 
* * string location_id = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for locationId to set. * @return This builder for chaining. */ public Builder setLocationIdBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); locationId_ = value; bitField0_ |= 0x00000020; 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.videointelligence.v1p1beta1.AnnotateVideoRequest) } // @@protoc_insertion_point(class_scope:google.cloud.videointelligence.v1p1beta1.AnnotateVideoRequest) private static final com.google.cloud.videointelligence.v1p1beta1.AnnotateVideoRequest DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.videointelligence.v1p1beta1.AnnotateVideoRequest(); } public static com.google.cloud.videointelligence.v1p1beta1.AnnotateVideoRequest getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public AnnotateVideoRequest 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.videointelligence.v1p1beta1.AnnotateVideoRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy