How to use the msrest.serialization.Model function in msrest

To help you get started, we’ve selected a few msrest examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Azure / azure-devops-cli-extension / azure-devops / azext_devops / devops_sdk / v5_1 / tfvc / models.py View on Github external
_attribute_map = {
        'is_rename': {'key': 'isRename', 'type': 'bool'},
        'server_item': {'key': 'serverItem', 'type': 'str'},
        'version_from': {'key': 'versionFrom', 'type': 'int'},
        'version_to': {'key': 'versionTo', 'type': 'int'}
    }

    def __init__(self, is_rename=None, server_item=None, version_from=None, version_to=None):
        super(TfvcMergeSource, self).__init__()
        self.is_rename = is_rename
        self.server_item = server_item
        self.version_from = version_from
        self.version_to = version_to


class TfvcPolicyFailureInfo(Model):
    """TfvcPolicyFailureInfo.

    :param message:
    :type message: str
    :param policy_name:
    :type policy_name: str
    """

    _attribute_map = {
        'message': {'key': 'message', 'type': 'str'},
        'policy_name': {'key': 'policyName', 'type': 'str'}
    }

    def __init__(self, message=None, policy_name=None):
        super(TfvcPolicyFailureInfo, self).__init__()
        self.message = message
github Azure / azure-cli / src / command_modules / azure-cli-vm / azure / cli / command_modules / vm / mgmt_vm / lib / models / template_link.py View on Github external
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
# pylint: skip-file

# coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class TemplateLink(Model):
    """Entity representing the reference to the template.

    Variables are only populated by the server, and will be ignored when
    sending a request.

    :ivar uri: URI referencing the template. Default value:
     "https://azuresdkci.blob.core.windows.net/templatehost/CreateVm_2017-1-5/azuredeploy.json"
     .
    :vartype uri: str
    :param content_version: If included it must match the ContentVersion in
     the template.
    :type content_version: str
    """

    _validation = {
        'uri': {'required': True, 'constant': True},
github Azure / azure-cli-extensions / src / db-up / azext_db_up / vendored_sdks / azure_mgmt_rdbms / mariadb / models / operation_py3.py View on Github external
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class Operation(Model):
    """REST API operation definition.

    Variables are only populated by the server, and will be ignored when
    sending a request.

    :ivar name: The name of the operation being performed on this particular
     object.
    :vartype name: str
    :ivar display: The localized display information for this particular
     operation or action.
    :vartype display: ~azure.mgmt.rdbms.mariadb.models.OperationDisplay
    :ivar origin: The intended executor of the operation. Possible values
     include: 'NotSpecified', 'user', 'system'
    :vartype origin: str or ~azure.mgmt.rdbms.mariadb.models.OperationOrigin
    :ivar properties: Additional descriptions for the operation.
    :vartype properties: dict[str, object]
github Azure / azure-devops-cli-extension / azure-devops / azext_devops / devops_sdk / v5_0 / member_entitlement_management / models.py View on Github external
:param name: Team Name
    :type name: str
    """

    _attribute_map = {
        'id': {'key': 'id', 'type': 'str'},
        'name': {'key': 'name', 'type': 'str'}
    }

    def __init__(self, id=None, name=None):
        super(TeamRef, self).__init__()
        self.id = id
        self.name = name


class UserEntitlement(Model):
    """UserEntitlement.

    :param access_level: User's access level denoted by a license.
    :type access_level: :class:`AccessLevel `
    :param extensions: User's extensions.
    :type extensions: list of :class:`Extension `
    :param group_assignments: [Readonly] GroupEntitlements that this user belongs to.
    :type group_assignments: list of :class:`GroupEntitlement `
    :param id: The unique identifier which matches the Id of the Identity associated with the GraphMember.
    :type id: str
    :param last_accessed_date: [Readonly] Date the user last accessed the collection.
    :type last_accessed_date: datetime
    :param project_entitlements: Relation between a project and the user's effective permissions in that project.
    :type project_entitlements: list of :class:`ProjectEntitlement `
    :param user: User reference.
    :type user: :class:`GraphUser `
github Azure / azure-sdk-for-python / azure-mgmt-network / azure / mgmt / network / v2017_11_01 / models / express_route_service_provider_bandwidths_offered.py View on Github external
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class ExpressRouteServiceProviderBandwidthsOffered(Model):
    """Contains bandwidths offered in ExpressRouteServiceProvider resources.

    :param offer_name: The OfferName.
    :type offer_name: str
    :param value_in_mbps: The ValueInMbps.
    :type value_in_mbps: int
    """

    _attribute_map = {
        'offer_name': {'key': 'offerName', 'type': 'str'},
        'value_in_mbps': {'key': 'valueInMbps', 'type': 'int'},
    }

    def __init__(self, **kwargs):
        super(ExpressRouteServiceProviderBandwidthsOffered, self).__init__(**kwargs)
        self.offer_name = kwargs.get('offer_name', None)
github microsoft / botbuilder-python / libraries / botbuilder-schema / botbuilder / schema / _models_py3.py View on Github external
self.label = label
        self.value_type = value_type
        self.value = value
        self.name = name
        self.relates_to = relates_to
        self.code = code
        self.expiration = expiration
        self.importance = importance
        self.delivery_mode = delivery_mode
        self.listen_for = listen_for
        self.text_highlights = text_highlights
        self.semantic_action = semantic_action
        self.caller_id = caller_id


class AnimationCard(Model):
    """An animation card (Ex: gif or short video clip).

    :param title: Title of this card
    :type title: str
    :param subtitle: Subtitle of this card
    :type subtitle: str
    :param text: Text of this card
    :type text: str
    :param image: Thumbnail placeholder
    :type image: ~botframework.connector.models.ThumbnailUrl
    :param media: Media URLs for this card. When this field contains more than
     one URL, each URL is an alternative format of the same content.
    :type media: list[~botframework.connector.models.MediaUrl]
    :param buttons: Actions on this card
    :type buttons: list[~botframework.connector.models.CardAction]
    :param shareable: This content may be shared with others (default:true)
github Azure / azure-sdk-for-python / sdk / costmanagement / azure-mgmt-costmanagement / azure / mgmt / costmanagement / models / export_list_result_py3.py View on Github external
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class ExportListResult(Model):
    """Result of listing exports. It contains a list of available exports in the
    scope provided.

    Variables are only populated by the server, and will be ignored when
    sending a request.

    :ivar value: The list of exports.
    :vartype value: list[~azure.mgmt.costmanagement.models.Export]
    """

    _validation = {
        'value': {'readonly': True},
    }

    _attribute_map = {
        'value': {'key': 'value', 'type': '[Export]'},
github Azure / azure-sdk-for-python / azure-mgmt-servicebus / azure / mgmt / servicebus / models / message_count_details.py View on Github external
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class MessageCountDetails(Model):
    """Message Count Details.

    Variables are only populated by the server, and will be ignored when
    sending a request.

    :ivar active_message_count: Number of active messages in the queue, topic,
     or subscription.
    :vartype active_message_count: long
    :ivar dead_letter_message_count: Number of messages that are dead
     lettered.
    :vartype dead_letter_message_count: long
    :ivar scheduled_message_count: Number of scheduled messages.
    :vartype scheduled_message_count: long
    :ivar transfer_message_count: Number of messages transferred to another
     queue, topic, or subscription.
    :vartype transfer_message_count: long
github Azure / azure-sdk-for-python / azure-mgmt-datalake-store / azure / mgmt / datalake / store / models / check_name_availability_parameters.py View on Github external
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class CheckNameAvailabilityParameters(Model):
    """Data Lake Store account name availability check parameters.

    Variables are only populated by the server, and will be ignored when
    sending a request.

    All required parameters must be populated in order to send to Azure.

    :param name: Required. The Data Lake Store name to check availability for.
    :type name: str
    :ivar type: Required. The resource type. Note: This should not be set by
     the user, as the constant value is Microsoft.DataLakeStore/accounts.
     Default value: "Microsoft.DataLakeStore/accounts" .
    :vartype type: str
    """

    _validation = {
github Azure / azure-cli-extensions / src / eventgrid / azext_eventgrid / vendored_sdks / eventgrid / models / retry_policy_py3.py View on Github external
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class RetryPolicy(Model):
    """Information about the retry policy for an event subscription.

    :param max_delivery_attempts: Maximum number of delivery retry attempts
     for events.
    :type max_delivery_attempts: int
    :param event_time_to_live_in_minutes: Time To Live (in minutes) for
     events.
    :type event_time_to_live_in_minutes: int
    """

    _attribute_map = {
        'max_delivery_attempts': {'key': 'maxDeliveryAttempts', 'type': 'int'},
        'event_time_to_live_in_minutes': {'key': 'eventTimeToLiveInMinutes', 'type': 'int'},
    }

    def __init__(self, *, max_delivery_attempts: int=None, event_time_to_live_in_minutes: int=None, **kwargs) -> None: