public Builder mergeFrom(com.google.logging.v2.LogEntryOperation other) { if (other == com.google.logging.v2.LogEntryOperation.getDefaultInstance()) return this; if (!other.getId().isEmpty()) { id_ = other.id_; onChanged(); } if (!other.getProducer().isEmpty()) { producer_ = other.producer_; onChanged(); } if (other.getFirst() != false) { setFirst(other.getFirst()); } if (other.getLast() != false) { setLast(other.getLast()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
@java.lang.Override public Builder newBuilderForType() { return newBuilder(); }
@java.lang.Override public com.google.logging.v2.LogEntryOperation buildPartial() { com.google.logging.v2.LogEntryOperation result = new com.google.logging.v2.LogEntryOperation(this); result.id_ = id_; result.producer_ = producer_; result.first_ = first_; result.last_ = last_; onBuilt(); return result; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.logging.v2.LogEntryOperation)) { return super.equals(obj); } com.google.logging.v2.LogEntryOperation other = (com.google.logging.v2.LogEntryOperation) obj; boolean result = true; result = result && getId().equals(other.getId()); result = result && getProducer().equals(other.getProducer()); result = result && (getFirst() == other.getFirst()); result = result && (getLast() == other.getLast()); result = result && unknownFields.equals(other.unknownFields); return result; }
/** * * * <pre> * Optional. An arbitrary producer identifier. The combination of * `id` and `producer` must be globally unique. Examples for `producer`: * `"MyDivision.MyBigCompany.com"`, `"github.com/MyProject/MyApplication"`. * </pre> * * <code>string producer = 2;</code> */ public Builder clearProducer() { producer_ = getDefaultInstance().getProducer(); onChanged(); return this; } /**
/** * * * <pre> * Optional. An arbitrary operation identifier. Log entries with the * same identifier are assumed to be part of the same operation. * </pre> * * <code>string id = 1;</code> */ public Builder clearId() { id_ = getDefaultInstance().getId(); onChanged(); return this; } /**
builder.setHttpRequest(HttpRequest.fromPb(entryPb.getHttpRequest())); if (!entryPb.getOperation().equals(LogEntryOperation.getDefaultInstance())) { builder.setOperation(Operation.fromPb(entryPb.getOperation()));
@java.lang.Override public com.google.logging.v2.LogEntryOperation getDefaultInstanceForType() { return com.google.logging.v2.LogEntryOperation.getDefaultInstance(); }
@java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); } if (!getProducerBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, producer_); } if (first_ != false) { output.writeBool(3, first_); } if (last_ != false) { output.writeBool(4, last_); } unknownFields.writeTo(output); }
result = result && getOperation().equals(other.getOperation());
builder.setHttpRequest(HttpRequest.fromPb(entryPb.getHttpRequest())); if (!entryPb.getOperation().equals(LogEntryOperation.getDefaultInstance())) { builder.setOperation(Operation.fromPb(entryPb.getOperation()));
/** * * * <pre> * Optional. Information about an operation associated with the log entry, if * applicable. * </pre> * * <code>.google.logging.v2.LogEntryOperation operation = 15;</code> */ public com.google.logging.v2.LogEntryOperation getOperation() { return operation_ == null ? com.google.logging.v2.LogEntryOperation.getDefaultInstance() : operation_; } /**
@java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); } if (!getProducerBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, producer_); } if (first_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, first_); } if (last_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, last_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + ID_FIELD_NUMBER; hash = (53 * hash) + getId().hashCode(); hash = (37 * hash) + PRODUCER_FIELD_NUMBER; hash = (53 * hash) + getProducer().hashCode(); hash = (37 * hash) + FIRST_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getFirst()); hash = (37 * hash) + LAST_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getLast()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
/** * * * <pre> * Optional. Information about an operation associated with the log entry, if * applicable. * </pre> * * <code>.google.logging.v2.LogEntryOperation operation = 15;</code> */ public com.google.logging.v2.LogEntryOperationOrBuilder getOperationOrBuilder() { if (operationBuilder_ != null) { return operationBuilder_.getMessageOrBuilder(); } else { return operation_ == null ? com.google.logging.v2.LogEntryOperation.getDefaultInstance() : operation_; } } /**
/** * * * <pre> * Optional. Information about an operation associated with the log entry, if * applicable. * </pre> * * <code>.google.logging.v2.LogEntryOperation operation = 15;</code> */ public Builder mergeOperation(com.google.logging.v2.LogEntryOperation value) { if (operationBuilder_ == null) { if (operation_ != null) { operation_ = com.google.logging.v2.LogEntryOperation.newBuilder(operation_) .mergeFrom(value) .buildPartial(); } else { operation_ = value; } onChanged(); } else { operationBuilder_.mergeFrom(value); } return this; } /**
static Operation fromPb(LogEntryOperation operationPb) { return newBuilder(operationPb.getId(), operationPb.getProducer()) .setFirst(operationPb.getFirst()) .setLast(operationPb.getLast()) .build(); } }
/** * * * <pre> * Optional. Information about an operation associated with the log entry, if * applicable. * </pre> * * <code>.google.logging.v2.LogEntryOperation operation = 15;</code> */ public com.google.logging.v2.LogEntryOperation getOperation() { if (operationBuilder_ == null) { return operation_ == null ? com.google.logging.v2.LogEntryOperation.getDefaultInstance() : operation_; } else { return operationBuilder_.getMessage(); } } /**
LogEntryOperation toPb() { LogEntryOperation.Builder builder = LogEntryOperation.newBuilder(); builder.setId(id); builder.setProducer(producer); builder.setFirst(first); builder.setLast(last); return builder.build(); }
LogEntryOperation toPb() { LogEntryOperation.Builder builder = LogEntryOperation.newBuilder(); builder.setId(id); builder.setProducer(producer); builder.setFirst(first); builder.setLast(last); return builder.build(); }