azure-devops/azext_devops/devops_sdk/v5_0/gallery/models.py [1:869]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
﻿# --------------------------------------------------------------------------------------------
# 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 AcquisitionOperation(Model):
    """AcquisitionOperation.

    :param operation_state: State of the the AcquisitionOperation for the current user
    :type operation_state: object
    :param operation_type: AcquisitionOperationType: install, request, buy, etc...
    :type operation_type: object
    :param reason: Optional reason to justify current state. Typically used with Disallow state.
    :type reason: str
    """

    _attribute_map = {
        'operation_state': {'key': 'operationState', 'type': 'object'},
        'operation_type': {'key': 'operationType', 'type': 'object'},
        'reason': {'key': 'reason', 'type': 'str'}
    }

    def __init__(self, operation_state=None, operation_type=None, reason=None):
        super(AcquisitionOperation, self).__init__()
        self.operation_state = operation_state
        self.operation_type = operation_type
        self.reason = reason


class AcquisitionOptions(Model):
    """AcquisitionOptions.

    :param default_operation: Default Operation for the ItemId in this target
    :type default_operation: :class:`AcquisitionOperation <azure.devops.v5_0.gallery.models.AcquisitionOperation>`
    :param item_id: The item id that this options refer to
    :type item_id: str
    :param operations: Operations allowed for the ItemId in this target
    :type operations: list of :class:`AcquisitionOperation <azure.devops.v5_0.gallery.models.AcquisitionOperation>`
    :param target: The target that this options refer to
    :type target: str
    """

    _attribute_map = {
        'default_operation': {'key': 'defaultOperation', 'type': 'AcquisitionOperation'},
        'item_id': {'key': 'itemId', 'type': 'str'},
        'operations': {'key': 'operations', 'type': '[AcquisitionOperation]'},
        'target': {'key': 'target', 'type': 'str'}
    }

    def __init__(self, default_operation=None, item_id=None, operations=None, target=None):
        super(AcquisitionOptions, self).__init__()
        self.default_operation = default_operation
        self.item_id = item_id
        self.operations = operations
        self.target = target


class Answers(Model):
    """Answers.

    :param vs_marketplace_extension_name: Gets or sets the vs marketplace extension name
    :type vs_marketplace_extension_name: str
    :param vs_marketplace_publisher_name: Gets or sets the vs marketplace publsiher name
    :type vs_marketplace_publisher_name: str
    """

    _attribute_map = {
        'vs_marketplace_extension_name': {'key': 'vsMarketplaceExtensionName', 'type': 'str'},
        'vs_marketplace_publisher_name': {'key': 'vsMarketplacePublisherName', 'type': 'str'}
    }

    def __init__(self, vs_marketplace_extension_name=None, vs_marketplace_publisher_name=None):
        super(Answers, self).__init__()
        self.vs_marketplace_extension_name = vs_marketplace_extension_name
        self.vs_marketplace_publisher_name = vs_marketplace_publisher_name


class AssetDetails(Model):
    """AssetDetails.

    :param answers: Gets or sets the Answers, which contains vs marketplace extension name and publisher name
    :type answers: :class:`Answers <azure.devops.v5_0.gallery.models.Answers>`
    :param publisher_natural_identifier: Gets or sets the VS publisher Id
    :type publisher_natural_identifier: str
    """

    _attribute_map = {
        'answers': {'key': 'answers', 'type': 'Answers'},
        'publisher_natural_identifier': {'key': 'publisherNaturalIdentifier', 'type': 'str'}
    }

    def __init__(self, answers=None, publisher_natural_identifier=None):
        super(AssetDetails, self).__init__()
        self.answers = answers
        self.publisher_natural_identifier = publisher_natural_identifier


class AzurePublisher(Model):
    """AzurePublisher.

    :param azure_publisher_id:
    :type azure_publisher_id: str
    :param publisher_name:
    :type publisher_name: str
    """

    _attribute_map = {
        'azure_publisher_id': {'key': 'azurePublisherId', 'type': 'str'},
        'publisher_name': {'key': 'publisherName', 'type': 'str'}
    }

    def __init__(self, azure_publisher_id=None, publisher_name=None):
        super(AzurePublisher, self).__init__()
        self.azure_publisher_id = azure_publisher_id
        self.publisher_name = publisher_name


class AzureRestApiRequestModel(Model):
    """AzureRestApiRequestModel.

    :param asset_details: Gets or sets the Asset details
    :type asset_details: :class:`AssetDetails <azure.devops.v5_0.gallery.models.AssetDetails>`
    :param asset_id: Gets or sets the asset id
    :type asset_id: str
    :param asset_version: Gets or sets the asset version
    :type asset_version: long
    :param customer_support_email: Gets or sets the customer support email
    :type customer_support_email: str
    :param integration_contact_email: Gets or sets the integration contact email
    :type integration_contact_email: str
    :param operation: Gets or sets the asset version
    :type operation: str
    :param plan_id: Gets or sets the plan identifier if any.
    :type plan_id: str
    :param publisher_id: Gets or sets the publisher id
    :type publisher_id: str
    :param type: Gets or sets the resource type
    :type type: str
    """

    _attribute_map = {
        'asset_details': {'key': 'assetDetails', 'type': 'AssetDetails'},
        'asset_id': {'key': 'assetId', 'type': 'str'},
        'asset_version': {'key': 'assetVersion', 'type': 'long'},
        'customer_support_email': {'key': 'customerSupportEmail', 'type': 'str'},
        'integration_contact_email': {'key': 'integrationContactEmail', 'type': 'str'},
        'operation': {'key': 'operation', 'type': 'str'},
        'plan_id': {'key': 'planId', 'type': 'str'},
        'publisher_id': {'key': 'publisherId', 'type': 'str'},
        'type': {'key': 'type', 'type': 'str'}
    }

    def __init__(self, asset_details=None, asset_id=None, asset_version=None, customer_support_email=None, integration_contact_email=None, operation=None, plan_id=None, publisher_id=None, type=None):
        super(AzureRestApiRequestModel, self).__init__()
        self.asset_details = asset_details
        self.asset_id = asset_id
        self.asset_version = asset_version
        self.customer_support_email = customer_support_email
        self.integration_contact_email = integration_contact_email
        self.operation = operation
        self.plan_id = plan_id
        self.publisher_id = publisher_id
        self.type = type


class CategoriesResult(Model):
    """CategoriesResult.

    :param categories:
    :type categories: list of :class:`ExtensionCategory <azure.devops.v5_0.gallery.models.ExtensionCategory>`
    """

    _attribute_map = {
        'categories': {'key': 'categories', 'type': '[ExtensionCategory]'}
    }

    def __init__(self, categories=None):
        super(CategoriesResult, self).__init__()
        self.categories = categories


class CategoryLanguageTitle(Model):
    """CategoryLanguageTitle.

    :param lang: The language for which the title is applicable
    :type lang: str
    :param lcid: The language culture id of the lang parameter
    :type lcid: int
    :param title: Actual title to be shown on the UI
    :type title: str
    """

    _attribute_map = {
        'lang': {'key': 'lang', 'type': 'str'},
        'lcid': {'key': 'lcid', 'type': 'int'},
        'title': {'key': 'title', 'type': 'str'}
    }

    def __init__(self, lang=None, lcid=None, title=None):
        super(CategoryLanguageTitle, self).__init__()
        self.lang = lang
        self.lcid = lcid
        self.title = title


