Skip to content

Commit 389c554

Browse files
committed
---
yaml --- r: 7567 b: refs/heads/tswast-patch-1 c: 5376eff h: refs/heads/master i: 7565: 2066553 7563: eac368c 7559: 9810622 7551: 7ef2d77
1 parent 47fb7c7 commit 389c554

2 files changed

Lines changed: 20 additions & 21 deletions

File tree

  • branches/tswast-patch-1/google-cloud-storage/src/main/java/com/google/cloud/storage

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,5 @@ refs/tags/v0.18.0: 9d193c4c4b9d1c6f21515dd8e50836b9194ec9bb
5757
refs/tags/v0.19.0: e67b56e4d8dad5f9a7b38c9b2107c23c828f2ed5
5858
refs/tags/v0.20.0: 839f7fb7156535146aa1cb2c5aadd8d375d854e8
5959
refs/tags/v0.20.1: 370471f437f1f4f68a11e068df5cd6bf39edb1fa
60-
refs/heads/tswast-patch-1: b0046d0810b955e99f7fbee5e4f84c95ac3854bc
60+
refs/heads/tswast-patch-1: 5376eff36a01a0707b3741c54497927d7a0929d3
6161
refs/heads/pubsub-streaming-pull: 19262b752ee874eb2ca3b950eb2aef44d5a5267b

branches/tswast-patch-1/google-cloud-storage/src/main/java/com/google/cloud/storage/Acl.java

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@
3434
*/
3535
public final class Acl implements Serializable {
3636

37-
private static final long serialVersionUID = 6435575339887912222L;
38-
37+
private static final long serialVersionUID = 7516713233557576082L;
3938
static final Function<ObjectAccessControl, Acl> FROM_OBJECT_PB_FUNCTION =
4039
new Function<ObjectAccessControl, Acl>() {
4140
@Override
@@ -51,10 +50,10 @@ public Acl apply(BucketAccessControl aclPb) {
5150
}
5251
};
5352

54-
private final String id;
55-
private final String etag;
5653
private final Entity entity;
5754
private final Role role;
55+
private final String id;
56+
private final String etag;
5857

5958
public enum Role {
6059
OWNER, READER, WRITER
@@ -359,33 +358,33 @@ private Acl(Builder builder) {
359358
}
360359

361360
/**
362-
* Returns the ID of the ACL entry.
361+
* Returns the entity for this ACL object.
363362
*/
364-
public String id() {
365-
return id;
363+
public Entity entity() {
364+
return entity;
366365
}
367366

368367
/**
369-
* Returns HTTP 1.1 Entity tag for the ACL entry.
370-
*
371-
* @see <a href="http://tools.ietf.org/html/rfc2616#section-3.11">Entity Tags</a>
368+
* Returns the role associated to the entity in this ACL object.
372369
*/
373-
public String etag() {
374-
return etag;
370+
public Role role() {
371+
return role;
375372
}
376373

377374
/**
378-
* Returns the entity for this ACL object.
375+
* Returns the ID of the ACL entry.
379376
*/
380-
public Entity entity() {
381-
return entity;
377+
public String id() {
378+
return id;
382379
}
383380

384381
/**
385-
* Returns the role associated to the entity in this ACL object.
382+
* Returns HTTP 1.1 Entity tag for the ACL entry.
383+
*
384+
* @see <a href="http://tools.ietf.org/html/rfc2616#section-3.11">Entity Tags</a>
386385
*/
387-
public Role role() {
388-
return role;
386+
public String etag() {
387+
return etag;
389388
}
390389

391390
/**
@@ -447,17 +446,17 @@ public boolean equals(Object obj) {
447446

448447
BucketAccessControl toBucketPb() {
449448
BucketAccessControl bucketPb = new BucketAccessControl();
450-
bucketPb.setRole(role().toString());
451449
bucketPb.setEntity(entity().toString());
450+
bucketPb.setRole(role().toString());
452451
bucketPb.setId(id());
453452
bucketPb.setEtag(etag());
454453
return bucketPb;
455454
}
456455

457456
ObjectAccessControl toObjectPb() {
458457
ObjectAccessControl objectPb = new ObjectAccessControl();
459-
objectPb.setRole(role().name());
460458
objectPb.setEntity(entity().toPb());
459+
objectPb.setRole(role().name());
461460
objectPb.setId(id());
462461
objectPb.setEtag(etag());
463462
return objectPb;

0 commit comments

Comments
 (0)