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 automation/resource-manager] Swagger change for pre and post script #3676

Merged
Merged
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
12 changes: 12 additions & 0 deletions azure-mgmt-automation/azure/mgmt/automation/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,15 @@
from .azure_query_properties_py3 import AzureQueryProperties
from .target_properties_py3 import TargetProperties
from .update_configuration_py3 import UpdateConfiguration
from .task_properties_py3 import TaskProperties
from .software_update_configuration_tasks_py3 import SoftwareUpdateConfigurationTasks
from .software_update_configuration_py3 import SoftwareUpdateConfiguration
from .collection_item_update_configuration_py3 import CollectionItemUpdateConfiguration
from .software_update_configuration_collection_item_py3 import SoftwareUpdateConfigurationCollectionItem
from .software_update_configuration_list_result_py3 import SoftwareUpdateConfigurationListResult
from .update_configuration_navigation_py3 import UpdateConfigurationNavigation
from .softare_update_configuration_run_task_properties_py3 import SoftareUpdateConfigurationRunTaskProperties
from .softare_update_configuration_run_tasks_py3 import SoftareUpdateConfigurationRunTasks
from .software_update_configuration_run_py3 import SoftwareUpdateConfigurationRun
from .software_update_configuration_run_list_result_py3 import SoftwareUpdateConfigurationRunListResult
from .job_navigation_py3 import JobNavigation
Expand Down Expand Up @@ -215,11 +219,15 @@
from .azure_query_properties import AzureQueryProperties
from .target_properties import TargetProperties
from .update_configuration import UpdateConfiguration
from .task_properties import TaskProperties
from .software_update_configuration_tasks import SoftwareUpdateConfigurationTasks
from .software_update_configuration import SoftwareUpdateConfiguration
from .collection_item_update_configuration import CollectionItemUpdateConfiguration
from .software_update_configuration_collection_item import SoftwareUpdateConfigurationCollectionItem
from .software_update_configuration_list_result import SoftwareUpdateConfigurationListResult
from .update_configuration_navigation import UpdateConfigurationNavigation
from .softare_update_configuration_run_task_properties import SoftareUpdateConfigurationRunTaskProperties
from .softare_update_configuration_run_tasks import SoftareUpdateConfigurationRunTasks
from .software_update_configuration_run import SoftwareUpdateConfigurationRun
from .software_update_configuration_run_list_result import SoftwareUpdateConfigurationRunListResult
from .job_navigation import JobNavigation
Expand Down Expand Up @@ -406,11 +414,15 @@
'AzureQueryProperties',
'TargetProperties',
'UpdateConfiguration',
'TaskProperties',
'SoftwareUpdateConfigurationTasks',
'SoftwareUpdateConfiguration',
'CollectionItemUpdateConfiguration',
'SoftwareUpdateConfigurationCollectionItem',
'SoftwareUpdateConfigurationListResult',
'UpdateConfigurationNavigation',
'SoftareUpdateConfigurationRunTaskProperties',
'SoftareUpdateConfigurationRunTasks',
'SoftwareUpdateConfigurationRun',
'SoftwareUpdateConfigurationRunListResult',
'JobNavigation',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@ class AzureQueryProperties(Model):

:param scope: List of Subscription or Resource Group ARM Ids.
:type scope: list[str]
:param location: List of locations to scope the query to.
:type location: list[str]
:param locations: List of locations to scope the query to.
:type locations: list[str]
:param tag_settings: Tag settings for the VM.
:type tag_settings: ~azure.mgmt.automation.models.TagSettingsProperties
"""

_attribute_map = {
'scope': {'key': 'scope', 'type': '[str]'},
'location': {'key': 'location', 'type': '[str]'},
'locations': {'key': 'locations', 'type': '[str]'},
'tag_settings': {'key': 'tagSettings', 'type': 'TagSettingsProperties'},
}

def __init__(self, **kwargs):
super(AzureQueryProperties, self).__init__(**kwargs)
self.scope = kwargs.get('scope', None)
self.location = kwargs.get('location', None)
self.locations = kwargs.get('locations', None)
self.tag_settings = kwargs.get('tag_settings', None)
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@ class AzureQueryProperties(Model):

:param scope: List of Subscription or Resource Group ARM Ids.
:type scope: list[str]
:param location: List of locations to scope the query to.
:type location: list[str]
:param locations: List of locations to scope the query to.
:type locations: list[str]
:param tag_settings: Tag settings for the VM.
:type tag_settings: ~azure.mgmt.automation.models.TagSettingsProperties
"""

_attribute_map = {
'scope': {'key': 'scope', 'type': '[str]'},
'location': {'key': 'location', 'type': '[str]'},
'locations': {'key': 'locations', 'type': '[str]'},
'tag_settings': {'key': 'tagSettings', 'type': 'TagSettingsProperties'},
}

