public Builder mergeFrom(feast.core.CoreServiceProto.CoreServiceTypes.GetEntitiesRequest other) { if (other == feast.core.CoreServiceProto.CoreServiceTypes.GetEntitiesRequest.getDefaultInstance()) return this; if (!other.ids_.isEmpty()) { if (ids_.isEmpty()) { ids_ = other.ids_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureIdsIsMutable(); ids_.addAll(other.ids_); } onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
@java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { feast.core.CoreServiceProto.CoreServiceTypes.GetEntitiesRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (feast.core.CoreServiceProto.CoreServiceTypes.GetEntitiesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_;
@java.lang.Override public feast.core.CoreServiceProto.CoreServiceTypes.GetEntitiesRequest buildPartial() { feast.core.CoreServiceProto.CoreServiceTypes.GetEntitiesRequest result = new feast.core.CoreServiceProto.CoreServiceTypes.GetEntitiesRequest(this); int from_bitField0_ = bitField0_; if (((bitField0_ & 0x00000001) == 0x00000001)) { ids_ = ids_.getUnmodifiableView(); bitField0_ = (bitField0_ & ~0x00000001); } result.ids_ = ids_; onBuilt(); return result; }
/** * Get map of entity ID and {@link EntitySpec} from Core API, given a collection of entityId. * * @param entityIds collection of entityId to retrieve. * @return map of entity ID as key and {@link EntitySpec} value. * @throws SpecRetrievalException if any error happens during retrieval */ public Map<String, EntitySpec> getEntitySpecs(Iterable<String> entityIds) { GetEntitiesRequest request = GetEntitiesRequest.newBuilder().addAllIds(entityIds).build(); try { GetEntitiesResponse response = blockingStub.getEntities(request); return response .getEntitiesList() .stream() .collect(Collectors.toMap(EntitySpec::getName, Function.identity())); } catch (StatusRuntimeException e) { log.error("GRPC error in getEntitySpecs: {}", e.getStatus()); throw new SpecRetrievalException("Unable to retrieve entity spec", e); } }
@java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { feast.core.CoreServiceProto.CoreServiceTypes.GetEntitiesRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (feast.core.CoreServiceProto.CoreServiceTypes.GetEntitiesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_;
@java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { feast.core.CoreServiceProto.CoreServiceTypes.GetEntitiesRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (feast.core.CoreServiceProto.CoreServiceTypes.GetEntitiesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_;
public Builder mergeFrom(feast.core.CoreServiceProto.CoreServiceTypes.GetEntitiesRequest other) { if (other == feast.core.CoreServiceProto.CoreServiceTypes.GetEntitiesRequest.getDefaultInstance()) return this; if (!other.ids_.isEmpty()) { if (ids_.isEmpty()) { ids_ = other.ids_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureIdsIsMutable(); ids_.addAll(other.ids_); } onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
public Builder mergeFrom(feast.core.CoreServiceProto.CoreServiceTypes.GetEntitiesRequest other) { if (other == feast.core.CoreServiceProto.CoreServiceTypes.GetEntitiesRequest.getDefaultInstance()) return this; if (!other.ids_.isEmpty()) { if (ids_.isEmpty()) { ids_ = other.ids_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureIdsIsMutable(); ids_.addAll(other.ids_); } onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
/** * <code>repeated string ids = 1;</code> */ public Builder addIdsBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureIdsIsMutable(); ids_.add(value); onChanged(); return this; } @java.lang.Override
/** * <code>repeated string ids = 1;</code> */ public Builder addIdsBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureIdsIsMutable(); ids_.add(value); onChanged(); return this; } @java.lang.Override
/** * Get map of entity ID and {@link EntitySpec} from Core API, given a collection of entityId. */ public Map<String, EntitySpec> getEntitySpecs(Iterable<String> entityIds) { GetEntitiesRequest request = GetEntitiesRequest.newBuilder().addAllIds(entityIds).build(); try { GetEntitiesResponse response = blockingStub.getEntities(request); return response .getEntitiesList() .stream() .collect(Collectors.toMap(EntitySpec::getName, Function.identity())); } catch (StatusRuntimeException e) { log.error("GRPC error in getEntitySpecs: {}", e.getStatus()); throw new SpecRetrievalException("Unable to retrieve entity spec", e); } }
/** * <code>repeated string ids = 1;</code> */ public Builder addIdsBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureIdsIsMutable(); ids_.add(value); onChanged(); return this; } @java.lang.Override
/** * <code>repeated string ids = 1;</code> */ public Builder setIds( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureIdsIsMutable(); ids_.set(index, value); onChanged(); return this; } /**
/** * <code>repeated string ids = 1;</code> */ public Builder setIds( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureIdsIsMutable(); ids_.set(index, value); onChanged(); return this; } /**
private Builder() { maybeForceBuilderInitialization(); }
private Builder() { maybeForceBuilderInitialization(); }
private Builder() { maybeForceBuilderInitialization(); }
/** * <code>repeated string ids = 1;</code> */ public Builder addIds( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureIdsIsMutable(); ids_.add(value); onChanged(); return this; } /**
public static Builder newBuilder(feast.core.CoreServiceProto.CoreServiceTypes.GetEntitiesRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override
public static Builder newBuilder(feast.core.CoreServiceProto.CoreServiceTypes.GetEntitiesRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override