Class LinkSettings


  • public class LinkSettings
    extends java.lang.Object
    Settings that apply to a link.
    • Constructor Detail

      • LinkSettings

        public LinkSettings​(@Nullable
                            AccessLevel accessLevel,
                            @Nullable
                            LinkAudience audience,
                            @Nullable
                            LinkExpiry expiry,
                            @Nullable
                            LinkPassword password)
        Settings that apply to a link.

        Use newBuilder() to create instances of this class without specifying values for all optional fields.

        Parameters:
        accessLevel - The access level on the link for this file. Currently, it only accepts 'viewer' and 'viewer_no_comment'.
        audience - The type of audience on the link for this file.
        expiry - An expiry timestamp to set on a link.
        password - The password for the link.
      • LinkSettings

        public LinkSettings()
        Settings that apply to a link.

        The default values for unset fields will be used.

    • Method Detail

      • getAccessLevel

        @Nullable
        public AccessLevel getAccessLevel()
        The access level on the link for this file. Currently, it only accepts 'viewer' and 'viewer_no_comment'.
        Returns:
        value for this field, or null if not present.
      • getAudience

        @Nullable
        public LinkAudience getAudience()
        The type of audience on the link for this file.
        Returns:
        value for this field, or null if not present.
      • getExpiry

        @Nullable
        public LinkExpiry getExpiry()
        An expiry timestamp to set on a link.
        Returns:
        value for this field, or null if not present.
      • getPassword

        @Nullable
        public LinkPassword getPassword()
        The password for the link.
        Returns:
        value for this field, or null if not present.
      • newBuilder

        public static LinkSettings.Builder newBuilder()
        Returns a new builder for creating an instance of this class.
        Returns:
        builder for this class.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • toStringMultiline

        public java.lang.String toStringMultiline()
        Returns a String representation of this object formatted for easier readability.

        The returned String may contain newlines.

        Returns:
        Formatted, multiline String representation of this object