Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[AutoPR azure-mgmt-resource] Template Specs: Dropping "Model" suffix from TemplateSpec and TemplateSpecVersion #1514

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,27 @@
from ._models_py3 import ErrorAdditionalInfo
from ._models_py3 import ErrorResponse
from ._models_py3 import SystemData
from ._models_py3 import TemplateSpec
from ._models_py3 import TemplateSpecArtifact
from ._models_py3 import TemplateSpecModel
from ._models_py3 import TemplateSpecsError, TemplateSpecsErrorException
from ._models_py3 import TemplateSpecTemplateArtifact
from ._models_py3 import TemplateSpecUpdateModel
from ._models_py3 import TemplateSpecVersionModel
from ._models_py3 import TemplateSpecVersion
from ._models_py3 import TemplateSpecVersionUpdateModel
except (SyntaxError, ImportError):
from ._models import AzureResourceBase
from ._models import ErrorAdditionalInfo
from ._models import ErrorResponse
from ._models import SystemData
from ._models import TemplateSpec
from ._models import TemplateSpecArtifact
from ._models import TemplateSpecModel
from ._models import TemplateSpecsError, TemplateSpecsErrorException
from ._models import TemplateSpecTemplateArtifact
from ._models import TemplateSpecUpdateModel
from ._models import TemplateSpecVersionModel
from ._models import TemplateSpecVersion
from ._models import TemplateSpecVersionUpdateModel
from ._paged_models import TemplateSpecModelPaged
from ._paged_models import TemplateSpecVersionModelPaged
from ._paged_models import TemplateSpecPaged
from ._paged_models import TemplateSpecVersionPaged
from ._template_specs_client_enums import (
CreatedByType,
)
Expand All @@ -44,14 +44,14 @@
'ErrorAdditionalInfo',
'ErrorResponse',
'SystemData',
'TemplateSpec',
'TemplateSpecArtifact',
'TemplateSpecModel',
'TemplateSpecsError', 'TemplateSpecsErrorException',
'TemplateSpecTemplateArtifact',
'TemplateSpecUpdateModel',
'TemplateSpecVersionModel',
'TemplateSpecVersion',
'TemplateSpecVersionUpdateModel',
'TemplateSpecModelPaged',
'TemplateSpecVersionModelPaged',
'TemplateSpecPaged',
'TemplateSpecVersionPaged',
'CreatedByType',
]
Original file line number Diff line number Diff line change
Expand Up @@ -176,41 +176,7 @@ def __init__(self, **kwargs):
self.last_modified_at = kwargs.get('last_modified_at', None)


class TemplateSpecArtifact(Model):
"""Represents a Template Spec artifact.

You probably want to use the sub-classes and not this class directly. Known
sub-classes are: TemplateSpecTemplateArtifact

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

:param path: Required. A filesystem safe relative path of the artifact.
:type path: str
:param kind: Required. Constant filled by server.
:type kind: str
"""

_validation = {
'path': {'required': True},
'kind': {'required': True},
}

_attribute_map = {
'path': {'key': 'path', 'type': 'str'},
'kind': {'key': 'kind', 'type': 'str'},
}

_subtype_map = {
'kind': {'template': 'TemplateSpecTemplateArtifact'}
}

def __init__(self, **kwargs):
super(TemplateSpecArtifact, self).__init__(**kwargs)
self.path = kwargs.get('path', None)
self.kind = None


class TemplateSpecModel(AzureResourceBase):
class TemplateSpec(AzureResourceBase):
"""Template Spec object.

Variables are only populated by the server, and will be ignored when
Expand Down Expand Up @@ -262,13 +228,47 @@ class TemplateSpecModel(AzureResourceBase):
}

def __init__(self, **kwargs):
super(TemplateSpecModel, self).__init__(**kwargs)
super(TemplateSpec, self).__init__(**kwargs)
self.location = kwargs.get('location', None)
self.description = kwargs.get('description', None)
self.display_name = kwargs.get('display_name', None)
self.tags = kwargs.get('tags', None)


class TemplateSpecArtifact(Model):
"""Represents a Template Spec artifact.

You probably want to use the sub-classes and not this class directly. Known
sub-classes are: TemplateSpecTemplateArtifact

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

:param path: Required. A filesystem safe relative path of the artifact.
:type path: str
:param kind: Required. Constant filled by server.
:type kind: str
"""

_validation = {
'path': {'required': True},
'kind': {'required': True},
}

_attribute_map = {
'path': {'key': 'path', 'type': 'str'},
'kind': {'key': 'kind', 'type': 'str'},
}

_subtype_map = {
'kind': {'template': 'TemplateSpecTemplateArtifact'}
}

def __init__(self, **kwargs):
super(TemplateSpecArtifact, self).__init__(**kwargs)
self.path = kwargs.get('path', None)
self.kind = None


class TemplateSpecsError(Model):
"""Template Specs error response.

Expand Down Expand Up @@ -370,7 +370,7 @@ def __init__(self, **kwargs):
self.tags = kwargs.get('tags', None)