def __init__(self, *, scope=None, location=None, tag_settings=None, **kwargs) -> None:
def __init__(self, *, scope=None, locations=None, tag_settings=None, **kwargs) -> None:
super(AzureQueryProperties, self).__init__(**kwargs)
self.scope = scope
self.location = location
self.locations = locations
self.tag_settings = tag_settings
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# 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 SoftareUpdateConfigurationRunTaskProperties(Model):
"""Task properties of the software update configuration.

:param status: The status of the task.
:type status: str
:param source: The name of the source of the task.
:type source: str
:param job_id: The job id of the task.
:type job_id: str
"""

_attribute_map = {
'status': {'key': 'status', 'type': 'str'},
'source': {'key': 'source', 'type': 'str'},
'job_id': {'key': 'jobId', 'type': 'str'},
}

def __init__(self, **kwargs):
super(SoftareUpdateConfigurationRunTaskProperties, self).__init__(**kwargs)
self.status = kwargs.get('status', None)
self.source = kwargs.get('source', None)
self.job_id = kwargs.get('job_id', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# 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 SoftareUpdateConfigurationRunTaskProperties(Model):
"""Task properties of the software update configuration.

:param status: The status of the task.
:type status: str
:param source: The name of the source of the task.
:type source: str
:param job_id: The job id of the task.
:type job_id: str
"""

_attribute_map = {
'status': {'key': 'status', 'type': 'str'},
'source': {'key': 'source', 'type': 'str'},
'job_id': {'key': 'jobId', 'type': 'str'},
}

def __init__(self, *, status: str=None, source: str=None, job_id: str=None, **kwargs) -> None:
super(SoftareUpdateConfigurationRunTaskProperties, self).__init__(**kwargs)
self.status = status
self.source = source
self.job_id = job_id
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# 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 SoftareUpdateConfigurationRunTasks(Model):
"""Software update configuration run tasks model.

:param pre_task: Pre task properties.
:type pre_task:
~azure.mgmt.automation.models.SoftareUpdateConfigurationRunTaskProperties
:param post_task: Post task properties.
:type post_task:
~azure.mgmt.automation.models.SoftareUpdateConfigurationRunTaskProperties
"""

_attribute_map = {
'pre_task': {'key': 'preTask', 'type': 'SoftareUpdateConfigurationRunTaskProperties'},
'post_task': {'key': 'postTask', 'type': 'SoftareUpdateConfigurationRunTaskProperties'},
}

def __init__(self, **kwargs):
super(SoftareUpdateConfigurationRunTasks, self).__init__(**kwargs)
self.pre_task = kwargs.get('pre_task', None)
self.post_task = kwargs.get('post_task', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# 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 SoftareUpdateConfigurationRunTasks(Model):
"""Software update configuration run tasks model.

:param pre_task: Pre task properties.
:type pre_task:
~azure.mgmt.automation.models.SoftareUpdateConfigurationRunTaskProperties
:param post_task: Post task properties.
:type post_task:
~azure.mgmt.automation.models.SoftareUpdateConfigurationRunTaskProperties
"""

_attribute_map = {
'pre_task': {'key': 'preTask', 'type': 'SoftareUpdateConfigurationRunTaskProperties'},
'post_task': {'key': 'postTask', 'type': 'SoftareUpdateConfigurationRunTaskProperties'},
}

def __init__(self, *, pre_task=None, post_task=None, **kwargs) -> None:
super(SoftareUpdateConfigurationRunTasks, self).__init__(**kwargs)
self.pre_task = pre_task
self.post_task = post_task
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,22 @@ class SoftwareUpdateConfiguration(Model):
:ivar provisioning_state: Provisioning state for the software update
configuration, which only appears in the response.
:vartype provisioning_state: str
:param error: detailes of provisioning error
:param error: Details of provisioning error
:type error: ~azure.mgmt.automation.models.ErrorResponse
:ivar creation_time: Creation time of theresource, which only appears in
:ivar creation_time: Creation time of the resource, which only appears in
the response.
:vartype creation_time: datetime
:ivar created_by: createdBy property, which only appears in the response.
:ivar created_by: CreatedBy property, which only appears in the response.
:vartype created_by: str
:ivar last_modified_time: Last time resource was modified, which only
appears in the response.
:vartype last_modified_time: datetime
:ivar last_modified_by: lastModifiedBy property, which only appears in the
:ivar last_modified_by: LastModifiedBy property, which only appears in the
response.
:vartype last_modified_by: str
:param tasks: Tasks information for the Software update configuration.
:type tasks:
~azure.mgmt.automation.models.SoftwareUpdateConfigurationTasks
"""

_validation = {
Expand Down Expand Up @@ -76,6 +79,7 @@ class SoftwareUpdateConfiguration(Model):
'created_by': {'key': 'properties.createdBy', 'type': 'str'},
'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'},
'last_modified_by': {'key': 'properties.lastModifiedBy', 'type': 'str'},
'tasks': {'key': 'properties.tasks', 'type': 'SoftwareUpdateConfigurationTasks'},
}

def __init__(self, **kwargs):
Expand All @@ -91,3 +95,4 @@ def __init__(self, **kwargs):
self.created_by = None
self.last_modified_time = None
self.last_modified_by = None
self.tasks = kwargs.get('tasks', None)
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ class SoftwareUpdateConfigurationMachineRun(Model):
:ivar last_modified_by: lastModifiedBy property, which only appears in the
response.
:vartype last_modified_by: str
:param error: detailes of provisioning error
:type error: ~azure.mgmt.automation.models.ErrorResponse
"""

_validation = {
Expand Down Expand Up @@ -101,6 +103,7 @@ class SoftwareUpdateConfigurationMachineRun(Model):
'created_by': {'key': 'properties.createdBy', 'type': 'str'},
'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'},
'last_modified_by': {'key': 'properties.lastModifiedBy', 'type': 'str'},
'error': {'key': 'properties.error', 'type': 'ErrorResponse'},
}

def __init__(self, **kwargs):
Expand All @@ -122,3 +125,4 @@ def __init__(self, **kwargs):
self.created_by = None
self.last_modified_time = None
self.last_modified_by = None
self.error = kwargs.get('error', None)
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ class SoftwareUpdateConfigurationMachineRun(Model):
:ivar last_modified_by: lastModifiedBy property, which only appears in the
response.
:vartype last_modified_by: str
:param error: detailes of provisioning error
:type error: ~azure.mgmt.automation.models.ErrorResponse
"""

_validation = {
Expand Down Expand Up @@ -101,9 +103,10 @@ class SoftwareUpdateConfigurationMachineRun(Model):
'created_by': {'key': 'properties.createdBy', 'type': 'str'},
'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'},
'last_modified_by': {'key': 'properties.lastModifiedBy', 'type': 'str'},
'error': {'key': 'properties.error', 'type': 'ErrorResponse'},
}

def __init__(self, *, software_update_configuration=None, job=None, **kwargs) -> None:
def __init__(self, *, software_update_configuration=None, job=None, error=None, **kwargs) -> None:
super(SoftwareUpdateConfigurationMachineRun, self).__init__(**kwargs)
self.name = None
self.id = None
Expand All @@ -122,3 +125,4 @@ def __init__(self, *, software_update_configuration=None, job=None, **kwargs) ->
self.created_by = None
self.last_modified_time = None
self.last_modified_by = None
self.error = error
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,22 @@ class SoftwareUpdateConfiguration(Model):
:ivar provisioning_state: Provisioning state for the software update
configuration, which only appears in the response.
:vartype provisioning_state: str
:param error: detailes of provisioning error
:param error: Details of provisioning error
:type error: ~azure.mgmt.automation.models.ErrorResponse
:ivar creation_time: Creation time of theresource, which only appears in
:ivar creation_time: Creation time of the resource, which only appears in
the response.
:vartype creation_time: datetime
:ivar created_by: createdBy property, which only appears in the response.
:ivar created_by: CreatedBy property, which only appears in the response.
:vartype created_by: str
:ivar last_modified_time: Last time resource was modified, which only
appears in the response.
:vartype last_modified_time: datetime
:ivar last_modified_by: lastModifiedBy property, which only appears in the
:ivar last_modified_by: LastModifiedBy property, which only appears in the
response.
:vartype last_modified_by: str
:param tasks: Tasks information for the Software update configuration.
:type tasks:
~azure.mgmt.automation.models.SoftwareUpdateConfigurationTasks
"""

_validation = {
Expand Down Expand Up @@ -76,9 +79,10 @@ class SoftwareUpdateConfiguration(Model):
'created_by': {'key': 'properties.createdBy', 'type': 'str'},
'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'},
'last_modified_by': {'key': 'properties.lastModifiedBy', 'type': 'str'},
'tasks': {'key': 'properties.tasks', 'type': 'SoftwareUpdateConfigurationTasks'},
}

def __init__(self, *, update_configuration, schedule_info, error=None, **kwargs) -> None:
def __init__(self, *, update_configuration, schedule_info, error=None, tasks=None, **kwargs) -> None:
super(SoftwareUpdateConfiguration, self).__init__(**kwargs)
self.name = None
self.id = None
Expand All @@ -91,3 +95,4 @@ def __init__(self, *, update_configuration, schedule_info, error=None, **kwargs)
self.created_by = None
self.last_modified_time = None
self.last_modified_by = None
self.tasks = tasks
Loading