class EventCounts(Model):
    """EventCounts.

    :param average_rating: Average rating on the day for extension
    :type average_rating: int
    :param buy_count: Number of times the extension was bought in hosted scenario (applies only to VSTS extensions)
    :type buy_count: int
    :param connected_buy_count: Number of times the extension was bought in connected scenario (applies only to VSTS extensions)
    :type connected_buy_count: int
    :param connected_install_count: Number of times the extension was installed in connected scenario (applies only to VSTS extensions)
    :type connected_install_count: int
    :param install_count: Number of times the extension was installed
    :type install_count: long
    :param try_count: Number of times the extension was installed as a trial (applies only to VSTS extensions)
    :type try_count: int
    :param uninstall_count: Number of times the extension was uninstalled (applies only to VSTS extensions)
    :type uninstall_count: int
    :param web_download_count: Number of times the extension was downloaded (applies to VSTS extensions and VSCode marketplace click installs)
    :type web_download_count: long
    :param web_page_views: Number of detail page views
    :type web_page_views: long
    """

    _attribute_map = {
        'average_rating': {'key': 'averageRating', 'type': 'int'},
        'buy_count': {'key': 'buyCount', 'type': 'int'},
        'connected_buy_count': {'key': 'connectedBuyCount', 'type': 'int'},
        'connected_install_count': {'key': 'connectedInstallCount', 'type': 'int'},
        'install_count': {'key': 'installCount', 'type': 'long'},
        'try_count': {'key': 'tryCount', 'type': 'int'},
        'uninstall_count': {'key': 'uninstallCount', 'type': 'int'},
        'web_download_count': {'key': 'webDownloadCount', 'type': 'long'},
        'web_page_views': {'key': 'webPageViews', 'type': 'long'}
    }

    def __init__(self, average_rating=None, buy_count=None, connected_buy_count=None, connected_install_count=None, install_count=None, try_count=None, uninstall_count=None, web_download_count=None, web_page_views=None):
        super(EventCounts, self).__init__()
        self.average_rating = average_rating
        self.buy_count = buy_count
        self.connected_buy_count = connected_buy_count
        self.connected_install_count = connected_install_count
        self.install_count = install_count
        self.try_count = try_count
        self.uninstall_count = uninstall_count
        self.web_download_count = web_download_count
        self.web_page_views = web_page_views


class ExtensionAcquisitionRequest(Model):
    """ExtensionAcquisitionRequest.

    :param assignment_type: How the item is being assigned
    :type assignment_type: object
    :param billing_id: The id of the subscription used for purchase
    :type billing_id: str
    :param item_id: The marketplace id (publisherName.extensionName) for the item
    :type item_id: str
    :param operation_type: The type of operation, such as install, request, purchase
    :type operation_type: object
    :param properties: Additional properties which can be added to the request.
    :type properties: :class:`object <azure.devops.v5_0.gallery.models.object>`
    :param quantity: How many licenses should be purchased
    :type quantity: int
    :param targets: A list of target guids where the item should be acquired (installed, requested, etc.), such as account id
    :type targets: list of str
    """

    _attribute_map = {
        'assignment_type': {'key': 'assignmentType', 'type': 'object'},
        'billing_id': {'key': 'billingId', 'type': 'str'},
        'item_id': {'key': 'itemId', 'type': 'str'},
        'operation_type': {'key': 'operationType', 'type': 'object'},
        'properties': {'key': 'properties', 'type': 'object'},
        'quantity': {'key': 'quantity', 'type': 'int'},
        'targets': {'key': 'targets', 'type': '[str]'}
    }

    def __init__(self, assignment_type=None, billing_id=None, item_id=None, operation_type=None, properties=None, quantity=None, targets=None):
        super(ExtensionAcquisitionRequest, self).__init__()
        self.assignment_type = assignment_type
        self.billing_id = billing_id
        self.item_id = item_id
        self.operation_type = operation_type
        self.properties = properties
        self.quantity = quantity
        self.targets = targets


class ExtensionBadge(Model):
    """ExtensionBadge.

    :param description:
    :type description: str
    :param img_uri:
    :type img_uri: str
    :param link:
    :type link: str
    """

    _attribute_map = {
        'description': {'key': 'description', 'type': 'str'},
        'img_uri': {'key': 'imgUri', 'type': 'str'},
        'link': {'key': 'link', 'type': 'str'}
    }

    def __init__(self, description=None, img_uri=None, link=None):
        super(ExtensionBadge, self).__init__()
        self.description = description
        self.img_uri = img_uri
        self.link = link


class ExtensionCategory(Model):
    """ExtensionCategory.

    :param associated_products: The name of the products with which this category is associated to.
    :type associated_products: list of str
    :param category_id:
    :type category_id: int
    :param category_name: This is the internal name for a category
    :type category_name: str
    :param language: This parameter is obsolete. Refer to LanguageTitles for langauge specific titles
    :type language: str
    :param language_titles: The list of all the titles of this category in various languages
    :type language_titles: list of :class:`CategoryLanguageTitle <azure.devops.v5_0.gallery.models.CategoryLanguageTitle>`
    :param parent_category_name: This is the internal name of the parent if this is associated with a parent
    :type parent_category_name: str
    """

    _attribute_map = {
        'associated_products': {'key': 'associatedProducts', 'type': '[str]'},
        'category_id': {'key': 'categoryId', 'type': 'int'},
        'category_name': {'key': 'categoryName', 'type': 'str'},
        'language': {'key': 'language', 'type': 'str'},
        'language_titles': {'key': 'languageTitles', 'type': '[CategoryLanguageTitle]'},
        'parent_category_name': {'key': 'parentCategoryName', 'type': 'str'}
    }

    def __init__(self, associated_products=None, category_id=None, category_name=None, language=None, language_titles=None, parent_category_name=None):
        super(ExtensionCategory, self).__init__()
        self.associated_products = associated_products
        self.category_id = category_id
        self.category_name = category_name
        self.language = language
        self.language_titles = language_titles
        self.parent_category_name = parent_category_name


class ExtensionDailyStat(Model):
    """ExtensionDailyStat.

    :param counts: Stores the event counts
    :type counts: :class:`EventCounts <azure.devops.v5_0.gallery.models.EventCounts>`
    :param extended_stats: Generic key/value pair to store extended statistics. Used for sending paid extension stats like Upgrade, Downgrade, Cancel trend etc.
    :type extended_stats: dict
    :param statistic_date: Timestamp of this data point
    :type statistic_date: datetime
    :param version: Version of the extension
    :type version: str
    """

    _attribute_map = {
        'counts': {'key': 'counts', 'type': 'EventCounts'},
        'extended_stats': {'key': 'extendedStats', 'type': '{object}'},
        'statistic_date': {'key': 'statisticDate', 'type': 'iso-8601'},
        'version': {'key': 'version', 'type': 'str'}
    }

    def __init__(self, counts=None, extended_stats=None, statistic_date=None, version=None):
        super(ExtensionDailyStat, self).__init__()
        self.counts = counts
        self.extended_stats = extended_stats
        self.statistic_date = statistic_date
        self.version = version


class ExtensionDailyStats(Model):
    """ExtensionDailyStats.

    :param daily_stats: List of extension statistics data points
    :type daily_stats: list of :class:`ExtensionDailyStat <azure.devops.v5_0.gallery.models.ExtensionDailyStat>`
    :param extension_id: Id of the extension, this will never be sent back to the client. For internal use only.
    :type extension_id: str
    :param extension_name: Name of the extension
    :type extension_name: str
    :param publisher_name: Name of the publisher
    :type publisher_name: str
    :param stat_count: Count of stats
    :type stat_count: int
    """

    _attribute_map = {
        'daily_stats': {'key': 'dailyStats', 'type': '[ExtensionDailyStat]'},
        'extension_id': {'key': 'extensionId', 'type': 'str'},
        'extension_name': {'key': 'extensionName', 'type': 'str'},
        'publisher_name': {'key': 'publisherName', 'type': 'str'},
        'stat_count': {'key': 'statCount', 'type': 'int'}
    }

    def __init__(self, daily_stats=None, extension_id=None, extension_name=None, publisher_name=None, stat_count=None):
        super(ExtensionDailyStats, self).__init__()
        self.daily_stats = daily_stats
        self.extension_id = extension_id
        self.extension_name = extension_name
        self.publisher_name = publisher_name
        self.stat_count = stat_count


