Class Permission

  • All Implemented Interfaces:
    com.github.davidmoten.odata.client.ODataEntityType, com.github.davidmoten.odata.client.ODataType

    public class Permission
    extends Entity
    implements com.github.davidmoten.odata.client.ODataEntityType
    • Constructor Detail

      • Permission

        protected Permission()
    • Method Detail

      • odataTypeName

        public String odataTypeName()
        Specified by:
        odataTypeName in interface com.github.davidmoten.odata.client.ODataType
        Overrides:
        odataTypeName in class Entity
      • builderPermission

        public static Permission.Builder builderPermission()
        Returns a builder which is used to create a new instance of this class (given that this class is immutable).
        Returns:
        a new Builder for this class
      • getChangedFields

        public com.github.davidmoten.odata.client.internal.ChangedFields getChangedFields()
        Specified by:
        getChangedFields in interface com.github.davidmoten.odata.client.ODataEntityType
        Overrides:
        getChangedFields in class Entity
      • postInject

        public void postInject​(boolean addKeysToContextPath)
        Specified by:
        postInject in interface com.github.davidmoten.odata.client.ODataType
        Overrides:
        postInject in class Entity
      • getGrantedTo

        public Optional<IdentitySet> getGrantedTo()

        Org.OData.Core.V1.Revisions

        Returns:
        property grantedTo
      • withGrantedTo

        public Permission withGrantedTo​(IdentitySet grantedTo)
        Returns an immutable copy of this with just the grantedTo field changed. Field description below. The field name is also added to an internal map of changed fields in the returned object so that when this.patch() is called (if available)on the returned object only the changed fields are submitted.

        Org.OData.Core.V1.Revisions

        Parameters:
        grantedTo - new value of grantedTo field (as defined in service metadata)
        Returns:
        immutable copy of this with just the grantedTo field changed
      • getGrantedToIdentities

        public com.github.davidmoten.odata.client.CollectionPage<IdentitySet> getGrantedToIdentities()

        Org.OData.Core.V1.Revisions

        Returns:
        property grantedToIdentities
      • withGrantedToIdentities

        public Permission withGrantedToIdentities​(List<IdentitySet> grantedToIdentities)
        Returns an immutable copy of this with just the grantedToIdentities field changed. Field description below. The field name is also added to an internal map of changed fields in the returned object so that when this.patch() is called (if available)on the returned object only the changed fields are submitted.

        Org.OData.Core.V1.Revisions

        Parameters:
        grantedToIdentities - new value of grantedToIdentities field (as defined in service metadata)
        Returns:
        immutable copy of this with just the grantedToIdentities field changed
      • getGrantedToIdentities

        public com.github.davidmoten.odata.client.CollectionPage<IdentitySet> getGrantedToIdentities​(com.github.davidmoten.odata.client.HttpRequestOptions options)

        Org.OData.Core.V1.Revisions

        Parameters:
        options - specify connect and read timeouts
        Returns:
        property grantedToIdentities
      • getGrantedToIdentitiesV2

        public com.github.davidmoten.odata.client.CollectionPage<SharePointIdentitySet> getGrantedToIdentitiesV2()
      • getGrantedToIdentitiesV2

        public com.github.davidmoten.odata.client.CollectionPage<SharePointIdentitySet> getGrantedToIdentitiesV2​(com.github.davidmoten.odata.client.HttpRequestOptions options)
      • getRoles

        public com.github.davidmoten.odata.client.CollectionPage<String> getRoles()
      • getRoles

        public com.github.davidmoten.odata.client.CollectionPage<String> getRoles​(com.github.davidmoten.odata.client.HttpRequestOptions options)
      • getUnmappedFields

        public com.github.davidmoten.odata.client.UnmappedFields getUnmappedFields()
        Specified by:
        getUnmappedFields in interface com.github.davidmoten.odata.client.ODataType
        Overrides:
        getUnmappedFields in class Entity
      • patch

        public Permission patch()
        Submits only changed fields for update and returns an immutable copy of this with changed fields reset.
        Overrides:
        patch in class Entity
        Returns:
        a copy of this with changed fields reset
        Throws:
        com.github.davidmoten.odata.client.ClientException - if HTTP response is not as expected
      • put

        public Permission put()
        Submits all fields for update and returns an immutable copy of this with changed fields reset (they were ignored anyway).
        Overrides:
        put in class Entity
        Returns:
        a copy of this with changed fields reset
        Throws:
        com.github.davidmoten.odata.client.ClientException - if HTTP response is not as expected
      • revokeGrants

        public com.github.davidmoten.odata.client.ActionRequestReturningNonCollectionUnwrapped<Permission> revokeGrants​(List<DriveRecipient> grantees)