/** * * * <pre> * If present, contextual information is needed to understand where this image * comes from. * </pre> * * <code>.google.cloud.vision.v1.ImageAnnotationContext context = 21;</code> */ public Builder setContext( com.google.cloud.vision.v1.ImageAnnotationContext.Builder builderForValue) { if (contextBuilder_ == null) { context_ = builderForValue.build(); onChanged(); } else { contextBuilder_.setMessage(builderForValue.build()); } return this; } /**
extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(context_); context_ = subBuilder.buildPartial();
public Builder mergeFrom(com.google.cloud.vision.v1.ImageAnnotationContext other) { if (other == com.google.cloud.vision.v1.ImageAnnotationContext.getDefaultInstance()) return this; if (!other.getUri().isEmpty()) { uri_ = other.uri_; onChanged(); } if (other.getPageNumber() != 0) { setPageNumber(other.getPageNumber()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(context_); context_ = subBuilder.buildPartial();
/** * * * <pre> * If present, contextual information is needed to understand where this image * comes from. * </pre> * * <code>.google.cloud.vision.v1.ImageAnnotationContext context = 21;</code> */ public Builder mergeContext(com.google.cloud.vision.v1.ImageAnnotationContext value) { if (contextBuilder_ == null) { if (context_ != null) { context_ = com.google.cloud.vision.v1.ImageAnnotationContext.newBuilder(context_) .mergeFrom(value) .buildPartial(); } else { context_ = value; } onChanged(); } else { contextBuilder_.mergeFrom(value); } return this; } /**
/** * * * <pre> * If present, contextual information is needed to understand where this image * comes from. * </pre> * * <code>.google.cloud.vision.v1.ImageAnnotationContext context = 21;</code> */ public Builder setContext( com.google.cloud.vision.v1.ImageAnnotationContext.Builder builderForValue) { if (contextBuilder_ == null) { context_ = builderForValue.build(); onChanged(); } else { contextBuilder_.setMessage(builderForValue.build()); } return this; } /**
@java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.cloud.vision.v1.ImageAnnotationContext parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.cloud.vision.v1.ImageAnnotationContext) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; }
/** * * * <pre> * The URI of the file used to produce the image. * </pre> * * <code>string uri = 1;</code> */ public Builder setUri(java.lang.String value) { if (value == null) { throw new NullPointerException(); } uri_ = value; onChanged(); return this; } /**
/** * * * <pre> * The URI of the file used to produce the image. * </pre> * * <code>string uri = 1;</code> */ public Builder setUriBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); uri_ = value; onChanged(); return this; }
/** * * * <pre> * If the file was a PDF or TIFF, this field gives the page number within * the file used to produce the image. * </pre> * * <code>int32 page_number = 2;</code> */ public Builder setPageNumber(int value) { pageNumber_ = value; onChanged(); return this; } /**
/** * * * <pre> * If the file was a PDF or TIFF, this field gives the page number within * the file used to produce the image. * </pre> * * <code>int32 page_number = 2;</code> */ public Builder clearPageNumber() { pageNumber_ = 0; onChanged(); return this; }
/** * * * <pre> * The URI of the file used to produce the image. * </pre> * * <code>string uri = 1;</code> */ public Builder clearUri() { uri_ = getDefaultInstance().getUri(); onChanged(); return this; } /**
public static Builder newBuilder(com.google.cloud.vision.v1.ImageAnnotationContext prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); }
public Builder mergeFrom(com.google.cloud.vision.v1.ImageAnnotationContext other) { if (other == com.google.cloud.vision.v1.ImageAnnotationContext.getDefaultInstance()) return this; if (!other.getUri().isEmpty()) { uri_ = other.uri_; onChanged(); } if (other.getPageNumber() != 0) { setPageNumber(other.getPageNumber()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
private Builder() { maybeForceBuilderInitialization(); }
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); }
@java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.vision.v1.ImageAnnotationContext) { return mergeFrom((com.google.cloud.vision.v1.ImageAnnotationContext) other); } else { super.mergeFrom(other); return this; } }
@java.lang.Override protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /**
@java.lang.Override public com.google.cloud.vision.v1.ImageAnnotationContext buildPartial() { com.google.cloud.vision.v1.ImageAnnotationContext result = new com.google.cloud.vision.v1.ImageAnnotationContext(this); result.uri_ = uri_; result.pageNumber_ = pageNumber_; onBuilt(); return result; }