class ExtensionDraft(Model):
    """ExtensionDraft.

    :param assets:
    :type assets: list of :class:`ExtensionDraftAsset <azure.devops.v5_0.gallery.models.ExtensionDraftAsset>`
    :param created_date:
    :type created_date: datetime
    :param draft_state:
    :type draft_state: object
    :param extension_name:
    :type extension_name: str
    :param id:
    :type id: str
    :param last_updated:
    :type last_updated: datetime
    :param payload:
    :type payload: :class:`ExtensionPayload <azure.devops.v5_0.gallery.models.ExtensionPayload>`
    :param product:
    :type product: str
    :param publisher_name:
    :type publisher_name: str
    :param validation_errors:
    :type validation_errors: list of { key: str; value: str }
    :param validation_warnings:
    :type validation_warnings: list of { key: str; value: str }
    """

    _attribute_map = {
        'assets': {'key': 'assets', 'type': '[ExtensionDraftAsset]'},
        'created_date': {'key': 'createdDate', 'type': 'iso-8601'},
        'draft_state': {'key': 'draftState', 'type': 'object'},
        'extension_name': {'key': 'extensionName', 'type': 'str'},
        'id': {'key': 'id', 'type': 'str'},
        'last_updated': {'key': 'lastUpdated', 'type': 'iso-8601'},
        'payload': {'key': 'payload', 'type': 'ExtensionPayload'},
        'product': {'key': 'product', 'type': 'str'},
        'publisher_name': {'key': 'publisherName', 'type': 'str'},
        'validation_errors': {'key': 'validationErrors', 'type': '[{ key: str; value: str }]'},
        'validation_warnings': {'key': 'validationWarnings', 'type': '[{ key: str; value: str }]'}
    }

    def __init__(self, assets=None, created_date=None, draft_state=None, extension_name=None, id=None, last_updated=None, payload=None, product=None, publisher_name=None, validation_errors=None, validation_warnings=None):
        super(ExtensionDraft, self).__init__()
        self.assets = assets
        self.created_date = created_date
        self.draft_state = draft_state
        self.extension_name = extension_name
        self.id = id
        self.last_updated = last_updated
        self.payload = payload
        self.product = product
        self.publisher_name = publisher_name
        self.validation_errors = validation_errors
        self.validation_warnings = validation_warnings


class ExtensionDraftPatch(Model):
    """ExtensionDraftPatch.

    :param extension_data:
    :type extension_data: :class:`UnpackagedExtensionData <azure.devops.v5_0.gallery.models.UnpackagedExtensionData>`
    :param operation:
    :type operation: object
    """

    _attribute_map = {
        'extension_data': {'key': 'extensionData', 'type': 'UnpackagedExtensionData'},
        'operation': {'key': 'operation', 'type': 'object'}
    }

    def __init__(self, extension_data=None, operation=None):
        super(ExtensionDraftPatch, self).__init__()
        self.extension_data = extension_data
        self.operation = operation


class ExtensionEvent(Model):
    """ExtensionEvent.

    :param id: Id which identifies each data point uniquely
    :type id: long
    :param properties:
    :type properties: :class:`object <azure.devops.v5_0.gallery.models.object>`
    :param statistic_date: Timestamp of when the event occurred
    :type statistic_date: datetime
    :param version: Version of the extension
    :type version: str
    """

    _attribute_map = {
        'id': {'key': 'id', 'type': 'long'},
        'properties': {'key': 'properties', 'type': 'object'},
        'statistic_date': {'key': 'statisticDate', 'type': 'iso-8601'},
        'version': {'key': 'version', 'type': 'str'}
    }

    def __init__(self, id=None, properties=None, statistic_date=None, version=None):
        super(ExtensionEvent, self).__init__()
        self.id = id
        self.properties = properties
        self.statistic_date = statistic_date
        self.version = version


class ExtensionEvents(Model):
    """ExtensionEvents.

    :param events: Generic container for events data. The dictionary key denotes the type of event and the list contains properties related to that event
    :type events: dict
    :param extension_id: Id of the extension, this will never be sent back to the client. This field will mainly be used when EMS calls into Gallery REST API to update install/uninstall events for various extensions in one go.
    :type extension_id: str
    :param extension_name: Name of the extension
    :type extension_name: str
    :param publisher_name: Name of the publisher
    :type publisher_name: str
    """

    _attribute_map = {
        'events': {'key': 'events', 'type': '{[ExtensionEvent]}'},
        'extension_id': {'key': 'extensionId', 'type': 'str'},
        'extension_name': {'key': 'extensionName', 'type': 'str'},
        'publisher_name': {'key': 'publisherName', 'type': 'str'}
    }

    def __init__(self, events=None, extension_id=None, extension_name=None, publisher_name=None):
        super(ExtensionEvents, self).__init__()
        self.events = events
        self.extension_id = extension_id
        self.extension_name = extension_name
        self.publisher_name = publisher_name


class ExtensionFile(Model):
    """ExtensionFile.

    :param asset_type:
    :type asset_type: str
    :param language:
    :type language: str
    :param source:
    :type source: str
    """

    _attribute_map = {
        'asset_type': {'key': 'assetType', 'type': 'str'},
        'language': {'key': 'language', 'type': 'str'},
        'source': {'key': 'source', 'type': 'str'}
    }

    def __init__(self, asset_type=None, language=None, source=None):
        super(ExtensionFile, self).__init__()
        self.asset_type = asset_type
        self.language = language
        self.source = source


class ExtensionFilterResult(Model):
    """ExtensionFilterResult.

    :param extensions: This is the set of appplications that matched the query filter supplied.
    :type extensions: list of :class:`PublishedExtension <azure.devops.v5_0.gallery.models.PublishedExtension>`
    :param paging_token: The PagingToken is returned from a request when more records exist that match the result than were requested or could be returned. A follow-up query with this paging token can be used to retrieve more results.
    :type paging_token: str
    :param result_metadata: This is the additional optional metadata for the given result. E.g. Total count of results which is useful in case of paged results
    :type result_metadata: list of :class:`ExtensionFilterResultMetadata <azure.devops.v5_0.gallery.models.ExtensionFilterResultMetadata>`
    """

    _attribute_map = {
        'extensions': {'key': 'extensions', 'type': '[PublishedExtension]'},
        'paging_token': {'key': 'pagingToken', 'type': 'str'},
        'result_metadata': {'key': 'resultMetadata', 'type': '[ExtensionFilterResultMetadata]'}
    }

    def __init__(self, extensions=None, paging_token=None, result_metadata=None):
        super(ExtensionFilterResult, self).__init__()
        self.extensions = extensions
        self.paging_token = paging_token
        self.result_metadata = result_metadata


class ExtensionFilterResultMetadata(Model):
    """ExtensionFilterResultMetadata.

    :param metadata_items: The metadata items for the category
    :type metadata_items: list of :class:`MetadataItem <azure.devops.v5_0.gallery.models.MetadataItem>`
    :param metadata_type: Defines the category of metadata items
    :type metadata_type: str
    """

    _attribute_map = {
        'metadata_items': {'key': 'metadataItems', 'type': '[MetadataItem]'},
        'metadata_type': {'key': 'metadataType', 'type': 'str'}
    }

    def __init__(self, metadata_items=None, metadata_type=None):
        super(ExtensionFilterResultMetadata, self).__init__()
        self.metadata_items = metadata_items
        self.metadata_type = metadata_type


class ExtensionPackage(Model):
    """ExtensionPackage.

    :param extension_manifest: Base 64 encoded extension package
    :type extension_manifest: str
    """

    _attribute_map = {
        'extension_manifest': {'key': 'extensionManifest', 'type': 'str'}
    }

    def __init__(self, extension_manifest=None):
        super(ExtensionPackage, self).__init__()
        self.extension_manifest = extension_manifest


