diff --git a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/BaseEntity.java b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/BaseEntity.java index 608dc7187..e6853d6d5 100644 --- a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/BaseEntity.java +++ b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/BaseEntity.java @@ -636,7 +636,7 @@ public Map> getProperties() { return properties; } - final com.google.datastore.v1.Entity toPb() { + public final com.google.datastore.v1.Entity toPb() { com.google.datastore.v1.Entity.Builder entityPb = com.google.datastore.v1.Entity.newBuilder(); for (Map.Entry> entry : properties.entrySet()) { entityPb.putProperties(entry.getKey(), entry.getValue().toPb()); diff --git a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/BaseKey.java b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/BaseKey.java index 6a015e388..89279d466 100644 --- a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/BaseKey.java +++ b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/BaseKey.java @@ -204,7 +204,7 @@ public boolean equals(Object obj) { && Objects.equals(getPath(), other.getPath()); } - com.google.datastore.v1.Key toPb() { + public com.google.datastore.v1.Key toPb() { com.google.datastore.v1.Key.Builder keyPb = com.google.datastore.v1.Key.newBuilder(); com.google.datastore.v1.PartitionId.Builder partitionIdPb = com.google.datastore.v1.PartitionId.newBuilder(); diff --git a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/Blob.java b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/Blob.java index edcbc9215..86ab567d2 100644 --- a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/Blob.java +++ b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/Blob.java @@ -135,7 +135,7 @@ public static Blob copyFrom(InputStream input) throws IOException { return copyFrom(bytes.toByteArray()); } - com.google.datastore.v1.Value toPb() { + public com.google.datastore.v1.Value toPb() { return com.google.datastore.v1.Value.newBuilder().setBlobValue(byteString).build(); } } diff --git a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/Cursor.java b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/Cursor.java index 959eddef3..b1c0685de 100644 --- a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/Cursor.java +++ b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/Cursor.java @@ -80,7 +80,7 @@ public static Cursor copyFrom(byte[] bytes) { return new Cursor(ByteString.copyFrom(checkNotNull(bytes))); } - com.google.datastore.v1.Value toPb() { + public com.google.datastore.v1.Value toPb() { return com.google.datastore.v1.Value.newBuilder().setBlobValue(byteString).build(); } } diff --git a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/GqlQuery.java b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/GqlQuery.java index de86a24a5..8f777a354 100644 --- a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/GqlQuery.java +++ b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/GqlQuery.java @@ -126,7 +126,7 @@ public boolean equals(Object obj) { return Objects.equals(cursor, other.cursor) && Objects.equals(value, other.value); } - com.google.datastore.v1.GqlQueryParameter toPb() { + public com.google.datastore.v1.GqlQueryParameter toPb() { com.google.datastore.v1.GqlQueryParameter.Builder argPb = com.google.datastore.v1.GqlQueryParameter.newBuilder(); if (cursor != null) { @@ -513,7 +513,7 @@ public boolean equals(Object obj) { && Objects.equals(positionalBindings, other.positionalBindings); } - com.google.datastore.v1.GqlQuery toPb() { + public com.google.datastore.v1.GqlQuery toPb() { GqlQueryProtoPreparer protoPreparer = new GqlQueryProtoPreparer(); return protoPreparer.prepare(this); } diff --git a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/LatLng.java b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/LatLng.java index 9b969dd81..e05d73c37 100644 --- a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/LatLng.java +++ b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/LatLng.java @@ -77,7 +77,7 @@ public static LatLng of(double latitude, double longitude) { return new LatLng(latitude, longitude); } - protected com.google.type.LatLng toPb() { + public com.google.type.LatLng toPb() { return com.google.type.LatLng.newBuilder() .setLatitude(latitude) .setLongitude(longitude) diff --git a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/PathElement.java b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/PathElement.java index fb72f4f06..8b8033482 100644 --- a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/PathElement.java +++ b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/PathElement.java @@ -98,7 +98,7 @@ public boolean equals(Object obj) { && Objects.equals(name, other.name); } - com.google.datastore.v1.Key.PathElement toPb() { + public com.google.datastore.v1.Key.PathElement toPb() { com.google.datastore.v1.Key.PathElement.Builder pathElementPb = com.google.datastore.v1.Key.PathElement.newBuilder(); pathElementPb.setKind(kind); diff --git a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/StructuredQuery.java b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/StructuredQuery.java index 30cd05759..603f4e628 100644 --- a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/StructuredQuery.java +++ b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/StructuredQuery.java @@ -153,7 +153,7 @@ public Operator apply(String constant) { static final Operator OR = type.createAndRegister("OR"); - com.google.datastore.v1.CompositeFilter.Operator toPb() { + public com.google.datastore.v1.CompositeFilter.Operator toPb() { return com.google.datastore.v1.CompositeFilter.Operator.valueOf(name()); } @@ -238,7 +238,7 @@ public static CompositeFilter or(Filter first, Filter... other) { } @Override - com.google.datastore.v1.Filter toPb() { + public com.google.datastore.v1.Filter toPb() { com.google.datastore.v1.Filter.Builder filterPb = com.google.datastore.v1.Filter.newBuilder(); com.google.datastore.v1.CompositeFilter.Builder compositeFilterPb = filterPb.getCompositeFilterBuilder(); @@ -287,7 +287,7 @@ public Operator apply(String constant) { static final Operator HAS_ANCESTOR = type.createAndRegister("HAS_ANCESTOR"); static final Operator NOT_IN = type.createAndRegister("NOT_IN"); - com.google.datastore.v1.PropertyFilter.Operator toPb() { + public com.google.datastore.v1.PropertyFilter.Operator toPb() { return com.google.datastore.v1.PropertyFilter.Operator.valueOf(name()); } @@ -564,7 +564,7 @@ public static PropertyFilter isNull(String property) { } @Override - com.google.datastore.v1.Filter toPb() { + public com.google.datastore.v1.Filter toPb() { com.google.datastore.v1.Filter.Builder filterPb = com.google.datastore.v1.Filter.newBuilder(); com.google.datastore.v1.PropertyFilter.Builder propertyFilterPb = filterPb.getPropertyFilterBuilder(); @@ -605,7 +605,7 @@ public Direction apply(String constant) { public static final Direction ASCENDING = type.createAndRegister("ASCENDING"); public static final Direction DESCENDING = type.createAndRegister("DESCENDING"); - com.google.datastore.v1.PropertyOrder.Direction toPb() { + public com.google.datastore.v1.PropertyOrder.Direction toPb() { return com.google.datastore.v1.PropertyOrder.Direction.valueOf(name()); } @@ -664,7 +664,7 @@ public Direction getDirection() { return direction; } - com.google.datastore.v1.PropertyOrder toPb() { + public com.google.datastore.v1.PropertyOrder toPb() { return com.google.datastore.v1.PropertyOrder.newBuilder() .setDirection(direction.toPb()) .setProperty( @@ -1053,7 +1053,7 @@ public StructuredQuery nextQuery(com.google.datastore.v1.RunQueryResponse res return builder.build(); } - com.google.datastore.v1.Query toPb() { + public com.google.datastore.v1.Query toPb() { StructuredQueryProtoPreparer protoPreparer = new StructuredQueryProtoPreparer(); return protoPreparer.prepare(this); } diff --git a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/Value.java b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/Value.java index 4bd0a5133..162edf721 100644 --- a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/Value.java +++ b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/Value.java @@ -207,7 +207,7 @@ public boolean equals(Object obj) { } @SuppressWarnings("unchecked") - com.google.datastore.v1.Value toPb() { + public com.google.datastore.v1.Value toPb() { return getType().getMarshaller().toProto(this); }