diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/__init__.py b/azure-mgmt-automation/azure/mgmt/automation/models/__init__.py index 452ebb0f5aaa..9f20c5350a4e 100644 --- a/azure-mgmt-automation/azure/mgmt/automation/models/__init__.py +++ b/azure-mgmt-automation/azure/mgmt/automation/models/__init__.py @@ -103,6 +103,7 @@ from .software_update_configuration_machine_run import SoftwareUpdateConfigurationMachineRun from .software_update_configuration_machine_run_list_result import SoftwareUpdateConfigurationMachineRunListResult from .source_control import SourceControl +from .source_control_security_token_properties import SourceControlSecurityTokenProperties from .source_control_update_parameters import SourceControlUpdateParameters from .source_control_create_or_update_parameters import SourceControlCreateOrUpdateParameters from .source_control_sync_job import SourceControlSyncJob @@ -182,6 +183,7 @@ WindowsUpdateClasses, LinuxUpdateClasses, SourceType, + TokenType, ProvisioningState, StartType, StreamType, @@ -286,6 +288,7 @@ 'SoftwareUpdateConfigurationMachineRun', 'SoftwareUpdateConfigurationMachineRunListResult', 'SourceControl', + 'SourceControlSecurityTokenProperties', 'SourceControlUpdateParameters', 'SourceControlCreateOrUpdateParameters', 'SourceControlSyncJob', @@ -364,6 +367,7 @@ 'WindowsUpdateClasses', 'LinuxUpdateClasses', 'SourceType', + 'TokenType', 'ProvisioningState', 'StartType', 'StreamType', diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/automation_client_enums.py b/azure-mgmt-automation/azure/mgmt/automation/models/automation_client_enums.py index 8bbee9d8fda3..c8ca35b54a1c 100644 --- a/azure-mgmt-automation/azure/mgmt/automation/models/automation_client_enums.py +++ b/azure-mgmt-automation/azure/mgmt/automation/models/automation_client_enums.py @@ -219,6 +219,12 @@ class SourceType(Enum): git_hub = "GitHub" +class TokenType(Enum): + + personal_access_token = "PersonalAccessToken" + oauth = "Oauth" + + class ProvisioningState(Enum): completed = "Completed" diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/source_control.py b/azure-mgmt-automation/azure/mgmt/automation/models/source_control.py index ab650a39c3f2..870b03c1d620 100644 --- a/azure-mgmt-automation/azure/mgmt/automation/models/source_control.py +++ b/azure-mgmt-automation/azure/mgmt/automation/models/source_control.py @@ -24,27 +24,26 @@ class SourceControl(ProxyResource): :vartype name: str :ivar type: The type of the resource. :vartype type: str - :param repo_url: Gets or sets the repo url of the source control. + :param repo_url: The repo url of the source control. :type repo_url: str - :param branch: Gets or sets the repo branch of the source control. Include - branch as empty string for VsoTfvc. + :param branch: The repo branch of the source control. Include branch as + empty string for VsoTfvc. :type branch: str - :param folder_path: Gets or sets the folder path of the source control. + :param folder_path: The folder path of the source control. :type folder_path: str - :param auto_sync: Gets or sets auto async of the source control. Default - is false. + :param auto_sync: The auto sync of the source control. Default is false. :type auto_sync: bool - :param publish_runbook: Gets or sets the auto publish of the source - control. Default is true. + :param publish_runbook: The auto publish of the source control. Default is + true. :type publish_runbook: bool :param source_type: The source type. Must be one of VsoGit, VsoTfvc, GitHub. Possible values include: 'VsoGit', 'VsoTfvc', 'GitHub' :type source_type: str or ~azure.mgmt.automation.models.SourceType - :param description: Gets or sets the description. + :param description: The description. :type description: str - :param creation_time: Gets or sets the creation time. + :param creation_time: The creation time. :type creation_time: datetime - :param last_modified_time: Gets or sets the last modified time. + :param last_modified_time: The last modified time. :type last_modified_time: datetime """ diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/source_control_create_or_update_parameters.py b/azure-mgmt-automation/azure/mgmt/automation/models/source_control_create_or_update_parameters.py index cb2611af827a..24ba13dd3293 100644 --- a/azure-mgmt-automation/azure/mgmt/automation/models/source_control_create_or_update_parameters.py +++ b/azure-mgmt-automation/azure/mgmt/automation/models/source_control_create_or_update_parameters.py @@ -15,29 +15,28 @@ class SourceControlCreateOrUpdateParameters(Model): """The parameters supplied to the create or update source control operation. - :param repo_url: Gets or sets the repo url of the source control. + :param repo_url: The repo url of the source control. :type repo_url: str - :param branch: Gets or sets the repo branch of the source control. Include - branch as empty string for VsoTfvc. + :param branch: The repo branch of the source control. Include branch as + empty string for VsoTfvc. :type branch: str - :param folder_path: Gets or sets the folder path of the source control. - Path must be relative. + :param folder_path: The folder path of the source control. Path must be + relative. :type folder_path: str - :param auto_sync: Gets or sets auto async of the source control. Default - is false. + :param auto_sync: The auto async of the source control. Default is false. :type auto_sync: bool - :param publish_runbook: Gets or sets the auto publish of the source - control. Default is true. + :param publish_runbook: The auto publish of the source control. Default is + true. :type publish_runbook: bool :param source_type: The source type. Must be one of VsoGit, VsoTfvc, GitHub, case sensitive. Possible values include: 'VsoGit', 'VsoTfvc', 'GitHub' :type source_type: str or ~azure.mgmt.automation.models.SourceType - :param security_token: Gets or sets the authorization token for the repo - of the source control. - :type security_token: str - :param description: Gets or sets the user description of the source + :param security_token: The authorization token for the repo of the source control. + :type security_token: + ~azure.mgmt.automation.models.SourceControlSecurityTokenProperties + :param description: The user description of the source control. :type description: str """ @@ -45,7 +44,6 @@ class SourceControlCreateOrUpdateParameters(Model): 'repo_url': {'max_length': 2000}, 'branch': {'max_length': 255}, 'folder_path': {'max_length': 255}, - 'security_token': {'max_length': 1024}, 'description': {'max_length': 512}, } @@ -56,7 +54,7 @@ class SourceControlCreateOrUpdateParameters(Model): 'auto_sync': {'key': 'properties.autoSync', 'type': 'bool'}, 'publish_runbook': {'key': 'properties.publishRunbook', 'type': 'bool'}, 'source_type': {'key': 'properties.sourceType', 'type': 'str'}, - 'security_token': {'key': 'properties.securityToken', 'type': 'str'}, + 'security_token': {'key': 'properties.securityToken', 'type': 'SourceControlSecurityTokenProperties'}, 'description': {'key': 'properties.description', 'type': 'str'}, } diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/source_control_security_token_properties.py b/azure-mgmt-automation/azure/mgmt/automation/models/source_control_security_token_properties.py new file mode 100644 index 000000000000..2e4c5feb9747 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/source_control_security_token_properties.py @@ -0,0 +1,42 @@ +# 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 SourceControlSecurityTokenProperties(Model): + """SourceControlSecurityTokenProperties. + + :param access_token: The access token. + :type access_token: str + :param refresh_token: The refresh token. + :type refresh_token: str + :param token_type: The token type. Must be either PersonalAccessToken or + Oauth. Possible values include: 'PersonalAccessToken', 'Oauth' + :type token_type: str or ~azure.mgmt.automation.models.TokenType + """ + + _validation = { + 'access_token': {'max_length': 1024}, + 'refresh_token': {'max_length': 1024}, + } + + _attribute_map = { + 'access_token': {'key': 'accessToken', 'type': 'str'}, + 'refresh_token': {'key': 'refreshToken', 'type': 'str'}, + 'token_type': {'key': 'tokenType', 'type': 'str'}, + } + + def __init__(self, access_token=None, refresh_token=None, token_type=None): + super(SourceControlSecurityTokenProperties, self).__init__() + self.access_token = access_token + self.refresh_token = refresh_token + self.token_type = token_type diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job.py b/azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job.py index eecd200d3fb5..66947d5e278e 100644 --- a/azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job.py +++ b/azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job.py @@ -24,20 +24,20 @@ class SourceControlSyncJob(Model): :vartype type: str :ivar id: Resource id. :vartype id: str - :param sync_job_id: Gets the source control sync job id. - :type sync_job_id: str - :ivar creation_time: Gets the creation time of the job. + :param source_control_sync_job_id: The source control sync job id. + :type source_control_sync_job_id: str + :ivar creation_time: The creation time of the job. :vartype creation_time: datetime - :param provisioning_state: Gets the provisioning state of the job. - Possible values include: 'Completed', 'Failed', 'Running' + :param provisioning_state: The provisioning state of the job. Possible + values include: 'Completed', 'Failed', 'Running' :type provisioning_state: str or ~azure.mgmt.automation.models.ProvisioningState - :ivar start_time: Gets the start time of the job. + :ivar start_time: The start time of the job. :vartype start_time: datetime - :ivar end_time: Gets the end time of the job. + :ivar end_time: The end time of the job. :vartype end_time: datetime - :param start_type: Gets the type of start for the sync job. Possible - values include: 'AutoSync', 'ManualSync' + :param start_type: The type of start for the sync job. Possible values + include: 'AutoSync', 'ManualSync' :type start_type: str or ~azure.mgmt.automation.models.StartType """ @@ -54,7 +54,7 @@ class SourceControlSyncJob(Model): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, - 'sync_job_id': {'key': 'properties.syncJobId', 'type': 'str'}, + 'source_control_sync_job_id': {'key': 'properties.sourceControlSyncJobId', 'type': 'str'}, 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, @@ -62,12 +62,12 @@ class SourceControlSyncJob(Model): 'start_type': {'key': 'properties.startType', 'type': 'str'}, } - def __init__(self, sync_job_id=None, provisioning_state=None, start_type=None): + def __init__(self, source_control_sync_job_id=None, provisioning_state=None, start_type=None): super(SourceControlSyncJob, self).__init__() self.name = None self.type = None self.id = None - self.sync_job_id = sync_job_id + self.source_control_sync_job_id = source_control_sync_job_id self.creation_time = None self.provisioning_state = provisioning_state self.start_time = None diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_by_id.py b/azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_by_id.py index 2c3069b02fd0..f30ae98aae0b 100644 --- a/azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_by_id.py +++ b/azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_by_id.py @@ -18,25 +18,24 @@ class SourceControlSyncJobById(Model): Variables are only populated by the server, and will be ignored when sending a request. - :param id: Gets the id of the job. + :param id: The id of the job. :type id: str - :param sync_job_id: Gets the source control sync job id. - :type sync_job_id: str - :ivar creation_time: Gets the creation time of the job. + :param source_control_sync_job_id: The source control sync job id. + :type source_control_sync_job_id: str + :ivar creation_time: The creation time of the job. :vartype creation_time: datetime - :param provisioning_state: Gets the provisioning state of the job. - Possible values include: 'Completed', 'Failed', 'Running' + :param provisioning_state: The provisioning state of the job. Possible + values include: 'Completed', 'Failed', 'Running' :type provisioning_state: str or ~azure.mgmt.automation.models.ProvisioningState - :ivar start_time: Gets the start time of the job. + :ivar start_time: The start time of the job. :vartype start_time: datetime - :ivar end_time: Gets the end time of the job. + :ivar end_time: The end time of the job. :vartype end_time: datetime - :param start_type: Gets the type of start for the sync job. Possible - values include: 'AutoSync', 'ManualSync' + :param start_type: The type of start for the sync job. Possible values + include: 'AutoSync', 'ManualSync' :type start_type: str or ~azure.mgmt.automation.models.StartType - :param exception: Gets the exceptions that occured while running the sync - job. + :param exception: The exceptions that occured while running the sync job. :type exception: str """ @@ -48,7 +47,7 @@ class SourceControlSyncJobById(Model): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, - 'sync_job_id': {'key': 'properties.syncJobId', 'type': 'str'}, + 'source_control_sync_job_id': {'key': 'properties.sourceControlSyncJobId', 'type': 'str'}, 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, @@ -57,10 +56,10 @@ class SourceControlSyncJobById(Model): 'exception': {'key': 'properties.exception', 'type': 'str'}, } - def __init__(self, id=None, sync_job_id=None, provisioning_state=None, start_type=None, exception=None): + def __init__(self, id=None, source_control_sync_job_id=None, provisioning_state=None, start_type=None, exception=None): super(SourceControlSyncJobById, self).__init__() self.id = id - self.sync_job_id = sync_job_id + self.source_control_sync_job_id = source_control_sync_job_id self.creation_time = None self.provisioning_state = provisioning_state self.start_time = None diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_create_parameters.py b/azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_create_parameters.py index c4226722c97e..49ad4b59c3d0 100644 --- a/azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_create_parameters.py +++ b/azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_create_parameters.py @@ -15,14 +15,19 @@ class SourceControlSyncJobCreateParameters(Model): """The parameters supplied to the create source control sync job operation. - :param commit_id: Sets the commit id of the source control sync job. + :param commit_id: The commit id of the source control sync job. If not + syncing to a commitId, enter an empty string. :type commit_id: str """ + _validation = { + 'commit_id': {'required': True, 'min_length': 0}, + } + _attribute_map = { 'commit_id': {'key': 'properties.commitId', 'type': 'str'}, } - def __init__(self, commit_id=None): + def __init__(self, commit_id): super(SourceControlSyncJobCreateParameters, self).__init__() self.commit_id = commit_id diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_stream.py b/azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_stream.py index 39217f3ba71e..ab524f4cfedc 100644 --- a/azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_stream.py +++ b/azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_stream.py @@ -20,13 +20,13 @@ class SourceControlSyncJobStream(Model): :ivar id: Resource id. :vartype id: str - :param sync_job_stream_id: Gets the sync job stream id. + :param sync_job_stream_id: The sync job stream id. :type sync_job_stream_id: str - :param summary: Gets the summary of the sync job stream. + :param summary: The summary of the sync job stream. :type summary: str - :ivar time: Gets the time of the sync job stream. + :ivar time: The time of the sync job stream. :vartype time: datetime - :param stream_type: Gets the type of the sync job stream. Possible values + :param stream_type: The type of the sync job stream. Possible values include: 'Error', 'Output' :type stream_type: str or ~azure.mgmt.automation.models.StreamType """ diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_stream_by_id.py b/azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_stream_by_id.py index 274dcb497047..ce197dea20db 100644 --- a/azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_stream_by_id.py +++ b/azure-mgmt-automation/azure/mgmt/automation/models/source_control_sync_job_stream_by_id.py @@ -20,19 +20,19 @@ class SourceControlSyncJobStreamById(Model): :ivar id: Resource id. :vartype id: str - :param sync_job_stream_id: Gets the sync job stream id. + :param sync_job_stream_id: The sync job stream id. :type sync_job_stream_id: str - :param summary: Gets the summary of the sync job stream. + :param summary: The summary of the sync job stream. :type summary: str - :ivar time: Gets the time of the sync job stream. + :ivar time: The time of the sync job stream. :vartype time: datetime - :param stream_type: Gets the type of the sync job stream. Possible values + :param stream_type: The type of the sync job stream. Possible values include: 'Error', 'Output' :type stream_type: str or ~azure.mgmt.automation.models.StreamType - :param stream_text: Gets the text of the sync job stream. + :param stream_text: The text of the sync job stream. :type stream_text: str - :param value: Gets the value of the sync job stream. - :type value: str + :param value: The values of the job stream. + :type value: dict[str, object] """ _validation = { @@ -47,7 +47,7 @@ class SourceControlSyncJobStreamById(Model): 'time': {'key': 'properties.time', 'type': 'iso-8601'}, 'stream_type': {'key': 'properties.streamType', 'type': 'str'}, 'stream_text': {'key': 'properties.streamText', 'type': 'str'}, - 'value': {'key': 'properties.value', 'type': 'str'}, + 'value': {'key': 'properties.value', 'type': '{object}'}, } def __init__(self, sync_job_stream_id=None, summary=None, stream_type=None, stream_text=None, value=None): diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/source_control_update_parameters.py b/azure-mgmt-automation/azure/mgmt/automation/models/source_control_update_parameters.py index 7cacc8d88618..1365fdbbdfa5 100644 --- a/azure-mgmt-automation/azure/mgmt/automation/models/source_control_update_parameters.py +++ b/azure-mgmt-automation/azure/mgmt/automation/models/source_control_update_parameters.py @@ -15,22 +15,21 @@ class SourceControlUpdateParameters(Model): """The parameters supplied to the update source control operation. - :param branch: Gets or sets the repo branch of the source control. + :param branch: The repo branch of the source control. :type branch: str - :param folder_path: Gets or sets the folder path of the source control. - Path must be relative. + :param folder_path: The folder path of the source control. Path must be + relative. :type folder_path: str - :param auto_sync: Gets or sets auto async of the source control. Default - is false. + :param auto_sync: The auto sync of the source control. Default is false. :type auto_sync: bool - :param publish_runbook: Gets or sets the auto publish of the source - control. Default is true. + :param publish_runbook: The auto publish of the source control. Default is + true. :type publish_runbook: bool - :param security_token: Gets or sets the authorization token for the repo - of the source control. - :type security_token: str - :param description: Gets or sets the user description of the source + :param security_token: The authorization token for the repo of the source control. + :type security_token: + ~azure.mgmt.automation.models.SourceControlSecurityTokenProperties + :param description: The user description of the source control. :type description: str """ @@ -39,7 +38,7 @@ class SourceControlUpdateParameters(Model): 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, 'auto_sync': {'key': 'properties.autoSync', 'type': 'bool'}, 'publish_runbook': {'key': 'properties.publishRunbook', 'type': 'bool'}, - 'security_token': {'key': 'properties.securityToken', 'type': 'str'}, + 'security_token': {'key': 'properties.securityToken', 'type': 'SourceControlSecurityTokenProperties'}, 'description': {'key': 'properties.description', 'type': 'str'}, } diff --git a/azure-mgmt-automation/azure/mgmt/automation/operations/source_control_sync_job_operations.py b/azure-mgmt-automation/azure/mgmt/automation/operations/source_control_sync_job_operations.py index 834a6a8aae1d..eae34e5199e7 100644 --- a/azure-mgmt-automation/azure/mgmt/automation/operations/source_control_sync_job_operations.py +++ b/azure-mgmt-automation/azure/mgmt/automation/operations/source_control_sync_job_operations.py @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def create( - self, resource_group_name, automation_account_name, source_control_name, source_control_sync_job_id, commit_id=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, automation_account_name, source_control_name, source_control_sync_job_id, commit_id, custom_headers=None, raw=False, **operation_config): """Creates the sync job for a source control. :param resource_group_name: Name of an Azure Resource group. @@ -48,7 +48,8 @@ def create( :type source_control_name: str :param source_control_sync_job_id: The source control sync job id. :type source_control_sync_job_id: str - :param commit_id: Sets the commit id of the source control sync job. + :param commit_id: The commit id of the source control sync job. If not + syncing to a commitId, enter an empty string. :type commit_id: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the