class ExtensionPayload(Model):
    """ExtensionPayload.

    :param description:
    :type description: str
    :param display_name:
    :type display_name: str
    :param file_name:
    :type file_name: str
    :param installation_targets:
    :type installation_targets: list of :class:`InstallationTarget <azure.devops.v5_0.gallery.models.InstallationTarget>`
    :param is_preview:
    :type is_preview: bool
    :param is_signed_by_microsoft:
    :type is_signed_by_microsoft: bool
    :param is_valid:
    :type is_valid: bool
    :param metadata:
    :type metadata: list of { key: str; value: str }
    :param type:
    :type type: object
    """

    _attribute_map = {
        'description': {'key': 'description', 'type': 'str'},
        'display_name': {'key': 'displayName', 'type': 'str'},
        'file_name': {'key': 'fileName', 'type': 'str'},
        'installation_targets': {'key': 'installationTargets', 'type': '[InstallationTarget]'},
        'is_preview': {'key': 'isPreview', 'type': 'bool'},
        'is_signed_by_microsoft': {'key': 'isSignedByMicrosoft', 'type': 'bool'},
        'is_valid': {'key': 'isValid', 'type': 'bool'},
        'metadata': {'key': 'metadata', 'type': '[{ key: str; value: str }]'},
        'type': {'key': 'type', 'type': 'object'}
    }

    def __init__(self, description=None, display_name=None, file_name=None, installation_targets=None, is_preview=None, is_signed_by_microsoft=None, is_valid=None, metadata=None, type=None):
        super(ExtensionPayload, self).__init__()
        self.description = description
        self.display_name = display_name
        self.file_name = file_name
        self.installation_targets = installation_targets
        self.is_preview = is_preview
        self.is_signed_by_microsoft = is_signed_by_microsoft
        self.is_valid = is_valid
        self.metadata = metadata
        self.type = type


class ExtensionQuery(Model):
    """ExtensionQuery.

    :param asset_types: When retrieving extensions with a query; frequently the caller only needs a small subset of the assets. The caller may specify a list of asset types that should be returned if the extension contains it. All other assets will not be returned.
    :type asset_types: list of str
    :param filters: Each filter is a unique query and will have matching set of extensions returned from the request. Each result will have the same index in the resulting array that the filter had in the incoming query.
    :type filters: list of :class:`QueryFilter <azure.devops.v5_0.gallery.models.QueryFilter>`
    :param flags: The Flags are used to deterine which set of information the caller would like returned for the matched extensions.
    :type flags: object
    """

    _attribute_map = {
        'asset_types': {'key': 'assetTypes', 'type': '[str]'},
        'filters': {'key': 'filters', 'type': '[QueryFilter]'},
        'flags': {'key': 'flags', 'type': 'object'}
    }

    def __init__(self, asset_types=None, filters=None, flags=None):
        super(ExtensionQuery, self).__init__()
        self.asset_types = asset_types
        self.filters = filters
        self.flags = flags


class ExtensionQueryResult(Model):
    """ExtensionQueryResult.

    :param results: For each filter supplied in the query, a filter result will be returned in the query result.
    :type results: list of :class:`ExtensionFilterResult <azure.devops.v5_0.gallery.models.ExtensionFilterResult>`
    """

    _attribute_map = {
        'results': {'key': 'results', 'type': '[ExtensionFilterResult]'}
    }

    def __init__(self, results=None):
        super(ExtensionQueryResult, self).__init__()
        self.results = results


class ExtensionShare(Model):
    """ExtensionShare.

    :param id:
    :type id: str
    :param is_org:
    :type is_org: bool
    :param name:
    :type name: str
    :param type:
    :type type: str
    """

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

    def __init__(self, id=None, is_org=None, name=None, type=None):
        super(ExtensionShare, self).__init__()
        self.id = id
        self.is_org = is_org
        self.name = name
        self.type = type


class ExtensionStatistic(Model):
    """ExtensionStatistic.

    :param statistic_name:
    :type statistic_name: str
    :param value:
    :type value: float
    """

    _attribute_map = {
        'statistic_name': {'key': 'statisticName', 'type': 'str'},
        'value': {'key': 'value', 'type': 'float'}
    }

    def __init__(self, statistic_name=None, value=None):
        super(ExtensionStatistic, self).__init__()
        self.statistic_name = statistic_name
        self.value = value


class ExtensionStatisticUpdate(Model):
    """ExtensionStatisticUpdate.

    :param extension_name:
    :type extension_name: str
    :param operation:
    :type operation: object
    :param publisher_name:
    :type publisher_name: str
    :param statistic:
    :type statistic: :class:`ExtensionStatistic <azure.devops.v5_0.gallery.models.ExtensionStatistic>`
    """

    _attribute_map = {
        'extension_name': {'key': 'extensionName', 'type': 'str'},
        'operation': {'key': 'operation', 'type': 'object'},
        'publisher_name': {'key': 'publisherName', 'type': 'str'},
        'statistic': {'key': 'statistic', 'type': 'ExtensionStatistic'}
    }

    def __init__(self, extension_name=None, operation=None, publisher_name=None, statistic=None):
        super(ExtensionStatisticUpdate, self).__init__()
        self.extension_name = extension_name
        self.operation = operation
        self.publisher_name = publisher_name
        self.statistic = statistic


class ExtensionVersion(Model):
    """ExtensionVersion.

    :param asset_uri:
    :type asset_uri: str
    :param badges:
    :type badges: list of :class:`ExtensionBadge <azure.devops.v5_0.gallery.models.ExtensionBadge>`
    :param fallback_asset_uri:
    :type fallback_asset_uri: str
    :param files:
    :type files: list of :class:`ExtensionFile <azure.devops.v5_0.gallery.models.ExtensionFile>`
    :param flags:
    :type flags: object
    :param last_updated:
    :type last_updated: datetime
    :param properties:
    :type properties: list of { key: str; value: str }
    :param validation_result_message:
    :type validation_result_message: str
    :param version:
    :type version: str
    :param version_description:
    :type version_description: str
    """

    _attribute_map = {
        'asset_uri': {'key': 'assetUri', 'type': 'str'},
        'badges': {'key': 'badges', 'type': '[ExtensionBadge]'},
        'fallback_asset_uri': {'key': 'fallbackAssetUri', 'type': 'str'},
        'files': {'key': 'files', 'type': '[ExtensionFile]'},
        'flags': {'key': 'flags', 'type': 'object'},
        'last_updated': {'key': 'lastUpdated', 'type': 'iso-8601'},
        'properties': {'key': 'properties', 'type': '[{ key: str; value: str }]'},
        'validation_result_message': {'key': 'validationResultMessage', 'type': 'str'},
        'version': {'key': 'version', 'type': 'str'},
        'version_description': {'key': 'versionDescription', 'type': 'str'}
    }

    def __init__(self, asset_uri=None, badges=None, fallback_asset_uri=None, files=None, flags=None, last_updated=None, properties=None, validation_result_message=None, version=None, version_description=None):
        super(ExtensionVersion, self).__init__()
        self.asset_uri = asset_uri
        self.badges = badges
        self.fallback_asset_uri = fallback_asset_uri
        self.files = files
        self.flags = flags
        self.last_updated = last_updated
        self.properties = properties
        self.validation_result_message = validation_result_message
        self.version = version
        self.version_description = version_description


class FilterCriteria(Model):
    """FilterCriteria.

    :param filter_type:
    :type filter_type: int
    :param value: The value used in the match based on the filter type.
    :type value: str
    """

    _attribute_map = {
        'filter_type': {'key': 'filterType', 'type': 'int'},
        'value': {'key': 'value', 'type': 'str'}
    }

    def __init__(self, filter_type=None, value=None):
        super(FilterCriteria, self).__init__()
        self.filter_type = filter_type
        self.value = value
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



