Class Permission

java.lang.Object
com.microsoft.graph.models.Entity
com.microsoft.graph.models.Permission
All Implemented Interfaces:
com.microsoft.kiota.serialization.AdditionalDataHolder, com.microsoft.kiota.serialization.Parsable, com.microsoft.kiota.store.BackedModel

@Generated("com.microsoft.kiota") public class Permission extends Entity implements com.microsoft.kiota.serialization.Parsable
  • Constructor Details

    • Permission

      public Permission()
      Instantiates a new Permission and sets the default values.
  • Method Details

    • createFromDiscriminatorValue

      @Nonnull public static Permission createFromDiscriminatorValue(@Nonnull com.microsoft.kiota.serialization.ParseNode parseNode)
      Creates a new instance of the appropriate class based on discriminator value
      Parameters:
      parseNode - The parse node to use to read the discriminator value and create the object
      Returns:
      a Permission
    • getExpirationDateTime

      @Nullable public OffsetDateTime getExpirationDateTime()
      Gets the expirationDateTime property value. A format of yyyy-MM-ddTHH:mm:ssZ of DateTimeOffset indicates the expiration time of the permission. DateTime.MinValue indicates there's no expiration set for this permission. Optional.
      Returns:
      a OffsetDateTime
    • getFieldDeserializers

      @Nonnull public Map<String,Consumer<com.microsoft.kiota.serialization.ParseNode>> getFieldDeserializers()
      The deserialization information for the current model
      Specified by:
      getFieldDeserializers in interface com.microsoft.kiota.serialization.Parsable
      Overrides:
      getFieldDeserializers in class Entity
      Returns:
      a Map<String,Consumer<com.microsoft.kiota.serialization.ParseNode>>
    • getGrantedTo

      @Nullable public IdentitySet getGrantedTo()
      Gets the grantedTo property value. For user type permissions, the details of the users and applications for this permission. Read-only.
      Returns:
      a IdentitySet
    • getGrantedToIdentities

      @Nullable public List<IdentitySet> getGrantedToIdentities()
      Gets the grantedToIdentities property value. For type permissions, the details of the users to whom permission was granted. Read-only.
      Returns:
      a List<IdentitySet>
    • getGrantedToIdentitiesV2

      @Nullable public List<SharePointIdentitySet> getGrantedToIdentitiesV2()
      Gets the grantedToIdentitiesV2 property value. For link type permissions, the details of the users to whom permission was granted. Read-only.
      Returns:
      a List<SharePointIdentitySet>
    • getGrantedToV2

      @Nullable public SharePointIdentitySet getGrantedToV2()
      Gets the grantedToV2 property value. For user type permissions, the details of the users and applications for this permission. Read-only.
      Returns:
      a SharePointIdentitySet
    • getHasPassword

      @Nullable public Boolean getHasPassword()
      Gets the hasPassword property value. Indicates whether the password is set for this permission. This property only appears in the response. Optional. Read-only. For OneDrive Personal only..
      Returns:
      a Boolean
    • getInheritedFrom

      @Nullable public ItemReference getInheritedFrom()
      Gets the inheritedFrom property value. Provides a reference to the ancestor of the current permission, if it's inherited from an ancestor. Read-only.
      Returns:
      a ItemReference
    • getInvitation

      @Nullable public SharingInvitation getInvitation()
      Gets the invitation property value. Details of any associated sharing invitation for this permission. Read-only.
      Returns:
      a SharingInvitation
    • getLink

      @Nullable public SharingLink getLink()
      Gets the link property value. Provides the link details of the current permission, if it's a link type permission. Read-only.
      Returns:
      a SharingLink
    • getRoles

      @Nullable public List<String> getRoles()
      Gets the roles property value. The type of permission, for example, read. See below for the full list of roles. Read-only.
      Returns:
      a List<String>
    • getShareId

      @Nullable public String getShareId()
      Gets the shareId property value. A unique token that can be used to access this shared item via the shares API. Read-only.
      Returns:
      a String
    • serialize

      public void serialize(@Nonnull com.microsoft.kiota.serialization.SerializationWriter writer)
      Serializes information the current object
      Specified by:
      serialize in interface com.microsoft.kiota.serialization.Parsable
      Overrides:
      serialize in class Entity
      Parameters:
      writer - Serialization writer to use to serialize this model
    • setExpirationDateTime

      public void setExpirationDateTime(@Nullable OffsetDateTime value)
      Sets the expirationDateTime property value. A format of yyyy-MM-ddTHH:mm:ssZ of DateTimeOffset indicates the expiration time of the permission. DateTime.MinValue indicates there's no expiration set for this permission. Optional.
      Parameters:
      value - Value to set for the expirationDateTime property.
    • setGrantedTo

      public void setGrantedTo(@Nullable IdentitySet value)
      Sets the grantedTo property value. For user type permissions, the details of the users and applications for this permission. Read-only.
      Parameters:
      value - Value to set for the grantedTo property.
    • setGrantedToIdentities

      public void setGrantedToIdentities(@Nullable List<IdentitySet> value)
      Sets the grantedToIdentities property value. For type permissions, the details of the users to whom permission was granted. Read-only.
      Parameters:
      value - Value to set for the grantedToIdentities property.
    • setGrantedToIdentitiesV2

      public void setGrantedToIdentitiesV2(@Nullable List<SharePointIdentitySet> value)
      Sets the grantedToIdentitiesV2 property value. For link type permissions, the details of the users to whom permission was granted. Read-only.
      Parameters:
      value - Value to set for the grantedToIdentitiesV2 property.
    • setGrantedToV2

      public void setGrantedToV2(@Nullable SharePointIdentitySet value)
      Sets the grantedToV2 property value. For user type permissions, the details of the users and applications for this permission. Read-only.
      Parameters:
      value - Value to set for the grantedToV2 property.
    • setHasPassword

      public void setHasPassword(@Nullable Boolean value)
      Sets the hasPassword property value. Indicates whether the password is set for this permission. This property only appears in the response. Optional. Read-only. For OneDrive Personal only..
      Parameters:
      value - Value to set for the hasPassword property.
    • setInheritedFrom

      public void setInheritedFrom(@Nullable ItemReference value)
      Sets the inheritedFrom property value. Provides a reference to the ancestor of the current permission, if it's inherited from an ancestor. Read-only.
      Parameters:
      value - Value to set for the inheritedFrom property.
    • setInvitation

      public void setInvitation(@Nullable SharingInvitation value)
      Sets the invitation property value. Details of any associated sharing invitation for this permission. Read-only.
      Parameters:
      value - Value to set for the invitation property.
    • setLink

      public void setLink(@Nullable SharingLink value)
      Sets the link property value. Provides the link details of the current permission, if it's a link type permission. Read-only.
      Parameters:
      value - Value to set for the link property.
    • setRoles

      public void setRoles(@Nullable List<String> value)
      Sets the roles property value. The type of permission, for example, read. See below for the full list of roles. Read-only.
      Parameters:
      value - Value to set for the roles property.
    • setShareId

      public void setShareId(@Nullable String value)
      Sets the shareId property value. A unique token that can be used to access this shared item via the shares API. Read-only.
      Parameters:
      value - Value to set for the shareId property.