@@ -4026,8 +4026,9 @@ class LinkAudience(bb.Union):
40264026 merely points the user to the content, and does not grant additional
40274027 rights to the user. Members of the content who use this link can only
40284028 access the content with their pre-existing access rights.
4029- :ivar sharing.LinkAudience.password: A link-specific password is required to
4030- access the link. Login is not required.
4029+ :ivar sharing.LinkAudience.password: Use `require_password` instead. A
4030+ link-specific password is required to access the link. Login is not
4031+ required.
40314032 :ivar sharing.LinkAudience.members: Link is accessible only by members of
40324033 the content.
40334034 """
@@ -9096,11 +9097,10 @@ def _process_custom_annotations(self, annotation_type, field_path, processor):
90969097
90979098class SharedLinkSettings (bb .Struct ):
90989099 """
9099- :ivar sharing.SharedLinkSettings.requested_visibility: The requested access
9100- for this shared link.
9101- :ivar sharing.SharedLinkSettings.link_password: If ``requested_visibility``
9102- is ``RequestedVisibility.password`` this is needed to specify the
9103- password to access the link.
9100+ :ivar sharing.SharedLinkSettings.require_password: Boolean flag to enable or
9101+ disable password protection.
9102+ :ivar sharing.SharedLinkSettings.link_password: If ``require_password`` is
9103+ true, this is needed to specify the password to access the link.
91049104 :ivar sharing.SharedLinkSettings.expires: Expiration time of the shared
91059105 link. By default the link won't expire.
91069106 :ivar sharing.SharedLinkSettings.audience: The new audience who can benefit
@@ -9112,31 +9112,36 @@ class SharedLinkSettings(bb.Struct):
91129112 :ivar sharing.SharedLinkSettings.access: Requested access level you want the
91139113 audience to gain from this link. Note, modifying access level for an
91149114 existing link is not supported.
9115+ :ivar sharing.SharedLinkSettings.requested_visibility: Use ``audience``
9116+ instead. The requested access for this shared link.
91159117 """
91169118
91179119 __slots__ = [
9118- '_requested_visibility_value ' ,
9120+ '_require_password_value ' ,
91199121 '_link_password_value' ,
91209122 '_expires_value' ,
91219123 '_audience_value' ,
91229124 '_access_value' ,
9125+ '_requested_visibility_value' ,
91239126 ]
91249127
91259128 _has_required_fields = False
91269129
91279130 def __init__ (self ,
9128- requested_visibility = None ,
9131+ require_password = None ,
91299132 link_password = None ,
91309133 expires = None ,
91319134 audience = None ,
9132- access = None ):
9133- self ._requested_visibility_value = bb .NOT_SET
9135+ access = None ,
9136+ requested_visibility = None ):
9137+ self ._require_password_value = bb .NOT_SET
91349138 self ._link_password_value = bb .NOT_SET
91359139 self ._expires_value = bb .NOT_SET
91369140 self ._audience_value = bb .NOT_SET
91379141 self ._access_value = bb .NOT_SET
9138- if requested_visibility is not None :
9139- self .requested_visibility = requested_visibility
9142+ self ._requested_visibility_value = bb .NOT_SET
9143+ if require_password is not None :
9144+ self .require_password = require_password
91409145 if link_password is not None :
91419146 self .link_password = link_password
91429147 if expires is not None :
@@ -9145,9 +9150,11 @@ def __init__(self,
91459150 self .audience = audience
91469151 if access is not None :
91479152 self .access = access
9153+ if requested_visibility is not None :
9154+ self .requested_visibility = requested_visibility
91489155
9149- # Instance attribute type: RequestedVisibility (validator is set below)
9150- requested_visibility = bb .Attribute ("requested_visibility " , nullable = True , user_defined = True )
9156+ # Instance attribute type: bool (validator is set below)
9157+ require_password = bb .Attribute ("require_password " , nullable = True )
91519158
91529159 # Instance attribute type: str (validator is set below)
91539160 link_password = bb .Attribute ("link_password" , nullable = True )
@@ -9161,6 +9168,9 @@ def __init__(self,
91619168 # Instance attribute type: RequestedLinkAccessLevel (validator is set below)
91629169 access = bb .Attribute ("access" , nullable = True , user_defined = True )
91639170
9171+ # Instance attribute type: RequestedVisibility (validator is set below)
9172+ requested_visibility = bb .Attribute ("requested_visibility" , nullable = True , user_defined = True )
9173+
91649174 def _process_custom_annotations (self , annotation_type , field_path , processor ):
91659175 super (SharedLinkSettings , self )._process_custom_annotations (annotation_type , field_path , processor )
91669176
@@ -12594,24 +12604,27 @@ def _process_custom_annotations(self, annotation_type, field_path, processor):
1259412604SharedLinkPolicy .members = SharedLinkPolicy ('members' )
1259512605SharedLinkPolicy .other = SharedLinkPolicy ('other' )
1259612606
12597- SharedLinkSettings .requested_visibility .validator = bv .Nullable (RequestedVisibility_validator )
12607+ SharedLinkSettings .require_password .validator = bv .Nullable (bv . Boolean () )
1259812608SharedLinkSettings .link_password .validator = bv .Nullable (bv .String ())
1259912609SharedLinkSettings .expires .validator = bv .Nullable (common .DropboxTimestamp_validator )
1260012610SharedLinkSettings .audience .validator = bv .Nullable (LinkAudience_validator )
1260112611SharedLinkSettings .access .validator = bv .Nullable (RequestedLinkAccessLevel_validator )
12612+ SharedLinkSettings .requested_visibility .validator = bv .Nullable (RequestedVisibility_validator )
1260212613SharedLinkSettings ._all_field_names_ = set ([
12603- 'requested_visibility ' ,
12614+ 'require_password ' ,
1260412615 'link_password' ,
1260512616 'expires' ,
1260612617 'audience' ,
1260712618 'access' ,
12619+ 'requested_visibility' ,
1260812620])
1260912621SharedLinkSettings ._all_fields_ = [
12610- ('requested_visibility ' , SharedLinkSettings .requested_visibility .validator ),
12622+ ('require_password ' , SharedLinkSettings .require_password .validator ),
1261112623 ('link_password' , SharedLinkSettings .link_password .validator ),
1261212624 ('expires' , SharedLinkSettings .expires .validator ),
1261312625 ('audience' , SharedLinkSettings .audience .validator ),
1261412626 ('access' , SharedLinkSettings .access .validator ),
12627+ ('requested_visibility' , SharedLinkSettings .requested_visibility .validator ),
1261512628]
1261612629
1261712630SharedLinkSettingsError ._invalid_settings_validator = bv .Void ()
0 commit comments