class TemplateSpecVersionModel(AzureResourceBase):
class TemplateSpecVersion(AzureResourceBase):
"""Template Spec Version object.

Variables are only populated by the server, and will be ignored when
Expand Down Expand Up @@ -424,7 +424,7 @@ class TemplateSpecVersionModel(AzureResourceBase):
}

def __init__(self, **kwargs):
super(TemplateSpecVersionModel, self).__init__(**kwargs)
super(TemplateSpecVersion, self).__init__(**kwargs)
self.location = kwargs.get('location', None)
self.artifacts = kwargs.get('artifacts', None)
self.description = kwargs.get('description', None)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,41 +176,7 @@ def __init__(self, *, created_by: str=None, created_by_type=None, created_at=Non
self.last_modified_at = last_modified_at


class TemplateSpecArtifact(Model):
"""Represents a Template Spec artifact.

You probably want to use the sub-classes and not this class directly. Known
sub-classes are: TemplateSpecTemplateArtifact

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

:param path: Required. A filesystem safe relative path of the artifact.
:type path: str
:param kind: Required. Constant filled by server.
:type kind: str
"""

_validation = {
'path': {'required': True},
'kind': {'required': True},
}

_attribute_map = {
'path': {'key': 'path', 'type': 'str'},
'kind': {'key': 'kind', 'type': 'str'},
}

_subtype_map = {
'kind': {'template': 'TemplateSpecTemplateArtifact'}
}

def __init__(self, *, path: str, **kwargs) -> None:
super(TemplateSpecArtifact, self).__init__(**kwargs)
self.path = path
self.kind = None


class TemplateSpecModel(AzureResourceBase):
class TemplateSpec(AzureResourceBase):
"""Template Spec object.

Variables are only populated by the server, and will be ignored when
Expand Down Expand Up @@ -262,13 +228,47 @@ class TemplateSpecModel(AzureResourceBase):
}

def __init__(self, *, location: str, description: str=None, display_name: str=None, tags=None, **kwargs) -> None:
super(TemplateSpecModel, self).__init__(**kwargs)
super(TemplateSpec, self).__init__(**kwargs)
self.location = location
self.description = description
self.display_name = display_name
self.tags = tags


class TemplateSpecArtifact(Model):
"""Represents a Template Spec artifact.

You probably want to use the sub-classes and not this class directly. Known
sub-classes are: TemplateSpecTemplateArtifact

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

:param path: Required. A filesystem safe relative path of the artifact.
:type path: str
:param kind: Required. Constant filled by server.
:type kind: str
"""

_validation = {
'path': {'required': True},
'kind': {'required': True},
}

_attribute_map = {
'path': {'key': 'path', 'type': 'str'},
'kind': {'key': 'kind', 'type': 'str'},
}

_subtype_map = {
'kind': {'template': 'TemplateSpecTemplateArtifact'}
}

def __init__(self, *, path: str, **kwargs) -> None:
super(TemplateSpecArtifact, self).__init__(**kwargs)
self.path = path
self.kind = None


class TemplateSpecsError(Model):
"""Template Specs error response.

Expand Down Expand Up @@ -370,7 +370,7 @@ def __init__(self, *, tags=None, **kwargs) -> None:
self.tags = tags


class TemplateSpecVersionModel(AzureResourceBase):
class TemplateSpecVersion(AzureResourceBase):
"""Template Spec Version object.

Variables are only populated by the server, and will be ignored when
Expand Down Expand Up @@ -424,7 +424,7 @@ class TemplateSpecVersionModel(AzureResourceBase):
}

def __init__(self, *, location: str, artifacts=None, description: str=None, template=None, tags=None, **kwargs) -> None:
super(TemplateSpecVersionModel, self).__init__(**kwargs)
super(TemplateSpecVersion, self).__init__(**kwargs)
self.location = location
self.artifacts = artifacts
self.description = description
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,29 @@
from msrest.paging import Paged


class TemplateSpecModelPaged(Paged):
class TemplateSpecPaged(Paged):
"""
A paging container for iterating over a list of :class:`TemplateSpecModel <azure.mgmt.resource.templatespecs.v2019_06_preview.models.TemplateSpecModel>` object
A paging container for iterating over a list of :class:`TemplateSpec <azure.mgmt.resource.templatespecs.v2019_06_preview.models.TemplateSpec>` object
"""

_attribute_map = {
'next_link': {'key': 'nextLink', 'type': 'str'},
'current_page': {'key': 'value', 'type': '[TemplateSpecModel]'}
'current_page': {'key': 'value', 'type': '[TemplateSpec]'}
}

def __init__(self, *args, **kwargs):

super(TemplateSpecModelPaged, self).__init__(*args, **kwargs)
class TemplateSpecVersionModelPaged(Paged):
super(TemplateSpecPaged, self).__init__(*args, **kwargs)
class TemplateSpecVersionPaged(Paged):
"""
A paging container for iterating over a list of :class:`TemplateSpecVersionModel <azure.mgmt.resource.templatespecs.v2019_06_preview.models.TemplateSpecVersionModel>` object
A paging container for iterating over a list of :class:`TemplateSpecVersion <azure.mgmt.resource.templatespecs.v2019_06_preview.models.TemplateSpecVersion>` object
"""

_attribute_map = {
'next_link': {'key': 'nextLink', 'type': 'str'},
'current_page': {'key': 'value', 'type': '[TemplateSpecVersionModel]'}
'current_page': {'key': 'value', 'type': '[TemplateSpecVersion]'}
}

def __init__(self, *args, **kwargs):

super(TemplateSpecVersionModelPaged, self).__init__(*args, **kwargs)
super(TemplateSpecVersionPaged, self).__init__(*args, **kwargs)
Loading