Ejemplo n.º 1
0
class TimeRange(bb.Struct):
    """
    Time range.

    :ivar team_common.TimeRange.start_time: Optional starting time (inclusive).
    :ivar team_common.TimeRange.end_time: Optional ending time (exclusive).
    """

    __slots__ = [
        '_start_time_value',
        '_end_time_value',
    ]

    _has_required_fields = False

    def __init__(self, start_time=None, end_time=None):
        self._start_time_value = bb.NOT_SET
        self._end_time_value = bb.NOT_SET
        if start_time is not None:
            self.start_time = start_time
        if end_time is not None:
            self.end_time = end_time

    # Instance attribute type: datetime.datetime (validator is set below)
    start_time = bb.Attribute("start_time", nullable=True)

    # Instance attribute type: datetime.datetime (validator is set below)
    end_time = bb.Attribute("end_time", nullable=True)

    def _process_custom_annotations(self, annotation_type, field_path,
                                    processor):
        super(TimeRange,
              self)._process_custom_annotations(annotation_type, field_path,
                                                processor)
Ejemplo n.º 2
0
class Team(bb.Struct):
    """
    Information about a team.

    :ivar users.Team.id: The team's unique ID.
    :ivar users.Team.name: The name of the team.
    """

    __slots__ = [
        '_id_value',
        '_name_value',
    ]

    _has_required_fields = True

    def __init__(self,
                 id=None,
                 name=None):
        self._id_value = bb.NOT_SET
        self._name_value = bb.NOT_SET
        if id is not None:
            self.id = id
        if name is not None:
            self.name = name

    # Instance attribute type: str (validator is set below)
    id = bb.Attribute("id")

    # Instance attribute type: str (validator is set below)
    name = bb.Attribute("name")

    def _process_custom_annotations(self, annotation_type, field_path, processor):
        super(Team, self)._process_custom_annotations(annotation_type, field_path, processor)
Ejemplo n.º 3
0
class SecondaryEmail(bb.Struct):
    """
    :ivar secondary_emails.SecondaryEmail.email: Secondary email address.
    :ivar secondary_emails.SecondaryEmail.is_verified: Whether or not the
        secondary email address is verified to be owned by a user.
    """

    __slots__ = [
        '_email_value',
        '_is_verified_value',
    ]

    _has_required_fields = True

    def __init__(self, email=None, is_verified=None):
        self._email_value = bb.NOT_SET
        self._is_verified_value = bb.NOT_SET
        if email is not None:
            self.email = email
        if is_verified is not None:
            self.is_verified = is_verified

    # Instance attribute type: str (validator is set below)
    email = bb.Attribute("email")

    # Instance attribute type: bool (validator is set below)
    is_verified = bb.Attribute("is_verified")

    def _process_custom_annotations(self, annotation_type, field_path,
                                    processor):
        super(SecondaryEmail,
              self)._process_custom_annotations(annotation_type, field_path,
                                                processor)
Ejemplo n.º 4
0
class FileRequestDeadline(bb.Struct):
    """
    :ivar file_requests.FileRequestDeadline.deadline: The deadline for this file
        request.
    :ivar file_requests.FileRequestDeadline.allow_late_uploads: If set, allow
        uploads after the deadline has passed. These     uploads will be marked
        overdue.
    """

    __slots__ = [
        '_deadline_value',
        '_allow_late_uploads_value',
    ]

    _has_required_fields = True

    def __init__(self,
                 deadline=None,
                 allow_late_uploads=None):
        self._deadline_value = bb.NOT_SET
        self._allow_late_uploads_value = bb.NOT_SET
        if deadline is not None:
            self.deadline = deadline
        if allow_late_uploads is not None:
            self.allow_late_uploads = allow_late_uploads

    # Instance attribute type: datetime.datetime (validator is set below)
    deadline = bb.Attribute("deadline")

    # Instance attribute type: GracePeriod (validator is set below)
    allow_late_uploads = bb.Attribute("allow_late_uploads", nullable=True, user_defined=True)

    def _process_custom_annotations(self, annotation_type, field_path, processor):
        super(FileRequestDeadline, self)._process_custom_annotations(annotation_type, field_path, processor)
