1# coding=utf-8
2# --------------------------------------------------------------------------
3# Copyright (c) Microsoft Corporation. All rights reserved.
4# Licensed under the MIT License. See License.txt in the project root for license information.
5# Code generated by Microsoft (R) AutoRest Code Generator.
6# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7# --------------------------------------------------------------------------
8
9import datetime
10from typing import Dict, List, Optional, Union
11
12from azure.core.exceptions import HttpResponseError
13import msrest.serialization
14
15from ._container_registry_management_client_enums import *
16
17
18class Resource(msrest.serialization.Model):
19    """An Azure resource.
20
21    Variables are only populated by the server, and will be ignored when sending a request.
22
23    All required parameters must be populated in order to send to Azure.
24
25    :ivar id: The resource ID.
26    :vartype id: str
27    :ivar name: The name of the resource.
28    :vartype name: str
29    :ivar type: The type of the resource.
30    :vartype type: str
31    :param location: Required. The location of the resource. This cannot be changed after the
32     resource is created.
33    :type location: str
34    :param tags: A set of tags. The tags of the resource.
35    :type tags: dict[str, str]
36    :ivar system_data: Metadata pertaining to creation and last modification of the resource.
37    :vartype system_data: ~azure.mgmt.containerregistry.v2019_06_01_preview.models.SystemData
38    """
39
40    _validation = {
41        'id': {'readonly': True},
42        'name': {'readonly': True},
43        'type': {'readonly': True},
44        'location': {'required': True},
45        'system_data': {'readonly': True},
46    }
47
48    _attribute_map = {
49        'id': {'key': 'id', 'type': 'str'},
50        'name': {'key': 'name', 'type': 'str'},
51        'type': {'key': 'type', 'type': 'str'},
52        'location': {'key': 'location', 'type': 'str'},
53        'tags': {'key': 'tags', 'type': '{str}'},
54        'system_data': {'key': 'systemData', 'type': 'SystemData'},
55    }
56
57    def __init__(
58        self,
59        *,
60        location: str,
61        tags: Optional[Dict[str, str]] = None,
62        **kwargs
63    ):
64        super(Resource, self).__init__(**kwargs)
65        self.id = None
66        self.name = None
67        self.type = None
68        self.location = location
69        self.tags = tags
70        self.system_data = None
71
72
73class AgentPool(Resource):
74    """The agentpool that has the ARM resource and properties.
75The agentpool will have all information to create an agent pool.
76
77    Variables are only populated by the server, and will be ignored when sending a request.
78
79    All required parameters must be populated in order to send to Azure.
80
81    :ivar id: The resource ID.
82    :vartype id: str
83    :ivar name: The name of the resource.
84    :vartype name: str
85    :ivar type: The type of the resource.
86    :vartype type: str
87    :param location: Required. The location of the resource. This cannot be changed after the
88     resource is created.
89    :type location: str
90    :param tags: A set of tags. The tags of the resource.
91    :type tags: dict[str, str]
92    :ivar system_data: Metadata pertaining to creation and last modification of the resource.
93    :vartype system_data: ~azure.mgmt.containerregistry.v2019_06_01_preview.models.SystemData
94    :param count: The count of agent machine.
95    :type count: int
96    :param tier: The Tier of agent machine.
97    :type tier: str
98    :param os: The OS of agent machine. Possible values include: "Windows", "Linux".
99    :type os: str or ~azure.mgmt.containerregistry.v2019_06_01_preview.models.OS
100    :param virtual_network_subnet_resource_id: The Virtual Network Subnet Resource Id of the agent
101     machine.
102    :type virtual_network_subnet_resource_id: str
103    :ivar provisioning_state: The provisioning state of this agent pool. Possible values include:
104     "Creating", "Updating", "Deleting", "Succeeded", "Failed", "Canceled".
105    :vartype provisioning_state: str or
106     ~azure.mgmt.containerregistry.v2019_06_01_preview.models.ProvisioningState
107    """
108
109    _validation = {
110        'id': {'readonly': True},
111        'name': {'readonly': True},
112        'type': {'readonly': True},
113        'location': {'required': True},
114        'system_data': {'readonly': True},
115        'provisioning_state': {'readonly': True},
116    }
117
118    _attribute_map = {
119        'id': {'key': 'id', 'type': 'str'},
120        'name': {'key': 'name', 'type': 'str'},
121        'type': {'key': 'type', 'type': 'str'},
122        'location': {'key': 'location', 'type': 'str'},
123        'tags': {'key': 'tags', 'type': '{str}'},
124        'system_data': {'key': 'systemData', 'type': 'SystemData'},
125        'count': {'key': 'properties.count', 'type': 'int'},
126        'tier': {'key': 'properties.tier', 'type': 'str'},
127        'os': {'key': 'properties.os', 'type': 'str'},
128        'virtual_network_subnet_resource_id': {'key': 'properties.virtualNetworkSubnetResourceId', 'type': 'str'},
129        'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
130    }
131
132    def __init__(
133        self,
134        *,
135        location: str,
136        tags: Optional[Dict[str, str]] = None,
137        count: Optional[int] = None,
138        tier: Optional[str] = None,
139        os: Optional[Union[str, "OS"]] = None,
140        virtual_network_subnet_resource_id: Optional[str] = None,
141        **kwargs
142    ):
143        super(AgentPool, self).__init__(location=location, tags=tags, **kwargs)
144        self.count = count
145        self.tier = tier
146        self.os = os
147        self.virtual_network_subnet_resource_id = virtual_network_subnet_resource_id
148        self.provisioning_state = None
149
150
151class AgentPoolListResult(msrest.serialization.Model):
152    """The collection of agent pools.
153
154    :param value: The collection value.
155    :type value: list[~azure.mgmt.containerregistry.v2019_06_01_preview.models.AgentPool]
156    :param next_link: The URI that can be used to request the next set of paged results.
157    :type next_link: str
158    """
159
160    _attribute_map = {
161        'value': {'key': 'value', 'type': '[AgentPool]'},
162        'next_link': {'key': 'nextLink', 'type': 'str'},
163    }
164
165    def __init__(
166        self,
167        *,
168        value: Optional[List["AgentPool"]] = None,
169        next_link: Optional[str] = None,
170        **kwargs
171    ):
172        super(AgentPoolListResult, self).__init__(**kwargs)
173        self.value = value
174        self.next_link = next_link
175
176
177class AgentPoolQueueStatus(msrest.serialization.Model):
178    """The QueueStatus of Agent Pool.
179
180    :param count: The number of pending runs in the queue.
181    :type count: int
182    """
183
184    _attribute_map = {
185        'count': {'key': 'count', 'type': 'int'},
186    }
187
188    def __init__(
189        self,
190        *,
191        count: Optional[int] = None,
192        **kwargs
193    ):
194        super(AgentPoolQueueStatus, self).__init__(**kwargs)
195        self.count = count
196
197
198class AgentPoolUpdateParameters(msrest.serialization.Model):
199    """The parameters for updating an agent pool.
200
201    :param tags: A set of tags. The ARM resource tags.
202    :type tags: dict[str, str]
203    :param count: The count of agent machine.
204    :type count: int
205    """
206
207    _attribute_map = {
208        'tags': {'key': 'tags', 'type': '{str}'},
209        'count': {'key': 'properties.count', 'type': 'int'},
210    }
211
212    def __init__(
213        self,
214        *,
215        tags: Optional[Dict[str, str]] = None,
216        count: Optional[int] = None,
217        **kwargs
218    ):
219        super(AgentPoolUpdateParameters, self).__init__(**kwargs)
220        self.tags = tags
221        self.count = count
222
223
224class AgentProperties(msrest.serialization.Model):
225    """The properties that determine the run agent configuration.
226
227    :param cpu: The CPU configuration in terms of number of cores required for the run.
228    :type cpu: int
229    """
230
231    _attribute_map = {
232        'cpu': {'key': 'cpu', 'type': 'int'},
233    }
234
235    def __init__(
236        self,
237        *,
238        cpu: Optional[int] = None,
239        **kwargs
240    ):
241        super(AgentProperties, self).__init__(**kwargs)
242        self.cpu = cpu
243
244
245class Argument(msrest.serialization.Model):
246    """The properties of a run argument.
247
248    All required parameters must be populated in order to send to Azure.
249
250    :param name: Required. The name of the argument.
251    :type name: str
252    :param value: Required. The value of the argument.
253    :type value: str
254    :param is_secret: Flag to indicate whether the argument represents a secret and want to be
255     removed from build logs.
256    :type is_secret: bool
257    """
258
259    _validation = {
260        'name': {'required': True},
261        'value': {'required': True},
262    }
263
264    _attribute_map = {
265        'name': {'key': 'name', 'type': 'str'},
266        'value': {'key': 'value', 'type': 'str'},
267        'is_secret': {'key': 'isSecret', 'type': 'bool'},
268    }
269
270    def __init__(
271        self,
272        *,
273        name: str,
274        value: str,
275        is_secret: Optional[bool] = False,
276        **kwargs
277    ):
278        super(Argument, self).__init__(**kwargs)
279        self.name = name
280        self.value = value
281        self.is_secret = is_secret
282
283
284class AuthInfo(msrest.serialization.Model):
285    """The authorization properties for accessing the source code repository.
286
287    All required parameters must be populated in order to send to Azure.
288
289    :param token_type: Required. The type of Auth token. Possible values include: "PAT", "OAuth".
290    :type token_type: str or ~azure.mgmt.containerregistry.v2019_06_01_preview.models.TokenType
291    :param token: Required. The access token used to access the source control provider.
292    :type token: str
293    :param refresh_token: The refresh token used to refresh the access token.
294    :type refresh_token: str
295    :param scope: The scope of the access token.
296    :type scope: str
297    :param expires_in: Time in seconds that the token remains valid.
298    :type expires_in: int
299    """
300
301    _validation = {
302        'token_type': {'required': True},
303        'token': {'required': True},
304    }
305
306    _attribute_map = {
307        'token_type': {'key': 'tokenType', 'type': 'str'},
308        'token': {'key': 'token', 'type': 'str'},
309        'refresh_token': {'key': 'refreshToken', 'type': 'str'},
310        'scope': {'key': 'scope', 'type': 'str'},
311        'expires_in': {'key': 'expiresIn', 'type': 'int'},
312    }
313
314    def __init__(
315        self,
316        *,
317        token_type: Union[str, "TokenType"],
318        token: str,
319        refresh_token: Optional[str] = None,
320        scope: Optional[str] = None,
321        expires_in: Optional[int] = None,
322        **kwargs
323    ):
324        super(AuthInfo, self).__init__(**kwargs)
325        self.token_type = token_type
326        self.token = token
327        self.refresh_token = refresh_token
328        self.scope = scope
329        self.expires_in = expires_in
330
331
332class AuthInfoUpdateParameters(msrest.serialization.Model):
333    """The authorization properties for accessing the source code repository.
334
335    :param token_type: The type of Auth token. Possible values include: "PAT", "OAuth".
336    :type token_type: str or ~azure.mgmt.containerregistry.v2019_06_01_preview.models.TokenType
337    :param token: The access token used to access the source control provider.
338    :type token: str
339    :param refresh_token: The refresh token used to refresh the access token.
340    :type refresh_token: str
341    :param scope: The scope of the access token.
342    :type scope: str
343    :param expires_in: Time in seconds that the token remains valid.
344    :type expires_in: int
345    """
346
347    _attribute_map = {
348        'token_type': {'key': 'tokenType', 'type': 'str'},
349        'token': {'key': 'token', 'type': 'str'},
350        'refresh_token': {'key': 'refreshToken', 'type': 'str'},
351        'scope': {'key': 'scope', 'type': 'str'},
352        'expires_in': {'key': 'expiresIn', 'type': 'int'},
353    }
354
355    def __init__(
356        self,
357        *,
358        token_type: Optional[Union[str, "TokenType"]] = None,
359        token: Optional[str] = None,
360        refresh_token: Optional[str] = None,
361        scope: Optional[str] = None,
362        expires_in: Optional[int] = None,
363        **kwargs
364    ):
365        super(AuthInfoUpdateParameters, self).__init__(**kwargs)
366        self.token_type = token_type
367        self.token = token
368        self.refresh_token = refresh_token
369        self.scope = scope
370        self.expires_in = expires_in
371
372
373class BaseImageDependency(msrest.serialization.Model):
374    """Properties that describe a base image dependency.
375
376    :param type: The type of the base image dependency. Possible values include: "BuildTime",
377     "RunTime".
378    :type type: str or
379     ~azure.mgmt.containerregistry.v2019_06_01_preview.models.BaseImageDependencyType
380    :param registry: The registry login server.
381    :type registry: str
382    :param repository: The repository name.
383    :type repository: str
384    :param tag: The tag name.
385    :type tag: str
386    :param digest: The sha256-based digest of the image manifest.
387    :type digest: str
388    """
389
390    _attribute_map = {
391        'type': {'key': 'type', 'type': 'str'},
392        'registry': {'key': 'registry', 'type': 'str'},
393        'repository': {'key': 'repository', 'type': 'str'},
394        'tag': {'key': 'tag', 'type': 'str'},
395        'digest': {'key': 'digest', 'type': 'str'},
396    }
397
398    def __init__(
399        self,
400        *,
401        type: Optional[Union[str, "BaseImageDependencyType"]] = None,
402        registry: Optional[str] = None,
403        repository: Optional[str] = None,
404        tag: Optional[str] = None,
405        digest: Optional[str] = None,
406        **kwargs
407    ):
408        super(BaseImageDependency, self).__init__(**kwargs)
409        self.type = type
410        self.registry = registry
411        self.repository = repository
412        self.tag = tag
413        self.digest = digest
414
415
416class BaseImageTrigger(msrest.serialization.Model):
417    """The trigger based on base image dependency.
418
419    All required parameters must be populated in order to send to Azure.
420
421    :param base_image_trigger_type: Required. The type of the auto trigger for base image
422     dependency updates. Possible values include: "All", "Runtime".
423    :type base_image_trigger_type: str or
424     ~azure.mgmt.containerregistry.v2019_06_01_preview.models.BaseImageTriggerType
425    :param update_trigger_endpoint: The endpoint URL for receiving update triggers.
426    :type update_trigger_endpoint: str
427    :param update_trigger_payload_type: Type of Payload body for Base image update triggers.
428     Possible values include: "Default", "Token".
429    :type update_trigger_payload_type: str or
430     ~azure.mgmt.containerregistry.v2019_06_01_preview.models.UpdateTriggerPayloadType
431    :param status: The current status of trigger. Possible values include: "Disabled", "Enabled".
432    :type status: str or ~azure.mgmt.containerregistry.v2019_06_01_preview.models.TriggerStatus
433    :param name: Required. The name of the trigger.
434    :type name: str
435    """
436
437    _validation = {
438        'base_image_trigger_type': {'required': True},
439        'name': {'required': True},
440    }
441
442    _attribute_map = {
443        'base_image_trigger_type': {'key': 'baseImageTriggerType', 'type': 'str'},
444        'update_trigger_endpoint': {'key': 'updateTriggerEndpoint', 'type': 'str'},
445        'update_trigger_payload_type': {'key': 'updateTriggerPayloadType', 'type': 'str'},
446        'status': {'key': 'status', 'type': 'str'},
447        'name': {'key': 'name', 'type': 'str'},
448    }
449
450    def __init__(
451        self,
452        *,
453        base_image_trigger_type: Union[str, "BaseImageTriggerType"],
454        name: str,
455        update_trigger_endpoint: Optional[str] = None,
456        update_trigger_payload_type: Optional[Union[str, "UpdateTriggerPayloadType"]] = None,
457        status: Optional[Union[str, "TriggerStatus"]] = None,
458        **kwargs
459    ):
460        super(BaseImageTrigger, self).__init__(**kwargs)
461        self.base_image_trigger_type = base_image_trigger_type
462        self.update_trigger_endpoint = update_trigger_endpoint
463        self.update_trigger_payload_type = update_trigger_payload_type
464        self.status = status
465        self.name = name
466
467
468class BaseImageTriggerUpdateParameters(msrest.serialization.Model):
469    """The properties for updating base image dependency trigger.
470
471    All required parameters must be populated in order to send to Azure.
472
473    :param base_image_trigger_type: The type of the auto trigger for base image dependency updates.
474     Possible values include: "All", "Runtime".
475    :type base_image_trigger_type: str or
476     ~azure.mgmt.containerregistry.v2019_06_01_preview.models.BaseImageTriggerType
477    :param update_trigger_endpoint: The endpoint URL for receiving update triggers.
478    :type update_trigger_endpoint: str
479    :param update_trigger_payload_type: Type of Payload body for Base image update triggers.
480     Possible values include: "Default", "Token".
481    :type update_trigger_payload_type: str or
482     ~azure.mgmt.containerregistry.v2019_06_01_preview.models.UpdateTriggerPayloadType
483    :param status: The current status of trigger. Possible values include: "Disabled", "Enabled".
484    :type status: str or ~azure.mgmt.containerregistry.v2019_06_01_preview.models.TriggerStatus
485    :param name: Required. The name of the trigger.
486    :type name: str
487    """
488
489    _validation = {
490        'name': {'required': True},
491    }
492
493    _attribute_map = {
494        'base_image_trigger_type': {'key': 'baseImageTriggerType', 'type': 'str'},
495        'update_trigger_endpoint': {'key': 'updateTriggerEndpoint', 'type': 'str'},
496        'update_trigger_payload_type': {'key': 'updateTriggerPayloadType', 'type': 'str'},
497        'status': {'key': 'status', 'type': 'str'},
498        'name': {'key': 'name', 'type': 'str'},
499    }
500
501    def __init__(
502        self,
503        *,
504        name: str,
505        base_image_trigger_type: Optional[Union[str, "BaseImageTriggerType"]] = None,
506        update_trigger_endpoint: Optional[str] = None,
507        update_trigger_payload_type: Optional[Union[str, "UpdateTriggerPayloadType"]] = None,
508        status: Optional[Union[str, "TriggerStatus"]] = None,
509        **kwargs
510    ):
511        super(BaseImageTriggerUpdateParameters, self).__init__(**kwargs)
512        self.base_image_trigger_type = base_image_trigger_type
513        self.update_trigger_endpoint = update_trigger_endpoint
514        self.update_trigger_payload_type = update_trigger_payload_type
515        self.status = status
516        self.name = name
517
518
519class Credentials(msrest.serialization.Model):
520    """The parameters that describes a set of credentials that will be used when a run is invoked.
521
522    :param source_registry: Describes the credential parameters for accessing the source registry.
523    :type source_registry:
524     ~azure.mgmt.containerregistry.v2019_06_01_preview.models.SourceRegistryCredentials
525    :param custom_registries: Describes the credential parameters for accessing other custom
526     registries. The key
527     for the dictionary item will be the registry login server (myregistry.azurecr.io) and
528     the value of the item will be the registry credentials for accessing the registry.
529    :type custom_registries: dict[str,
530     ~azure.mgmt.containerregistry.v2019_06_01_preview.models.CustomRegistryCredentials]
531    """
532
533    _attribute_map = {
534        'source_registry': {'key': 'sourceRegistry', 'type': 'SourceRegistryCredentials'},
535        'custom_registries': {'key': 'customRegistries', 'type': '{CustomRegistryCredentials}'},
536    }
537
538    def __init__(
539        self,
540        *,
541        source_registry: Optional["SourceRegistryCredentials"] = None,
542        custom_registries: Optional[Dict[str, "CustomRegistryCredentials"]] = None,
543        **kwargs
544    ):
545        super(Credentials, self).__init__(**kwargs)
546        self.source_registry = source_registry
547        self.custom_registries = custom_registries
548
549
550class CustomRegistryCredentials(msrest.serialization.Model):
551    """Describes the credentials that will be used to access a custom registry during a run.
552
553    :param user_name: The username for logging into the custom registry.
554    :type user_name: ~azure.mgmt.containerregistry.v2019_06_01_preview.models.SecretObject
555    :param password: The password for logging into the custom registry. The password is a secret
556     object that allows multiple ways of providing the value for it.
557    :type password: ~azure.mgmt.containerregistry.v2019_06_01_preview.models.SecretObject
558    :param identity: Indicates the managed identity assigned to the custom credential. If a
559     user-assigned identity
560     this value is the Client ID. If a system-assigned identity, the value will be ``system``. In
561     the case of a system-assigned identity, the Client ID will be determined by the runner. This
562     identity may be used to authenticate to key vault to retrieve credentials or it may be the
563     only
564     source of authentication used for accessing the registry.
565    :type identity: str
566    """
567
568    _attribute_map = {
569        'user_name': {'key': 'userName', 'type': 'SecretObject'},
570        'password': {'key': 'password', 'type': 'SecretObject'},
571        'identity': {'key': 'identity', 'type': 'str'},
572    }
573
574    def __init__(
575        self,
576        *,
577        user_name: Optional["SecretObject"] = None,
578        password: Optional["SecretObject"] = None,
579        identity: Optional[str] = None,
580        **kwargs
581    ):
582        super(CustomRegistryCredentials, self).__init__(**kwargs)
583        self.user_name = user_name
584        self.password = password
585        self.identity = identity
586
587
588class RunRequest(msrest.serialization.Model):
589    """The request parameters for scheduling a run.
590
591    You probably want to use the sub-classes and not this class directly. Known
592    sub-classes are: DockerBuildRequest, EncodedTaskRunRequest, FileTaskRunRequest, TaskRunRequest.
593
594    All required parameters must be populated in order to send to Azure.
595
596    :param type: Required. The type of the run request.Constant filled by server.
597    :type type: str
598    :param is_archive_enabled: The value that indicates whether archiving is enabled for the run or
599     not.
600    :type is_archive_enabled: bool
601    :param agent_pool_name: The dedicated agent pool for the run.
602    :type agent_pool_name: str
603    :param log_template: The template that describes the repository and tag information for run log
604     artifact.
605    :type log_template: str
606    """
607
608    _validation = {
609        'type': {'required': True},
610    }
611
612    _attribute_map = {
613        'type': {'key': 'type', 'type': 'str'},
614        'is_archive_enabled': {'key': 'isArchiveEnabled', 'type': 'bool'},
615        'agent_pool_name': {'key': 'agentPoolName', 'type': 'str'},
616        'log_template': {'key': 'logTemplate', 'type': 'str'},
617    }
618
619    _subtype_map = {
620        'type': {'DockerBuildRequest': 'DockerBuildRequest', 'EncodedTaskRunRequest': 'EncodedTaskRunRequest', 'FileTaskRunRequest': 'FileTaskRunRequest', 'TaskRunRequest': 'TaskRunRequest'}
621    }
622
623    def __init__(
624        self,
625        *,
626        is_archive_enabled: Optional[bool] = False,
627        agent_pool_name: Optional[str] = None,
628        log_template: Optional[str] = None,
629        **kwargs
630    ):
631        super(RunRequest, self).__init__(**kwargs)
632        self.type = None  # type: Optional[str]
633        self.is_archive_enabled = is_archive_enabled
634        self.agent_pool_name = agent_pool_name
635        self.log_template = log_template
636
637
638class DockerBuildRequest(RunRequest):
639    """The parameters for a docker quick build.
640
641    All required parameters must be populated in order to send to Azure.
642
643    :param type: Required. The type of the run request.Constant filled by server.
644    :type type: str
645    :param is_archive_enabled: The value that indicates whether archiving is enabled for the run or
646     not.
647    :type is_archive_enabled: bool
648    :param agent_pool_name: The dedicated agent pool for the run.
649    :type agent_pool_name: str
650    :param log_template: The template that describes the repository and tag information for run log
651     artifact.
652    :type log_template: str
653    :param image_names: The fully qualified image names including the repository and tag.
654    :type image_names: list[str]
655    :param is_push_enabled: The value of this property indicates whether the image built should be
656     pushed to the registry or not.
657    :type is_push_enabled: bool
658    :param no_cache: The value of this property indicates whether the image cache is enabled or
659     not.
660    :type no_cache: bool
661    :param docker_file_path: Required. The Docker file path relative to the source location.
662    :type docker_file_path: str
663    :param target: The name of the target build stage for the docker build.
664    :type target: str
665    :param arguments: The collection of override arguments to be used when executing the run.
666    :type arguments: list[~azure.mgmt.containerregistry.v2019_06_01_preview.models.Argument]
667    :param timeout: Run timeout in seconds.
668    :type timeout: int
669    :param platform: Required. The platform properties against which the run has to happen.
670    :type platform: ~azure.mgmt.containerregistry.v2019_06_01_preview.models.PlatformProperties
671    :param agent_configuration: The machine configuration of the run agent.
672    :type agent_configuration:
673     ~azure.mgmt.containerregistry.v2019_06_01_preview.models.AgentProperties
674    :param source_location: The URL(absolute or relative) of the source context. It can be an URL
675     to a tar or git repository.
676     If it is relative URL, the relative path should be obtained from calling
677     listBuildSourceUploadUrl API.
678    :type source_location: str
679    :param credentials: The properties that describes a set of credentials that will be used when
680     this run is invoked.
681    :type credentials: ~azure.mgmt.containerregistry.v2019_06_01_preview.models.Credentials
682    """
683
684    _validation = {
685        'type': {'required': True},
686        'docker_file_path': {'required': True},
687        'timeout': {'maximum': 28800, 'minimum': 300},
688        'platform': {'required': True},
689    }
690
691    _attribute_map = {
692        'type': {'key': 'type', 'type': 'str'},
693        'is_archive_enabled': {'key': 'isArchiveEnabled', 'type': 'bool'},
694        'agent_pool_name': {'key': 'agentPoolName', 'type': 'str'},
695        'log_template': {'key': 'logTemplate', 'type': 'str'},
696        'image_names': {'key': 'imageNames', 'type': '[str]'},
697        'is_push_enabled': {'key': 'isPushEnabled', 'type': 'bool'},
698        'no_cache': {'key': 'noCache', 'type': 'bool'},
699        'docker_file_path': {'key': 'dockerFilePath', 'type': 'str'},
700        'target': {'key': 'target', 'type': 'str'},
701        'arguments': {'key': 'arguments', 'type': '[Argument]'},
702        'timeout': {'key': 'timeout', 'type': 'int'},
703        'platform': {'key': 'platform', 'type': 'PlatformProperties'},
704        'agent_configuration': {'key': 'agentConfiguration', 'type': 'AgentProperties'},
705        'source_location': {'key': 'sourceLocation', 'type': 'str'},
706        'credentials': {'key': 'credentials', 'type': 'Credentials'},
707    }
708
709    def __init__(
710        self,
711        *,
712        docker_file_path: str,
713        platform: "PlatformProperties",
714        is_archive_enabled: Optional[bool] = False,
715        agent_pool_name: Optional[str] = None,
716        log_template: Optional[str] = None,
717        image_names: Optional[List[str]] = None,
718        is_push_enabled: Optional[bool] = True,
719        no_cache: Optional[bool] = False,
720        target: Optional[str] = None,
721        arguments: Optional[List["Argument"]] = None,
722        timeout: Optional[int] = 3600,
723        agent_configuration: Optional["AgentProperties"] = None,
724        source_location: Optional[str] = None,
725        credentials: Optional["Credentials"] = None,
726        **kwargs
727    ):
728        super(DockerBuildRequest, self).__init__(is_archive_enabled=is_archive_enabled, agent_pool_name=agent_pool_name, log_template=log_template, **kwargs)
729        self.type = 'DockerBuildRequest'  # type: str
730        self.image_names = image_names
731        self.is_push_enabled = is_push_enabled
732        self.no_cache = no_cache
733        self.docker_file_path = docker_file_path
734        self.target = target
735        self.arguments = arguments
736        self.timeout = timeout
737        self.platform = platform
738        self.agent_configuration = agent_configuration
739        self.source_location = source_location
740        self.credentials = credentials
741
742
743class TaskStepProperties(msrest.serialization.Model):
744    """Base properties for any task step.
745
746    You probably want to use the sub-classes and not this class directly. Known
747    sub-classes are: DockerBuildStep, EncodedTaskStep, FileTaskStep.
748
749    Variables are only populated by the server, and will be ignored when sending a request.
750
751    All required parameters must be populated in order to send to Azure.
752
753    :param type: Required. The type of the step.Constant filled by server.  Possible values
754     include: "Docker", "FileTask", "EncodedTask".
755    :type type: str or ~azure.mgmt.containerregistry.v2019_06_01_preview.models.StepType
756    :ivar base_image_dependencies: List of base image dependencies for a step.
757    :vartype base_image_dependencies:
758     list[~azure.mgmt.containerregistry.v2019_06_01_preview.models.BaseImageDependency]
759    :param context_path: The URL(absolute or relative) of the source context for the task step.
760    :type context_path: str
761    :param context_access_token: The token (git PAT or SAS token of storage account blob)
762     associated with the context for a step.
763    :type context_access_token: str
764    """
765
766    _validation = {
767        'type': {'required': True},
768        'base_image_dependencies': {'readonly': True},
769    }
770
771    _attribute_map = {
772        'type': {'key': 'type', 'type': 'str'},
773        'base_image_dependencies': {'key': 'baseImageDependencies', 'type': '[BaseImageDependency]'},
774        'context_path': {'key': 'contextPath', 'type': 'str'},
775        'context_access_token': {'key': 'contextAccessToken', 'type': 'str'},
776    }
777
778    _subtype_map = {
779        'type': {'Docker': 'DockerBuildStep', 'EncodedTask': 'EncodedTaskStep', 'FileTask': 'FileTaskStep'}
780    }
781
782    def __init__(
783        self,
784        *,
785        context_path: Optional[str] = None,
786        context_access_token: Optional[str] = None,
787        **kwargs
788    ):
789        super(TaskStepProperties, self).__init__(**kwargs)
790        self.type = None  # type: Optional[str]
791        self.base_image_dependencies = None
792        self.context_path = context_path
793        self.context_access_token = context_access_token
794
795
796class DockerBuildStep(TaskStepProperties):
797    """The Docker build step.
798
799    Variables are only populated by the server, and will be ignored when sending a request.
800
801    All required parameters must be populated in order to send to Azure.
802
803    :param type: Required. The type of the step.Constant filled by server.  Possible values
804     include: "Docker", "FileTask", "EncodedTask".
805    :type type: str or ~azure.mgmt.containerregistry.v2019_06_01_preview.models.StepType
806    :ivar base_image_dependencies: List of base image dependencies for a step.
807    :vartype base_image_dependencies:
808     list[~azure.mgmt.containerregistry.v2019_06_01_preview.models.BaseImageDependency]
809    :param context_path: The URL(absolute or relative) of the source context for the task step.
810    :type context_path: str
811    :param context_access_token: The token (git PAT or SAS token of storage account blob)
812     associated with the context for a step.
813    :type context_access_token: str
814    :param image_names: The fully qualified image names including the repository and tag.
815    :type image_names: list[str]
816    :param is_push_enabled: The value of this property indicates whether the image built should be
817     pushed to the registry or not.
818    :type is_push_enabled: bool
819    :param no_cache: The value of this property indicates whether the image cache is enabled or
820     not.
821    :type no_cache: bool
822    :param docker_file_path: Required. The Docker file path relative to the source context.
823    :type docker_file_path: str
824    :param target: The name of the target build stage for the docker build.
825    :type target: str
826    :param arguments: The collection of override arguments to be used when executing this build
827     step.
828    :type arguments: list[~azure.mgmt.containerregistry.v2019_06_01_preview.models.Argument]
829    """
830
831    _validation = {
832        'type': {'required': True},
833        'base_image_dependencies': {'readonly': True},
834        'docker_file_path': {'required': True},
835    }
836
837    _attribute_map = {
838        'type': {'key': 'type', 'type': 'str'},
839        'base_image_dependencies': {'key': 'baseImageDependencies', 'type': '[BaseImageDependency]'},
840        'context_path': {'key': 'contextPath', 'type': 'str'},
841        'context_access_token': {'key': 'contextAccessToken', 'type': 'str'},
842        'image_names': {'key': 'imageNames', 'type': '[str]'},
843        'is_push_enabled': {'key': 'isPushEnabled', 'type': 'bool'},
844        'no_cache': {'key': 'noCache', 'type': 'bool'},
845        'docker_file_path': {'key': 'dockerFilePath', 'type': 'str'},
846        'target': {'key': 'target', 'type': 'str'},
847        'arguments': {'key': 'arguments', 'type': '[Argument]'},
848    }
849
850    def __init__(
851        self,
852        *,
853        docker_file_path: str,
854        context_path: Optional[str] = None,
855        context_access_token: Optional[str] = None,
856        image_names: Optional[List[str]] = None,
857        is_push_enabled: Optional[bool] = True,
858        no_cache: Optional[bool] = False,
859        target: Optional[str] = None,
860        arguments: Optional[List["Argument"]] = None,
861        **kwargs
862    ):
863        super(DockerBuildStep, self).__init__(context_path=context_path, context_access_token=context_access_token, **kwargs)
864        self.type = 'Docker'  # type: str
865        self.image_names = image_names
866        self.is_push_enabled = is_push_enabled
867        self.no_cache = no_cache
868        self.docker_file_path = docker_file_path
869        self.target = target
870        self.arguments = arguments
871
872
873class TaskStepUpdateParameters(msrest.serialization.Model):
874    """Base properties for updating any task step.
875
876    You probably want to use the sub-classes and not this class directly. Known
877    sub-classes are: DockerBuildStepUpdateParameters, EncodedTaskStepUpdateParameters, FileTaskStepUpdateParameters.
878
879    All required parameters must be populated in order to send to Azure.
880
881    :param type: Required. The type of the step.Constant filled by server.  Possible values
882     include: "Docker", "FileTask", "EncodedTask".
883    :type type: str or ~azure.mgmt.containerregistry.v2019_06_01_preview.models.StepType
884    :param context_path: The URL(absolute or relative) of the source context for the task step.
885    :type context_path: str
886    :param context_access_token: The token (git PAT or SAS token of storage account blob)
887     associated with the context for a step.
888    :type context_access_token: str
889    """
890
891    _validation = {
892        'type': {'required': True},
893    }
894
895    _attribute_map = {
896        'type': {'key': 'type', 'type': 'str'},
897        'context_path': {'key': 'contextPath', 'type': 'str'},
898        'context_access_token': {'key': 'contextAccessToken', 'type': 'str'},
899    }
900
901    _subtype_map = {
902        'type': {'Docker': 'DockerBuildStepUpdateParameters', 'EncodedTask': 'EncodedTaskStepUpdateParameters', 'FileTask': 'FileTaskStepUpdateParameters'}
903    }
904
905    def __init__(
906        self,
907        *,
908        context_path: Optional[str] = None,
909        context_access_token: Optional[str] = None,
910        **kwargs
911    ):
912        super(TaskStepUpdateParameters, self).__init__(**kwargs)
913        self.type = None  # type: Optional[str]
914        self.context_path = context_path
915        self.context_access_token = context_access_token
916
917
918class DockerBuildStepUpdateParameters(TaskStepUpdateParameters):
919    """The properties for updating a docker build step.
920
921    All required parameters must be populated in order to send to Azure.
922
923    :param type: Required. The type of the step.Constant filled by server.  Possible values
924     include: "Docker", "FileTask", "EncodedTask".
925    :type type: str or ~azure.mgmt.containerregistry.v2019_06_01_preview.models.StepType
926    :param context_path: The URL(absolute or relative) of the source context for the task step.
927    :type context_path: str
928    :param context_access_token: The token (git PAT or SAS token of storage account blob)
929     associated with the context for a step.
930    :type context_access_token: str
931    :param image_names: The fully qualified image names including the repository and tag.
932    :type image_names: list[str]
933    :param is_push_enabled: The value of this property indicates whether the image built should be
934     pushed to the registry or not.
935    :type is_push_enabled: bool
936    :param no_cache: The value of this property indicates whether the image cache is enabled or
937     not.
938    :type no_cache: bool
939    :param docker_file_path: The Docker file path relative to the source context.
940    :type docker_file_path: str
941    :param arguments: The collection of override arguments to be used when executing this build
942     step.
943    :type arguments: list[~azure.mgmt.containerregistry.v2019_06_01_preview.models.Argument]
944    :param target: The name of the target build stage for the docker build.
945    :type target: str
946    """
947
948    _validation = {
949        'type': {'required': True},
950    }
951
952    _attribute_map = {
953        'type': {'key': 'type', 'type': 'str'},
954        'context_path': {'key': 'contextPath', 'type': 'str'},
955        'context_access_token': {'key': 'contextAccessToken', 'type': 'str'},
956        'image_names': {'key': 'imageNames', 'type': '[str]'},
957        'is_push_enabled': {'key': 'isPushEnabled', 'type': 'bool'},
958        'no_cache': {'key': 'noCache', 'type': 'bool'},
959        'docker_file_path': {'key': 'dockerFilePath', 'type': 'str'},
960        'arguments': {'key': 'arguments', 'type': '[Argument]'},
961        'target': {'key': 'target', 'type': 'str'},
962    }
963
964    def __init__(
965        self,
966        *,
967        context_path: Optional[str] = None,
968        context_access_token: Optional[str] = None,
969        image_names: Optional[List[str]] = None,
970        is_push_enabled: Optional[bool] = None,
971        no_cache: Optional[bool] = None,
972        docker_file_path: Optional[str] = None,
973        arguments: Optional[List["Argument"]] = None,
974        target: Optional[str] = None,
975        **kwargs
976    ):
977        super(DockerBuildStepUpdateParameters, self).__init__(context_path=context_path, context_access_token=context_access_token, **kwargs)
978        self.type = 'Docker'  # type: str
979        self.image_names = image_names
980        self.is_push_enabled = is_push_enabled
981        self.no_cache = no_cache
982        self.docker_file_path = docker_file_path
983        self.arguments = arguments
984        self.target = target
985
986
987class EncodedTaskRunRequest(RunRequest):
988    """The parameters for a quick task run request.
989
990    All required parameters must be populated in order to send to Azure.
991
992    :param type: Required. The type of the run request.Constant filled by server.
993    :type type: str
994    :param is_archive_enabled: The value that indicates whether archiving is enabled for the run or
995     not.
996    :type is_archive_enabled: bool
997    :param agent_pool_name: The dedicated agent pool for the run.
998    :type agent_pool_name: str
999    :param log_template: The template that describes the repository and tag information for run log
1000     artifact.
1001    :type log_template: str
1002    :param encoded_task_content: Required. Base64 encoded value of the template/definition file
1003     content.
1004    :type encoded_task_content: str
1005    :param encoded_values_content: Base64 encoded value of the parameters/values file content.
1006    :type encoded_values_content: str
1007    :param values: The collection of overridable values that can be passed when running a task.
1008    :type values: list[~azure.mgmt.containerregistry.v2019_06_01_preview.models.SetValue]
1009    :param timeout: Run timeout in seconds.
1010    :type timeout: int
1011    :param platform: Required. The platform properties against which the run has to happen.
1012    :type platform: ~azure.mgmt.containerregistry.v2019_06_01_preview.models.PlatformProperties
1013    :param agent_configuration: The machine configuration of the run agent.
1014    :type agent_configuration:
1015     ~azure.mgmt.containerregistry.v2019_06_01_preview.models.AgentProperties
1016    :param source_location: The URL(absolute or relative) of the source context. It can be an URL
1017     to a tar or git repository.
1018     If it is relative URL, the relative path should be obtained from calling
1019     listBuildSourceUploadUrl API.
1020    :type source_location: str
1021    :param credentials: The properties that describes a set of credentials that will be used when
1022     this run is invoked.
1023    :type credentials: ~azure.mgmt.containerregistry.v2019_06_01_preview.models.Credentials
1024    """
1025
1026    _validation = {
1027        'type': {'required': True},
1028        'encoded_task_content': {'required': True},
1029        'timeout': {'maximum': 28800, 'minimum': 300},
1030        'platform': {'required': True},
1031    }
1032
1033    _attribute_map = {
1034        'type': {'key': 'type', 'type': 'str'},
1035        'is_archive_enabled': {'key': 'isArchiveEnabled', 'type': 'bool'},
1036        'agent_pool_name': {'key': 'agentPoolName', 'type': 'str'},
1037        'log_template': {'key': 'logTemplate', 'type': 'str'},
1038        'encoded_task_content': {'key': 'encodedTaskContent', 'type': 'str'},
1039        'encoded_values_content': {'key': 'encodedValuesContent', 'type': 'str'},
1040        'values': {'key': 'values', 'type': '[SetValue]'},
1041        'timeout': {'key': 'timeout', 'type': 'int'},
1042        'platform': {'key': 'platform', 'type': 'PlatformProperties'},
1043        'agent_configuration': {'key': 'agentConfiguration', 'type': 'AgentProperties'},
1044        'source_location': {'key': 'sourceLocation', 'type': 'str'},
1045        'credentials': {'key': 'credentials', 'type': 'Credentials'},
1046    }
1047
1048    def __init__(
1049        self,
1050        *,
1051        encoded_task_content: str,
1052        platform: "PlatformProperties",
1053        is_archive_enabled: Optional[bool] = False,
1054        agent_pool_name: Optional[str] = None,
1055        log_template: Optional[str] = None,
1056        encoded_values_content: Optional[str] = None,
1057        values: Optional[List["SetValue"]] = None,
1058        timeout: Optional[int] = 3600,
1059        agent_configuration: Optional["AgentProperties"] = None,
1060        source_location: Optional[str] = None,
1061        credentials: Optional["Credentials"] = None,
1062        **kwargs
1063    ):
1064        super(EncodedTaskRunRequest, self).__init__(is_archive_enabled=is_archive_enabled, agent_pool_name=agent_pool_name, log_template=log_template, **kwargs)
1065        self.type = 'EncodedTaskRunRequest'  # type: str
1066        self.encoded_task_content = encoded_task_content
1067        self.encoded_values_content = encoded_values_content
1068        self.values = values
1069        self.timeout = timeout
1070        self.platform = platform
1071        self.agent_configuration = agent_configuration
1072        self.source_location = source_location
1073        self.credentials = credentials
1074
1075
1076class EncodedTaskStep(TaskStepProperties):
1077    """The properties of a encoded task step.
1078
1079    Variables are only populated by the server, and will be ignored when sending a request.
1080
1081    All required parameters must be populated in order to send to Azure.
1082
1083    :param type: Required. The type of the step.Constant filled by server.  Possible values
1084     include: "Docker", "FileTask", "EncodedTask".
1085    :type type: str or ~azure.mgmt.containerregistry.v2019_06_01_preview.models.StepType
1086    :ivar base_image_dependencies: List of base image dependencies for a step.
1087    :vartype base_image_dependencies:
1088     list[~azure.mgmt.containerregistry.v2019_06_01_preview.models.BaseImageDependency]
1089    :param context_path: The URL(absolute or relative) of the source context for the task step.
1090    :type context_path: str
1091    :param context_access_token: The token (git PAT or SAS token of storage account blob)
1092     associated with the context for a step.
1093    :type context_access_token: str
1094    :param encoded_task_content: Required. Base64 encoded value of the template/definition file
1095     content.
1096    :type encoded_task_content: str
1097    :param encoded_values_content: Base64 encoded value of the parameters/values file content.
1098    :type encoded_values_content: str
1099    :param values: The collection of overridable values that can be passed when running a task.
1100    :type values: list[~azure.mgmt.containerregistry.v2019_06_01_preview.models.SetValue]
1101    """
1102
1103    _validation = {
1104        'type': {'required': True},
1105        'base_image_dependencies': {'readonly': True},
1106        'encoded_task_content': {'required': True},
1107    }
1108
1109    _attribute_map = {
1110        'type': {'key': 'type', 'type': 'str'},
1111        'base_image_dependencies': {'key': 'baseImageDependencies', 'type': '[BaseImageDependency]'},
1112        'context_path': {'key': 'contextPath', 'type': 'str'},
1113        'context_access_token': {'key': 'contextAccessToken', 'type': 'str'},
1114        'encoded_task_content': {'key': 'encodedTaskContent', 'type': 'str'},
1115        'encoded_values_content': {'key': 'encodedValuesContent', 'type': 'str'},
1116        'values': {'key': 'values', 'type': '[SetValue]'},
1117    }
1118
1119    def __init__(
1120        self,
1121        *,
1122        encoded_task_content: str,
1123        context_path: Optional[str] = None,
1124        context_access_token: Optional[str] = None,
1125        encoded_values_content: Optional[str] = None,
1126        values: Optional[List["SetValue"]] = None,
1127        **kwargs
1128    ):
1129        super(EncodedTaskStep, self).__init__(context_path=context_path, context_access_token=context_access_token, **kwargs)
1130        self.type = 'EncodedTask'  # type: str
1131        self.encoded_task_content = encoded_task_content
1132        self.encoded_values_content = encoded_values_content
1133        self.values = values
1134
1135
1136class EncodedTaskStepUpdateParameters(TaskStepUpdateParameters):
1137    """The properties for updating encoded task step.
1138
1139    All required parameters must be populated in order to send to Azure.
1140
1141    :param type: Required. The type of the step.Constant filled by server.  Possible values
1142     include: "Docker", "FileTask", "EncodedTask".
1143    :type type: str or ~azure.mgmt.containerregistry.v2019_06_01_preview.models.StepType
1144    :param context_path: The URL(absolute or relative) of the source context for the task step.
1145    :type context_path: str
1146    :param context_access_token: The token (git PAT or SAS token of storage account blob)
1147     associated with the context for a step.
1148    :type context_access_token: str
1149    :param encoded_task_content: Base64 encoded value of the template/definition file content.
1150    :type encoded_task_content: str
1151    :param encoded_values_content: Base64 encoded value of the parameters/values file content.
1152    :type encoded_values_content: str
1153    :param values: The collection of overridable values that can be passed when running a task.
1154    :type values: list[~azure.mgmt.containerregistry.v2019_06_01_preview.models.SetValue]
1155    """
1156
1157    _validation = {
1158        'type': {'required': True},
1159    }
1160
1161    _attribute_map = {
1162        'type': {'key': 'type', 'type': 'str'},
1163        'context_path': {'key': 'contextPath', 'type': 'str'},
1164        'context_access_token': {'key': 'contextAccessToken', 'type': 'str'},
1165        'encoded_task_content': {'key': 'encodedTaskContent', 'type': 'str'},
1166        'encoded_values_content': {'key': 'encodedValuesContent', 'type': 'str'},
1167        'values': {'key': 'values', 'type': '[SetValue]'},
1168    }
1169
1170    def __init__(
1171        self,
1172        *,
1173        context_path: Optional[str] = None,
1174        context_access_token: Optional[str] = None,
1175        encoded_task_content: Optional[str] = None,
1176        encoded_values_content: Optional[str] = None,
1177        values: Optional[List["SetValue"]] = None,
1178        **kwargs
1179    ):
1180        super(EncodedTaskStepUpdateParameters, self).__init__(context_path=context_path, context_access_token=context_access_token, **kwargs)
1181        self.type = 'EncodedTask'  # type: str
1182        self.encoded_task_content = encoded_task_content
1183        self.encoded_values_content = encoded_values_content
1184        self.values = values
1185
1186
1187class ErrorResponse(msrest.serialization.Model):
1188    """An error response from the Azure Container Registry service.
1189
1190    :param error: Azure container registry build API error body.
1191    :type error: ~azure.mgmt.containerregistry.v2019_06_01_preview.models.ErrorResponseBody
1192    """
1193
1194    _attribute_map = {
1195        'error': {'key': 'error', 'type': 'ErrorResponseBody'},
1196    }
1197
1198    def __init__(
1199        self,
1200        *,
1201        error: Optional["ErrorResponseBody"] = None,
1202        **kwargs
1203    ):
1204        super(ErrorResponse, self).__init__(**kwargs)
1205        self.error = error
1206
1207
1208class ErrorResponseBody(msrest.serialization.Model):
1209    """An error response from the Azure Container Registry service.
1210
1211    All required parameters must be populated in order to send to Azure.
1212
1213    :param code: Required. error code.
1214    :type code: str
1215    :param message: Required. error message.
1216    :type message: str
1217    :param target: target of the particular error.
1218    :type target: str
1219    :param details: an array of additional nested error response info objects, as described by this
1220     contract.
1221    :type details: ~azure.mgmt.containerregistry.v2019_06_01_preview.models.InnerErrorDescription
1222    """
1223
1224    _validation = {
1225        'code': {'required': True},
1226        'message': {'required': True},
1227    }
1228
1229    _attribute_map = {
1230        'code': {'key': 'code', 'type': 'str'},
1231        'message': {'key': 'message', 'type': 'str'},
1232        'target': {'key': 'target', 'type': 'str'},
1233        'details': {'key': 'details', 'type': 'InnerErrorDescription'},
1234    }
1235
1236    def __init__(
1237        self,
1238        *,
1239        code: str,
1240        message: str,
1241        target: Optional[str] = None,
1242        details: Optional["InnerErrorDescription"] = None,
1243        **kwargs
1244    ):
1245        super(ErrorResponseBody, self).__init__(**kwargs)
1246        self.code = code
1247        self.message = message
1248        self.target = target
1249        self.details = details
1250
1251
1252class FileTaskRunRequest(RunRequest):
1253    """The request parameters for a scheduling run against a task file.
1254
1255    All required parameters must be populated in order to send to Azure.
1256
1257    :param type: Required. The type of the run request.Constant filled by server.
1258    :type type: str
1259    :param is_archive_enabled: The value that indicates whether archiving is enabled for the run or
1260     not.
1261    :type is_archive_enabled: bool
1262    :param agent_pool_name: The dedicated agent pool for the run.
1263    :type agent_pool_name: str
1264    :param log_template: The template that describes the repository and tag information for run log
1265     artifact.
1266    :type log_template: str
1267    :param task_file_path: Required. The template/definition file path relative to the source.
1268    :type task_file_path: str
1269    :param values_file_path: The values/parameters file path relative to the source.
1270    :type values_file_path: str
1271    :param values: The collection of overridable values that can be passed when running a task.
1272    :type values: list[~azure.mgmt.containerregistry.v2019_06_01_preview.models.SetValue]
1273    :param timeout: Run timeout in seconds.
1274    :type timeout: int
1275    :param platform: Required. The platform properties against which the run has to happen.
1276    :type platform: ~azure.mgmt.containerregistry.v2019_06_01_preview.models.PlatformProperties
1277    :param agent_configuration: The machine configuration of the run agent.
1278    :type agent_configuration:
1279     ~azure.mgmt.containerregistry.v2019_06_01_preview.models.AgentProperties
1280    :param source_location: The URL(absolute or relative) of the source context. It can be an URL
1281     to a tar or git repository.
1282     If it is relative URL, the relative path should be obtained from calling
1283     listBuildSourceUploadUrl API.
1284    :type source_location: str
1285    :param credentials: The properties that describes a set of credentials that will be used when
1286     this run is invoked.
1287    :type credentials: ~azure.mgmt.containerregistry.v2019_06_01_preview.models.Credentials
1288    """
1289
1290    _validation = {
1291        'type': {'required': True},
1292        'task_file_path': {'required': True},
1293        'timeout': {'maximum': 28800, 'minimum': 300},
1294        'platform': {'required': True},
1295    }
1296
1297    _attribute_map = {
1298        'type': {'key': 'type', 'type': 'str'},
1299        'is_archive_enabled': {'key': 'isArchiveEnabled', 'type': 'bool'},
1300        'agent_pool_name': {'key': 'agentPoolName', 'type': 'str'},
1301        'log_template': {'key': 'logTemplate', 'type': 'str'},
1302        'task_file_path': {'key': 'taskFilePath', 'type': 'str'},
1303        'values_file_path': {'key': 'valuesFilePath', 'type': 'str'},
1304        'values': {'key': 'values', 'type': '[SetValue]'},
1305        'timeout': {'key': 'timeout', 'type': 'int'},
1306        'platform': {'key': 'platform', 'type': 'PlatformProperties'},
1307        'agent_configuration': {'key': 'agentConfiguration', 'type': 'AgentProperties'},
1308        'source_location': {'key': 'sourceLocation', 'type': 'str'},
1309        'credentials': {'key': 'credentials', 'type': 'Credentials'},
1310    }
1311
1312    def __init__(
1313        self,
1314        *,
1315        task_file_path: str,
1316        platform: "PlatformProperties",
1317        is_archive_enabled: Optional[bool] = False,
1318        agent_pool_name: Optional[str] = None,
1319        log_template: Optional[str] = None,
1320        values_file_path: Optional[str] = None,
1321        values: Optional[List["SetValue"]] = None,
1322        timeout: Optional[int] = 3600,
1323        agent_configuration: Optional["AgentProperties"] = None,
1324        source_location: Optional[str] = None,
1325        credentials: Optional["Credentials"] = None,
1326        **kwargs
1327    ):
1328        super(FileTaskRunRequest, self).__init__(is_archive_enabled=is_archive_enabled, agent_pool_name=agent_pool_name, log_template=log_template, **kwargs)
1329        self.type = 'FileTaskRunRequest'  # type: str
1330        self.task_file_path = task_file_path
1331        self.values_file_path = values_file_path
1332        self.values = values
1333        self.timeout = timeout
1334        self.platform = platform
1335        self.agent_configuration = agent_configuration
1336        self.source_location = source_location
1337        self.credentials = credentials
1338
1339
1340class FileTaskStep(TaskStepProperties):
1341    """The properties of a task step.
1342
1343    Variables are only populated by the server, and will be ignored when sending a request.
1344
1345    All required parameters must be populated in order to send to Azure.
1346
1347    :param type: Required. The type of the step.Constant filled by server.  Possible values
1348     include: "Docker", "FileTask", "EncodedTask".
1349    :type type: str or ~azure.mgmt.containerregistry.v2019_06_01_preview.models.StepType
1350    :ivar base_image_dependencies: List of base image dependencies for a step.
1351    :vartype base_image_dependencies:
1352     list[~azure.mgmt.containerregistry.v2019_06_01_preview.models.BaseImageDependency]
1353    :param context_path: The URL(absolute or relative) of the source context for the task step.
1354    :type context_path: str
1355    :param context_access_token: The token (git PAT or SAS token of storage account blob)
1356     associated with the context for a step.
1357    :type context_access_token: str
1358    :param task_file_path: Required. The task template/definition file path relative to the source
1359     context.
1360    :type task_file_path: str
1361    :param values_file_path: The task values/parameters file path relative to the source context.
1362    :type values_file_path: str
1363    :param values: The collection of overridable values that can be passed when running a task.
1364    :type values: list[~azure.mgmt.containerregistry.v2019_06_01_preview.models.SetValue]
1365    """
1366
1367    _validation = {
1368        'type': {'required': True},
1369        'base_image_dependencies': {'readonly': True},
1370        'task_file_path': {'required': True},
1371    }
1372
1373    _attribute_map = {
1374        'type': {'key': 'type', 'type': 'str'},
1375        'base_image_dependencies': {'key': 'baseImageDependencies', 'type': '[BaseImageDependency]'},
1376        'context_path': {'key': 'contextPath', 'type': 'str'},
1377        'context_access_token': {'key': 'contextAccessToken', 'type': 'str'},
1378        'task_file_path': {'key': 'taskFilePath', 'type': 'str'},
1379        'values_file_path': {'key': 'valuesFilePath', 'type': 'str'},
1380        'values': {'key': 'values', 'type': '[SetValue]'},
1381    }
1382
1383    def __init__(
1384        self,
1385        *,
1386        task_file_path: str,
1387        context_path: Optional[str] = None,
1388        context_access_token: Optional[str] = None,
1389        values_file_path: Optional[str] = None,
1390        values: Optional[List["SetValue"]] = None,
1391        **kwargs
1392    ):
1393        super(FileTaskStep, self).__init__(context_path=context_path, context_access_token=context_access_token, **kwargs)
1394        self.type = 'FileTask'  # type: str
1395        self.task_file_path = task_file_path
1396        self.values_file_path = values_file_path
1397        self.values = values
1398
1399
1400class FileTaskStepUpdateParameters(TaskStepUpdateParameters):
1401    """The properties of updating a task step.
1402
1403    All required parameters must be populated in order to send to Azure.
1404
1405    :param type: Required. The type of the step.Constant filled by server.  Possible values
1406     include: "Docker", "FileTask", "EncodedTask".
1407    :type type: str or ~azure.mgmt.containerregistry.v2019_06_01_preview.models.StepType
1408    :param context_path: The URL(absolute or relative) of the source context for the task step.
1409    :type context_path: str
1410    :param context_access_token: The token (git PAT or SAS token of storage account blob)
1411     associated with the context for a step.
1412    :type context_access_token: str
1413    :param task_file_path: The task template/definition file path relative to the source context.
1414    :type task_file_path: str
1415    :param values_file_path: The values/parameters file path relative to the source context.
1416    :type values_file_path: str
1417    :param values: The collection of overridable values that can be passed when running a task.
1418    :type values: list[~azure.mgmt.containerregistry.v2019_06_01_preview.models.SetValue]
1419    """
1420
1421    _validation = {
1422        'type': {'required': True},
1423    }
1424
1425    _attribute_map = {
1426        'type': {'key': 'type', 'type': 'str'},
1427        'context_path': {'key': 'contextPath', 'type': 'str'},
1428        'context_access_token': {'key': 'contextAccessToken', 'type': 'str'},
1429        'task_file_path': {'key': 'taskFilePath', 'type': 'str'},
1430        'values_file_path': {'key': 'valuesFilePath', 'type': 'str'},
1431        'values': {'key': 'values', 'type': '[SetValue]'},
1432    }
1433
1434    def __init__(
1435        self,
1436        *,
1437        context_path: Optional[str] = None,
1438        context_access_token: Optional[str] = None,
1439        task_file_path: Optional[str] = None,
1440        values_file_path: Optional[str] = None,
1441        values: Optional[List["SetValue"]] = None,
1442        **kwargs
1443    ):
1444        super(FileTaskStepUpdateParameters, self).__init__(context_path=context_path, context_access_token=context_access_token, **kwargs)
1445        self.type = 'FileTask'  # type: str
1446        self.task_file_path = task_file_path
1447        self.values_file_path = values_file_path
1448        self.values = values
1449
1450
1451class IdentityProperties(msrest.serialization.Model):
1452    """Managed identity for the resource.
1453
1454    :param principal_id: The principal ID of resource identity.
1455    :type principal_id: str
1456    :param tenant_id: The tenant ID of resource.
1457    :type tenant_id: str
1458    :param type: The identity type. Possible values include: "SystemAssigned", "UserAssigned",
1459     "SystemAssigned, UserAssigned", "None".
1460    :type type: str or
1461     ~azure.mgmt.containerregistry.v2019_06_01_preview.models.ResourceIdentityType
1462    :param user_assigned_identities: The list of user identities associated with the resource. The
1463     user identity
1464     dictionary key references will be ARM resource ids in the form:
1465     '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/
1466         providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
1467    :type user_assigned_identities: dict[str,
1468     ~azure.mgmt.containerregistry.v2019_06_01_preview.models.UserIdentityProperties]
1469    """
1470
1471    _attribute_map = {
1472        'principal_id': {'key': 'principalId', 'type': 'str'},
1473        'tenant_id': {'key': 'tenantId', 'type': 'str'},
1474        'type': {'key': 'type', 'type': 'str'},
1475        'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{UserIdentityProperties}'},
1476    }
1477
1478    def __init__(
1479        self,
1480        *,
1481        principal_id: Optional[str] = None,
1482        tenant_id: Optional[str] = None,
1483        type: Optional[Union[str, "ResourceIdentityType"]] = None,
1484        user_assigned_identities: Optional[Dict[str, "UserIdentityProperties"]] = None,
1485        **kwargs
1486    ):
1487        super(IdentityProperties, self).__init__(**kwargs)
1488        self.principal_id = principal_id
1489        self.tenant_id = tenant_id
1490        self.type = type
1491        self.user_assigned_identities = user_assigned_identities
1492
1493
1494class ImageDescriptor(msrest.serialization.Model):
1495    """Properties for a registry image.
1496
1497    :param registry: The registry login server.
1498    :type registry: str
1499    :param repository: The repository name.
1500    :type repository: str
1501    :param tag: The tag name.
1502    :type tag: str
1503    :param digest: The sha256-based digest of the image manifest.
1504    :type digest: str
1505    """
1506
1507    _attribute_map = {
1508        'registry': {'key': 'registry', 'type': 'str'},
1509        'repository': {'key': 'repository', 'type': 'str'},
1510        'tag': {'key': 'tag', 'type': 'str'},
1511        'digest': {'key': 'digest', 'type': 'str'},
1512    }
1513
1514    def __init__(
1515        self,
1516        *,
1517        registry: Optional[str] = None,
1518        repository: Optional[str] = None,
1519        tag: Optional[str] = None,
1520        digest: Optional[str] = None,
1521        **kwargs
1522    ):
1523        super(ImageDescriptor, self).__init__(**kwargs)
1524        self.registry = registry
1525        self.repository = repository
1526        self.tag = tag
1527        self.digest = digest
1528
1529
1530class ImageUpdateTrigger(msrest.serialization.Model):
1531    """The image update trigger that caused a build.
1532
1533    :param id: The unique ID of the trigger.
1534    :type id: str
1535    :param timestamp: The timestamp when the image update happened.
1536    :type timestamp: ~datetime.datetime
1537    :param images: The list of image updates that caused the build.
1538    :type images: list[~azure.mgmt.containerregistry.v2019_06_01_preview.models.ImageDescriptor]
1539    """
1540
1541    _attribute_map = {
1542        'id': {'key': 'id', 'type': 'str'},
1543        'timestamp': {'key': 'timestamp', 'type': 'iso-8601'},
1544        'images': {'key': 'images', 'type': '[ImageDescriptor]'},
1545    }
1546
1547    def __init__(
1548        self,
1549        *,
1550        id: Optional[str] = None,
1551        timestamp: Optional[datetime.datetime] = None,
1552        images: Optional[List["ImageDescriptor"]] = None,
1553        **kwargs
1554    ):
1555        super(ImageUpdateTrigger, self).__init__(**kwargs)
1556        self.id = id
1557        self.timestamp = timestamp
1558        self.images = images
1559
1560
1561class InnerErrorDescription(msrest.serialization.Model):
1562    """inner error.
1563
1564    All required parameters must be populated in order to send to Azure.
1565
1566    :param code: Required. error code.
1567    :type code: str
1568    :param message: Required. error message.
1569    :type message: str
1570    :param target: target of the particular error.
1571    :type target: str
1572    """
1573
1574    _validation = {
1575        'code': {'required': True},
1576        'message': {'required': True},
1577    }
1578
1579    _attribute_map = {
1580        'code': {'key': 'code', 'type': 'str'},
1581        'message': {'key': 'message', 'type': 'str'},
1582        'target': {'key': 'target', 'type': 'str'},
1583    }
1584
1585    def __init__(
1586        self,
1587        *,
1588        code: str,
1589        message: str,
1590        target: Optional[str] = None,
1591        **kwargs
1592    ):
1593        super(InnerErrorDescription, self).__init__(**kwargs)
1594        self.code = code
1595        self.message = message
1596        self.target = target
1597
1598
1599class OverrideTaskStepProperties(msrest.serialization.Model):
1600    """OverrideTaskStepProperties.
1601
1602    :param context_path: The source context against which run has to be queued.
1603    :type context_path: str
1604    :param file: The file against which run has to be queued.
1605    :type file: str
1606    :param arguments: Gets or sets the collection of override arguments to be used when
1607     executing a build step.
1608    :type arguments: list[~azure.mgmt.containerregistry.v2019_06_01_preview.models.Argument]
1609    :param target: The name of the target build stage for the docker build.
1610    :type target: str
1611    :param values: The collection of overridable values that can be passed when running a Task.
1612    :type values: list[~azure.mgmt.containerregistry.v2019_06_01_preview.models.SetValue]
1613    :param update_trigger_token: Base64 encoded update trigger token that will be attached with the
1614     base image trigger webhook.
1615    :type update_trigger_token: str
1616    """
1617
1618    _attribute_map = {
1619        'context_path': {'key': 'contextPath', 'type': 'str'},
1620        'file': {'key': 'file', 'type': 'str'},
1621        'arguments': {'key': 'arguments', 'type': '[Argument]'},
1622        'target': {'key': 'target', 'type': 'str'},
1623        'values': {'key': 'values', 'type': '[SetValue]'},
1624        'update_trigger_token': {'key': 'updateTriggerToken', 'type': 'str'},
1625    }
1626
1627    def __init__(
1628        self,
1629        *,
1630        context_path: Optional[str] = None,
1631        file: Optional[str] = None,
1632        arguments: Optional[List["Argument"]] = None,
1633        target: Optional[str] = None,
1634        values: Optional[List["SetValue"]] = None,
1635        update_trigger_token: Optional[str] = None,
1636        **kwargs
1637    ):
1638        super(OverrideTaskStepProperties, self).__init__(**kwargs)
1639        self.context_path = context_path
1640        self.file = file
1641        self.arguments = arguments
1642        self.target = target
1643        self.values = values
1644        self.update_trigger_token = update_trigger_token
1645
1646
1647class PlatformProperties(msrest.serialization.Model):
1648    """The platform properties against which the run has to happen.
1649
1650    All required parameters must be populated in order to send to Azure.
1651
1652    :param os: Required. The operating system type required for the run. Possible values include:
1653     "Windows", "Linux".
1654    :type os: str or ~azure.mgmt.containerregistry.v2019_06_01_preview.models.OS
1655    :param architecture: The OS architecture. Possible values include: "amd64", "x86", "386",
1656     "arm", "arm64".
1657    :type architecture: str or
1658     ~azure.mgmt.containerregistry.v2019_06_01_preview.models.Architecture
1659    :param variant: Variant of the CPU. Possible values include: "v6", "v7", "v8".
1660    :type variant: str or ~azure.mgmt.containerregistry.v2019_06_01_preview.models.Variant
1661    """
1662
1663    _validation = {
1664        'os': {'required': True},
1665    }
1666
1667    _attribute_map = {
1668        'os': {'key': 'os', 'type': 'str'},
1669        'architecture': {'key': 'architecture', 'type': 'str'},
1670        'variant': {'key': 'variant', 'type': 'str'},
1671    }
1672
1673    def __init__(
1674        self,
1675        *,
1676        os: Union[str, "OS"],
1677        architecture: Optional[Union[str, "Architecture"]] = None,
1678        variant: Optional[Union[str, "Variant"]] = None,
1679        **kwargs
1680    ):
1681        super(PlatformProperties, self).__init__(**kwargs)
1682        self.os = os
1683        self.architecture = architecture
1684        self.variant = variant
1685
1686
1687class PlatformUpdateParameters(msrest.serialization.Model):
1688    """The properties for updating the platform configuration.
1689
1690    :param os: The operating system type required for the run. Possible values include: "Windows",
1691     "Linux".
1692    :type os: str or ~azure.mgmt.containerregistry.v2019_06_01_preview.models.OS
1693    :param architecture: The OS architecture. Possible values include: "amd64", "x86", "386",
1694     "arm", "arm64".
1695    :type architecture: str or
1696     ~azure.mgmt.containerregistry.v2019_06_01_preview.models.Architecture
1697    :param variant: Variant of the CPU. Possible values include: "v6", "v7", "v8".
1698    :type variant: str or ~azure.mgmt.containerregistry.v2019_06_01_preview.models.Variant
1699    """
1700
1701    _attribute_map = {
1702        'os': {'key': 'os', 'type': 'str'},
1703        'architecture': {'key': 'architecture', 'type': 'str'},
1704        'variant': {'key': 'variant', 'type': 'str'},
1705    }
1706
1707    def __init__(
1708        self,
1709        *,
1710        os: Optional[Union[str, "OS"]] = None,
1711        architecture: Optional[Union[str, "Architecture"]] = None,
1712        variant: Optional[Union[str, "Variant"]] = None,
1713        **kwargs
1714    ):
1715        super(PlatformUpdateParameters, self).__init__(**kwargs)
1716        self.os = os
1717        self.architecture = architecture
1718        self.variant = variant
1719
1720
1721class ProxyResource(msrest.serialization.Model):
1722    """The resource model definition for a ARM proxy resource. It will have everything other than required location and tags.
1723
1724    Variables are only populated by the server, and will be ignored when sending a request.
1725
1726    :ivar id: The resource ID.
1727    :vartype id: str
1728    :ivar name: The name of the resource.
1729    :vartype name: str
1730    :ivar type: The type of the resource.
1731    :vartype type: str
1732    :ivar system_data: Metadata pertaining to creation and last modification of the resource.
1733    :vartype system_data: ~azure.mgmt.containerregistry.v2019_06_01_preview.models.SystemData
1734    """
1735
1736    _validation = {
1737        'id': {'readonly': True},
1738        'name': {'readonly': True},
1739        'type': {'readonly': True},
1740        'system_data': {'readonly': True},
1741    }
1742
1743    _attribute_map = {
1744        'id': {'key': 'id', 'type': 'str'},
1745        'name': {'key': 'name', 'type': 'str'},
1746        'type': {'key': 'type', 'type': 'str'},
1747        'system_data': {'key': 'systemData', 'type': 'SystemData'},
1748    }
1749
1750    def __init__(
1751        self,
1752        **kwargs
1753    ):
1754        super(ProxyResource, self).__init__(**kwargs)
1755        self.id = None
1756        self.name = None
1757        self.type = None
1758        self.system_data = None
1759
1760
1761class Run(ProxyResource):
1762    """Run resource properties.
1763
1764    Variables are only populated by the server, and will be ignored when sending a request.
1765
1766    :ivar id: The resource ID.
1767    :vartype id: str
1768    :ivar name: The name of the resource.
1769    :vartype name: str
1770    :ivar type: The type of the resource.
1771    :vartype type: str
1772    :ivar system_data: Metadata pertaining to creation and last modification of the resource.
1773    :vartype system_data: ~azure.mgmt.containerregistry.v2019_06_01_preview.models.SystemData
1774    :param run_id: The unique identifier for the run.
1775    :type run_id: str
1776    :param status: The current status of the run. Possible values include: "Queued", "Started",
1777     "Running", "Succeeded", "Failed", "Canceled", "Error", "Timeout".
1778    :type status: str or ~azure.mgmt.containerregistry.v2019_06_01_preview.models.RunStatus
1779    :param last_updated_time: The last updated time for the run.
1780    :type last_updated_time: ~datetime.datetime
1781    :param run_type: The type of run. Possible values include: "QuickBuild", "QuickRun",
1782     "AutoBuild", "AutoRun".
1783    :type run_type: str or ~azure.mgmt.containerregistry.v2019_06_01_preview.models.RunType
1784    :param agent_pool_name: The dedicated agent pool for the run.
1785    :type agent_pool_name: str
1786    :param create_time: The time the run was scheduled.
1787    :type create_time: ~datetime.datetime
1788    :param start_time: The time the run started.
1789    :type start_time: ~datetime.datetime
1790    :param finish_time: The time the run finished.
1791    :type finish_time: ~datetime.datetime
1792    :param output_images: The list of all images that were generated from the run. This is
1793     applicable if the run generates base image dependencies.
1794    :type output_images:
1795     list[~azure.mgmt.containerregistry.v2019_06_01_preview.models.ImageDescriptor]
1796    :param task: The task against which run was scheduled.
1797    :type task: str
1798    :param image_update_trigger: The image update trigger that caused the run. This is applicable
1799     if the task has base image trigger configured.
1800    :type image_update_trigger:
1801     ~azure.mgmt.containerregistry.v2019_06_01_preview.models.ImageUpdateTrigger
1802    :param source_trigger: The source trigger that caused the run.
1803    :type source_trigger:
1804     ~azure.mgmt.containerregistry.v2019_06_01_preview.models.SourceTriggerDescriptor
1805    :param timer_trigger: The timer trigger that caused the run.
1806    :type timer_trigger:
1807     ~azure.mgmt.containerregistry.v2019_06_01_preview.models.TimerTriggerDescriptor
1808    :param platform: The platform properties against which the run will happen.
1809    :type platform: ~azure.mgmt.containerregistry.v2019_06_01_preview.models.PlatformProperties
1810    :param agent_configuration: The machine configuration of the run agent.
1811    :type agent_configuration:
1812     ~azure.mgmt.containerregistry.v2019_06_01_preview.models.AgentProperties
1813    :param source_registry_auth: The scope of the credentials that were used to login to the source
1814     registry during this run.
1815    :type source_registry_auth: str
1816    :param custom_registries: The list of custom registries that were logged in during this run.
1817    :type custom_registries: list[str]
1818    :ivar run_error_message: The error message received from backend systems after the run is
1819     scheduled.
1820    :vartype run_error_message: str
1821    :param update_trigger_token: The update trigger token passed for the Run.
1822    :type update_trigger_token: str
1823    :ivar log_artifact: The image description for the log artifact.
1824    :vartype log_artifact: ~azure.mgmt.containerregistry.v2019_06_01_preview.models.ImageDescriptor
1825    :param provisioning_state: The provisioning state of a run. Possible values include:
1826     "Creating", "Updating", "Deleting", "Succeeded", "Failed", "Canceled".
1827    :type provisioning_state: str or
1828     ~azure.mgmt.containerregistry.v2019_06_01_preview.models.ProvisioningState
1829    :param is_archive_enabled: The value that indicates whether archiving is enabled or not.
1830    :type is_archive_enabled: bool
1831    """
1832
1833    _validation = {
1834        'id': {'readonly': True},
1835        'name': {'readonly': True},
1836        'type': {'readonly': True},
1837        'system_data': {'readonly': True},
1838        'run_error_message': {'readonly': True},
1839        'log_artifact': {'readonly': True},
1840    }
1841
1842    _attribute_map = {
1843        'id': {'key': 'id', 'type': 'str'},
1844        'name': {'key': 'name', 'type': 'str'},
1845        'type': {'key': 'type', 'type': 'str'},
1846        'system_data': {'key': 'systemData', 'type': 'SystemData'},
1847        'run_id': {'key': 'properties.runId', 'type': 'str'},
1848        'status': {'key': 'properties.status', 'type': 'str'},
1849        'last_updated_time': {'key': 'properties.lastUpdatedTime', 'type': 'iso-8601'},
1850        'run_type': {'key': 'properties.runType', 'type': 'str'},
1851        'agent_pool_name': {'key': 'properties.agentPoolName', 'type': 'str'},
1852        'create_time': {'key': 'properties.createTime', 'type': 'iso-8601'},
1853        'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'},
1854        'finish_time': {'key': 'properties.finishTime', 'type': 'iso-8601'},
1855        'output_images': {'key': 'properties.outputImages', 'type': '[ImageDescriptor]'},
1856        'task': {'key': 'properties.task', 'type': 'str'},
1857        'image_update_trigger': {'key': 'properties.imageUpdateTrigger', 'type': 'ImageUpdateTrigger'},
1858        'source_trigger': {'key': 'properties.sourceTrigger', 'type': 'SourceTriggerDescriptor'},
1859        'timer_trigger': {'key': 'properties.timerTrigger', 'type': 'TimerTriggerDescriptor'},
1860        'platform': {'key': 'properties.platform', 'type': 'PlatformProperties'},
1861        'agent_configuration': {'key': 'properties.agentConfiguration', 'type': 'AgentProperties'},
1862        'source_registry_auth': {'key': 'properties.sourceRegistryAuth', 'type': 'str'},
1863        'custom_registries': {'key': 'properties.customRegistries', 'type': '[str]'},
1864        'run_error_message': {'key': 'properties.runErrorMessage', 'type': 'str'},
1865        'update_trigger_token': {'key': 'properties.updateTriggerToken', 'type': 'str'},
1866        'log_artifact': {'key': 'properties.logArtifact', 'type': 'ImageDescriptor'},
1867        'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
1868        'is_archive_enabled': {'key': 'properties.isArchiveEnabled', 'type': 'bool'},
1869    }
1870
1871    def __init__(
1872        self,
1873        *,
1874        run_id: Optional[str] = None,
1875        status: Optional[Union[str, "RunStatus"]] = None,
1876        last_updated_time: Optional[datetime.datetime] = None,
1877        run_type: Optional[Union[str, "RunType"]] = None,
1878        agent_pool_name: Optional[str] = None,
1879        create_time: Optional[datetime.datetime] = None,
1880        start_time: Optional[datetime.datetime] = None,
1881        finish_time: Optional[datetime.datetime] = None,
1882        output_images: Optional[List["ImageDescriptor"]] = None,
1883        task: Optional[str] = None,
1884        image_update_trigger: Optional["ImageUpdateTrigger"] = None,
1885        source_trigger: Optional["SourceTriggerDescriptor"] = None,
1886        timer_trigger: Optional["TimerTriggerDescriptor"] = None,
1887        platform: Optional["PlatformProperties"] = None,
1888        agent_configuration: Optional["AgentProperties"] = None,
1889        source_registry_auth: Optional[str] = None,
1890        custom_registries: Optional[List[str]] = None,
1891        update_trigger_token: Optional[str] = None,
1892        provisioning_state: Optional[Union[str, "ProvisioningState"]] = None,
1893        is_archive_enabled: Optional[bool] = False,
1894        **kwargs
1895    ):
1896        super(Run, self).__init__(**kwargs)
1897        self.run_id = run_id
1898        self.status = status
1899        self.last_updated_time = last_updated_time
1900        self.run_type = run_type
1901        self.agent_pool_name = agent_pool_name
1902        self.create_time = create_time
1903        self.start_time = start_time
1904        self.finish_time = finish_time
1905        self.output_images = output_images
1906        self.task = task
1907        self.image_update_trigger = image_update_trigger
1908        self.source_trigger = source_trigger
1909        self.timer_trigger = timer_trigger
1910        self.platform = platform
1911        self.agent_configuration = agent_configuration
1912        self.source_registry_auth = source_registry_auth
1913        self.custom_registries = custom_registries
1914        self.run_error_message = None
1915        self.update_trigger_token = update_trigger_token
1916        self.log_artifact = None
1917        self.provisioning_state = provisioning_state
1918        self.is_archive_enabled = is_archive_enabled
1919
1920
1921class RunFilter(msrest.serialization.Model):
1922    """Properties that are enabled for Odata querying on runs.
1923
1924    :param run_id: The unique identifier for the run.
1925    :type run_id: str
1926    :param run_type: The type of run. Possible values include: "QuickBuild", "QuickRun",
1927     "AutoBuild", "AutoRun".
1928    :type run_type: str or ~azure.mgmt.containerregistry.v2019_06_01_preview.models.RunType
1929    :param status: The current status of the run. Possible values include: "Queued", "Started",
1930     "Running", "Succeeded", "Failed", "Canceled", "Error", "Timeout".
1931    :type status: str or ~azure.mgmt.containerregistry.v2019_06_01_preview.models.RunStatus
1932    :param create_time: The create time for a run.
1933    :type create_time: ~datetime.datetime
1934    :param finish_time: The time the run finished.
1935    :type finish_time: ~datetime.datetime
1936    :param output_image_manifests: The list of comma-separated image manifests that were generated
1937     from the run. This is applicable if the run is of
1938     build type.
1939    :type output_image_manifests: str
1940    :param is_archive_enabled: The value that indicates whether archiving is enabled or not.
1941    :type is_archive_enabled: bool
1942    :param task_name: The name of the task that the run corresponds to.
1943    :type task_name: str
1944    :param agent_pool_name: The name of the agent pool that the run corresponds to.
1945    :type agent_pool_name: str
1946    """
1947
1948    _attribute_map = {
1949        'run_id': {'key': 'runId', 'type': 'str'},
1950        'run_type': {'key': 'runType', 'type': 'str'},
1951        'status': {'key': 'status', 'type': 'str'},
1952        'create_time': {'key': 'createTime', 'type': 'iso-8601'},
1953        'finish_time': {'key': 'finishTime', 'type': 'iso-8601'},
1954        'output_image_manifests': {'key': 'outputImageManifests', 'type': 'str'},
1955        'is_archive_enabled': {'key': 'isArchiveEnabled', 'type': 'bool'},
1956        'task_name': {'key': 'taskName', 'type': 'str'},
1957        'agent_pool_name': {'key': 'agentPoolName', 'type': 'str'},
1958    }
1959
1960    def __init__(
1961        self,
1962        *,
1963        run_id: Optional[str] = None,
1964        run_type: Optional[Union[str, "RunType"]] = None,
1965        status: Optional[Union[str, "RunStatus"]] = None,
1966        create_time: Optional[datetime.datetime] = None,
1967        finish_time: Optional[datetime.datetime] = None,
1968        output_image_manifests: Optional[str] = None,
1969        is_archive_enabled: Optional[bool] = None,
1970        task_name: Optional[str] = None,
1971        agent_pool_name: Optional[str] = None,
1972        **kwargs
1973    ):
1974        super(RunFilter, self).__init__(**kwargs)
1975        self.run_id = run_id
1976        self.run_type = run_type
1977        self.status = status
1978        self.create_time = create_time
1979        self.finish_time = finish_time
1980        self.output_image_manifests = output_image_manifests
1981        self.is_archive_enabled = is_archive_enabled
1982        self.task_name = task_name
1983        self.agent_pool_name = agent_pool_name
1984
1985
1986class RunGetLogResult(msrest.serialization.Model):
1987    """The result of get log link operation.
1988
1989    :param log_link: The link to logs for a run on a azure container registry.
1990    :type log_link: str
1991    :param log_artifact_link: The link to logs in registry for a run on a azure container registry.
1992    :type log_artifact_link: str
1993    """
1994
1995    _attribute_map = {
1996        'log_link': {'key': 'logLink', 'type': 'str'},
1997        'log_artifact_link': {'key': 'logArtifactLink', 'type': 'str'},
1998    }
1999
2000    def __init__(
2001        self,
2002        *,
2003        log_link: Optional[str] = None,
2004        log_artifact_link: Optional[str] = None,
2005        **kwargs
2006    ):
2007        super(RunGetLogResult, self).__init__(**kwargs)
2008        self.log_link = log_link
2009        self.log_artifact_link = log_artifact_link
2010
2011
2012class RunListResult(msrest.serialization.Model):
2013    """Collection of runs.
2014
2015    :param value: The collection value.
2016    :type value: list[~azure.mgmt.containerregistry.v2019_06_01_preview.models.Run]
2017    :param next_link: The URI that can be used to request the next set of paged results.
2018    :type next_link: str
2019    """
2020
2021    _attribute_map = {
2022        'value': {'key': 'value', 'type': '[Run]'},
2023        'next_link': {'key': 'nextLink', 'type': 'str'},
2024    }
2025
2026    def __init__(
2027        self,
2028        *,
2029        value: Optional[List["Run"]] = None,
2030        next_link: Optional[str] = None,
2031        **kwargs
2032    ):
2033        super(RunListResult, self).__init__(**kwargs)
2034        self.value = value
2035        self.next_link = next_link
2036
2037
2038class RunUpdateParameters(msrest.serialization.Model):
2039    """The set of run properties that can be updated.
2040
2041    :param is_archive_enabled: The value that indicates whether archiving is enabled or not.
2042    :type is_archive_enabled: bool
2043    """
2044
2045    _attribute_map = {
2046        'is_archive_enabled': {'key': 'isArchiveEnabled', 'type': 'bool'},
2047    }
2048
2049    def __init__(
2050        self,
2051        *,
2052        is_archive_enabled: Optional[bool] = None,
2053        **kwargs
2054    ):
2055        super(RunUpdateParameters, self).__init__(**kwargs)
2056        self.is_archive_enabled = is_archive_enabled
2057
2058
2059class SecretObject(msrest.serialization.Model):
2060    """Describes the properties of a secret object value.
2061
2062    :param value: The value of the secret. The format of this value will be determined
2063     based on the type of the secret object. If the type is Opaque, the value will be
2064     used as is without any modification.
2065    :type value: str
2066    :param type: The type of the secret object which determines how the value of the secret object
2067     has to be
2068     interpreted. Possible values include: "Opaque", "Vaultsecret".
2069    :type type: str or ~azure.mgmt.containerregistry.v2019_06_01_preview.models.SecretObjectType
2070    """
2071
2072    _attribute_map = {
2073        'value': {'key': 'value', 'type': 'str'},
2074        'type': {'key': 'type', 'type': 'str'},
2075    }
2076
2077    def __init__(
2078        self,
2079        *,
2080        value: Optional[str] = None,
2081        type: Optional[Union[str, "SecretObjectType"]] = None,
2082        **kwargs
2083    ):
2084        super(SecretObject, self).__init__(**kwargs)
2085        self.value = value
2086        self.type = type
2087
2088
2089class SetValue(msrest.serialization.Model):
2090    """The properties of a overridable value that can be passed to a task template.
2091
2092    All required parameters must be populated in order to send to Azure.
2093
2094    :param name: Required. The name of the overridable value.
2095    :type name: str
2096    :param value: Required. The overridable value.
2097    :type value: str
2098    :param is_secret: Flag to indicate whether the value represents a secret or not.
2099    :type is_secret: bool
2100    """
2101
2102    _validation = {
2103        'name': {'required': True},
2104        'value': {'required': True},
2105    }
2106
2107    _attribute_map = {
2108        'name': {'key': 'name', 'type': 'str'},
2109        'value': {'key': 'value', 'type': 'str'},
2110        'is_secret': {'key': 'isSecret', 'type': 'bool'},
2111    }
2112
2113    def __init__(
2114        self,
2115        *,
2116        name: str,
2117        value: str,
2118        is_secret: Optional[bool] = False,
2119        **kwargs
2120    ):
2121        super(SetValue, self).__init__(**kwargs)
2122        self.name = name
2123        self.value = value
2124        self.is_secret = is_secret
2125
2126
2127class SourceProperties(msrest.serialization.Model):
2128    """The properties of the source code repository.
2129
2130    All required parameters must be populated in order to send to Azure.
2131
2132    :param source_control_type: Required. The type of source control service. Possible values
2133     include: "Github", "VisualStudioTeamService".
2134    :type source_control_type: str or
2135     ~azure.mgmt.containerregistry.v2019_06_01_preview.models.SourceControlType
2136    :param repository_url: Required. The full URL to the source code repository.
2137    :type repository_url: str
2138    :param branch: The branch name of the source code.
2139    :type branch: str
2140    :param source_control_auth_properties: The authorization properties for accessing the source
2141     code repository and to set up
2142     webhooks for notifications.
2143    :type source_control_auth_properties:
2144     ~azure.mgmt.containerregistry.v2019_06_01_preview.models.AuthInfo
2145    """
2146
2147    _validation = {
2148        'source_control_type': {'required': True},
2149        'repository_url': {'required': True},
2150    }
2151
2152    _attribute_map = {
2153        'source_control_type': {'key': 'sourceControlType', 'type': 'str'},
2154        'repository_url': {'key': 'repositoryUrl', 'type': 'str'},
2155        'branch': {'key': 'branch', 'type': 'str'},
2156        'source_control_auth_properties': {'key': 'sourceControlAuthProperties', 'type': 'AuthInfo'},
2157    }
2158
2159    def __init__(
2160        self,
2161        *,
2162        source_control_type: Union[str, "SourceControlType"],
2163        repository_url: str,
2164        branch: Optional[str] = None,
2165        source_control_auth_properties: Optional["AuthInfo"] = None,
2166        **kwargs
2167    ):
2168        super(SourceProperties, self).__init__(**kwargs)
2169        self.source_control_type = source_control_type
2170        self.repository_url = repository_url
2171        self.branch = branch
2172        self.source_control_auth_properties = source_control_auth_properties
2173
2174
2175class SourceRegistryCredentials(msrest.serialization.Model):
2176    """Describes the credential parameters for accessing the source registry.
2177
2178    :param login_mode: The authentication mode which determines the source registry login scope.
2179     The credentials for the source registry
2180     will be generated using the given scope. These credentials will be used to login to
2181     the source registry during the run. Possible values include: "None", "Default".
2182    :type login_mode: str or
2183     ~azure.mgmt.containerregistry.v2019_06_01_preview.models.SourceRegistryLoginMode
2184    """
2185
2186    _attribute_map = {
2187        'login_mode': {'key': 'loginMode', 'type': 'str'},
2188    }
2189
2190    def __init__(
2191        self,
2192        *,
2193        login_mode: Optional[Union[str, "SourceRegistryLoginMode"]] = None,
2194        **kwargs
2195    ):
2196        super(SourceRegistryCredentials, self).__init__(**kwargs)
2197        self.login_mode = login_mode
2198
2199
2200class SourceTrigger(msrest.serialization.Model):
2201    """The properties of a source based trigger.
2202
2203    All required parameters must be populated in order to send to Azure.
2204
2205    :param source_repository: Required. The properties that describes the source(code) for the
2206     task.
2207    :type source_repository:
2208     ~azure.mgmt.containerregistry.v2019_06_01_preview.models.SourceProperties
2209    :param source_trigger_events: Required. The source event corresponding to the trigger.
2210    :type source_trigger_events: list[str or
2211     ~azure.mgmt.containerregistry.v2019_06_01_preview.models.SourceTriggerEvent]
2212    :param status: The current status of trigger. Possible values include: "Disabled", "Enabled".
2213    :type status: str or ~azure.mgmt.containerregistry.v2019_06_01_preview.models.TriggerStatus
2214    :param name: Required. The name of the trigger.
2215    :type name: str
2216    """
2217
2218    _validation = {
2219        'source_repository': {'required': True},
2220        'source_trigger_events': {'required': True},
2221        'name': {'required': True},
2222    }
2223
2224    _attribute_map = {
2225        'source_repository': {'key': 'sourceRepository', 'type': 'SourceProperties'},
2226        'source_trigger_events': {'key': 'sourceTriggerEvents', 'type': '[str]'},
2227        'status': {'key': 'status', 'type': 'str'},
2228        'name': {'key': 'name', 'type': 'str'},
2229    }
2230
2231    def __init__(
2232        self,
2233        *,
2234        source_repository: "SourceProperties",
2235        source_trigger_events: List[Union[str, "SourceTriggerEvent"]],
2236        name: str,
2237        status: Optional[Union[str, "TriggerStatus"]] = None,
2238        **kwargs
2239    ):
2240        super(SourceTrigger, self).__init__(**kwargs)
2241        self.source_repository = source_repository
2242        self.source_trigger_events = source_trigger_events
2243        self.status = status
2244        self.name = name
2245
2246
2247class SourceTriggerDescriptor(msrest.serialization.Model):
2248    """The source trigger that caused a run.
2249
2250    :param id: The unique ID of the trigger.
2251    :type id: str
2252    :param event_type: The event type of the trigger.
2253    :type event_type: str
2254    :param commit_id: The unique ID that identifies a commit.
2255    :type commit_id: str
2256    :param pull_request_id: The unique ID that identifies pull request.
2257    :type pull_request_id: str
2258    :param repository_url: The repository URL.
2259    :type repository_url: str
2260    :param branch_name: The branch name in the repository.
2261    :type branch_name: str
2262    :param provider_type: The source control provider type.
2263    :type provider_type: str
2264    """
2265
2266    _attribute_map = {
2267        'id': {'key': 'id', 'type': 'str'},
2268        'event_type': {'key': 'eventType', 'type': 'str'},
2269        'commit_id': {'key': 'commitId', 'type': 'str'},
2270        'pull_request_id': {'key': 'pullRequestId', 'type': 'str'},
2271        'repository_url': {'key': 'repositoryUrl', 'type': 'str'},
2272        'branch_name': {'key': 'branchName', 'type': 'str'},
2273        'provider_type': {'key': 'providerType', 'type': 'str'},
2274    }
2275
2276    def __init__(
2277        self,
2278        *,
2279        id: Optional[str] = None,
2280        event_type: Optional[str] = None,
2281        commit_id: Optional[str] = None,
2282        pull_request_id: Optional[str] = None,
2283        repository_url: Optional[str] = None,
2284        branch_name: Optional[str] = None,
2285        provider_type: Optional[str] = None,
2286        **kwargs
2287    ):
2288        super(SourceTriggerDescriptor, self).__init__(**kwargs)
2289        self.id = id
2290        self.event_type = event_type
2291        self.commit_id = commit_id
2292        self.pull_request_id = pull_request_id
2293        self.repository_url = repository_url
2294        self.branch_name = branch_name
2295        self.provider_type = provider_type
2296
2297
2298class SourceTriggerUpdateParameters(msrest.serialization.Model):
2299    """The properties for updating a source based trigger.
2300
2301    All required parameters must be populated in order to send to Azure.
2302
2303    :param source_repository: The properties that describes the source(code) for the task.
2304    :type source_repository:
2305     ~azure.mgmt.containerregistry.v2019_06_01_preview.models.SourceUpdateParameters
2306    :param source_trigger_events: The source event corresponding to the trigger.
2307    :type source_trigger_events: list[str or
2308     ~azure.mgmt.containerregistry.v2019_06_01_preview.models.SourceTriggerEvent]
2309    :param status: The current status of trigger. Possible values include: "Disabled", "Enabled".
2310    :type status: str or ~azure.mgmt.containerregistry.v2019_06_01_preview.models.TriggerStatus
2311    :param name: Required. The name of the trigger.
2312    :type name: str
2313    """
2314
2315    _validation = {
2316        'name': {'required': True},
2317    }
2318
2319    _attribute_map = {
2320        'source_repository': {'key': 'sourceRepository', 'type': 'SourceUpdateParameters'},
2321        'source_trigger_events': {'key': 'sourceTriggerEvents', 'type': '[str]'},
2322        'status': {'key': 'status', 'type': 'str'},
2323        'name': {'key': 'name', 'type': 'str'},
2324    }
2325
2326    def __init__(
2327        self,
2328        *,
2329        name: str,
2330        source_repository: Optional["SourceUpdateParameters"] = None,
2331        source_trigger_events: Optional[List[Union[str, "SourceTriggerEvent"]]] = None,
2332        status: Optional[Union[str, "TriggerStatus"]] = None,
2333        **kwargs
2334    ):
2335        super(SourceTriggerUpdateParameters, self).__init__(**kwargs)
2336        self.source_repository = source_repository
2337        self.source_trigger_events = source_trigger_events
2338        self.status = status
2339        self.name = name
2340
2341
2342class SourceUpdateParameters(msrest.serialization.Model):
2343    """The properties for updating the source code repository.
2344
2345    :param source_control_type: The type of source control service. Possible values include:
2346     "Github", "VisualStudioTeamService".
2347    :type source_control_type: str or
2348     ~azure.mgmt.containerregistry.v2019_06_01_preview.models.SourceControlType
2349    :param repository_url: The full URL to the source code repository.
2350    :type repository_url: str
2351    :param branch: The branch name of the source code.
2352    :type branch: str
2353    :param source_control_auth_properties: The authorization properties for accessing the source
2354     code repository and to set up
2355     webhooks for notifications.
2356    :type source_control_auth_properties:
2357     ~azure.mgmt.containerregistry.v2019_06_01_preview.models.AuthInfoUpdateParameters
2358    """
2359
2360    _attribute_map = {
2361        'source_control_type': {'key': 'sourceControlType', 'type': 'str'},
2362        'repository_url': {'key': 'repositoryUrl', 'type': 'str'},
2363        'branch': {'key': 'branch', 'type': 'str'},
2364        'source_control_auth_properties': {'key': 'sourceControlAuthProperties', 'type': 'AuthInfoUpdateParameters'},
2365    }
2366
2367    def __init__(
2368        self,
2369        *,
2370        source_control_type: Optional[Union[str, "SourceControlType"]] = None,
2371        repository_url: Optional[str] = None,
2372        branch: Optional[str] = None,
2373        source_control_auth_properties: Optional["AuthInfoUpdateParameters"] = None,
2374        **kwargs
2375    ):
2376        super(SourceUpdateParameters, self).__init__(**kwargs)
2377        self.source_control_type = source_control_type
2378        self.repository_url = repository_url
2379        self.branch = branch
2380        self.source_control_auth_properties = source_control_auth_properties
2381
2382
2383class SourceUploadDefinition(msrest.serialization.Model):
2384    """The properties of a response to source upload request.
2385
2386    :param upload_url: The URL where the client can upload the source.
2387    :type upload_url: str
2388    :param relative_path: The relative path to the source. This is used to submit the subsequent
2389     queue build request.
2390    :type relative_path: str
2391    """
2392
2393    _attribute_map = {
2394        'upload_url': {'key': 'uploadUrl', 'type': 'str'},
2395        'relative_path': {'key': 'relativePath', 'type': 'str'},
2396    }
2397
2398    def __init__(
2399        self,
2400        *,
2401        upload_url: Optional[str] = None,
2402        relative_path: Optional[str] = None,
2403        **kwargs
2404    ):
2405        super(SourceUploadDefinition, self).__init__(**kwargs)
2406        self.upload_url = upload_url
2407        self.relative_path = relative_path
2408
2409
2410class SystemData(msrest.serialization.Model):
2411    """Metadata pertaining to creation and last modification of the resource.
2412
2413    :param created_by: The identity that created the resource.
2414    :type created_by: str
2415    :param created_by_type: The type of identity that created the resource. Possible values
2416     include: "User", "Application", "ManagedIdentity", "Key".
2417    :type created_by_type: str or
2418     ~azure.mgmt.containerregistry.v2019_06_01_preview.models.CreatedByType
2419    :param created_at: The timestamp of resource creation (UTC).
2420    :type created_at: ~datetime.datetime
2421    :param last_modified_by: The identity that last modified the resource.
2422    :type last_modified_by: str
2423    :param last_modified_by_type: The type of identity that last modified the resource. Possible
2424     values include: "User", "Application", "ManagedIdentity", "Key".
2425    :type last_modified_by_type: str or
2426     ~azure.mgmt.containerregistry.v2019_06_01_preview.models.LastModifiedByType
2427    :param last_modified_at: The timestamp of resource modification (UTC).
2428    :type last_modified_at: ~datetime.datetime
2429    """
2430
2431    _attribute_map = {
2432        'created_by': {'key': 'createdBy', 'type': 'str'},
2433        'created_by_type': {'key': 'createdByType', 'type': 'str'},
2434        'created_at': {'key': 'createdAt', 'type': 'iso-8601'},
2435        'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'},
2436        'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'},
2437        'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'},
2438    }
2439
2440    def __init__(
2441        self,
2442        *,
2443        created_by: Optional[str] = None,
2444        created_by_type: Optional[Union[str, "CreatedByType"]] = None,
2445        created_at: Optional[datetime.datetime] = None,
2446        last_modified_by: Optional[str] = None,
2447        last_modified_by_type: Optional[Union[str, "LastModifiedByType"]] = None,
2448        last_modified_at: Optional[datetime.datetime] = None,
2449        **kwargs
2450    ):
2451        super(SystemData, self).__init__(**kwargs)
2452        self.created_by = created_by
2453        self.created_by_type = created_by_type
2454        self.created_at = created_at
2455        self.last_modified_by = last_modified_by
2456        self.last_modified_by_type = last_modified_by_type
2457        self.last_modified_at = last_modified_at
2458
2459
2460class Task(Resource):
2461    """The task that has the ARM resource and task properties.
2462The task will have all information to schedule a run against it.
2463
2464    Variables are only populated by the server, and will be ignored when sending a request.
2465
2466    All required parameters must be populated in order to send to Azure.
2467
2468    :ivar id: The resource ID.
2469    :vartype id: str
2470    :ivar name: The name of the resource.
2471    :vartype name: str
2472    :ivar type: The type of the resource.
2473    :vartype type: str
2474    :param location: Required. The location of the resource. This cannot be changed after the
2475     resource is created.
2476    :type location: str
2477    :param tags: A set of tags. The tags of the resource.
2478    :type tags: dict[str, str]
2479    :ivar system_data: Metadata pertaining to creation and last modification of the resource.
2480    :vartype system_data: ~azure.mgmt.containerregistry.v2019_06_01_preview.models.SystemData
2481    :param identity: Identity for the resource.
2482    :type identity: ~azure.mgmt.containerregistry.v2019_06_01_preview.models.IdentityProperties
2483    :ivar provisioning_state: The provisioning state of the task. Possible values include:
2484     "Creating", "Updating", "Deleting", "Succeeded", "Failed", "Canceled".
2485    :vartype provisioning_state: str or
2486     ~azure.mgmt.containerregistry.v2019_06_01_preview.models.ProvisioningState
2487    :ivar creation_date: The creation date of task.
2488    :vartype creation_date: ~datetime.datetime
2489    :param status: The current status of task. Possible values include: "Disabled", "Enabled".
2490    :type status: str or ~azure.mgmt.containerregistry.v2019_06_01_preview.models.TaskStatus
2491    :param platform: The platform properties against which the run has to happen.
2492    :type platform: ~azure.mgmt.containerregistry.v2019_06_01_preview.models.PlatformProperties
2493    :param agent_configuration: The machine configuration of the run agent.
2494    :type agent_configuration:
2495     ~azure.mgmt.containerregistry.v2019_06_01_preview.models.AgentProperties
2496    :param agent_pool_name: The dedicated agent pool for the task.
2497    :type agent_pool_name: str
2498    :param timeout: Run timeout in seconds.
2499    :type timeout: int
2500    :param step: The properties of a task step.
2501    :type step: ~azure.mgmt.containerregistry.v2019_06_01_preview.models.TaskStepProperties
2502    :param trigger: The properties that describe all triggers for the task.
2503    :type trigger: ~azure.mgmt.containerregistry.v2019_06_01_preview.models.TriggerProperties
2504    :param credentials: The properties that describes a set of credentials that will be used when
2505     this run is invoked.
2506    :type credentials: ~azure.mgmt.containerregistry.v2019_06_01_preview.models.Credentials
2507    :param log_template: The template that describes the repository and tag information for run log
2508     artifact.
2509    :type log_template: str
2510    :param is_system_task: The value of this property indicates whether the task resource is system
2511     task or not.
2512    :type is_system_task: bool
2513    """
2514
2515    _validation = {
2516        'id': {'readonly': True},
2517        'name': {'readonly': True},
2518        'type': {'readonly': True},
2519        'location': {'required': True},
2520        'system_data': {'readonly': True},
2521        'provisioning_state': {'readonly': True},
2522        'creation_date': {'readonly': True},
2523        'timeout': {'maximum': 28800, 'minimum': 300},
2524    }
2525
2526    _attribute_map = {
2527        'id': {'key': 'id', 'type': 'str'},
2528        'name': {'key': 'name', 'type': 'str'},
2529        'type': {'key': 'type', 'type': 'str'},
2530        'location': {'key': 'location', 'type': 'str'},
2531        'tags': {'key': 'tags', 'type': '{str}'},
2532        'system_data': {'key': 'systemData', 'type': 'SystemData'},
2533        'identity': {'key': 'identity', 'type': 'IdentityProperties'},
2534        'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
2535        'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'},
2536        'status': {'key': 'properties.status', 'type': 'str'},
2537        'platform': {'key': 'properties.platform', 'type': 'PlatformProperties'},
2538        'agent_configuration': {'key': 'properties.agentConfiguration', 'type': 'AgentProperties'},
2539        'agent_pool_name': {'key': 'properties.agentPoolName', 'type': 'str'},
2540        'timeout': {'key': 'properties.timeout', 'type': 'int'},
2541        'step': {'key': 'properties.step', 'type': 'TaskStepProperties'},
2542        'trigger': {'key': 'properties.trigger', 'type': 'TriggerProperties'},
2543        'credentials': {'key': 'properties.credentials', 'type': 'Credentials'},
2544        'log_template': {'key': 'properties.logTemplate', 'type': 'str'},
2545        'is_system_task': {'key': 'properties.isSystemTask', 'type': 'bool'},
2546    }
2547
2548    def __init__(
2549        self,
2550        *,
2551        location: str,
2552        tags: Optional[Dict[str, str]] = None,
2553        identity: Optional["IdentityProperties"] = None,
2554        status: Optional[Union[str, "TaskStatus"]] = None,
2555        platform: Optional["PlatformProperties"] = None,
2556        agent_configuration: Optional["AgentProperties"] = None,
2557        agent_pool_name: Optional[str] = None,
2558        timeout: Optional[int] = 3600,
2559        step: Optional["TaskStepProperties"] = None,
2560        trigger: Optional["TriggerProperties"] = None,
2561        credentials: Optional["Credentials"] = None,
2562        log_template: Optional[str] = None,
2563        is_system_task: Optional[bool] = False,
2564        **kwargs
2565    ):
2566        super(Task, self).__init__(location=location, tags=tags, **kwargs)
2567        self.identity = identity
2568        self.provisioning_state = None
2569        self.creation_date = None
2570        self.status = status
2571        self.platform = platform
2572        self.agent_configuration = agent_configuration
2573        self.agent_pool_name = agent_pool_name
2574        self.timeout = timeout
2575        self.step = step
2576        self.trigger = trigger
2577        self.credentials = credentials
2578        self.log_template = log_template
2579        self.is_system_task = is_system_task
2580
2581
2582class TaskListResult(msrest.serialization.Model):
2583    """The collection of tasks.
2584
2585    :param value: The collection value.
2586    :type value: list[~azure.mgmt.containerregistry.v2019_06_01_preview.models.Task]
2587    :param next_link: The URI that can be used to request the next set of paged results.
2588    :type next_link: str
2589    """
2590
2591    _attribute_map = {
2592        'value': {'key': 'value', 'type': '[Task]'},
2593        'next_link': {'key': 'nextLink', 'type': 'str'},
2594    }
2595
2596    def __init__(
2597        self,
2598        *,
2599        value: Optional[List["Task"]] = None,
2600        next_link: Optional[str] = None,
2601        **kwargs
2602    ):
2603        super(TaskListResult, self).__init__(**kwargs)
2604        self.value = value
2605        self.next_link = next_link
2606
2607
2608class TaskRun(ProxyResource):
2609    """The task run that has the ARM resource and properties.
2610The task run will have the information of request and result of a run.
2611
2612    Variables are only populated by the server, and will be ignored when sending a request.
2613
2614    :ivar id: The resource ID.
2615    :vartype id: str
2616    :ivar name: The name of the resource.
2617    :vartype name: str
2618    :ivar type: The type of the resource.
2619    :vartype type: str
2620    :ivar system_data: Metadata pertaining to creation and last modification of the resource.
2621    :vartype system_data: ~azure.mgmt.containerregistry.v2019_06_01_preview.models.SystemData
2622    :param identity: Identity for the resource.
2623    :type identity: ~azure.mgmt.containerregistry.v2019_06_01_preview.models.IdentityProperties
2624    :param location: The location of the resource.
2625    :type location: str
2626    :ivar provisioning_state: The provisioning state of this task run. Possible values include:
2627     "Creating", "Updating", "Deleting", "Succeeded", "Failed", "Canceled".
2628    :vartype provisioning_state: str or
2629     ~azure.mgmt.containerregistry.v2019_06_01_preview.models.ProvisioningState
2630    :param run_request: The request (parameters) for the run.
2631    :type run_request: ~azure.mgmt.containerregistry.v2019_06_01_preview.models.RunRequest
2632    :ivar run_result: The result of this task run.
2633    :vartype run_result: ~azure.mgmt.containerregistry.v2019_06_01_preview.models.Run
2634    :param force_update_tag: How the run should be forced to rerun even if the run request
2635     configuration has not changed.
2636    :type force_update_tag: str
2637    """
2638
2639    _validation = {
2640        'id': {'readonly': True},
2641        'name': {'readonly': True},
2642        'type': {'readonly': True},
2643        'system_data': {'readonly': True},
2644        'provisioning_state': {'readonly': True},
2645        'run_result': {'readonly': True},
2646    }
2647
2648    _attribute_map = {
2649        'id': {'key': 'id', 'type': 'str'},
2650        'name': {'key': 'name', 'type': 'str'},
2651        'type': {'key': 'type', 'type': 'str'},
2652        'system_data': {'key': 'systemData', 'type': 'SystemData'},
2653        'identity': {'key': 'identity', 'type': 'IdentityProperties'},
2654        'location': {'key': 'location', 'type': 'str'},
2655        'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
2656        'run_request': {'key': 'properties.runRequest', 'type': 'RunRequest'},
2657        'run_result': {'key': 'properties.runResult', 'type': 'Run'},
2658        'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'},
2659    }
2660
2661    def __init__(
2662        self,
2663        *,
2664        identity: Optional["IdentityProperties"] = None,
2665        location: Optional[str] = None,
2666        run_request: Optional["RunRequest"] = None,
2667        force_update_tag: Optional[str] = None,
2668        **kwargs
2669    ):
2670        super(TaskRun, self).__init__(**kwargs)
2671        self.identity = identity
2672        self.location = location
2673        self.provisioning_state = None
2674        self.run_request = run_request
2675        self.run_result = None
2676        self.force_update_tag = force_update_tag
2677
2678
2679class TaskRunListResult(msrest.serialization.Model):
2680    """The collection of task runs.
2681
2682    :param value: The collection value.
2683    :type value: list[~azure.mgmt.containerregistry.v2019_06_01_preview.models.TaskRun]
2684    :param next_link: The URI that can be used to request the next set of paged results.
2685    :type next_link: str
2686    """
2687
2688    _attribute_map = {
2689        'value': {'key': 'value', 'type': '[TaskRun]'},
2690        'next_link': {'key': 'nextLink', 'type': 'str'},
2691    }
2692
2693    def __init__(
2694        self,
2695        *,
2696        value: Optional[List["TaskRun"]] = None,
2697        next_link: Optional[str] = None,
2698        **kwargs
2699    ):
2700        super(TaskRunListResult, self).__init__(**kwargs)
2701        self.value = value
2702        self.next_link = next_link
2703
2704
2705class TaskRunRequest(RunRequest):
2706    """The parameters for a task run request.
2707
2708    All required parameters must be populated in order to send to Azure.
2709
2710    :param type: Required. The type of the run request.Constant filled by server.
2711    :type type: str
2712    :param is_archive_enabled: The value that indicates whether archiving is enabled for the run or
2713     not.
2714    :type is_archive_enabled: bool
2715    :param agent_pool_name: The dedicated agent pool for the run.
2716    :type agent_pool_name: str
2717    :param log_template: The template that describes the repository and tag information for run log
2718     artifact.
2719    :type log_template: str
2720    :param task_id: Required. The resource ID of task against which run has to be queued.
2721    :type task_id: str
2722    :param override_task_step_properties: Set of overridable parameters that can be passed when
2723     running a Task.
2724    :type override_task_step_properties:
2725     ~azure.mgmt.containerregistry.v2019_06_01_preview.models.OverrideTaskStepProperties
2726    """
2727
2728    _validation = {
2729        'type': {'required': True},
2730        'task_id': {'required': True},
2731    }
2732
2733    _attribute_map = {
2734        'type': {'key': 'type', 'type': 'str'},
2735        'is_archive_enabled': {'key': 'isArchiveEnabled', 'type': 'bool'},
2736        'agent_pool_name': {'key': 'agentPoolName', 'type': 'str'},
2737        'log_template': {'key': 'logTemplate', 'type': 'str'},
2738        'task_id': {'key': 'taskId', 'type': 'str'},
2739        'override_task_step_properties': {'key': 'overrideTaskStepProperties', 'type': 'OverrideTaskStepProperties'},
2740    }
2741
2742    def __init__(
2743        self,
2744        *,
2745        task_id: str,
2746        is_archive_enabled: Optional[bool] = False,
2747        agent_pool_name: Optional[str] = None,
2748        log_template: Optional[str] = None,
2749        override_task_step_properties: Optional["OverrideTaskStepProperties"] = None,
2750        **kwargs
2751    ):
2752        super(TaskRunRequest, self).__init__(is_archive_enabled=is_archive_enabled, agent_pool_name=agent_pool_name, log_template=log_template, **kwargs)
2753        self.type = 'TaskRunRequest'  # type: str
2754        self.task_id = task_id
2755        self.override_task_step_properties = override_task_step_properties
2756
2757
2758class TaskRunUpdateParameters(msrest.serialization.Model):
2759    """The parameters for updating a task run.
2760
2761    :param identity: Identity for the resource.
2762    :type identity: ~azure.mgmt.containerregistry.v2019_06_01_preview.models.IdentityProperties
2763    :param location: The location of the resource.
2764    :type location: str
2765    :param tags: A set of tags. The ARM resource tags.
2766    :type tags: dict[str, str]
2767    :param run_request: The request (parameters) for the new run.
2768    :type run_request: ~azure.mgmt.containerregistry.v2019_06_01_preview.models.RunRequest
2769    :param force_update_tag: How the run should be forced to rerun even if the run request
2770     configuration has not changed.
2771    :type force_update_tag: str
2772    """
2773
2774    _attribute_map = {
2775        'identity': {'key': 'identity', 'type': 'IdentityProperties'},
2776        'location': {'key': 'location', 'type': 'str'},
2777        'tags': {'key': 'tags', 'type': '{str}'},
2778        'run_request': {'key': 'properties.runRequest', 'type': 'RunRequest'},
2779        'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'},
2780    }
2781
2782    def __init__(
2783        self,
2784        *,
2785        identity: Optional["IdentityProperties"] = None,
2786        location: Optional[str] = None,
2787        tags: Optional[Dict[str, str]] = None,
2788        run_request: Optional["RunRequest"] = None,
2789        force_update_tag: Optional[str] = None,
2790        **kwargs
2791    ):
2792        super(TaskRunUpdateParameters, self).__init__(**kwargs)
2793        self.identity = identity
2794        self.location = location
2795        self.tags = tags
2796        self.run_request = run_request
2797        self.force_update_tag = force_update_tag
2798
2799
2800class TaskUpdateParameters(msrest.serialization.Model):
2801    """The parameters for updating a task.
2802
2803    :param identity: Identity for the resource.
2804    :type identity: ~azure.mgmt.containerregistry.v2019_06_01_preview.models.IdentityProperties
2805    :param tags: A set of tags. The ARM resource tags.
2806    :type tags: dict[str, str]
2807    :param status: The current status of task. Possible values include: "Disabled", "Enabled".
2808    :type status: str or ~azure.mgmt.containerregistry.v2019_06_01_preview.models.TaskStatus
2809    :param platform: The platform properties against which the run has to happen.
2810    :type platform:
2811     ~azure.mgmt.containerregistry.v2019_06_01_preview.models.PlatformUpdateParameters
2812    :param agent_configuration: The machine configuration of the run agent.
2813    :type agent_configuration:
2814     ~azure.mgmt.containerregistry.v2019_06_01_preview.models.AgentProperties
2815    :param agent_pool_name: The dedicated agent pool for the task.
2816    :type agent_pool_name: str
2817    :param timeout: Run timeout in seconds.
2818    :type timeout: int
2819    :param step: The properties for updating a task step.
2820    :type step: ~azure.mgmt.containerregistry.v2019_06_01_preview.models.TaskStepUpdateParameters
2821    :param trigger: The properties for updating trigger properties.
2822    :type trigger: ~azure.mgmt.containerregistry.v2019_06_01_preview.models.TriggerUpdateParameters
2823    :param credentials: The parameters that describes a set of credentials that will be used when
2824     this run is invoked.
2825    :type credentials: ~azure.mgmt.containerregistry.v2019_06_01_preview.models.Credentials
2826    :param log_template: The template that describes the repository and tag information for run log
2827     artifact.
2828    :type log_template: str
2829    """
2830
2831    _attribute_map = {
2832        'identity': {'key': 'identity', 'type': 'IdentityProperties'},
2833        'tags': {'key': 'tags', 'type': '{str}'},
2834        'status': {'key': 'properties.status', 'type': 'str'},
2835        'platform': {'key': 'properties.platform', 'type': 'PlatformUpdateParameters'},
2836        'agent_configuration': {'key': 'properties.agentConfiguration', 'type': 'AgentProperties'},
2837        'agent_pool_name': {'key': 'properties.agentPoolName', 'type': 'str'},
2838        'timeout': {'key': 'properties.timeout', 'type': 'int'},
2839        'step': {'key': 'properties.step', 'type': 'TaskStepUpdateParameters'},
2840        'trigger': {'key': 'properties.trigger', 'type': 'TriggerUpdateParameters'},
2841        'credentials': {'key': 'properties.credentials', 'type': 'Credentials'},
2842        'log_template': {'key': 'properties.logTemplate', 'type': 'str'},
2843    }
2844
2845    def __init__(
2846        self,
2847        *,
2848        identity: Optional["IdentityProperties"] = None,
2849        tags: Optional[Dict[str, str]] = None,
2850        status: Optional[Union[str, "TaskStatus"]] = None,
2851        platform: Optional["PlatformUpdateParameters"] = None,
2852        agent_configuration: Optional["AgentProperties"] = None,
2853        agent_pool_name: Optional[str] = None,
2854        timeout: Optional[int] = None,
2855        step: Optional["TaskStepUpdateParameters"] = None,
2856        trigger: Optional["TriggerUpdateParameters"] = None,
2857        credentials: Optional["Credentials"] = None,
2858        log_template: Optional[str] = None,
2859        **kwargs
2860    ):
2861        super(TaskUpdateParameters, self).__init__(**kwargs)
2862        self.identity = identity
2863        self.tags = tags
2864        self.status = status
2865        self.platform = platform
2866        self.agent_configuration = agent_configuration
2867        self.agent_pool_name = agent_pool_name
2868        self.timeout = timeout
2869        self.step = step
2870        self.trigger = trigger
2871        self.credentials = credentials
2872        self.log_template = log_template
2873
2874
2875class TimerTrigger(msrest.serialization.Model):
2876    """The properties of a timer trigger.
2877
2878    All required parameters must be populated in order to send to Azure.
2879
2880    :param schedule: Required. The CRON expression for the task schedule.
2881    :type schedule: str
2882    :param status: The current status of trigger. Possible values include: "Disabled", "Enabled".
2883    :type status: str or ~azure.mgmt.containerregistry.v2019_06_01_preview.models.TriggerStatus
2884    :param name: Required. The name of the trigger.
2885    :type name: str
2886    """
2887
2888    _validation = {
2889        'schedule': {'required': True},
2890        'name': {'required': True},
2891    }
2892
2893    _attribute_map = {
2894        'schedule': {'key': 'schedule', 'type': 'str'},
2895        'status': {'key': 'status', 'type': 'str'},
2896        'name': {'key': 'name', 'type': 'str'},
2897    }
2898
2899    def __init__(
2900        self,
2901        *,
2902        schedule: str,
2903        name: str,
2904        status: Optional[Union[str, "TriggerStatus"]] = None,
2905        **kwargs
2906    ):
2907        super(TimerTrigger, self).__init__(**kwargs)
2908        self.schedule = schedule
2909        self.status = status
2910        self.name = name
2911
2912
2913class TimerTriggerDescriptor(msrest.serialization.Model):
2914    """TimerTriggerDescriptor.
2915
2916    :param timer_trigger_name: The timer trigger name that caused the run.
2917    :type timer_trigger_name: str
2918    :param schedule_occurrence: The occurrence that triggered the run.
2919    :type schedule_occurrence: str
2920    """
2921
2922    _attribute_map = {
2923        'timer_trigger_name': {'key': 'timerTriggerName', 'type': 'str'},
2924        'schedule_occurrence': {'key': 'scheduleOccurrence', 'type': 'str'},
2925    }
2926
2927    def __init__(
2928        self,
2929        *,
2930        timer_trigger_name: Optional[str] = None,
2931        schedule_occurrence: Optional[str] = None,
2932        **kwargs
2933    ):
2934        super(TimerTriggerDescriptor, self).__init__(**kwargs)
2935        self.timer_trigger_name = timer_trigger_name
2936        self.schedule_occurrence = schedule_occurrence
2937
2938
2939class TimerTriggerUpdateParameters(msrest.serialization.Model):
2940    """The properties for updating a timer trigger.
2941
2942    All required parameters must be populated in order to send to Azure.
2943
2944    :param schedule: The CRON expression for the task schedule.
2945    :type schedule: str
2946    :param status: The current status of trigger. Possible values include: "Disabled", "Enabled".
2947    :type status: str or ~azure.mgmt.containerregistry.v2019_06_01_preview.models.TriggerStatus
2948    :param name: Required. The name of the trigger.
2949    :type name: str
2950    """
2951
2952    _validation = {
2953        'name': {'required': True},
2954    }
2955
2956    _attribute_map = {
2957        'schedule': {'key': 'schedule', 'type': 'str'},
2958        'status': {'key': 'status', 'type': 'str'},
2959        'name': {'key': 'name', 'type': 'str'},
2960    }
2961
2962    def __init__(
2963        self,
2964        *,
2965        name: str,
2966        schedule: Optional[str] = None,
2967        status: Optional[Union[str, "TriggerStatus"]] = None,
2968        **kwargs
2969    ):
2970        super(TimerTriggerUpdateParameters, self).__init__(**kwargs)
2971        self.schedule = schedule
2972        self.status = status
2973        self.name = name
2974
2975
2976class TriggerProperties(msrest.serialization.Model):
2977    """The properties of a trigger.
2978
2979    :param timer_triggers: The collection of timer triggers.
2980    :type timer_triggers:
2981     list[~azure.mgmt.containerregistry.v2019_06_01_preview.models.TimerTrigger]
2982    :param source_triggers: The collection of triggers based on source code repository.
2983    :type source_triggers:
2984     list[~azure.mgmt.containerregistry.v2019_06_01_preview.models.SourceTrigger]
2985    :param base_image_trigger: The trigger based on base image dependencies.
2986    :type base_image_trigger:
2987     ~azure.mgmt.containerregistry.v2019_06_01_preview.models.BaseImageTrigger
2988    """
2989
2990    _attribute_map = {
2991        'timer_triggers': {'key': 'timerTriggers', 'type': '[TimerTrigger]'},
2992        'source_triggers': {'key': 'sourceTriggers', 'type': '[SourceTrigger]'},
2993        'base_image_trigger': {'key': 'baseImageTrigger', 'type': 'BaseImageTrigger'},
2994    }
2995
2996    def __init__(
2997        self,
2998        *,
2999        timer_triggers: Optional[List["TimerTrigger"]] = None,
3000        source_triggers: Optional[List["SourceTrigger"]] = None,
3001        base_image_trigger: Optional["BaseImageTrigger"] = None,
3002        **kwargs
3003    ):
3004        super(TriggerProperties, self).__init__(**kwargs)
3005        self.timer_triggers = timer_triggers
3006        self.source_triggers = source_triggers
3007        self.base_image_trigger = base_image_trigger
3008
3009
3010class TriggerUpdateParameters(msrest.serialization.Model):
3011    """The properties for updating triggers.
3012
3013    :param timer_triggers: The collection of timer triggers.
3014    :type timer_triggers:
3015     list[~azure.mgmt.containerregistry.v2019_06_01_preview.models.TimerTriggerUpdateParameters]
3016    :param source_triggers: The collection of triggers based on source code repository.
3017    :type source_triggers:
3018     list[~azure.mgmt.containerregistry.v2019_06_01_preview.models.SourceTriggerUpdateParameters]
3019    :param base_image_trigger: The trigger based on base image dependencies.
3020    :type base_image_trigger:
3021     ~azure.mgmt.containerregistry.v2019_06_01_preview.models.BaseImageTriggerUpdateParameters
3022    """
3023
3024    _attribute_map = {
3025        'timer_triggers': {'key': 'timerTriggers', 'type': '[TimerTriggerUpdateParameters]'},
3026        'source_triggers': {'key': 'sourceTriggers', 'type': '[SourceTriggerUpdateParameters]'},
3027        'base_image_trigger': {'key': 'baseImageTrigger', 'type': 'BaseImageTriggerUpdateParameters'},
3028    }
3029
3030    def __init__(
3031        self,
3032        *,
3033        timer_triggers: Optional[List["TimerTriggerUpdateParameters"]] = None,
3034        source_triggers: Optional[List["SourceTriggerUpdateParameters"]] = None,
3035        base_image_trigger: Optional["BaseImageTriggerUpdateParameters"] = None,
3036        **kwargs
3037    ):
3038        super(TriggerUpdateParameters, self).__init__(**kwargs)
3039        self.timer_triggers = timer_triggers
3040        self.source_triggers = source_triggers
3041        self.base_image_trigger = base_image_trigger
3042
3043
3044class UserIdentityProperties(msrest.serialization.Model):
3045    """UserIdentityProperties.
3046
3047    :param principal_id: The principal id of user assigned identity.
3048    :type principal_id: str
3049    :param client_id: The client id of user assigned identity.
3050    :type client_id: str
3051    """
3052
3053    _attribute_map = {
3054        'principal_id': {'key': 'principalId', 'type': 'str'},
3055        'client_id': {'key': 'clientId', 'type': 'str'},
3056    }
3057
3058    def __init__(
3059        self,
3060        *,
3061        principal_id: Optional[str] = None,
3062        client_id: Optional[str] = None,
3063        **kwargs
3064    ):
3065        super(UserIdentityProperties, self).__init__(**kwargs)
3066        self.principal_id = principal_id
3067        self.client_id = client_id
3068