Skip to content

Commit

Permalink
fix(spanner): getEdition() is returning null for Instance (#3496)
Browse files Browse the repository at this point in the history
  • Loading branch information
sakthivelmanii authored Nov 23, 2024
1 parent 49fd803 commit 77cb585
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import com.google.longrunning.Operation;
import com.google.spanner.admin.database.v1.CreateDatabaseMetadata;
import com.google.spanner.admin.instance.v1.AutoscalingConfig;
import com.google.spanner.admin.instance.v1.Instance.Edition;
import com.google.spanner.admin.instance.v1.UpdateInstanceMetadata;
import java.util.Map;

Expand Down Expand Up @@ -111,6 +112,12 @@ public Builder putAllLabels(Map<String, String> labels) {
return this;
}

@Override
public Builder setEdition(Edition edition) {
infoBuilder.setEdition(edition);
return this;
}

@Override
public Instance build() {
return new Instance(this);
Expand Down Expand Up @@ -228,6 +235,7 @@ static Instance fromProto(
.setCreateTime(Timestamp.fromProto(proto.getCreateTime()))
.setUpdateTime(Timestamp.fromProto(proto.getUpdateTime()))
.setAutoscalingConfig(proto.getAutoscalingConfig())
.setEdition(proto.getEdition())
.setProcessingUnits(proto.getProcessingUnits());
State state;
switch (proto.getState()) {
Expand Down

0 comments on commit 77cb585

Please sign in to comment.