Ejemplo n.º 5
0
class RateLimitError(bb.Struct):
    """
    Error occurred because the app is being rate limited.

    :ivar auth.RateLimitError.reason: The reason why the app is being rate
        limited.
    :ivar auth.RateLimitError.retry_after: The number of seconds that the app
        should wait before making another request.
    """

    __slots__ = [
        '_reason_value',
        '_retry_after_value',
    ]

    _has_required_fields = True

    def __init__(self,
                 reason=None,
                 retry_after=None):
        self._reason_value = bb.NOT_SET
        self._retry_after_value = bb.NOT_SET
        if reason is not None:
            self.reason = reason
        if retry_after is not None:
            self.retry_after = retry_after

    # Instance attribute type: RateLimitReason (validator is set below)
    reason = bb.Attribute("reason", user_defined=True)

    # Instance attribute type: int (validator is set below)
    retry_after = bb.Attribute("retry_after")

    def _process_custom_annotations(self, annotation_type, field_path, processor):
        super(RateLimitError, self)._process_custom_annotations(annotation_type, field_path, processor)
Ejemplo n.º 6
0
class TokenFromOAuth1Arg(bb.Struct):
    """
    :ivar auth.TokenFromOAuth1Arg.oauth1_token: The supplied OAuth 1.0 access
        token.
    :ivar auth.TokenFromOAuth1Arg.oauth1_token_secret: The token secret
        associated with the supplied access token.
    """

    __slots__ = [
        '_oauth1_token_value',
        '_oauth1_token_secret_value',
    ]

    _has_required_fields = True

    def __init__(self, oauth1_token=None, oauth1_token_secret=None):
        self._oauth1_token_value = bb.NOT_SET
        self._oauth1_token_secret_value = bb.NOT_SET
        if oauth1_token is not None:
            self.oauth1_token = oauth1_token
        if oauth1_token_secret is not None:
            self.oauth1_token_secret = oauth1_token_secret

    # Instance attribute type: str (validator is set below)
    oauth1_token = bb.Attribute("oauth1_token")

    # Instance attribute type: str (validator is set below)
    oauth1_token_secret = bb.Attribute("oauth1_token_secret")

    def _process_custom_annotations(self, annotation_type, field_path,
                                    processor):
        super(TokenFromOAuth1Arg,
              self)._process_custom_annotations(annotation_type, field_path,
                                                processor)
Ejemplo n.º 7
0
class SpaceUsage(bb.Struct):
    """
    Information about a user's space usage and quota.

    :ivar users.SpaceUsage.used: The user's total space usage (bytes).
    :ivar users.SpaceUsage.allocation: The user's space allocation.
    """

    __slots__ = [
        '_used_value',
        '_allocation_value',
    ]

    _has_required_fields = True

    def __init__(self,
                 used=None,
                 allocation=None):
        self._used_value = bb.NOT_SET
        self._allocation_value = bb.NOT_SET
        if used is not None:
            self.used = used
        if allocation is not None:
            self.allocation = allocation

    # Instance attribute type: int (validator is set below)
    used = bb.Attribute("used")

    # Instance attribute type: SpaceAllocation (validator is set below)
    allocation = bb.Attribute("allocation", user_defined=True)

    def _process_custom_annotations(self, annotation_type, field_path, processor):
        super(SpaceUsage, self)._process_custom_annotations(annotation_type, field_path, processor)
