Skip to content

Commit

Permalink
Generated from 8741aed33b77989e144e30c2229e44db19aa1265 (#3223)
Browse files Browse the repository at this point in the history
Added the replica count change.
  • Loading branch information
AutorestCI authored Aug 31, 2018
1 parent f4b3e17 commit 76f5dd2
Show file tree
Hide file tree
Showing 8 changed files with 104 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@
from .regional_replication_status_py3 import RegionalReplicationStatus
from .replication_status_py3 import ReplicationStatus
from .gallery_image_version_py3 import GalleryImageVersion
from .target_region_py3 import TargetRegion
from .managed_artifact_py3 import ManagedArtifact
from .gallery_artifact_source_py3 import GalleryArtifactSource
from .gallery_artifact_publishing_profile_base_py3 import GalleryArtifactPublishingProfileBase
Expand Down Expand Up @@ -301,6 +302,7 @@
from .regional_replication_status import RegionalReplicationStatus
from .replication_status import ReplicationStatus
from .gallery_image_version import GalleryImageVersion
from .target_region import TargetRegion
from .managed_artifact import ManagedArtifact
from .gallery_artifact_source import GalleryArtifactSource
from .gallery_artifact_publishing_profile_base import GalleryArtifactPublishingProfileBase
Expand Down Expand Up @@ -344,7 +346,6 @@
RollingUpgradeStatusCode,
RollingUpgradeActionType,
IntervalInMins,
ScaleTier,
AggregatedReplicationState,
ReplicationState,
HostCaching,
Expand Down Expand Up @@ -496,6 +497,7 @@
'RegionalReplicationStatus',
'ReplicationStatus',
'GalleryImageVersion',
'TargetRegion',
'ManagedArtifact',
'GalleryArtifactSource',
'GalleryArtifactPublishingProfileBase',
Expand Down Expand Up @@ -538,7 +540,6 @@
'RollingUpgradeStatusCode',
'RollingUpgradeActionType',
'IntervalInMins',
'ScaleTier',
'AggregatedReplicationState',
'ReplicationState',
'HostCaching',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -328,12 +328,6 @@ class IntervalInMins(str, Enum):
sixty_mins = "SixtyMins"


class ScaleTier(str, Enum):

s30 = "S30"
s100 = "S100"


class AggregatedReplicationState(str, Enum):

unknown = "Unknown"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ class GalleryArtifactPublishingProfileBase(Model):
All required parameters must be populated in order to send to Azure.
:param regions: The regions where the artifact is going to be published.
:type regions: list[str]
:param target_regions: The target regions where the artifact is going to
be published.
: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
"""
Expand All @@ -28,11 +30,11 @@ class GalleryArtifactPublishingProfileBase(Model):
}

_attribute_map = {
'regions': {'key': 'regions', 'type': '[str]'},
'target_regions': {'key': 'targetRegions', 'type': '[TargetRegion]'},
'source': {'key': 'source', 'type': 'GalleryArtifactSource'},
}

def __init__(self, **kwargs):
super(GalleryArtifactPublishingProfileBase, self).__init__(**kwargs)
self.regions = kwargs.get('regions', None)
self.target_regions = kwargs.get('target_regions', None)
self.source = kwargs.get('source', None)
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ class GalleryArtifactPublishingProfileBase(Model):
All required parameters must be populated in order to send to Azure.
:param regions: The regions where the artifact is going to be published.
:type regions: list[str]
:param target_regions: The target regions where the artifact is going to
be published.
: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
"""
Expand All @@ -28,11 +30,11 @@ class GalleryArtifactPublishingProfileBase(Model):
}

_attribute_map = {
'regions': {'key': 'regions', 'type': '[str]'},
'target_regions': {'key': 'targetRegions', 'type': '[TargetRegion]'},
'source': {'key': 'source', 'type': 'GalleryArtifactSource'},
}

