# encoding: utf-8
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.

module Azure::ContainerRegistry::Mgmt::V2019_06_01_preview
  module Models
    #
    # The task run that has the ARM resource and properties.
    # The task run will have the information of request and result of a run.
    #
    class TaskRun < ProxyResource

      include MsRestAzure

      # @return [IdentityProperties] Identity for the resource.
      attr_accessor :identity

      # @return [ProvisioningState] The provisioning state of this task run.
      # Possible values include: 'Creating', 'Updating', 'Deleting',
      # 'Succeeded', 'Failed', 'Canceled'
      attr_accessor :provisioning_state

      # @return [RunRequest] The request (parameters) for the run
      attr_accessor :run_request

      # @return [Run] The result of this task run
      attr_accessor :run_result

      # @return [String] How the run should be forced to rerun even if the run
      # request configuration has not changed
      attr_accessor :force_update_tag

      # @return [String] The location of the resource
      attr_accessor :location


      #
      # Mapper for TaskRun class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'TaskRun',
          type: {
            name: 'Composite',
            class_name: 'TaskRun',
            model_properties: {
              id: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'id',
                type: {
                  name: 'String'
                }
              },
              name: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'name',
                type: {
                  name: 'String'
                }
              },
              type: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'type',
                type: {
                  name: 'String'
                }
              },
              system_data: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'systemData',
                type: {
                  name: 'Composite',
                  class_name: 'SystemData'
                }
              },
              identity: {
                client_side_validation: true,
                required: false,
                serialized_name: 'identity',
                type: {
                  name: 'Composite',
                  class_name: 'IdentityProperties'
                }
              },
              provisioning_state: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.provisioningState',
                type: {
                  name: 'String'
                }
              },
              run_request: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.runRequest',
                type: {
                  name: 'Composite',
                  polymorphic_discriminator: 'type',
                  uber_parent: 'RunRequest',
                  class_name: 'RunRequest'
                }
              },
              run_result: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.runResult',
                type: {
                  name: 'Composite',
                  class_name: 'Run'
                }
              },
              force_update_tag: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.forceUpdateTag',
                type: {
                  name: 'String'
                }
              },
              location: {
                client_side_validation: true,
                required: false,
                serialized_name: 'location',
                type: {
                  name: 'String'
                }
              }
            }
          }
        }
      end
    end
  end
end