Ejemplo n.º 8
0
class BasicAccount(Account):
    """
    Basic information about any account.

    :ivar users.BasicAccount.is_teammate: Whether this user is a teammate of the
        current user. If this account is the current user's account, then this
        will be ``True``.
    :ivar users.BasicAccount.team_member_id: The user's unique team member id.
        This field will only be present if the user is part of a team and
        ``is_teammate`` is ``True``.
    """

    __slots__ = [
        '_is_teammate_value',
        '_team_member_id_value',
    ]

    _has_required_fields = True

    def __init__(self,
                 account_id=None,
                 name=None,
                 email=None,
                 email_verified=None,
                 disabled=None,
                 is_teammate=None,
                 profile_photo_url=None,
                 team_member_id=None):
        super(BasicAccount, self).__init__(account_id,
                                           name,
                                           email,
                                           email_verified,
                                           disabled,
                                           profile_photo_url)
        self._is_teammate_value = bb.NOT_SET
        self._team_member_id_value = bb.NOT_SET
        if is_teammate is not None:
            self.is_teammate = is_teammate
        if team_member_id is not None:
            self.team_member_id = team_member_id

    # Instance attribute type: bool (validator is set below)
    is_teammate = bb.Attribute("is_teammate")

    # Instance attribute type: str (validator is set below)
    team_member_id = bb.Attribute("team_member_id", nullable=True)

    def _process_custom_annotations(self, annotation_type, field_path, processor):
        super(BasicAccount, self)._process_custom_annotations(annotation_type, field_path, processor)
Ejemplo n.º 9
0
class ListFileRequestsV2Result(bb.Struct):
    """
    Result for :meth:`dropbox.dropbox_client.Dropbox.file_requests_list` and
    :meth:`dropbox.dropbox_client.Dropbox.file_requests_list_continue`.

    :ivar file_requests.ListFileRequestsV2Result.file_requests: The file
        requests owned by this user. Apps with the app folder permission will
        only see file requests in their app folder.
    :ivar file_requests.ListFileRequestsV2Result.cursor: Pass the cursor into
        :meth:`dropbox.dropbox_client.Dropbox.file_requests_list_continue` to
        obtain additional file requests.
    :ivar file_requests.ListFileRequestsV2Result.has_more: Is true if there are
        additional file requests that have not been returned yet. An additional
        call to :route:list/continue` can retrieve them.
    """

    __slots__ = [
        '_file_requests_value',
        '_cursor_value',
        '_has_more_value',
    ]

    _has_required_fields = True

    def __init__(self,
                 file_requests=None,
                 cursor=None,
                 has_more=None):
        self._file_requests_value = bb.NOT_SET
        self._cursor_value = bb.NOT_SET
        self._has_more_value = bb.NOT_SET
        if file_requests is not None:
            self.file_requests = file_requests
        if cursor is not None:
            self.cursor = cursor
        if has_more is not None:
            self.has_more = has_more

    # Instance attribute type: list of [FileRequest] (validator is set below)
    file_requests = bb.Attribute("file_requests")

    # Instance attribute type: str (validator is set below)
    cursor = bb.Attribute("cursor")

    # Instance attribute type: bool (validator is set below)
    has_more = bb.Attribute("has_more")

    def _process_custom_annotations(self, annotation_type, field_path, processor):
        super(ListFileRequestsV2Result, self)._process_custom_annotations(annotation_type, field_path, processor)
Ejemplo n.º 10
0
class ListFileRequestsResult(bb.Struct):
    """
    Result for :meth:`dropbox.dropbox_client.Dropbox.file_requests_list`.

    :ivar file_requests.ListFileRequestsResult.file_requests: The file requests
        owned by this user. Apps with the app folder permission will only see
        file requests in their app folder.
    """

    __slots__ = [
        '_file_requests_value',
    ]

    _has_required_fields = True

    def __init__(self,
                 file_requests=None):
        self._file_requests_value = bb.NOT_SET
        if file_requests is not None:
            self.file_requests = file_requests

    # Instance attribute type: list of [FileRequest] (validator is set below)
    file_requests = bb.Attribute("file_requests")

    def _process_custom_annotations(self, annotation_type, field_path, processor):
        super(ListFileRequestsResult, self)._process_custom_annotations(annotation_type, field_path, processor)