def __init__(self, *, source, regions=None, **kwargs) -> None:
def __init__(self, *, source, target_regions=None, **kwargs) -> None:
super(GalleryArtifactPublishingProfileBase, self).__init__(**kwargs)
self.regions = regions
self.target_regions = target_regions
self.source = source
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,15 @@ class GalleryImageVersionPublishingProfile(GalleryArtifactPublishingProfileBase)
All required parameters must be populated in order to send to Azure.
:param regions: The regions where the artifact is going to be published.
:type regions: list[str]
:param target_regions: The target regions where the artifact is going to
be published.
: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 scale_tier: The scale tier of the gallery image version. Valid
values are 'S30' and 'S100'. Possible values include: 'S30', 'S100'
:type scale_tier: str or ~azure.mgmt.compute.v2018_06_01.models.ScaleTier
:param replica_count: This is the number of source blob copies in a
region.
:type replica_count: int
:param exclude_from_latest: The flag means that if it is set to true,
people deploying VMs with 'latest' as version will not use this version.
:type exclude_from_latest: bool
Expand All @@ -44,17 +46,17 @@ class GalleryImageVersionPublishingProfile(GalleryArtifactPublishingProfileBase)
}

_attribute_map = {
'regions': {'key': 'regions', 'type': '[str]'},
'target_regions': {'key': 'targetRegions', 'type': '[TargetRegion]'},
'source': {'key': 'source', 'type': 'GalleryArtifactSource'},
'scale_tier': {'key': 'scaleTier', 'type': 'str'},
'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, **kwargs):
super(GalleryImageVersionPublishingProfile, self).__init__(**kwargs)
self.scale_tier = kwargs.get('scale_tier', None)
self.replica_count = kwargs.get('replica_count', None)
self.exclude_from_latest = kwargs.get('exclude_from_latest', None)
self.published_date = None
self.end_of_life_date = kwargs.get('end_of_life_date', None)
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,15 @@ class GalleryImageVersionPublishingProfile(GalleryArtifactPublishingProfileBase)
All required parameters must be populated in order to send to Azure.
:param regions: The regions where the artifact is going to be published.
:type regions: list[str]
:param target_regions: The target regions where the artifact is going to
be published.
: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 scale_tier: The scale tier of the gallery image version. Valid
values are 'S30' and 'S100'. Possible values include: 'S30', 'S100'
:type scale_tier: str or ~azure.mgmt.compute.v2018_06_01.models.ScaleTier
:param replica_count: This is the number of source blob copies in a
region.
:type replica_count: int
:param exclude_from_latest: The flag means that if it is set to true,
people deploying VMs with 'latest' as version will not use this version.
:type exclude_from_latest: bool
Expand All @@ -44,17 +46,17 @@ class GalleryImageVersionPublishingProfile(GalleryArtifactPublishingProfileBase)
}

_attribute_map = {
'regions': {'key': 'regions', 'type': '[str]'},
'target_regions': {'key': 'targetRegions', 'type': '[TargetRegion]'},
'source': {'key': 'source', 'type': 'GalleryArtifactSource'},
'scale_tier': {'key': 'scaleTier', 'type': 'str'},
'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, regions=None, scale_tier=None, exclude_from_latest: bool=None, end_of_life_date=None, **kwargs) -> None:
super(GalleryImageVersionPublishingProfile, self).__init__(regions=regions, source=source, **kwargs)
self.scale_tier = scale_tier
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# 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 TargetRegion(Model):
"""Describes the target region information.
:param name: The name of the region.
:type name: str
:param regional_replica_count: This is the number of source blob copies in
this specific region.
:type regional_replica_count: int
"""

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'regional_replica_count': {'key': 'regionalReplicaCount', 'type': 'int'},
}

def __init__(self, **kwargs):
super(TargetRegion, self).__init__(**kwargs)
self.name = kwargs.get('name', None)
self.regional_replica_count = kwargs.get('regional_replica_count', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# 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 TargetRegion(Model):
"""Describes the target region information.
:param name: The name of the region.
:type name: str
:param regional_replica_count: This is the number of source blob copies in
this specific region.
:type regional_replica_count: int
"""

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'regional_replica_count': {'key': 'regionalReplicaCount', 'type': 'int'},
}

def __init__(self, *, name: str=None, regional_replica_count: int=None, **kwargs) -> None:
super(TargetRegion, self).__init__(**kwargs)
self.name = name
self.regional_replica_count = regional_replica_count

0 comments on commit 76f5dd2

Please sign in to comment.