|
| 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 GraphSubjectBase(Model): |
| 13 | + """ |
| 14 | + :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. |
| 15 | + :type _links: :class:`ReferenceLinks <azure.devops.v5_1.microsoft._visual_studio._services._web_api.models.ReferenceLinks>` |
| 16 | + :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. |
| 17 | + :type descriptor: str |
| 18 | + :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. |
| 19 | + :type display_name: str |
| 20 | + :param url: This url is the full route to the source resource of this graph subject. |
| 21 | + :type url: str |
| 22 | + """ |
| 23 | + |
| 24 | + _attribute_map = { |
| 25 | + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, |
| 26 | + 'descriptor': {'key': 'descriptor', 'type': 'str'}, |
| 27 | + 'display_name': {'key': 'displayName', 'type': 'str'}, |
| 28 | + 'url': {'key': 'url', 'type': 'str'} |
| 29 | + } |
| 30 | + |
| 31 | + def __init__(self, _links=None, descriptor=None, display_name=None, url=None): |
| 32 | + super(GraphSubjectBase, self).__init__() |
| 33 | + self._links = _links |
| 34 | + self.descriptor = descriptor |
| 35 | + self.display_name = display_name |
| 36 | + self.url = url |
| 37 | + |
| 38 | + |
| 39 | +class IdentityRef(GraphSubjectBase): |
| 40 | + """ |
| 41 | + :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. |
| 42 | + :type _links: :class:`ReferenceLinks <azure.devops.v5_1.microsoft._visual_studio._services._web_api.models.ReferenceLinks>` |
| 43 | + :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. |
| 44 | + :type descriptor: str |
| 45 | + :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. |
| 46 | + :type display_name: str |
| 47 | + :param url: This url is the full route to the source resource of this graph subject. |
| 48 | + :type url: str |
| 49 | + :param directory_alias: Deprecated - Can be retrieved by querying the Graph user referenced in the "self" entry of the IdentityRef "_links" dictionary |
| 50 | + :type directory_alias: str |
| 51 | + :param id: |
| 52 | + :type id: str |
| 53 | + :param image_url: Deprecated - Available in the "avatar" entry of the IdentityRef "_links" dictionary |
| 54 | + :type image_url: str |
| 55 | + :param inactive: Deprecated - Can be retrieved by querying the Graph membership state referenced in the "membershipState" entry of the GraphUser "_links" dictionary |
| 56 | + :type inactive: bool |
| 57 | + :param is_aad_identity: Deprecated - Can be inferred from the subject type of the descriptor (Descriptor.IsAadUserType/Descriptor.IsAadGroupType) |
| 58 | + :type is_aad_identity: bool |
| 59 | + :param is_container: Deprecated - Can be inferred from the subject type of the descriptor (Descriptor.IsGroupType) |
| 60 | + :type is_container: bool |
| 61 | + :param is_deleted_in_origin: |
| 62 | + :type is_deleted_in_origin: bool |
| 63 | + :param profile_url: Deprecated - not in use in most preexisting implementations of ToIdentityRef |
| 64 | + :type profile_url: str |
| 65 | + :param unique_name: Deprecated - use Domain+PrincipalName instead |
| 66 | + :type unique_name: str |
| 67 | + """ |
| 68 | + |
| 69 | + _attribute_map = { |
| 70 | + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, |
| 71 | + 'descriptor': {'key': 'descriptor', 'type': 'str'}, |
| 72 | + 'display_name': {'key': 'displayName', 'type': 'str'}, |
| 73 | + 'url': {'key': 'url', 'type': 'str'}, |
| 74 | + 'directory_alias': {'key': 'directoryAlias', 'type': 'str'}, |
| 75 | + 'id': {'key': 'id', 'type': 'str'}, |
| 76 | + 'image_url': {'key': 'imageUrl', 'type': 'str'}, |
| 77 | + 'inactive': {'key': 'inactive', 'type': 'bool'}, |
| 78 | + 'is_aad_identity': {'key': 'isAadIdentity', 'type': 'bool'}, |
| 79 | + 'is_container': {'key': 'isContainer', 'type': 'bool'}, |
| 80 | + 'is_deleted_in_origin': {'key': 'isDeletedInOrigin', 'type': 'bool'}, |
| 81 | + 'profile_url': {'key': 'profileUrl', 'type': 'str'}, |
| 82 | + 'unique_name': {'key': 'uniqueName', 'type': 'str'} |
| 83 | + } |
| 84 | + |
| 85 | + def __init__(self, _links=None, descriptor=None, display_name=None, url=None, directory_alias=None, id=None, image_url=None, inactive=None, is_aad_identity=None, is_container=None, is_deleted_in_origin=None, profile_url=None, unique_name=None): |
| 86 | + super(IdentityRef, self).__init__(_links=_links, descriptor=descriptor, display_name=display_name, url=url) |
| 87 | + self.directory_alias = directory_alias |
| 88 | + self.id = id |
| 89 | + self.image_url = image_url |
| 90 | + self.inactive = inactive |
| 91 | + self.is_aad_identity = is_aad_identity |
| 92 | + self.is_container = is_container |
| 93 | + self.is_deleted_in_origin = is_deleted_in_origin |
| 94 | + self.profile_url = profile_url |
| 95 | + self.unique_name = unique_name |
| 96 | + |
| 97 | + |
| 98 | +class Permission(Model): |
| 99 | + """ |
| 100 | + :param authorized: |
| 101 | + :type authorized: bool |
| 102 | + :param authorized_by: |
| 103 | + :type authorized_by: :class:`IdentityRef <azure.devops.v5_1.pipeline_permissions.models.IdentityRef>` |
| 104 | + :param authorized_on: |
| 105 | + :type authorized_on: datetime |
| 106 | + """ |
| 107 | + |
| 108 | + _attribute_map = { |
| 109 | + 'authorized': {'key': 'authorized', 'type': 'bool'}, |
| 110 | + 'authorized_by': {'key': 'authorizedBy', 'type': 'IdentityRef'}, |
| 111 | + 'authorized_on': {'key': 'authorizedOn', 'type': 'iso-8601'} |
| 112 | + } |
| 113 | + |
| 114 | + def __init__(self, authorized=None, authorized_by=None, authorized_on=None): |
| 115 | + super(Permission, self).__init__() |
| 116 | + self.authorized = authorized |
| 117 | + self.authorized_by = authorized_by |
| 118 | + self.authorized_on = authorized_on |
| 119 | + |
| 120 | + |
| 121 | +class PipelinePermission(Permission): |
| 122 | + """ |
| 123 | + :param authorized: |
| 124 | + :type authorized: bool |
| 125 | + :param authorized_by: |
| 126 | + :type authorized_by: :class:`IdentityRef <azure.devops.v5_1.pipeline_permissions.models.IdentityRef>` |
| 127 | + :param authorized_on: |
| 128 | + :type authorized_on: datetime |
| 129 | + :param id: |
| 130 | + :type id: int |
| 131 | + """ |
| 132 | + |
| 133 | + _attribute_map = { |
| 134 | + 'authorized': {'key': 'authorized', 'type': 'bool'}, |
| 135 | + 'authorized_by': {'key': 'authorizedBy', 'type': 'IdentityRef'}, |
| 136 | + 'authorized_on': {'key': 'authorizedOn', 'type': 'iso-8601'}, |
| 137 | + 'id': {'key': 'id', 'type': 'int'} |
| 138 | + } |
| 139 | + |
| 140 | + def __init__(self, authorized=None, authorized_by=None, authorized_on=None, id=None): |
| 141 | + super(PipelinePermission, self).__init__(authorized=authorized, authorized_by=authorized_by, authorized_on=authorized_on) |
| 142 | + self.id = id |
| 143 | + |
| 144 | + |
| 145 | +class ReferenceLinks(Model): |
| 146 | + """ |
| 147 | + The class to represent a collection of REST reference links. |
| 148 | +
|
| 149 | + :param links: The readonly view of the links. Because Reference links are readonly, we only want to expose them as read only. |
| 150 | + :type links: dict |
| 151 | + """ |
| 152 | + |
| 153 | + _attribute_map = { |
| 154 | + 'links': {'key': 'links', 'type': '{object}'} |
| 155 | + } |
| 156 | + |
| 157 | + def __init__(self, links=None): |
| 158 | + super(ReferenceLinks, self).__init__() |
| 159 | + self.links = links |
| 160 | + |
| 161 | + |
| 162 | +class Resource(Model): |
| 163 | + """ |
| 164 | + :param id: Id of the resource. |
| 165 | + :type id: str |
| 166 | + :param type: Type of the resource. |
| 167 | + :type type: str |
| 168 | + """ |
| 169 | + |
| 170 | + _attribute_map = { |
| 171 | + 'id': {'key': 'id', 'type': 'str'}, |
| 172 | + 'type': {'key': 'type', 'type': 'str'} |
| 173 | + } |
| 174 | + |
| 175 | + def __init__(self, id=None, type=None): |
| 176 | + super(Resource, self).__init__() |
| 177 | + self.id = id |
| 178 | + self.type = type |
| 179 | + |
| 180 | + |
| 181 | +class ResourcePipelinePermissions(Model): |
| 182 | + """ |
| 183 | + :param all_pipelines: |
| 184 | + :type all_pipelines: :class:`Permission <azure.devops.v5_1.pipeline_permissions.models.Permission>` |
| 185 | + :param pipelines: |
| 186 | + :type pipelines: list of :class:`PipelinePermission <azure.devops.v5_1.pipeline_permissions.models.PipelinePermission>` |
| 187 | + :param resource: |
| 188 | + :type resource: :class:`Resource <azure.devops.v5_1.pipeline_permissions.models.Resource>` |
| 189 | + """ |
| 190 | + |
| 191 | + _attribute_map = { |
| 192 | + 'all_pipelines': {'key': 'allPipelines', 'type': 'Permission'}, |
| 193 | + 'pipelines': {'key': 'pipelines', 'type': '[PipelinePermission]'}, |
| 194 | + 'resource': {'key': 'resource', 'type': 'Resource'} |
| 195 | + } |
| 196 | + |
| 197 | + def __init__(self, all_pipelines=None, pipelines=None, resource=None): |
| 198 | + super(ResourcePipelinePermissions, self).__init__() |
| 199 | + self.all_pipelines = all_pipelines |
| 200 | + self.pipelines = pipelines |
| 201 | + self.resource = resource |
| 202 | + |
| 203 | + |
| 204 | +__all__ = [ |
| 205 | + 'GraphSubjectBase', |
| 206 | + 'IdentityRef', |
| 207 | + 'Permission', |
| 208 | + 'PipelinePermission', |
| 209 | + 'ReferenceLinks', |
| 210 | + 'Resource', |
| 211 | + 'ResourcePipelinePermissions', |
| 212 | +] |
0 commit comments