Ejemplo n.º 11
0
class GetAccountBatchArg(bb.Struct):
    """
    :ivar users.GetAccountBatchArg.account_ids: List of user account
        identifiers.  Should not contain any duplicate account IDs.
    """

    __slots__ = [
        '_account_ids_value',
    ]

    _has_required_fields = True

    def __init__(self, account_ids=None):
        self._account_ids_value = bb.NOT_SET
        if account_ids is not None:
            self.account_ids = account_ids

    # Instance attribute type: list of [str] (validator is set below)
    account_ids = bb.Attribute("account_ids")

    def _process_custom_annotations(self, annotation_type, field_path,
                                    processor):
        super(GetAccountBatchArg,
              self)._process_custom_annotations(annotation_type, field_path,
                                                processor)
Ejemplo n.º 12
0
class UserFeaturesGetValuesBatchArg(bb.Struct):
    """
    :ivar users.UserFeaturesGetValuesBatchArg.features: A list of features in
        :class:`UserFeature`. If the list is empty, this route will return
        :class:`UserFeaturesGetValuesBatchError`.
    """

    __slots__ = [
        '_features_value',
    ]

    _has_required_fields = True

    def __init__(self, features=None):
        self._features_value = bb.NOT_SET
        if features is not None:
            self.features = features

    # Instance attribute type: list of [UserFeature] (validator is set below)
    features = bb.Attribute("features")

    def _process_custom_annotations(self, annotation_type, field_path,
                                    processor):
        super(UserFeaturesGetValuesBatchArg,
              self)._process_custom_annotations(annotation_type, field_path,
                                                processor)
Ejemplo n.º 13
0
class PollArg(bb.Struct):
    """
    Arguments for methods that poll the status of an asynchronous job.

    :ivar async.PollArg.async_job_id: Id of the asynchronous job. This is the
        value of a response returned from the method that launched the job.
    """

    __slots__ = [
        '_async_job_id_value',
    ]

    _has_required_fields = True

    def __init__(self,
                 async_job_id=None):
        self._async_job_id_value = bb.NOT_SET
        if async_job_id is not None:
            self.async_job_id = async_job_id

    # Instance attribute type: str (validator is set below)
    async_job_id = bb.Attribute("async_job_id")

    def _process_custom_annotations(self, annotation_type, field_path, processor):
        super(PollArg, self)._process_custom_annotations(annotation_type, field_path, processor)
Ejemplo n.º 14
0
class CountFileRequestsResult(bb.Struct):
    """
    Result for :meth:`dropbox.dropbox_client.Dropbox.file_requests_count`.

    :ivar file_requests.CountFileRequestsResult.file_request_count: The number
        file requests owner by this user.
    """

    __slots__ = [
        '_file_request_count_value',
    ]

    _has_required_fields = True

    def __init__(self,
                 file_request_count=None):
        self._file_request_count_value = bb.NOT_SET
        if file_request_count is not None:
            self.file_request_count = file_request_count

    # Instance attribute type: int (validator is set below)
    file_request_count = bb.Attribute("file_request_count")

    def _process_custom_annotations(self, annotation_type, field_path, processor):
        super(CountFileRequestsResult, self)._process_custom_annotations(annotation_type, field_path, processor)
Ejemplo n.º 15
0
class ListFileRequestsArg(bb.Struct):
    """
    Arguments for :meth:`dropbox.dropbox_client.Dropbox.file_requests_list`.

    :ivar file_requests.ListFileRequestsArg.limit: The maximum number of file
        requests that should be returned per request.
    """

    __slots__ = [
        '_limit_value',
    ]

    _has_required_fields = False

    def __init__(self,
                 limit=None):
        self._limit_value = bb.NOT_SET
        if limit is not None:
            self.limit = limit

    # Instance attribute type: int (validator is set below)
    limit = bb.Attribute("limit")

    def _process_custom_annotations(self, annotation_type, field_path, processor):
        super(ListFileRequestsArg, self)._process_custom_annotations(annotation_type, field_path, processor)
Ejemplo n.º 16
0
class GetFileRequestArgs(bb.Struct):
    """
    Arguments for :meth:`dropbox.dropbox_client.Dropbox.file_requests_get`.

    :ivar file_requests.GetFileRequestArgs.id: The ID of the file request to
        retrieve.
    """

    __slots__ = [
        '_id_value',
    ]

    _has_required_fields = True

    def __init__(self,
                 id=None):
        self._id_value = bb.NOT_SET
        if id is not None:
            self.id = id

    # Instance attribute type: str (validator is set below)
    id = bb.Attribute("id")

    def _process_custom_annotations(self, annotation_type, field_path, processor):
        super(GetFileRequestArgs, self)._process_custom_annotations(annotation_type, field_path, processor)