azure-devops/azext_devops/devops_sdk/v5_1/gallery/models.py [1:863]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
﻿# --------------------------------------------------------------------------------------------
# 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 AcquisitionOperation(Model):
    """
    :param operation_state: State of the the AcquisitionOperation for the current user
    :type operation_state: object
    :param operation_type: AcquisitionOperationType: install, request, buy, etc...
    :type operation_type: object
    :param reason: Optional reason to justify current state. Typically used with Disallow state.
    :type reason: str
    """

    _attribute_map = {
        'operation_state': {'key': 'operationState', 'type': 'object'},
        'operation_type': {'key': 'operationType', 'type': 'object'},
        'reason': {'key': 'reason', 'type': 'str'}
    }

    def __init__(self, operation_state=None, operation_type=None, reason=None):
        super(AcquisitionOperation, self).__init__()
        self.operation_state = operation_state
        self.operation_type = operation_type
        self.reason = reason


class AcquisitionOptions(Model):
    """
    Market item acquisition options (install, buy, etc) for an installation target.

    :param default_operation: Default Operation for the ItemId in this target
    :type default_operation: :class:`AcquisitionOperation <azure.devops.v5_1.gallery.models.AcquisitionOperation>`
    :param item_id: The item id that this options refer to
    :type item_id: str
    :param operations: Operations allowed for the ItemId in this target
    :type operations: list of :class:`AcquisitionOperation <azure.devops.v5_1.gallery.models.AcquisitionOperation>`
    :param target: The target that this options refer to
    :type target: str
    """

    _attribute_map = {
        'default_operation': {'key': 'defaultOperation', 'type': 'AcquisitionOperation'},
        'item_id': {'key': 'itemId', 'type': 'str'},
        'operations': {'key': 'operations', 'type': '[AcquisitionOperation]'},
        'target': {'key': 'target', 'type': 'str'}
    }

    def __init__(self, default_operation=None, item_id=None, operations=None, target=None):
        super(AcquisitionOptions, self).__init__()
        self.default_operation = default_operation
        self.item_id = item_id
        self.operations = operations
        self.target = target


class Answers(Model):
    """
    :param vs_marketplace_extension_name: Gets or sets the vs marketplace extension name
    :type vs_marketplace_extension_name: str
    :param vs_marketplace_publisher_name: Gets or sets the vs marketplace publisher name
    :type vs_marketplace_publisher_name: str
    """

    _attribute_map = {
        'vs_marketplace_extension_name': {'key': 'vsMarketplaceExtensionName', 'type': 'str'},
        'vs_marketplace_publisher_name': {'key': 'vsMarketplacePublisherName', 'type': 'str'}
    }

    def __init__(self, vs_marketplace_extension_name=None, vs_marketplace_publisher_name=None):
        super(Answers, self).__init__()
        self.vs_marketplace_extension_name = vs_marketplace_extension_name
        self.vs_marketplace_publisher_name = vs_marketplace_publisher_name


class AssetDetails(Model):
    """
    :param answers: Gets or sets the Answers, which contains vs marketplace extension name and publisher name
    :type answers: :class:`Answers <azure.devops.v5_1.gallery.models.Answers>`
    :param publisher_natural_identifier: Gets or sets the VS publisher Id
    :type publisher_natural_identifier: str
    """

    _attribute_map = {
        'answers': {'key': 'answers', 'type': 'Answers'},
        'publisher_natural_identifier': {'key': 'publisherNaturalIdentifier', 'type': 'str'}
    }

    def __init__(self, answers=None, publisher_natural_identifier=None):
        super(AssetDetails, self).__init__()
        self.answers = answers
        self.publisher_natural_identifier = publisher_natural_identifier


class AzurePublisher(Model):
    """
    :param azure_publisher_id:
    :type azure_publisher_id: str
    :param publisher_name:
    :type publisher_name: str
    """

    _attribute_map = {
        'azure_publisher_id': {'key': 'azurePublisherId', 'type': 'str'},
        'publisher_name': {'key': 'publisherName', 'type': 'str'}
    }

    def __init__(self, azure_publisher_id=None, publisher_name=None):
        super(AzurePublisher, self).__init__()
        self.azure_publisher_id = azure_publisher_id
        self.publisher_name = publisher_name


class AzureRestApiRequestModel(Model):
    """
    :param asset_details: Gets or sets the Asset details
    :type asset_details: :class:`AssetDetails <azure.devops.v5_1.gallery.models.AssetDetails>`
    :param asset_id: Gets or sets the asset id
    :type asset_id: str
    :param asset_version: Gets or sets the asset version
    :type asset_version: long
    :param customer_support_email: Gets or sets the customer support email
    :type customer_support_email: str
    :param integration_contact_email: Gets or sets the integration contact email
    :type integration_contact_email: str
    :param operation: Gets or sets the asset version
    :type operation: str
    :param plan_id: Gets or sets the plan identifier if any.
    :type plan_id: str
    :param publisher_id: Gets or sets the publisher id
    :type publisher_id: str
    :param type: Gets or sets the resource type
    :type type: str
    """

    _attribute_map = {
        'asset_details': {'key': 'assetDetails', 'type': 'AssetDetails'},
        'asset_id': {'key': 'assetId', 'type': 'str'},
        'asset_version': {'key': 'assetVersion', 'type': 'long'},
        'customer_support_email': {'key': 'customerSupportEmail', 'type': 'str'},
        'integration_contact_email': {'key': 'integrationContactEmail', 'type': 'str'},
        'operation': {'key': 'operation', 'type': 'str'},
        'plan_id': {'key': 'planId', 'type': 'str'},
        'publisher_id': {'key': 'publisherId', 'type': 'str'},
        'type': {'key': 'type', 'type': 'str'}
    }

    def __init__(self, asset_details=None, asset_id=None, asset_version=None, customer_support_email=None, integration_contact_email=None, operation=None, plan_id=None, publisher_id=None, type=None):
        super(AzureRestApiRequestModel, self).__init__()
        self.asset_details = asset_details
        self.asset_id = asset_id
        self.asset_version = asset_version
        self.customer_support_email = customer_support_email
        self.integration_contact_email = integration_contact_email
        self.operation = operation
        self.plan_id = plan_id
        self.publisher_id = publisher_id
        self.type = type


class CategoriesResult(Model):
    """
    This is the set of categories in response to the get category query

    :param categories:
    :type categories: list of :class:`ExtensionCategory <azure.devops.v5_1.gallery.models.ExtensionCategory>`
    """

    _attribute_map = {
        'categories': {'key': 'categories', 'type': '[ExtensionCategory]'}
    }

    def __init__(self, categories=None):
        super(CategoriesResult, self).__init__()
        self.categories = categories


class CategoryLanguageTitle(Model):
    """
    Definition of one title of a category

    :param lang: The language for which the title is applicable
    :type lang: str
    :param lcid: The language culture id of the lang parameter
    :type lcid: int
    :param title: Actual title to be shown on the UI
    :type title: str
    """

    _attribute_map = {
        'lang': {'key': 'lang', 'type': 'str'},
        'lcid': {'key': 'lcid', 'type': 'int'},
        'title': {'key': 'title', 'type': 'str'}
    }

    def __init__(self, lang=None, lcid=None, title=None):
        super(CategoryLanguageTitle, self).__init__()
        self.lang = lang
        self.lcid = lcid
        self.title = title


