Skip to content

Commit 30166e4

Browse files
committed
---
yaml --- r: 5093 b: refs/heads/master c: 5376eff h: refs/heads/master i: 5091: c2d28b2
1 parent fe4da53 commit 30166e4

2 files changed

Lines changed: 20 additions & 21 deletions

File tree

  • trunk/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
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: b0046d0810b955e99f7fbee5e4f84c95ac3854bc
2+
refs/heads/master: 5376eff36a01a0707b3741c54497927d7a0929d3
33
refs/heads/travis: e21ee7b88a5edc3f3d8c71f90c3fc32abf7e8dd6
44
refs/heads/gh-pages: 7406918e071dd2c5677a638ae2a06e7592b6542c
55
refs/heads/pubsub-alpha: d6bbd32eed6cb48cda8d6798ee70ddd6bfc1f07d

trunk/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)