Ejemplo n.º 17
0
class DeleteFileRequestsResult(bb.Struct):
    """
    Result for :meth:`dropbox.dropbox_client.Dropbox.file_requests_delete`.

    :ivar file_requests.DeleteFileRequestsResult.file_requests: The file
        requests deleted by the request.
    """

    __slots__ = [
        '_file_requests_value',
    ]

    _has_required_fields = True

    def __init__(self,
                 file_requests=None):
        self._file_requests_value = bb.NOT_SET
        if file_requests is not None:
            self.file_requests = file_requests

    # Instance attribute type: list of [FileRequest] (validator is set below)
    file_requests = bb.Attribute("file_requests")

    def _process_custom_annotations(self, annotation_type, field_path, processor):
        super(DeleteFileRequestsResult, self)._process_custom_annotations(annotation_type, field_path, processor)
Ejemplo n.º 18
0
class DeleteFileRequestArgs(bb.Struct):
    """
    Arguments for :meth:`dropbox.dropbox_client.Dropbox.file_requests_delete`.

    :ivar file_requests.DeleteFileRequestArgs.ids: List IDs of the file requests
        to delete.
    """

    __slots__ = [
        '_ids_value',
    ]

    _has_required_fields = True

    def __init__(self,
                 ids=None):
        self._ids_value = bb.NOT_SET
        if ids is not None:
            self.ids = ids

    # Instance attribute type: list of [str] (validator is set below)
    ids = bb.Attribute("ids")

    def _process_custom_annotations(self, annotation_type, field_path, processor):
        super(DeleteFileRequestArgs, self)._process_custom_annotations(annotation_type, field_path, processor)
Ejemplo n.º 19
0
class EchoResult(bb.Struct):
    """
    EchoResult contains the result returned from the Dropbox servers.

    :ivar check.EchoResult.result: If everything worked correctly, this would be
        the same as query.
    """

    __slots__ = [
        '_result_value',
    ]

    _has_required_fields = False

    def __init__(self, result=None):
        self._result_value = bb.NOT_SET
        if result is not None:
            self.result = result

    # Instance attribute type: str (validator is set below)
    result = bb.Attribute("result")

    def _process_custom_annotations(self, annotation_type, field_path,
                                    processor):
        super(EchoResult,
              self)._process_custom_annotations(annotation_type, field_path,
                                                processor)
Ejemplo n.º 20
0
class EchoArg(bb.Struct):
    """
    EchoArg contains the arguments to be sent to the Dropbox servers.

    :ivar check.EchoArg.query: The string that you'd like to be echoed back to
        you.
    """

    __slots__ = [
        '_query_value',
    ]

    _has_required_fields = False

    def __init__(self, query=None):
        self._query_value = bb.NOT_SET
        if query is not None:
            self.query = query

    # Instance attribute type: str (validator is set below)
    query = bb.Attribute("query")

    def _process_custom_annotations(self, annotation_type, field_path,
                                    processor):
        super(EchoArg,
              self)._process_custom_annotations(annotation_type, field_path,
                                                processor)
Ejemplo n.º 21
0
class IndividualSpaceAllocation(bb.Struct):
    """
    :ivar users.IndividualSpaceAllocation.allocated: The total space allocated
        to the user's account (bytes).
    """

    __slots__ = [
        '_allocated_value',
    ]

    _has_required_fields = True

    def __init__(self, allocated=None):
        self._allocated_value = bb.NOT_SET
        if allocated is not None:
            self.allocated = allocated

    # Instance attribute type: int (validator is set below)
    allocated = bb.Attribute("allocated")

    def _process_custom_annotations(self, annotation_type, field_path,
                                    processor):
        super(IndividualSpaceAllocation,
              self)._process_custom_annotations(annotation_type, field_path,
                                                processor)
