com.baidubce.services.bos.model
Class Grant

java.lang.Object
  extended by com.baidubce.services.bos.model.Grant

public class Grant
extends Object

Specifies a grant, consisting of one grantee and one permission.


Constructor Summary
Grant()
          Constructs a void Constructor for Bucket Acl Grant.
Grant(List<Grantee> grantee, List<Permission> permission)
          Constructs a new Grant object using the specified grantee and permission objects.
 
Method Summary
 boolean equals(Object obj)
           
 Condition getCondition()
          Gets the condition of Bucket Acl.
 String getEffect()
          Gets effect of Bucket Acl
 List<Grantee> getGrantee()
          Gets the grantee being granted a permission by this grant.
 List<String> getNotResource()
          Gets notResource of Bucket Acl.
 List<Permission> getPermission()
          Gets the permission being granted to the grantee by this grant.
 List<String> getResource()
          Gets the resource of Bucket Acl.
 int hashCode()
           
 void setCondition(Condition condition)
          Sets the condition of Bucket Acl.
 void setEffect(String effect)
          Sets effect of Bucket Acl
 void setGrantee(List<Grantee> grantee)
          Sets the grantee being granted a permission by this grant.
 void setNotResource(List<String> notResource)
          Sets notResource of Bucket Acl.
 void setPermission(List<Permission> permission)
          Sets the permission being granted to the grantee by this grant.
 void setResource(List<String> resource)
          Sets the resource of Bucket Acl.
 String toString()
           
 Grant withCondition(Condition condition)
          Sets the condtion of Bucket Acl.
 Grant withEffect(String effect)
          Sets effect of Bucket Acl
 Grant withGrantee(List<Grantee> grantee)
          Sets the grantee being granted a permission by this grant.
 Grant withNotResource(List<String> notResource)
          Sets notResource of Bucket Acl.
 Grant withPermission(List<Permission> permission)
          Sets the permission being granted to the grantee by this grant.
 Grant withResource(List<String> resource)
          Sets the resource of Bucket Acl.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Grant

public Grant(List<Grantee> grantee,
             List<Permission> permission)
Constructs a new Grant object using the specified grantee and permission objects.

Parameters:
grantee - The grantee being granted a permission by this grant.
permission - The permission being granted to the grantee by this grant.

Grant

public Grant()
Constructs a void Constructor for Bucket Acl Grant.

Method Detail

getGrantee

public List<Grantee> getGrantee()
Gets the grantee being granted a permission by this grant.

Returns:
The grantee being granted a permission by this grant.

setGrantee

public void setGrantee(List<Grantee> grantee)
Sets the grantee being granted a permission by this grant.

Parameters:
grantee - The grantee being granted a permission by this grant.

withGrantee

public Grant withGrantee(List<Grantee> grantee)
Sets the grantee being granted a permission by this grant.

Parameters:
grantee - The grantee being granted a permission by this grant.
Returns:
this object.

getPermission

public List<Permission> getPermission()
Gets the permission being granted to the grantee by this grant.

Returns:
The permission being granted to the grantee by this grant.

setPermission

public void setPermission(List<Permission> permission)
Sets the permission being granted to the grantee by this grant.

Parameters:
permission - The permission being granted to the grantee by this grant.

withPermission

public Grant withPermission(List<Permission> permission)
Sets the permission being granted to the grantee by this grant.

Parameters:
permission - The permission being granted to the grantee by this grant.
Returns:
this object

getCondition

public Condition getCondition()
Gets the condition of Bucket Acl.

Returns:
the condition of Bucket Acl.

setCondition

public void setCondition(Condition condition)
Sets the condition of Bucket Acl.

Parameters:
condition - The condtion of Bucket Acl.

withCondition

public Grant withCondition(Condition condition)
Sets the condtion of Bucket Acl.

Parameters:
condition - The condtion of Bucket Acl.
Returns:
this object.

getResource

public List<String> getResource()
Gets the resource of Bucket Acl.

Returns:
the resource of Bucket Acl.

setResource

public void setResource(List<String> resource)
Sets the resource of Bucket Acl.

Parameters:
resource - The resource of Bucket Acl.

withResource

public Grant withResource(List<String> resource)
Sets the resource of Bucket Acl.

Parameters:
resource - The resource of Bucket Acl.
Returns:
this object.

getNotResource

public List<String> getNotResource()
Gets notResource of Bucket Acl.

Returns:
the notResource if Bucket Acl.

setNotResource

public void setNotResource(List<String> notResource)
Sets notResource of Bucket Acl.

Parameters:
notResource - The notResource if Bucket Acl.

withNotResource

public Grant withNotResource(List<String> notResource)
Sets notResource of Bucket Acl.

Parameters:
notResource - The notResource of Bucket Acl.
Returns:
this object.

getEffect

public String getEffect()
Gets effect of Bucket Acl

Returns:
the effect of Bucket Acl

setEffect

public void setEffect(String effect)
Sets effect of Bucket Acl

Parameters:
effect -

withEffect

public Grant withEffect(String effect)
Sets effect of Bucket Acl

Parameters:
effect -
Returns:
this object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2020. All rights reserved.