/** * * * <pre> * Video segments to annotate. The segments may overlap and are not required * to be contiguous or span the whole video. If unspecified, each video * is treated as a single segment. * </pre> * * <code>repeated .google.cloud.videointelligence.v1beta1.VideoSegment segments = 1;</code> */ public Builder clearSegments() { if (segmentsBuilder_ == null) { segments_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { segmentsBuilder_.clear(); } return this; } /**
/** * * * <pre> * Video segments to annotate. The segments may overlap and are not required * to be contiguous or span the whole video. If unspecified, each video * is treated as a single segment. * </pre> * * <code>repeated .google.cloud.videointelligence.v1beta1.VideoSegment segments = 1;</code> */ public Builder addSegments(com.google.cloud.videointelligence.v1beta1.VideoSegment value) { if (segmentsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureSegmentsIsMutable(); segments_.add(value); onChanged(); } else { segmentsBuilder_.addMessage(value); } return this; } /**
/** * * * <pre> * Model to use for shot change detection. * Supported values: "latest" and "stable" (the default). * </pre> * * <code>string shot_change_detection_model = 6;</code> */ public Builder setShotChangeDetectionModelBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); shotChangeDetectionModel_ = value; onChanged(); return this; }
/** * * * <pre> * If label detection has been requested, what labels should be detected * in addition to video-level labels or segment-level labels. If unspecified, * defaults to `SHOT_MODE`. * </pre> * * <code>.google.cloud.videointelligence.v1beta1.LabelDetectionMode label_detection_mode = 2; * </code> */ public Builder setLabelDetectionMode( com.google.cloud.videointelligence.v1beta1.LabelDetectionMode value) { if (value == null) { throw new NullPointerException(); } labelDetectionMode_ = value.getNumber(); onChanged(); return this; } /**
/** * * * <pre> * Model to use for safe search detection. * Supported values: "latest" and "stable" (the default). * </pre> * * <code>string safe_search_detection_model = 7;</code> */ public Builder setSafeSearchDetectionModelBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); safeSearchDetectionModel_ = value; onChanged(); return this; }
/** * * * <pre> * Model to use for shot change detection. * Supported values: "latest" and "stable" (the default). * </pre> * * <code>string shot_change_detection_model = 6;</code> */ public Builder setShotChangeDetectionModel(java.lang.String value) { if (value == null) { throw new NullPointerException(); } shotChangeDetectionModel_ = value; onChanged(); return this; } /**
/** * * * <pre> * Model to use for face detection. * Supported values: "latest" and "stable" (the default). * </pre> * * <code>string face_detection_model = 5;</code> */ public Builder setFaceDetectionModel(java.lang.String value) { if (value == null) { throw new NullPointerException(); } faceDetectionModel_ = value; onChanged(); return this; } /**
/** * * * <pre> * Video segments to annotate. The segments may overlap and are not required * to be contiguous or span the whole video. If unspecified, each video * is treated as a single segment. * </pre> * * <code>repeated .google.cloud.videointelligence.v1beta1.VideoSegment segments = 1;</code> */ public Builder addAllSegments( java.lang.Iterable<? extends com.google.cloud.videointelligence.v1beta1.VideoSegment> values) { if (segmentsBuilder_ == null) { ensureSegmentsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, segments_); onChanged(); } else { segmentsBuilder_.addAllMessages(values); } return this; } /**
/** * * * <pre> * If label detection has been requested, what labels should be detected * in addition to video-level labels or segment-level labels. If unspecified, * defaults to `SHOT_MODE`. * </pre> * * <code>.google.cloud.videointelligence.v1beta1.LabelDetectionMode label_detection_mode = 2; * </code> */ public Builder setLabelDetectionModeValue(int value) { labelDetectionMode_ = value; onChanged(); return this; } /**
/** * * * <pre> * Model to use for safe search detection. * Supported values: "latest" and "stable" (the default). * </pre> * * <code>string safe_search_detection_model = 7;</code> */ public Builder setSafeSearchDetectionModel(java.lang.String value) { if (value == null) { throw new NullPointerException(); } safeSearchDetectionModel_ = value; onChanged(); return this; } /**
/** * * * <pre> * Model to use for label detection. * Supported values: "latest" and "stable" (the default). * </pre> * * <code>string label_detection_model = 4;</code> */ public Builder setLabelDetectionModelBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); labelDetectionModel_ = value; onChanged(); return this; }
/** * * * <pre> * If label detection has been requested, what labels should be detected * in addition to video-level labels or segment-level labels. If unspecified, * defaults to `SHOT_MODE`. * </pre> * * <code>.google.cloud.videointelligence.v1beta1.LabelDetectionMode label_detection_mode = 2; * </code> */ public Builder clearLabelDetectionMode() { labelDetectionMode_ = 0; onChanged(); return this; }
/** * * * <pre> * Model to use for face detection. * Supported values: "latest" and "stable" (the default). * </pre> * * <code>string face_detection_model = 5;</code> */ public Builder setFaceDetectionModelBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); faceDetectionModel_ = value; onChanged(); return this; }
/** * * * <pre> * Model to use for label detection. * Supported values: "latest" and "stable" (the default). * </pre> * * <code>string label_detection_model = 4;</code> */ public Builder setLabelDetectionModel(java.lang.String value) { if (value == null) { throw new NullPointerException(); } labelDetectionModel_ = value; onChanged(); return this; } /**
/** * * * <pre> * Model to use for safe search detection. * Supported values: "latest" and "stable" (the default). * </pre> * * <code>string safe_search_detection_model = 7;</code> */ public Builder clearSafeSearchDetectionModel() { safeSearchDetectionModel_ = getDefaultInstance().getSafeSearchDetectionModel(); onChanged(); return this; } /**
/** * * * <pre> * Model to use for face detection. * Supported values: "latest" and "stable" (the default). * </pre> * * <code>string face_detection_model = 5;</code> */ public Builder clearFaceDetectionModel() { faceDetectionModel_ = getDefaultInstance().getFaceDetectionModel(); onChanged(); return this; } /**
/** * * * <pre> * Whether the video has been shot from a stationary (i.e. non-moving) camera. * When set to true, might improve detection accuracy for moving objects. * </pre> * * <code>bool stationary_camera = 3;</code> */ public Builder clearStationaryCamera() { stationaryCamera_ = false; onChanged(); return this; }
/** * * * <pre> * Model to use for shot change detection. * Supported values: "latest" and "stable" (the default). * </pre> * * <code>string shot_change_detection_model = 6;</code> */ public Builder clearShotChangeDetectionModel() { shotChangeDetectionModel_ = getDefaultInstance().getShotChangeDetectionModel(); onChanged(); return this; } /**
/** * * * <pre> * Model to use for label detection. * Supported values: "latest" and "stable" (the default). * </pre> * * <code>string label_detection_model = 4;</code> */ public Builder clearLabelDetectionModel() { labelDetectionModel_ = getDefaultInstance().getLabelDetectionModel(); onChanged(); return this; } /**
/** * * * <pre> * Whether the video has been shot from a stationary (i.e. non-moving) camera. * When set to true, might improve detection accuracy for moving objects. * </pre> * * <code>bool stationary_camera = 3;</code> */ public Builder setStationaryCamera(boolean value) { stationaryCamera_ = value; onChanged(); return this; } /**