|
| 1 | +# -------------------------------------------------------------------------------------------- |
| 2 | +# Copyright (c) Microsoft Corporation. All rights reserved. |
| 3 | +# Licensed under the MIT License. See License.txt in the project root for license information. |
| 4 | +# -------------------------------------------------------------------------------------------- |
| 5 | +# Generated file, DO NOT EDIT |
| 6 | +# Changes may cause incorrect behavior and will be lost if the code is regenerated. |
| 7 | +# -------------------------------------------------------------------------------------------- |
| 8 | + |
| 9 | +from msrest.serialization import Model |
| 10 | + |
| 11 | + |
| 12 | +class SessionToken(Model): |
| 13 | + """SessionToken. |
| 14 | +
|
| 15 | + :param access_id: |
| 16 | + :type access_id: str |
| 17 | + :param alternate_token: This is populated when user requests a compact token. The alternate token value is self describing token. |
| 18 | + :type alternate_token: str |
| 19 | + :param authorization_id: |
| 20 | + :type authorization_id: str |
| 21 | + :param client_id: |
| 22 | + :type client_id: str |
| 23 | + :param display_name: |
| 24 | + :type display_name: str |
| 25 | + :param host_authorization_id: |
| 26 | + :type host_authorization_id: str |
| 27 | + :param is_public: |
| 28 | + :type is_public: bool |
| 29 | + :param is_valid: |
| 30 | + :type is_valid: bool |
| 31 | + :param public_data: |
| 32 | + :type public_data: str |
| 33 | + :param scope: |
| 34 | + :type scope: str |
| 35 | + :param source: |
| 36 | + :type source: str |
| 37 | + :param target_accounts: |
| 38 | + :type target_accounts: list of str |
| 39 | + :param token: This is computed and not returned in Get queries |
| 40 | + :type token: str |
| 41 | + :param user_id: |
| 42 | + :type user_id: str |
| 43 | + :param valid_from: |
| 44 | + :type valid_from: datetime |
| 45 | + :param valid_to: |
| 46 | + :type valid_to: datetime |
| 47 | + """ |
| 48 | + |
| 49 | + _attribute_map = { |
| 50 | + 'access_id': {'key': 'accessId', 'type': 'str'}, |
| 51 | + 'alternate_token': {'key': 'alternateToken', 'type': 'str'}, |
| 52 | + 'authorization_id': {'key': 'authorizationId', 'type': 'str'}, |
| 53 | + 'client_id': {'key': 'clientId', 'type': 'str'}, |
| 54 | + 'display_name': {'key': 'displayName', 'type': 'str'}, |
| 55 | + 'host_authorization_id': {'key': 'hostAuthorizationId', 'type': 'str'}, |
| 56 | + 'is_public': {'key': 'isPublic', 'type': 'bool'}, |
| 57 | + 'is_valid': {'key': 'isValid', 'type': 'bool'}, |
| 58 | + 'public_data': {'key': 'publicData', 'type': 'str'}, |
| 59 | + 'scope': {'key': 'scope', 'type': 'str'}, |
| 60 | + 'source': {'key': 'source', 'type': 'str'}, |
| 61 | + 'target_accounts': {'key': 'targetAccounts', 'type': '[str]'}, |
| 62 | + 'token': {'key': 'token', 'type': 'str'}, |
| 63 | + 'user_id': {'key': 'userId', 'type': 'str'}, |
| 64 | + 'valid_from': {'key': 'validFrom', 'type': 'iso-8601'}, |
| 65 | + 'valid_to': {'key': 'validTo', 'type': 'iso-8601'} |
| 66 | + } |
| 67 | + |
| 68 | + def __init__(self, access_id=None, alternate_token=None, authorization_id=None, client_id=None, display_name=None, host_authorization_id=None, is_public=None, is_valid=None, public_data=None, scope=None, source=None, target_accounts=None, token=None, user_id=None, valid_from=None, valid_to=None): |
| 69 | + super(SessionToken, self).__init__() |
| 70 | + self.access_id = access_id |
| 71 | + self.alternate_token = alternate_token |
| 72 | + self.authorization_id = authorization_id |
| 73 | + self.client_id = client_id |
| 74 | + self.display_name = display_name |
| 75 | + self.host_authorization_id = host_authorization_id |
| 76 | + self.is_public = is_public |
| 77 | + self.is_valid = is_valid |
| 78 | + self.public_data = public_data |
| 79 | + self.scope = scope |
| 80 | + self.source = source |
| 81 | + self.target_accounts = target_accounts |
| 82 | + self.token = token |
| 83 | + self.user_id = user_id |
| 84 | + self.valid_from = valid_from |
| 85 | + self.valid_to = valid_to |
| 86 | + |
| 87 | + |
| 88 | +class TokenAdminPagedSessionTokens(Model): |
| 89 | + """TokenAdminPagedSessionTokens. |
| 90 | +
|
| 91 | + :param continuation_token: The continuation token that can be used to retrieve the next page of session tokens, or <code>null</code> if there is no next page. |
| 92 | + :type continuation_token: str |
| 93 | + :param value: The list of all session tokens in the current page. |
| 94 | + :type value: list of :class:`SessionToken <azure.devops.v5_0.token_admin.models.SessionToken>` |
| 95 | + """ |
| 96 | + |
| 97 | + _attribute_map = { |
| 98 | + 'continuation_token': {'key': 'continuationToken', 'type': 'str'}, |
| 99 | + 'value': {'key': 'value', 'type': '[SessionToken]'} |
| 100 | + } |
| 101 | + |
| 102 | + def __init__(self, continuation_token=None, value=None): |
| 103 | + super(TokenAdminPagedSessionTokens, self).__init__() |
| 104 | + self.continuation_token = continuation_token |
| 105 | + self.value = value |
| 106 | + |
| 107 | + |
| 108 | +class TokenAdminRevocation(Model): |
| 109 | + """TokenAdminRevocation. |
| 110 | +
|
| 111 | + :param authorization_id: The authorization ID of the OAuth authorization to revoke. |
| 112 | + :type authorization_id: str |
| 113 | + """ |
| 114 | + |
| 115 | + _attribute_map = { |
| 116 | + 'authorization_id': {'key': 'authorizationId', 'type': 'str'} |
| 117 | + } |
| 118 | + |
| 119 | + def __init__(self, authorization_id=None): |
| 120 | + super(TokenAdminRevocation, self).__init__() |
| 121 | + self.authorization_id = authorization_id |
| 122 | + |
| 123 | + |
| 124 | +class TokenAdminRevocationRule(Model): |
| 125 | + """TokenAdminRevocationRule. |
| 126 | +
|
| 127 | + :param created_before: A datetime cutoff. Tokens created before this time will be rejected. This is an optional paramter. If omitted, defaults to the time at which the rule was created. |
| 128 | + :type created_before: datetime |
| 129 | + :param scopes: A string containing a space-delimited list of OAuth scopes. A token matching any one of the scopes will be rejected. For a list of all OAuth scopes supported by VSTS, see: https://docs.microsoft.com/en-us/vsts/integrate/get-started/authentication/oauth?view=vsts#scopes. This is a mandatory parameter. |
| 130 | + :type scopes: str |
| 131 | + """ |
| 132 | + |
| 133 | + _attribute_map = { |
| 134 | + 'created_before': {'key': 'createdBefore', 'type': 'iso-8601'}, |
| 135 | + 'scopes': {'key': 'scopes', 'type': 'str'} |
| 136 | + } |
| 137 | + |
| 138 | + def __init__(self, created_before=None, scopes=None): |
| 139 | + super(TokenAdminRevocationRule, self).__init__() |
| 140 | + self.created_before = created_before |
| 141 | + self.scopes = scopes |
| 142 | + |
| 143 | + |
| 144 | +__all__ = [ |
| 145 | + 'SessionToken', |
| 146 | + 'TokenAdminPagedSessionTokens', |
| 147 | + 'TokenAdminRevocation', |
| 148 | + 'TokenAdminRevocationRule', |
| 149 | +] |
0 commit comments