Skip to content

Commit caf1737

Browse files
committed
---
yaml --- r: 4845 b: refs/heads/logging-alpha c: 785c3fe h: refs/heads/master i: 4843: 47c1f39
1 parent 9e78bbe commit caf1737

10 files changed

Lines changed: 16 additions & 9 deletions

File tree

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ refs/heads/compute-alpha: 969cba2627f1d53d352cc4a5ffe0879dacf65e6c
1212
refs/heads/dns-alpha: 2f90e7e338349287ace33375896907af0f032ca1
1313
refs/heads/dns-alpha-batch: 17442b07867021b85d0452f5f3eda29a3413288f
1414
refs/heads/gcs-nio: 283aeaf15efdcf3621eb6859f05e55ad7764375d
15-
refs/heads/logging-alpha: d34490f196965a6b71e7f84b3a43c17de98d30fd
15+
refs/heads/logging-alpha: 785c3fe3a43c2cb4af9a08279b7cf047fa9a71ba
1616
refs/tags/v0.1.0: a615317f7424ed58621b1f65d5c4d8cbbe8a6ed8
1717
refs/tags/v0.1.1: 7a7f6985fe465e9dd6a075af55493f42b4933be0
1818
refs/tags/v0.1.2: 3eb3fe866ba22487686048f45d927b8c8638ea3f

branches/logging-alpha/gcloud-java-compute/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ Java idiomatic client for [Google Cloud Compute] (https://cloud.google.com/compu
1010
[![Dependency Status](https://www.versioneye.com/user/projects/56bd8ee72a29ed002d2b0969/badge.svg?style=flat)](https://www.versioneye.com/user/projects/56bd8ee72a29ed002d2b0969)
1111

1212
- [Homepage] (https://googlecloudplatform.github.io/gcloud-java/)
13-
<!-- TODO(mziccard): add link to API documentatin -->
13+
14+
<!-- TODO(mziccard): add link to API documentation -->
1415

1516
> Note: This client is a work-in-progress, and may occasionally
1617
> make backwards-incompatible changes.

branches/logging-alpha/gcloud-java-compute/src/main/java/com/google/gcloud/compute/DiskTypeId.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,14 @@ public static DiskTypeId of(ZoneId zoneId, String diskType) {
9999
}
100100

101101
/**
102-
* Returns a disk type identity given the zone disk and disk type.
102+
* Returns a disk type identity given the zone and disk type names.
103103
*/
104104
public static DiskTypeId of(String zone, String diskType) {
105105
return of(ZoneId.of(null, zone), diskType);
106106
}
107107

108108
/**
109-
* Returns a disk type identity given project disk, zone disk and disk type.
109+
* Returns a disk type identity given project disk, zone and disk type names.
110110
*/
111111
public static DiskTypeId of(String project, String zone, String diskType) {
112112
return of(ZoneId.of(project, zone), diskType);

branches/logging-alpha/gcloud-java-compute/src/main/java/com/google/gcloud/compute/MachineType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ public MachineTypeId machineTypeId() {
164164
}
165165

166166
/**
167-
* Returns an unique identifier for the machin type; defined by the service.
167+
* Returns an unique identifier for the machine type; defined by the service.
168168
*/
169169
public BigInteger id() {
170170
return id;

branches/logging-alpha/gcloud-java-compute/src/main/java/com/google/gcloud/compute/Region.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,9 @@ com.google.api.services.compute.model.Region toPb() {
327327
regionPb.setName(regionId.region());
328328
regionPb.setDescription(description);
329329
regionPb.setSelfLink(selfLink);
330-
regionPb.setStatus(status.name());
330+
if (status != null) {
331+
regionPb.setStatus(status.name());
332+
}
331333
if (zones != null) {
332334
regionPb.setZones(Lists.transform(zones, ZoneId.TO_URL_FUNCTION));
333335
}

branches/logging-alpha/gcloud-java-compute/src/main/java/com/google/gcloud/compute/Zone.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,9 @@ com.google.api.services.compute.model.Zone toPb() {
356356
zonePb.setName(zoneId.zone());
357357
zonePb.setDescription(description);
358358
zonePb.setSelfLink(selfLink);
359-
zonePb.setStatus(status.name());
359+
if (status != null) {
360+
zonePb.setStatus(status.name());
361+
}
360362
if (maintenanceWindows != null) {
361363
zonePb.setMaintenanceWindows(
362364
Lists.transform(maintenanceWindows, MaintenanceWindow.TO_PB_FUNCTION));

branches/logging-alpha/gcloud-java-compute/src/test/java/com/google/gcloud/compute/DiskTypeTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ public void testBuilder() {
6363
public void testToPbAndFromPb() {
6464
compareDiskTypes(DISK_TYPE, DiskType.fromPb(DISK_TYPE.toPb()));
6565
DiskType diskType = DiskType.builder()
66-
.id(ID)
6766
.diskTypeId(DISK_TYPE_ID)
6867
.selfLink(DISK_TYPE_ID.toUrl())
6968
.build();

branches/logging-alpha/gcloud-java-compute/src/test/java/com/google/gcloud/compute/MachineTypeTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ public void testBuilder() {
7575
public void testToPbAndFromPb() {
7676
compareMachineTypes(MACHINE_TYPE, MachineType.fromPb(MACHINE_TYPE.toPb()));
7777
MachineType machineType = MachineType.builder()
78-
.id(ID)
7978
.machineTypeId(MACHINE_TYPE_ID)
8079
.selfLink(MACHINE_TYPE_ID.toUrl())
8180
.build();

branches/logging-alpha/gcloud-java-compute/src/test/java/com/google/gcloud/compute/RegionTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ public void testToAndFromPb() {
7676
compareRegions(REGION, region);
7777
assertEquals(REGION_ID.project(), region.regionId().project());
7878
assertEquals(REGION_ID.region(), region.regionId().region());
79+
region = Region.builder().regionId(REGION_ID).selfLink(REGION_ID.toUrl()).build();
80+
compareRegions(region, Region.fromPb(region.toPb()));
7981
}
8082

8183
private void compareRegions(Region expected, Region value) {

branches/logging-alpha/gcloud-java-compute/src/test/java/com/google/gcloud/compute/ZoneTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ public void testToAndFromPb() {
7777
compareZones(ZONE, zone);
7878
assertEquals(ZONE_ID.project(), zone.zoneId().project());
7979
assertEquals(ZONE_ID.zone(), zone.zoneId().zone());
80+
zone = Zone.builder().zoneId(ZONE_ID).selfLink(ZONE_ID.toUrl()).build();
81+
compareZones(zone, Zone.fromPb(zone.toPb()));
8082
}
8183

8284
private void compareZones(Zone expected, Zone value) {

0 commit comments

Comments
 (0)