BuilderImpl(Image imagePb) { if (imagePb.getId() != null) { this.generatedId = imagePb.getId().toString(); } if (imagePb.getCreationTimestamp() != null) { this.creationTimestamp = TIMESTAMP_FORMATTER.parseMillis(imagePb.getCreationTimestamp()); } this.imageId = ImageId.fromUrl(imagePb.getSelfLink()); this.description = imagePb.getDescription(); this.configuration = ImageConfiguration.fromPb(imagePb); if (imagePb.getStatus() != null) { this.status = Status.valueOf(imagePb.getStatus()); } this.diskSizeGb = imagePb.getDiskSizeGb(); if (imagePb.getLicenses() != null) { this.licenses = Lists.transform(imagePb.getLicenses(), LicenseId.FROM_URL_FUNCTION); } if (imagePb.getDeprecated() != null) { this.deprecationStatus = DeprecationStatus.fromPb(imagePb.getDeprecated(), ImageId.FROM_URL_FUNCTION); } }
BuilderImpl(Image imagePb) { if (imagePb.getId() != null) { this.generatedId = imagePb.getId().toString(); } if (imagePb.getCreationTimestamp() != null) { this.creationTimestamp = TIMESTAMP_FORMATTER.parseMillis(imagePb.getCreationTimestamp()); } this.imageId = ImageId.fromUrl(imagePb.getSelfLink()); this.description = imagePb.getDescription(); this.configuration = ImageConfiguration.fromPb(imagePb); if (imagePb.getStatus() != null) { this.status = Status.valueOf(imagePb.getStatus()); } this.diskSizeGb = imagePb.getDiskSizeGb(); if (imagePb.getLicenses() != null) { this.licenses = Lists.transform(imagePb.getLicenses(), LicenseId.FROM_URL_FUNCTION); } if (imagePb.getDeprecated() != null) { this.deprecationStatus = DeprecationStatus.fromPb(imagePb.getDeprecated(), ImageId.FROM_URL_FUNCTION); } }