Skip to content

add User area for 4.1 api #88

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions vsts/vsts/user/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
# Generated file, DO NOT EDIT
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------------------------
7 changes: 7 additions & 0 deletions vsts/vsts/user/v4_1/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
# Generated file, DO NOT EDIT
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------------------------
35 changes: 35 additions & 0 deletions vsts/vsts/user/v4_1/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
# Generated file, DO NOT EDIT
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------------------------

from .avatar import Avatar
from .create_user_parameters import CreateUserParameters
from .mail_confirmation_parameters import MailConfirmationParameters
from .reference_links import ReferenceLinks
from .send_user_notification_parameters import SendUserNotificationParameters
from .set_user_attribute_parameters import SetUserAttributeParameters
from .update_user_parameters import UpdateUserParameters
from .user import User
from .user_attribute import UserAttribute
from .user_attributes import UserAttributes
from .user_notification import UserNotification
from .user_notifications import UserNotifications

__all__ = [
'Avatar',
'CreateUserParameters',
'MailConfirmationParameters',
'ReferenceLinks',
'SendUserNotificationParameters',
'SetUserAttributeParameters',
'UpdateUserParameters',
'User',
'UserAttribute',
'UserAttributes',
'UserNotification',
'UserNotifications',
]
37 changes: 37 additions & 0 deletions vsts/vsts/user/v4_1/models/avatar.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
# Generated file, DO NOT EDIT
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------------------------

from msrest.serialization import Model


class Avatar(Model):
"""Avatar.

:param image: The raw avatar image data, in either jpg or png format.
:type image: str
:param is_auto_generated: True if the avatar is dynamically generated, false if user-provided.
:type is_auto_generated: bool
:param last_modified: The date/time at which the avatar was last modified.
:type last_modified: datetime
:param size: The size of the avatar, e.g. small, medium, or large.
:type size: object
"""

_attribute_map = {
'image': {'key': 'image', 'type': 'str'},
'is_auto_generated': {'key': 'isAutoGenerated', 'type': 'bool'},
'last_modified': {'key': 'lastModified', 'type': 'iso-8601'},
'size': {'key': 'size', 'type': 'object'}
}

def __init__(self, image=None, is_auto_generated=None, last_modified=None, size=None):
super(Avatar, self).__init__()
self.image = image
self.is_auto_generated = is_auto_generated
self.last_modified = last_modified
self.size = size
45 changes: 45 additions & 0 deletions vsts/vsts/user/v4_1/models/create_user_parameters.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
# Generated file, DO NOT EDIT
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------------------------

from msrest.serialization import Model


class CreateUserParameters(Model):
"""CreateUserParameters.

:param country: The user's country of residence or association.
:type country: str
:param data:
:type data: dict
:param descriptor: The user's unique identifier, and the primary means by which the user is referenced.
:type descriptor: :class:`str <user.v4_1.models.str>`
:param display_name: The user's name, as displayed throughout the product.
:type display_name: str
:param mail: The user's preferred email address.
:type mail: str
:param region: The region in which the user resides or is associated.
:type region: str
"""

_attribute_map = {
'country': {'key': 'country', 'type': 'str'},
'data': {'key': 'data', 'type': '{object}'},
'descriptor': {'key': 'descriptor', 'type': 'str'},
'display_name': {'key': 'displayName', 'type': 'str'},
'mail': {'key': 'mail', 'type': 'str'},
'region': {'key': 'region', 'type': 'str'}
}

def __init__(self, country=None, data=None, descriptor=None, display_name=None, mail=None, region=None):
super(CreateUserParameters, self).__init__()
self.country = country
self.data = data
self.descriptor = descriptor
self.display_name = display_name
self.mail = mail
self.region = region
29 changes: 29 additions & 0 deletions vsts/vsts/user/v4_1/models/mail_confirmation_parameters.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
# Generated file, DO NOT EDIT
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------------------------

from msrest.serialization import Model


class MailConfirmationParameters(Model):
"""MailConfirmationParameters.

:param challenge_code: The unique code that proves ownership of the email address.
:type challenge_code: str
:param mail_address: The email address to be confirmed.
:type mail_address: str
"""

_attribute_map = {
'challenge_code': {'key': 'challengeCode', 'type': 'str'},
'mail_address': {'key': 'mailAddress', 'type': 'str'}
}

def __init__(self, challenge_code=None, mail_address=None):
super(MailConfirmationParameters, self).__init__()
self.challenge_code = challenge_code
self.mail_address = mail_address
25 changes: 25 additions & 0 deletions vsts/vsts/user/v4_1/models/reference_links.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
# Generated file, DO NOT EDIT
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------------------------

from msrest.serialization import Model


class ReferenceLinks(Model):
"""ReferenceLinks.

:param links: The readonly view of the links. Because Reference links are readonly, we only want to expose them as read only.
:type links: dict
"""

_attribute_map = {
'links': {'key': 'links', 'type': '{object}'}
}

def __init__(self, links=None):
super(ReferenceLinks, self).__init__()
self.links = links
29 changes: 29 additions & 0 deletions vsts/vsts/user/v4_1/models/send_user_notification_parameters.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
# Generated file, DO NOT EDIT
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------------------------

from msrest.serialization import Model


class SendUserNotificationParameters(Model):
"""SendUserNotificationParameters.

:param notification: Notification to be delivered
:type notification: :class:`UserNotification <user.v4_1.models.UserNotification>`
:param recipients: Users whom this notification is addressed to
:type recipients: list of :class:`str <user.v4_1.models.str>`
"""

