@java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { io.grafeas.v1beta1.GetOccurrenceNoteRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (io.grafeas.v1beta1.GetOccurrenceNoteRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; }
public Builder mergeFrom(io.grafeas.v1beta1.GetOccurrenceNoteRequest other) { if (other == io.grafeas.v1beta1.GetOccurrenceNoteRequest.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
/** * * * <pre> * The name of the occurrence in the form of * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. * </pre> * * <code>string name = 1;</code> */ public Builder setName(java.lang.String value) { if (value == null) { throw new NullPointerException(); } name_ = value; onChanged(); return this; } /**
@java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { io.grafeas.v1beta1.GetOccurrenceNoteRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (io.grafeas.v1beta1.GetOccurrenceNoteRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; }
/** * * * <pre> * The name of the occurrence in the form of * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. * </pre> * * <code>string name = 1;</code> */ public Builder setNameBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); name_ = value; onChanged(); return this; }
/** * * * <pre> * The name of the occurrence in the form of * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. * </pre> * * <code>string name = 1;</code> */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /**
private Builder() { maybeForceBuilderInitialization(); }
public static Builder newBuilder(io.grafeas.v1beta1.GetOccurrenceNoteRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); }
public Builder mergeFrom(io.grafeas.v1beta1.GetOccurrenceNoteRequest other) { if (other == io.grafeas.v1beta1.GetOccurrenceNoteRequest.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
@java.lang.Override public io.grafeas.v1beta1.GetOccurrenceNoteRequest build() { io.grafeas.v1beta1.GetOccurrenceNoteRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
@java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof io.grafeas.v1beta1.GetOccurrenceNoteRequest) { return mergeFrom((io.grafeas.v1beta1.GetOccurrenceNoteRequest) other); } else { super.mergeFrom(other); return this; } }
@java.lang.Override public io.grafeas.v1beta1.GetOccurrenceNoteRequest buildPartial() { io.grafeas.v1beta1.GetOccurrenceNoteRequest result = new io.grafeas.v1beta1.GetOccurrenceNoteRequest(this); result.name_ = name_; onBuilt(); return result; }
@java.lang.Override protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /**
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); }
/** * Gets the note attached to the specified occurrence. Consumer projects can use this method to * get a note that belongs to a provider project. * * <p>Sample code: * * <pre><code> * try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) { * OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]"); * Note response = grafeasV1Beta1Client.getOccurrenceNote(name); * } * </code></pre> * * @param name The name of the occurrence in the form of * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Note getOccurrenceNote(OccurrenceName name) { GetOccurrenceNoteRequest request = GetOccurrenceNoteRequest.newBuilder() .setName(name == null ? null : name.toString()) .build(); return getOccurrenceNote(request); }
/** * * * <pre> * The name of the occurrence in the form of * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. * </pre> * * <code>string name = 1;</code> */ public Builder setName(java.lang.String value) { if (value == null) { throw new NullPointerException(); } name_ = value; onChanged(); return this; } /**
/** * Gets the note attached to the specified occurrence. Consumer projects can use this method to * get a note that belongs to a provider project. * * <p>Sample code: * * <pre><code> * try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) { * OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]"); * Note response = grafeasV1Beta1Client.getOccurrenceNote(name.toString()); * } * </code></pre> * * @param name The name of the occurrence in the form of * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Note getOccurrenceNote(String name) { GetOccurrenceNoteRequest request = GetOccurrenceNoteRequest.newBuilder().setName(name).build(); return getOccurrenceNote(request); }
/** * * * <pre> * The name of the occurrence in the form of * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. * </pre> * * <code>string name = 1;</code> */ public Builder setNameBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); name_ = value; onChanged(); return this; }
/** * * * <pre> * The name of the occurrence in the form of * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. * </pre> * * <code>string name = 1;</code> */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /**