# 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 .gallery_artifact_publishing_profile_base_py3 import GalleryArtifactPublishingProfileBase
[docs]class GalleryImageVersionPublishingProfile(GalleryArtifactPublishingProfileBase):
"""The publishing profile of a gallery Image Version.
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 target_regions: The target regions where the Image Version is going
to be replicated to. This property is updateable.
:type target_regions:
list[~azure.mgmt.compute.v2018_06_01.models.TargetRegion]
:param source: Required.
:type source: ~azure.mgmt.compute.v2018_06_01.models.GalleryArtifactSource
:param replica_count: The number of replicas of the Image Version to be
created per region. This property would take effect for a region when
regionalReplicaCount is not specified. This property is updateable.
:type replica_count: int
:param exclude_from_latest: If set to true, Virtual Machines deployed from
the latest version of the Image Definition won't use this Image Version.
:type exclude_from_latest: bool
:ivar published_date: The timestamp for when the gallery Image Version is
published.
:vartype published_date: datetime
:param end_of_life_date: The end of life date of the gallery Image
Version. This property can be used for decommissioning purposes. This
property is updateable.
:type end_of_life_date: datetime
"""
_validation = {
'source': {'required': True},
'published_date': {'readonly': True},
}
_attribute_map = {
'target_regions': {'key': 'targetRegions', 'type': '[TargetRegion]'},
'source': {'key': 'source', 'type': 'GalleryArtifactSource'},
'replica_count': {'key': 'replicaCount', 'type': 'int'},
'exclude_from_latest': {'key': 'excludeFromLatest', 'type': 'bool'},
'published_date': {'key': 'publishedDate', 'type': 'iso-8601'},
'end_of_life_date': {'key': 'endOfLifeDate', 'type': 'iso-8601'},
}
def __init__(self, *, source, target_regions=None, replica_count: int=None, exclude_from_latest: bool=None, end_of_life_date=None, **kwargs) -> None:
super(GalleryImageVersionPublishingProfile, self).__init__(target_regions=target_regions, source=source, **kwargs)
self.replica_count = replica_count
self.exclude_from_latest = exclude_from_latest
self.published_date = None
self.end_of_life_date = end_of_life_date