class EventCounts(Model):
    """
    :param average_rating: Average rating on the day for extension
    :type average_rating: int
    :param buy_count: Number of times the extension was bought in hosted scenario (applies only to VSTS extensions)
    :type buy_count: int
    :param connected_buy_count: Number of times the extension was bought in connected scenario (applies only to VSTS extensions)
    :type connected_buy_count: int
    :param connected_install_count: Number of times the extension was installed in connected scenario (applies only to VSTS extensions)
    :type connected_install_count: int
    :param install_count: Number of times the extension was installed
    :type install_count: long
    :param try_count: Number of times the extension was installed as a trial (applies only to VSTS extensions)
    :type try_count: int
    :param uninstall_count: Number of times the extension was uninstalled (applies only to VSTS extensions)
    :type uninstall_count: int
    :param web_download_count: Number of times the extension was downloaded (applies to VSTS extensions and VSCode marketplace click installs)
    :type web_download_count: long
    :param web_page_views: Number of detail page views
    :type web_page_views: long
    """

    _attribute_map = {
        'average_rating': {'key': 'averageRating', 'type': 'int'},
        'buy_count': {'key': 'buyCount', 'type': 'int'},
        'connected_buy_count': {'key': 'connectedBuyCount', 'type': 'int'},
        'connected_install_count': {'key': 'connectedInstallCount', 'type': 'int'},
        'install_count': {'key': 'installCount', 'type': 'long'},
        'try_count': {'key': 'tryCount', 'type': 'int'},
        'uninstall_count': {'key': 'uninstallCount', 'type': 'int'},
        'web_download_count': {'key': 'webDownloadCount', 'type': 'long'},
        'web_page_views': {'key': 'webPageViews', 'type': 'long'}
    }

    def __init__(self, average_rating=None, buy_count=None, connected_buy_count=None, connected_install_count=None, install_count=None, try_count=None, uninstall_count=None, web_download_count=None, web_page_views=None):
        super(EventCounts, self).__init__()
        self.average_rating = average_rating
        self.buy_count = buy_count
        self.connected_buy_count = connected_buy_count
        self.connected_install_count = connected_install_count
        self.install_count = install_count
        self.try_count = try_count
        self.uninstall_count = uninstall_count
        self.web_download_count = web_download_count
        self.web_page_views = web_page_views


class ExtensionAcquisitionRequest(Model):
    """
    Contract for handling the extension acquisition process

    :param assignment_type: How the item is being assigned
    :type assignment_type: object
    :param billing_id: The id of the subscription used for purchase
    :type billing_id: str
    :param item_id: The marketplace id (publisherName.extensionName) for the item
    :type item_id: str
    :param operation_type: The type of operation, such as install, request, purchase
    :type operation_type: object
    :param properties: Additional properties which can be added to the request.
    :type properties: :class:`object <azure.devops.v5_1.gallery.models.object>`
    :param quantity: How many licenses should be purchased
    :type quantity: int
    :param targets: A list of target guids where the item should be acquired (installed, requested, etc.), such as account id
    :type targets: list of str
    """

    _attribute_map = {
        'assignment_type': {'key': 'assignmentType', 'type': 'object'},
        'billing_id': {'key': 'billingId', 'type': 'str'},
        'item_id': {'key': 'itemId', 'type': 'str'},
        'operation_type': {'key': 'operationType', 'type': 'object'},
        'properties': {'key': 'properties', 'type': 'object'},
        'quantity': {'key': 'quantity', 'type': 'int'},
        'targets': {'key': 'targets', 'type': '[str]'}
    }

    def __init__(self, assignment_type=None, billing_id=None, item_id=None, operation_type=None, properties=None, quantity=None, targets=None):
        super(ExtensionAcquisitionRequest, self).__init__()
        self.assignment_type = assignment_type
        self.billing_id = billing_id
        self.item_id = item_id
        self.operation_type = operation_type
        self.properties = properties
        self.quantity = quantity
        self.targets = targets


class ExtensionBadge(Model):
    """
    :param description:
    :type description: str
    :param img_uri:
    :type img_uri: str
    :param link:
    :type link: str
    """

    _attribute_map = {
        'description': {'key': 'description', 'type': 'str'},
        'img_uri': {'key': 'imgUri', 'type': 'str'},
        'link': {'key': 'link', 'type': 'str'}
    }

    def __init__(self, description=None, img_uri=None, link=None):
        super(ExtensionBadge, self).__init__()
        self.description = description
        self.img_uri = img_uri
        self.link = link


class ExtensionCategory(Model):
    """
    :param associated_products: The name of the products with which this category is associated to.
    :type associated_products: list of str
    :param category_id:
    :type category_id: int
    :param category_name: This is the internal name for a category
    :type category_name: str
    :param language: This parameter is obsolete. Refer to LanguageTitles for langauge specific titles
    :type language: str
    :param language_titles: The list of all the titles of this category in various languages
    :type language_titles: list of :class:`CategoryLanguageTitle <azure.devops.v5_1.gallery.models.CategoryLanguageTitle>`
    :param parent_category_name: This is the internal name of the parent if this is associated with a parent
    :type parent_category_name: str
    """

    _attribute_map = {
        'associated_products': {'key': 'associatedProducts', 'type': '[str]'},
        'category_id': {'key': 'categoryId', 'type': 'int'},
        'category_name': {'key': 'categoryName', 'type': 'str'},
        'language': {'key': 'language', 'type': 'str'},
        'language_titles': {'key': 'languageTitles', 'type': '[CategoryLanguageTitle]'},
        'parent_category_name': {'key': 'parentCategoryName', 'type': 'str'}
    }

    def __init__(self, associated_products=None, category_id=None, category_name=None, language=None, language_titles=None, parent_category_name=None):
        super(ExtensionCategory, self).__init__()
        self.associated_products = associated_products
        self.category_id = category_id
        self.category_name = category_name
        self.language = language
        self.language_titles = language_titles
        self.parent_category_name = parent_category_name


class ExtensionDailyStat(Model):
    """
    :param counts: Stores the event counts
    :type counts: :class:`EventCounts <azure.devops.v5_1.gallery.models.EventCounts>`
    :param extended_stats: Generic key/value pair to store extended statistics. Used for sending paid extension stats like Upgrade, Downgrade, Cancel trend etc.
    :type extended_stats: dict
    :param statistic_date: Timestamp of this data point
    :type statistic_date: datetime
    :param version: Version of the extension
    :type version: str
    """

    _attribute_map = {
        'counts': {'key': 'counts', 'type': 'EventCounts'},
        'extended_stats': {'key': 'extendedStats', 'type': '{object}'},
        'statistic_date': {'key': 'statisticDate', 'type': 'iso-8601'},
        'version': {'key': 'version', 'type': 'str'}
    }

    def __init__(self, counts=None, extended_stats=None, statistic_date=None, version=None):
        super(ExtensionDailyStat, self).__init__()
        self.counts = counts
        self.extended_stats = extended_stats
        self.statistic_date = statistic_date
        self.version = version


class ExtensionDailyStats(Model):
    """
    :param daily_stats: List of extension statistics data points
    :type daily_stats: list of :class:`ExtensionDailyStat <azure.devops.v5_1.gallery.models.ExtensionDailyStat>`
    :param extension_id: Id of the extension, this will never be sent back to the client. For internal use only.
    :type extension_id: str
    :param extension_name: Name of the extension
    :type extension_name: str
    :param publisher_name: Name of the publisher
    :type publisher_name: str
    :param stat_count: Count of stats
    :type stat_count: int
    """

    _attribute_map = {
        'daily_stats': {'key': 'dailyStats', 'type': '[ExtensionDailyStat]'},
        'extension_id': {'key': 'extensionId', 'type': 'str'},
        'extension_name': {'key': 'extensionName', 'type': 'str'},
        'publisher_name': {'key': 'publisherName', 'type': 'str'},
        'stat_count': {'key': 'statCount', 'type': 'int'}
    }

    def __init__(self, daily_stats=None, extension_id=None, extension_name=None, publisher_name=None, stat_count=None):
        super(ExtensionDailyStats, self).__init__()
        self.daily_stats = daily_stats
        self.extension_id = extension_id
        self.extension_name = extension_name
        self.publisher_name = publisher_name
        self.stat_count = stat_count


class ExtensionDraft(Model):
    """
    :param assets:
    :type assets: list of :class:`ExtensionDraftAsset <azure.devops.v5_1.gallery.models.ExtensionDraftAsset>`
    :param created_date:
    :type created_date: datetime
    :param draft_state:
    :type draft_state: object
    :param extension_name:
    :type extension_name: str
    :param id:
    :type id: str
    :param last_updated:
    :type last_updated: datetime
    :param payload:
    :type payload: :class:`ExtensionPayload <azure.devops.v5_1.gallery.models.ExtensionPayload>`
    :param product:
    :type product: str
    :param publisher_name:
    :type publisher_name: str
    :param validation_errors:
    :type validation_errors: list of { key: str; value: str }
    :param validation_warnings:
    :type validation_warnings: list of { key: str; value: str }
    """

    _attribute_map = {
        'assets': {'key': 'assets', 'type': '[ExtensionDraftAsset]'},
        'created_date': {'key': 'createdDate', 'type': 'iso-8601'},
        'draft_state': {'key': 'draftState', 'type': 'object'},
        'extension_name': {'key': 'extensionName', 'type': 'str'},
        'id': {'key': 'id', 'type': 'str'},
        'last_updated': {'key': 'lastUpdated', 'type': 'iso-8601'},
        'payload': {'key': 'payload', 'type': 'ExtensionPayload'},
        'product': {'key': 'product', 'type': 'str'},
        'publisher_name': {'key': 'publisherName', 'type': 'str'},
        'validation_errors': {'key': 'validationErrors', 'type': '[{ key: str; value: str }]'},
        'validation_warnings': {'key': 'validationWarnings', 'type': '[{ key: str; value: str }]'}
    }

    def __init__(self, assets=None, created_date=None, draft_state=None, extension_name=None, id=None, last_updated=None, payload=None, product=None, publisher_name=None, validation_errors=None, validation_warnings=None):
        super(ExtensionDraft, self).__init__()
        self.assets = assets
        self.created_date = created_date
        self.draft_state = draft_state
        self.extension_name = extension_name
        self.id = id
        self.last_updated = last_updated
        self.payload = payload
        self.product = product
        self.publisher_name = publisher_name
        self.validation_errors = validation_errors
        self.validation_warnings = validation_warnings


class ExtensionDraftPatch(Model):
    """
    :param extension_data:
    :type extension_data: :class:`UnpackagedExtensionData <azure.devops.v5_1.gallery.models.UnpackagedExtensionData>`
    :param operation:
    :type operation: object
    """

    _attribute_map = {
        'extension_data': {'key': 'extensionData', 'type': 'UnpackagedExtensionData'},
        'operation': {'key': 'operation', 'type': 'object'}
    }

    def __init__(self, extension_data=None, operation=None):
        super(ExtensionDraftPatch, self).__init__()
        self.extension_data = extension_data
        self.operation = operation


class ExtensionEvent(Model):
    """
    Stores details of each event

    :param id: Id which identifies each data point uniquely
    :type id: long
    :param properties:
    :type properties: :class:`object <azure.devops.v5_1.gallery.models.object>`
    :param statistic_date: Timestamp of when the event occurred
    :type statistic_date: datetime
    :param version: Version of the extension
    :type version: str
    """

    _attribute_map = {
        'id': {'key': 'id', 'type': 'long'},
        'properties': {'key': 'properties', 'type': 'object'},
        'statistic_date': {'key': 'statisticDate', 'type': 'iso-8601'},
        'version': {'key': 'version', 'type': 'str'}
    }

    def __init__(self, id=None, properties=None, statistic_date=None, version=None):
        super(ExtensionEvent, self).__init__()
        self.id = id
        self.properties = properties
        self.statistic_date = statistic_date
        self.version = version


class ExtensionEvents(Model):
    """
    Container object for all extension events. Stores all install and uninstall events related to an extension. The events container is generic so can store data of any type of event. New event types can be added without altering the contract.

    :param events: Generic container for events data. The dictionary key denotes the type of event and the list contains properties related to that event
    :type events: dict
    :param extension_id: Id of the extension, this will never be sent back to the client. This field will mainly be used when EMS calls into Gallery REST API to update install/uninstall events for various extensions in one go.
    :type extension_id: str
    :param extension_name: Name of the extension
    :type extension_name: str
    :param publisher_name: Name of the publisher
    :type publisher_name: str
    """

    _attribute_map = {
        'events': {'key': 'events', 'type': '{[ExtensionEvent]}'},
        'extension_id': {'key': 'extensionId', 'type': 'str'},
        'extension_name': {'key': 'extensionName', 'type': 'str'},
        'publisher_name': {'key': 'publisherName', 'type': 'str'}
    }

    def __init__(self, events=None, extension_id=None, extension_name=None, publisher_name=None):
        super(ExtensionEvents, self).__init__()
        self.events = events
        self.extension_id = extension_id
        self.extension_name = extension_name
        self.publisher_name = publisher_name


class ExtensionFile(Model):
    """
    :param asset_type:
    :type asset_type: str
    :param language:
    :type language: str
    :param source:
    :type source: str
    """

    _attribute_map = {
        'asset_type': {'key': 'assetType', 'type': 'str'},
        'language': {'key': 'language', 'type': 'str'},
        'source': {'key': 'source', 'type': 'str'}
    }

    def __init__(self, asset_type=None, language=None, source=None):
        super(ExtensionFile, self).__init__()
        self.asset_type = asset_type
        self.language = language
        self.source = source


class ExtensionFilterResult(Model):
    """
    The FilterResult is the set of extensions that matched a particular query filter.

    :param extensions: This is the set of applications that matched the query filter supplied.
    :type extensions: list of :class:`PublishedExtension <azure.devops.v5_1.gallery.models.PublishedExtension>`
    :param paging_token: The PagingToken is returned from a request when more records exist that match the result than were requested or could be returned. A follow-up query with this paging token can be used to retrieve more results.
    :type paging_token: str
    :param result_metadata: This is the additional optional metadata for the given result. E.g. Total count of results which is useful in case of paged results
    :type result_metadata: list of :class:`ExtensionFilterResultMetadata <azure.devops.v5_1.gallery.models.ExtensionFilterResultMetadata>`
    """

    _attribute_map = {
        'extensions': {'key': 'extensions', 'type': '[PublishedExtension]'},
        'paging_token': {'key': 'pagingToken', 'type': 'str'},
        'result_metadata': {'key': 'resultMetadata', 'type': '[ExtensionFilterResultMetadata]'}
    }

    def __init__(self, extensions=None, paging_token=None, result_metadata=None):
        super(ExtensionFilterResult, self).__init__()
        self.extensions = extensions
        self.paging_token = paging_token
        self.result_metadata = result_metadata


class ExtensionFilterResultMetadata(Model):
    """
    ExtensionFilterResultMetadata is one set of metadata for the result e.g. Total count. There can be multiple metadata items for one metadata.

    :param metadata_items: The metadata items for the category
    :type metadata_items: list of :class:`MetadataItem <azure.devops.v5_1.gallery.models.MetadataItem>`
    :param metadata_type: Defines the category of metadata items
    :type metadata_type: str
    """

    _attribute_map = {
        'metadata_items': {'key': 'metadataItems', 'type': '[MetadataItem]'},
        'metadata_type': {'key': 'metadataType', 'type': 'str'}
    }

    def __init__(self, metadata_items=None, metadata_type=None):
        super(ExtensionFilterResultMetadata, self).__init__()
        self.metadata_items = metadata_items
        self.metadata_type = metadata_type


class ExtensionPackage(Model):
    """
    Package that will be used to create or update a published extension

    :param extension_manifest: Base 64 encoded extension package
    :type extension_manifest: str
    """

    _attribute_map = {
        'extension_manifest': {'key': 'extensionManifest', 'type': 'str'}
    }

    def __init__(self, extension_manifest=None):
        super(ExtensionPackage, self).__init__()
        self.extension_manifest = extension_manifest


