Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Generated from ea69aa851115aefa504659edacc24fcacd9ae694
Making stream's value property an object instead of a string. Updating stream's examples.
  • Loading branch information
AutorestCI committed Aug 5, 2018
commit 3d034f7265e75638aee23625d96578c12e9c4ef7
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -182,6 +183,7 @@
WindowsUpdateClasses,
LinuxUpdateClasses,
SourceType,
TokenType,
ProvisioningState,
StartType,
StreamType,
Expand Down Expand Up @@ -286,6 +288,7 @@
'SoftwareUpdateConfigurationMachineRun',
'SoftwareUpdateConfigurationMachineRunListResult',
'SourceControl',
'SourceControlSecurityTokenProperties',
'SourceControlUpdateParameters',
'SourceControlCreateOrUpdateParameters',
'SourceControlSyncJob',
Expand Down Expand Up @@ -364,6 +367,7 @@
'WindowsUpdateClasses',
'LinuxUpdateClasses',
'SourceType',
'TokenType',
'ProvisioningState',
'StartType',
'StreamType',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,12 @@ class SourceType(Enum):
git_hub = "GitHub"


class TokenType(Enum):

personal_access_token = "PersonalAccessToken"
oauth = "Oauth"


class ProvisioningState(Enum):

completed = "Completed"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ class SourceControlCreateOrUpdateParameters(Model):
: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
:type security_token:
~azure.mgmt.automation.models.SourceControlSecurityTokenProperties
:param description: Gets or sets the user description of the source
control.
:type description: str
Expand All @@ -45,7 +46,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},
}

Expand All @@ -56,7 +56,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'},
}

Expand Down
Original file line number Diff line number Diff line change
@@ -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: Gets or sets the access token.
:type access_token: str
:param refresh_token: Gets or sets 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
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ 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
:param source_control_sync_job_id: Gets the source control sync job id.
:type source_control_sync_job_id: str
:ivar creation_time: Gets the creation time of the job.
:vartype creation_time: datetime
:param provisioning_state: Gets the provisioning state of the job.
Expand Down Expand Up @@ -54,20 +54,20 @@ 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'},
'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'},
'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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ class SourceControlSyncJobById(Model):

:param id: Gets the id of the job.
:type id: str
:param sync_job_id: Gets the source control sync job id.
:type sync_job_id: str
:param source_control_sync_job_id: Gets the source control sync job id.
:type source_control_sync_job_id: str
:ivar creation_time: Gets the creation time of the job.
:vartype creation_time: datetime
:param provisioning_state: Gets the provisioning state of the job.
Expand All @@ -48,7 +48,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'},
Expand All @@ -57,10 +57,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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: Sets 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
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ class SourceControlSyncJobStreamById(Model):
:type stream_type: str or ~azure.mgmt.automation.models.StreamType
:param stream_text: Gets 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: Gets or sets the values of the job stream.
:type value: dict[str, object]
"""

_validation = {
Expand All @@ -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):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ class SourceControlUpdateParameters(Model):
:type publish_runbook: bool
:param security_token: Gets or sets the authorization token for the repo
of the source control.
:type security_token: str
:type security_token:
~azure.mgmt.automation.models.SourceControlSecurityTokenProperties
:param description: Gets or sets the user description of the source
control.
:type description: str
Expand All @@ -39,7 +40,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'},
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -49,6 +49,7 @@ def create(
: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.
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
Expand Down