Ejemplo n.º 22
0
class SetProfilePhotoResult(bb.Struct):
    """
    :ivar account.SetProfilePhotoResult.profile_photo_url: URL for the photo
        representing the user, if one is set.
    """

    __slots__ = [
        '_profile_photo_url_value',
    ]

    _has_required_fields = True

    def __init__(self, profile_photo_url=None):
        self._profile_photo_url_value = bb.NOT_SET
        if profile_photo_url is not None:
            self.profile_photo_url = profile_photo_url

    # Instance attribute type: str (validator is set below)
    profile_photo_url = bb.Attribute("profile_photo_url")

    def _process_custom_annotations(self, annotation_type, field_path,
                                    processor):
        super(SetProfilePhotoResult,
              self)._process_custom_annotations(annotation_type, field_path,
                                                processor)
Ejemplo n.º 23
0
class SetProfilePhotoArg(bb.Struct):
    """
    :ivar account.SetProfilePhotoArg.photo: Image to set as the user's new
        profile photo.
    """

    __slots__ = [
        '_photo_value',
    ]

    _has_required_fields = True

    def __init__(self, photo=None):
        self._photo_value = bb.NOT_SET
        if photo is not None:
            self.photo = photo

    # Instance attribute type: PhotoSourceArg (validator is set below)
    photo = bb.Attribute("photo", user_defined=True)

    def _process_custom_annotations(self, annotation_type, field_path,
                                    processor):
        super(SetProfilePhotoArg,
              self)._process_custom_annotations(annotation_type, field_path,
                                                processor)
Ejemplo n.º 24
0
class TokenFromOAuth1Result(bb.Struct):
    """
    :ivar auth.TokenFromOAuth1Result.oauth2_token: The OAuth 2.0 token generated
        from the supplied OAuth 1.0 token.
    """

    __slots__ = [
        '_oauth2_token_value',
    ]

    _has_required_fields = True

    def __init__(self, oauth2_token=None):
        self._oauth2_token_value = bb.NOT_SET
        if oauth2_token is not None:
            self.oauth2_token = oauth2_token

    # Instance attribute type: str (validator is set below)
    oauth2_token = bb.Attribute("oauth2_token")

    def _process_custom_annotations(self, annotation_type, field_path,
                                    processor):
        super(TokenFromOAuth1Result,
              self)._process_custom_annotations(annotation_type, field_path,
                                                processor)
Ejemplo n.º 25
0
class TokenScopeError(bb.Struct):
    """
    :ivar auth.TokenScopeError.required_scope: The required scope to access the
        route.
    """

    __slots__ = [
        '_required_scope_value',
    ]

    _has_required_fields = True

    def __init__(self, required_scope=None):
        self._required_scope_value = bb.NOT_SET
        if required_scope is not None:
            self.required_scope = required_scope

    # Instance attribute type: str (validator is set below)
    required_scope = bb.Attribute("required_scope")

    def _process_custom_annotations(self, annotation_type, field_path,
                                    processor):
        super(TokenScopeError,
              self)._process_custom_annotations(annotation_type, field_path,
                                                processor)
Ejemplo n.º 26
0
class DeleteManualContactsArg(bb.Struct):
    """
    :ivar contacts.DeleteManualContactsArg.email_addresses: List of manually
        added contacts to be deleted.
    """

    __slots__ = [
        '_email_addresses_value',
    ]

    _has_required_fields = True

    def __init__(self, email_addresses=None):
        self._email_addresses_value = bb.NOT_SET
        if email_addresses is not None:
            self.email_addresses = email_addresses

    # Instance attribute type: list of [str] (validator is set below)
    email_addresses = bb.Attribute("email_addresses")

    def _process_custom_annotations(self, annotation_type, field_path,
                                    processor):
        super(DeleteManualContactsArg,
              self)._process_custom_annotations(annotation_type, field_path,
                                                processor)