class ExtensionPayload(Model):
    """
    :param description:
    :type description: str
    :param display_name:
    :type display_name: str
    :param file_name:
    :type file_name: str
    :param installation_targets:
    :type installation_targets: list of :class:`InstallationTarget <azure.devops.v5_1.gallery.models.InstallationTarget>`
    :param is_preview:
    :type is_preview: bool
    :param is_signed_by_microsoft:
    :type is_signed_by_microsoft: bool
    :param is_valid:
    :type is_valid: bool
    :param metadata:
    :type metadata: list of { key: str; value: str }
    :param type:
    :type type: object
    """

    _attribute_map = {
        'description': {'key': 'description', 'type': 'str'},
        'display_name': {'key': 'displayName', 'type': 'str'},
        'file_name': {'key': 'fileName', 'type': 'str'},
        'installation_targets': {'key': 'installationTargets', 'type': '[InstallationTarget]'},
        'is_preview': {'key': 'isPreview', 'type': 'bool'},
        'is_signed_by_microsoft': {'key': 'isSignedByMicrosoft', 'type': 'bool'},
        'is_valid': {'key': 'isValid', 'type': 'bool'},
        'metadata': {'key': 'metadata', 'type': '[{ key: str; value: str }]'},
        'type': {'key': 'type', 'type': 'object'}
    }

    def __init__(self, description=None, display_name=None, file_name=None, installation_targets=None, is_preview=None, is_signed_by_microsoft=None, is_valid=None, metadata=None, type=None):
        super(ExtensionPayload, self).__init__()
        self.description = description
        self.display_name = display_name
        self.file_name = file_name
        self.installation_targets = installation_targets
        self.is_preview = is_preview
        self.is_signed_by_microsoft = is_signed_by_microsoft
        self.is_valid = is_valid
        self.metadata = metadata
        self.type = type


class ExtensionQuery(Model):
    """
    An ExtensionQuery is used to search the gallery for a set of extensions that match one of many filter values.

    :param asset_types: When retrieving extensions with a query; frequently the caller only needs a small subset of the assets. The caller may specify a list of asset types that should be returned if the extension contains it. All other assets will not be returned.
    :type asset_types: list of str
    :param filters: Each filter is a unique query and will have matching set of extensions returned from the request. Each result will have the same index in the resulting array that the filter had in the incoming query.
    :type filters: list of :class:`QueryFilter <azure.devops.v5_1.gallery.models.QueryFilter>`
    :param flags: The Flags are used to determine which set of information the caller would like returned for the matched extensions.
    :type flags: object
    """

    _attribute_map = {
        'asset_types': {'key': 'assetTypes', 'type': '[str]'},
        'filters': {'key': 'filters', 'type': '[QueryFilter]'},
        'flags': {'key': 'flags', 'type': 'object'}
    }

    def __init__(self, asset_types=None, filters=None, flags=None):
        super(ExtensionQuery, self).__init__()
        self.asset_types = asset_types
        self.filters = filters
        self.flags = flags


class ExtensionQueryResult(Model):
    """
    This is the set of extensions that matched a supplied query through the filters given.

    :param results: For each filter supplied in the query, a filter result will be returned in the query result.
    :type results: list of :class:`ExtensionFilterResult <azure.devops.v5_1.gallery.models.ExtensionFilterResult>`
    """

    _attribute_map = {
        'results': {'key': 'results', 'type': '[ExtensionFilterResult]'}
    }

    def __init__(self, results=None):
        super(ExtensionQueryResult, self).__init__()
        self.results = results


class ExtensionShare(Model):
    """
    :param id:
    :type id: str
    :param is_org:
    :type is_org: bool
    :param name:
    :type name: str
    :param type:
    :type type: str
    """

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

    def __init__(self, id=None, is_org=None, name=None, type=None):
        super(ExtensionShare, self).__init__()
        self.id = id
        self.is_org = is_org
        self.name = name
        self.type = type


class ExtensionStatistic(Model):
    """
    :param statistic_name:
    :type statistic_name: str
    :param value:
    :type value: float
    """

    _attribute_map = {
        'statistic_name': {'key': 'statisticName', 'type': 'str'},
        'value': {'key': 'value', 'type': 'float'}
    }

    def __init__(self, statistic_name=None, value=None):
        super(ExtensionStatistic, self).__init__()
        self.statistic_name = statistic_name
        self.value = value


class ExtensionStatisticUpdate(Model):
    """
    :param extension_name:
    :type extension_name: str
    :param operation:
    :type operation: object
    :param publisher_name:
    :type publisher_name: str
    :param statistic:
    :type statistic: :class:`ExtensionStatistic <azure.devops.v5_1.gallery.models.ExtensionStatistic>`
    """

    _attribute_map = {
        'extension_name': {'key': 'extensionName', 'type': 'str'},
        'operation': {'key': 'operation', 'type': 'object'},
        'publisher_name': {'key': 'publisherName', 'type': 'str'},
        'statistic': {'key': 'statistic', 'type': 'ExtensionStatistic'}
    }

    def __init__(self, extension_name=None, operation=None, publisher_name=None, statistic=None):
        super(ExtensionStatisticUpdate, self).__init__()
        self.extension_name = extension_name
        self.operation = operation
        self.publisher_name = publisher_name
        self.statistic = statistic


class ExtensionVersion(Model):
    """
    :param asset_uri:
    :type asset_uri: str
    :param badges:
    :type badges: list of :class:`ExtensionBadge <azure.devops.v5_1.gallery.models.ExtensionBadge>`
    :param fallback_asset_uri:
    :type fallback_asset_uri: str
    :param files:
    :type files: list of :class:`ExtensionFile <azure.devops.v5_1.gallery.models.ExtensionFile>`
    :param flags:
    :type flags: object
    :param last_updated:
    :type last_updated: datetime
    :param properties:
    :type properties: list of { key: str; value: str }
    :param validation_result_message:
    :type validation_result_message: str
    :param version:
    :type version: str
    :param version_description:
    :type version_description: str
    """

    _attribute_map = {
        'asset_uri': {'key': 'assetUri', 'type': 'str'},
        'badges': {'key': 'badges', 'type': '[ExtensionBadge]'},
        'fallback_asset_uri': {'key': 'fallbackAssetUri', 'type': 'str'},
        'files': {'key': 'files', 'type': '[ExtensionFile]'},
        'flags': {'key': 'flags', 'type': 'object'},
        'last_updated': {'key': 'lastUpdated', 'type': 'iso-8601'},
        'properties': {'key': 'properties', 'type': '[{ key: str; value: str }]'},
        'validation_result_message': {'key': 'validationResultMessage', 'type': 'str'},
        'version': {'key': 'version', 'type': 'str'},
        'version_description': {'key': 'versionDescription', 'type': 'str'}
    }

    def __init__(self, asset_uri=None, badges=None, fallback_asset_uri=None, files=None, flags=None, last_updated=None, properties=None, validation_result_message=None, version=None, version_description=None):
        super(ExtensionVersion, self).__init__()
        self.asset_uri = asset_uri
        self.badges = badges
        self.fallback_asset_uri = fallback_asset_uri
        self.files = files
        self.flags = flags
        self.last_updated = last_updated
        self.properties = properties
        self.validation_result_message = validation_result_message
        self.version = version
        self.version_description = version_description


class FilterCriteria(Model):
    """
    One condition in a QueryFilter.

    :param filter_type:
    :type filter_type: int
    :param value: The value used in the match based on the filter type.
    :type value: str
    """

    _attribute_map = {
        'filter_type': {'key': 'filterType', 'type': 'int'},
        'value': {'key': 'value', 'type': 'str'}
    }

    def __init__(self, filter_type=None, value=None):
        super(FilterCriteria, self).__init__()
        self.filter_type = filter_type
        self.value = value
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



