if (!other.getDescription().isEmpty()) { description_ = other.description_; onChanged(); onChanged(); bitField0_ = (bitField0_ & ~0x00000004); } else { ensureLocationsIsMutable(); locations_.addAll(other.locations_); onChanged(); locationsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getLocationsFieldBuilder() : null; } else { this.mergeUnknownFields(other.unknownFields); onChanged(); return this;
private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.videointelligence.v1beta1.LabelLocation, com.google.cloud.videointelligence.v1beta1.LabelLocation.Builder, com.google.cloud.videointelligence.v1beta1.LabelLocationOrBuilder> getLocationsFieldBuilder() { if (locationsBuilder_ == null) { locationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.videointelligence.v1beta1.LabelLocation, com.google.cloud.videointelligence.v1beta1.LabelLocation.Builder, com.google.cloud.videointelligence.v1beta1.LabelLocationOrBuilder>( locations_, ((bitField0_ & 0x00000004) == 0x00000004), getParentForChildren(), isClean()); locations_ = null; } return locationsBuilder_; }
@java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.cloud.videointelligence.v1beta1.LabelAnnotation parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.cloud.videointelligence.v1beta1.LabelAnnotation) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; }
/** * * * <pre> * Where the label was detected and with what confidence. * </pre> * * <code>repeated .google.cloud.videointelligence.v1beta1.LabelLocation locations = 3;</code> */ public Builder addLocations( int index, com.google.cloud.videointelligence.v1beta1.LabelLocation value) { if (locationsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureLocationsIsMutable(); locations_.add(index, value); onChanged(); } else { locationsBuilder_.addMessage(index, value); } return this; } /**
/** * * * <pre> * Where the label was detected and with what confidence. * </pre> * * <code>repeated .google.cloud.videointelligence.v1beta1.LabelLocation locations = 3;</code> */ public Builder setLocations( int index, com.google.cloud.videointelligence.v1beta1.LabelLocation value) { if (locationsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureLocationsIsMutable(); locations_.set(index, value); onChanged(); } else { locationsBuilder_.setMessage(index, value); } return this; } /**
/** * * * <pre> * Where the label was detected and with what confidence. * </pre> * * <code>repeated .google.cloud.videointelligence.v1beta1.LabelLocation locations = 3;</code> */ public Builder addLocations(com.google.cloud.videointelligence.v1beta1.LabelLocation value) { if (locationsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureLocationsIsMutable(); locations_.add(value); onChanged(); } else { locationsBuilder_.addMessage(value); } return this; } /**
/** * * * <pre> * Label annotations. There is exactly one element for each unique label. * </pre> * * <code>repeated .google.cloud.videointelligence.v1beta1.LabelAnnotation label_annotations = 2; * </code> */ public Builder addLabelAnnotations( int index, com.google.cloud.videointelligence.v1beta1.LabelAnnotation.Builder builderForValue) { if (labelAnnotationsBuilder_ == null) { ensureLabelAnnotationsIsMutable(); labelAnnotations_.add(index, builderForValue.build()); onChanged(); } else { labelAnnotationsBuilder_.addMessage(index, builderForValue.build()); } return this; } /**
/** * * * <pre> * Label annotations. There is exactly one element for each unique label. * </pre> * * <code>repeated .google.cloud.videointelligence.v1beta1.LabelAnnotation label_annotations = 2; * </code> */ public Builder setLabelAnnotations( int index, com.google.cloud.videointelligence.v1beta1.LabelAnnotation.Builder builderForValue) { if (labelAnnotationsBuilder_ == null) { ensureLabelAnnotationsIsMutable(); labelAnnotations_.set(index, builderForValue.build()); onChanged(); } else { labelAnnotationsBuilder_.setMessage(index, builderForValue.build()); } return this; } /**
/** * * * <pre> * Where the label was detected and with what confidence. * </pre> * * <code>repeated .google.cloud.videointelligence.v1beta1.LabelLocation locations = 3;</code> */ public Builder addAllLocations( java.lang.Iterable<? extends com.google.cloud.videointelligence.v1beta1.LabelLocation> values) { if (locationsBuilder_ == null) { ensureLocationsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, locations_); onChanged(); } else { locationsBuilder_.addAllMessages(values); } return this; } /**
/** * * * <pre> * Label annotations. There is exactly one element for each unique label. * </pre> * * <code>repeated .google.cloud.videointelligence.v1beta1.LabelAnnotation label_annotations = 2; * </code> */ public Builder addLabelAnnotations( com.google.cloud.videointelligence.v1beta1.LabelAnnotation.Builder builderForValue) { if (labelAnnotationsBuilder_ == null) { ensureLabelAnnotationsIsMutable(); labelAnnotations_.add(builderForValue.build()); onChanged(); } else { labelAnnotationsBuilder_.addMessage(builderForValue.build()); } return this; } /**
/** * * * <pre> * Where the label was detected and with what confidence. * </pre> * * <code>repeated .google.cloud.videointelligence.v1beta1.LabelLocation locations = 3;</code> */ public Builder addLocations( int index, com.google.cloud.videointelligence.v1beta1.LabelLocation.Builder builderForValue) { if (locationsBuilder_ == null) { ensureLocationsIsMutable(); locations_.add(index, builderForValue.build()); onChanged(); } else { locationsBuilder_.addMessage(index, builderForValue.build()); } return this; } /**
/** * * * <pre> * Where the label was detected and with what confidence. * </pre> * * <code>repeated .google.cloud.videointelligence.v1beta1.LabelLocation locations = 3;</code> */ public Builder setLocations( int index, com.google.cloud.videointelligence.v1beta1.LabelLocation.Builder builderForValue) { if (locationsBuilder_ == null) { ensureLocationsIsMutable(); locations_.set(index, builderForValue.build()); onChanged(); } else { locationsBuilder_.setMessage(index, builderForValue.build()); } return this; } /**
/** * * * <pre> * Where the label was detected and with what confidence. * </pre> * * <code>repeated .google.cloud.videointelligence.v1beta1.LabelLocation locations = 3;</code> */ public Builder addLocations( com.google.cloud.videointelligence.v1beta1.LabelLocation.Builder builderForValue) { if (locationsBuilder_ == null) { ensureLocationsIsMutable(); locations_.add(builderForValue.build()); onChanged(); } else { locationsBuilder_.addMessage(builderForValue.build()); } return this; } /**
/** * * * <pre> * Where the label was detected and with what confidence. * </pre> * * <code>repeated .google.cloud.videointelligence.v1beta1.LabelLocation locations = 3;</code> */ public Builder removeLocations(int index) { if (locationsBuilder_ == null) { ensureLocationsIsMutable(); locations_.remove(index); onChanged(); } else { locationsBuilder_.remove(index); } return this; } /**
/** * * * <pre> * Where the label was detected and with what confidence. * </pre> * * <code>repeated .google.cloud.videointelligence.v1beta1.LabelLocation locations = 3;</code> */ public com.google.cloud.videointelligence.v1beta1.LabelLocation.Builder addLocationsBuilder( int index) { return getLocationsFieldBuilder() .addBuilder( index, com.google.cloud.videointelligence.v1beta1.LabelLocation.getDefaultInstance()); } /**
/** * * * <pre> * Where the label was detected and with what confidence. * </pre> * * <code>repeated .google.cloud.videointelligence.v1beta1.LabelLocation locations = 3;</code> */ public com.google.cloud.videointelligence.v1beta1.LabelLocation.Builder addLocationsBuilder() { return getLocationsFieldBuilder() .addBuilder( com.google.cloud.videointelligence.v1beta1.LabelLocation.getDefaultInstance()); } /**
/** * * * <pre> * Where the label was detected and with what confidence. * </pre> * * <code>repeated .google.cloud.videointelligence.v1beta1.LabelLocation locations = 3;</code> */ public com.google.cloud.videointelligence.v1beta1.LabelLocation.Builder getLocationsBuilder( int index) { return getLocationsFieldBuilder().getBuilder(index); } /**
private Builder() { maybeForceBuilderInitialization(); }
public static Builder newBuilder( com.google.cloud.videointelligence.v1beta1.LabelAnnotation prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); }