Ejemplo n.º 27
0
class TeamRootInfo(RootInfo):
    """
    Root info when user is member of a team with a separate root namespace ID.

    :ivar common.TeamRootInfo.home_path: The path for user's home directory
        under the shared team root.
    """

    __slots__ = [
        '_home_path_value',
    ]

    _has_required_fields = True

    def __init__(self,
                 root_namespace_id=None,
                 home_namespace_id=None,
                 home_path=None):
        super(TeamRootInfo, self).__init__(root_namespace_id,
                                           home_namespace_id)
        self._home_path_value = bb.NOT_SET
        if home_path is not None:
            self.home_path = home_path

    # Instance attribute type: str (validator is set below)
    home_path = bb.Attribute("home_path")

    def _process_custom_annotations(self, annotation_type, field_path,
                                    processor):
        super(TeamRootInfo,
              self)._process_custom_annotations(annotation_type, field_path,
                                                processor)
Ejemplo n.º 28
0
class FullTeam(Team):
    """
    Detailed information about a team.

    :ivar users.FullTeam.sharing_policies: Team policies governing sharing.
    :ivar users.FullTeam.office_addin_policy: Team policy governing the use of
        the Office Add-In.
    """

    __slots__ = [
        '_sharing_policies_value',
        '_office_addin_policy_value',
    ]

    _has_required_fields = True

    def __init__(self,
                 id=None,
                 name=None,
                 sharing_policies=None,
                 office_addin_policy=None):
        super(FullTeam, self).__init__(id, name)
        self._sharing_policies_value = bb.NOT_SET
        self._office_addin_policy_value = bb.NOT_SET
        if sharing_policies is not None:
            self.sharing_policies = sharing_policies
        if office_addin_policy is not None:
            self.office_addin_policy = office_addin_policy

    # Instance attribute type: team_policies.TeamSharingPolicies (validator is set below)
    sharing_policies = bb.Attribute("sharing_policies", user_defined=True)

    # Instance attribute type: team_policies.OfficeAddInPolicy (validator is set below)
    office_addin_policy = bb.Attribute("office_addin_policy",
                                       user_defined=True)

    def _process_custom_annotations(self, annotation_type, field_path,
                                    processor):
        super(FullTeam,
              self)._process_custom_annotations(annotation_type, field_path,
                                                processor)
Ejemplo n.º 29
0
class RootInfo(bb.Struct):
    """
    Information about current user's root.

    :ivar common.RootInfo.root_namespace_id: The namespace ID for user's root
        namespace. It will be the namespace ID of the shared team root if the
        user is member of a team with a separate team root. Otherwise it will be
        same as ``RootInfo.home_namespace_id``.
    :ivar common.RootInfo.home_namespace_id: The namespace ID for user's home
        namespace.
    """

    __slots__ = [
        '_root_namespace_id_value',
        '_home_namespace_id_value',
    ]

    _has_required_fields = True

    def __init__(self, root_namespace_id=None, home_namespace_id=None):
        self._root_namespace_id_value = bb.NOT_SET
        self._home_namespace_id_value = bb.NOT_SET
        if root_namespace_id is not None:
            self.root_namespace_id = root_namespace_id
        if home_namespace_id is not None:
            self.home_namespace_id = home_namespace_id

    # Instance attribute type: str (validator is set below)
    root_namespace_id = bb.Attribute("root_namespace_id")

    # Instance attribute type: str (validator is set below)
    home_namespace_id = bb.Attribute("home_namespace_id")

    def _process_custom_annotations(self, annotation_type, field_path,
                                    processor):
        super(RootInfo,
              self)._process_custom_annotations(annotation_type, field_path,
                                                processor)
Ejemplo n.º 30
0
class UserFeaturesGetValuesBatchResult(bb.Struct):

    __slots__ = [
        '_values_value',
    ]

    _has_required_fields = True

    def __init__(self,
                 values=None):
        self._values_value = bb.NOT_SET
        if values is not None:
            self.values = values

    # Instance attribute type: list of [UserFeatureValue] (validator is set below)
    values = bb.Attribute("values")

    def _process_custom_annotations(self, annotation_type, field_path, processor):
        super(UserFeaturesGetValuesBatchResult, self)._process_custom_annotations(annotation_type, field_path, processor)