_attribute_map = {
'notification': {'key': 'notification', 'type': 'UserNotification'},
'recipients': {'key': 'recipients', 'type': '[str]'}
}

def __init__(self, notification=None, recipients=None):
super(SendUserNotificationParameters, self).__init__()
self.notification = notification
self.recipients = recipients
37 changes: 37 additions & 0 deletions vsts/vsts/user/v4_1/models/set_user_attribute_parameters.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
# Generated file, DO NOT EDIT
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------------------------

from msrest.serialization import Model


class SetUserAttributeParameters(Model):
"""SetUserAttributeParameters.

:param last_modified: The date/time at which the attribute was last modified.
:type last_modified: datetime
:param name: The unique group-prefixed name of the attribute, e.g. "TFS.TimeZone".
:type name: str
:param revision: The attribute's revision, for change tracking.
:type revision: int
:param value: The value of the attribute.
:type value: str
"""

_attribute_map = {
'last_modified': {'key': 'lastModified', 'type': 'iso-8601'},
'name': {'key': 'name', 'type': 'str'},
'revision': {'key': 'revision', 'type': 'int'},
'value': {'key': 'value', 'type': 'str'}
}

def __init__(self, last_modified=None, name=None, revision=None, value=None):
super(SetUserAttributeParameters, self).__init__()
self.last_modified = last_modified
self.name = name
self.revision = revision
self.value = value
25 changes: 25 additions & 0 deletions vsts/vsts/user/v4_1/models/update_user_parameters.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
# Generated file, DO NOT EDIT
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------------------------

from msrest.serialization import Model


class UpdateUserParameters(Model):
"""UpdateUserParameters.

:param properties: The collection of properties to set. See "User" for valid fields.
:type properties: :class:`object <user.v4_1.models.object>`
"""

_attribute_map = {
'properties': {'key': 'properties', 'type': 'object'}
}

def __init__(self, properties=None):
super(UpdateUserParameters, self).__init__()
self.properties = properties
73 changes: 73 additions & 0 deletions vsts/vsts/user/v4_1/models/user.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
# Generated file, DO NOT EDIT
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------------------------

from msrest.serialization import Model


class User(Model):
"""User.

:param bio: A short blurb of "about me"-style text.
:type bio: str
:param blog: A link to an external blog.
:type blog: str
:param company: The company at which the user is employed.
:type company: str
:param country: The user's country of residence or association.
:type country: str
:param date_created: The date the user was created in the system
:type date_created: datetime
:param descriptor: The user's unique identifier, and the primary means by which the user is referenced.
:type descriptor: :class:`str <user.v4_1.models.str>`
:param display_name: The user's name, as displayed throughout the product.
:type display_name: str
:param last_modified: The date/time at which the user data was last modified.
:type last_modified: datetime
:param links: A set of readonly links for obtaining more info about the user.
:type links: :class:`ReferenceLinks <user.v4_1.models.ReferenceLinks>`
:param mail: The user's preferred email address.
:type mail: str
:param revision: The attribute's revision, for change tracking.
:type revision: int
:param unconfirmed_mail: The user's preferred email address which has not yet been confirmed.
:type unconfirmed_mail: str
:param user_name: The unique name of the user.
:type user_name: str
"""

_attribute_map = {
'bio': {'key': 'bio', 'type': 'str'},
'blog': {'key': 'blog', 'type': 'str'},
'company': {'key': 'company', 'type': 'str'},
'country': {'key': 'country', 'type': 'str'},
'date_created': {'key': 'dateCreated', 'type': 'iso-8601'},
'descriptor': {'key': 'descriptor', 'type': 'str'},
'display_name': {'key': 'displayName', 'type': 'str'},
'last_modified': {'key': 'lastModified', 'type': 'iso-8601'},
'links': {'key': 'links', 'type': 'ReferenceLinks'},
'mail': {'key': 'mail', 'type': 'str'},
'revision': {'key': 'revision', 'type': 'int'},
'unconfirmed_mail': {'key': 'unconfirmedMail', 'type': 'str'},
'user_name': {'key': 'userName', 'type': 'str'}
}

def __init__(self, bio=None, blog=None, company=None, country=None, date_created=None, descriptor=None, display_name=None, last_modified=None, links=None, mail=None, revision=None, unconfirmed_mail=None, user_name=None):
super(User, self).__init__()
self.bio = bio
self.blog = blog
self.company = company
self.country = country
self.date_created = date_created
self.descriptor = descriptor
self.display_name = display_name
self.last_modified = last_modified
self.links = links
self.mail = mail
self.revision = revision
self.unconfirmed_mail = unconfirmed_mail
self.user_name = user_name
37 changes: 37 additions & 0 deletions vsts/vsts/user/v4_1/models/user_attribute.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
# Generated file, DO NOT EDIT
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------------------------

from msrest.serialization import Model


class UserAttribute(Model):
"""UserAttribute.

:param last_modified: The date/time at which the attribute was last modified.
:type last_modified: datetime
:param name: The unique group-prefixed name of the attribute, e.g. "TFS.TimeZone".
:type name: str
:param revision: The attribute's revision, for change tracking.
:type revision: int
:param value: The value of the attribute.
:type value: str
"""

_attribute_map = {
'last_modified': {'key': 'lastModified', 'type': 'iso-8601'},
'name': {'key': 'name', 'type': 'str'},
'revision': {'key': 'revision', 'type': 'int'},
'value': {'key': 'value', 'type': 'str'}
}

def __init__(self, last_modified=None, name=None, revision=None, value=None):
super(UserAttribute, self).__init__()
self.last_modified = last_modified
self.name = name
self.revision = revision
self.value = value
Loading