# 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_04_01
  module Models
    #
    # The parameters for updating a task.
    #
    class TaskUpdateParameters

      include MsRestAzure

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

      # @return [TaskStatus] The current status of task. Possible values
      # include: 'Disabled', 'Enabled'
      attr_accessor :status

      # @return [PlatformUpdateParameters] The platform properties against
      # which the run has to happen.
      attr_accessor :platform

      # @return [AgentProperties] The machine configuration of the run agent.
      attr_accessor :agent_configuration

      # @return [Integer] Run timeout in seconds.
      attr_accessor :timeout

      # @return [TaskStepUpdateParameters] The properties for updating a task
      # step.
      attr_accessor :step

      # @return [TriggerUpdateParameters] The properties for updating trigger
      # properties.
      attr_accessor :trigger

      # @return [Credentials] The parameters that describes a set of
      # credentials that will be used when this run is invoked.
      attr_accessor :credentials

      # @return [Hash{String => String}] The ARM resource tags.
      attr_accessor :tags


      #
      # Mapper for TaskUpdateParameters class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'TaskUpdateParameters',
          type: {
            name: 'Composite',
            class_name: 'TaskUpdateParameters',
            model_properties: {
              identity: {
                client_side_validation: true,
                required: false,
                serialized_name: 'identity',
                type: {
                  name: 'Composite',
                  class_name: 'IdentityProperties'
                }
              },
              status: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.status',
                type: {
                  name: 'String'
                }
              },
              platform: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.platform',
                type: {
                  name: 'Composite',
                  class_name: 'PlatformUpdateParameters'
                }
              },
              agent_configuration: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.agentConfiguration',
                type: {
                  name: 'Composite',
                  class_name: 'AgentProperties'
                }
              },
              timeout: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.timeout',
                type: {
                  name: 'Number'
                }
              },
              step: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.step',
                type: {
                  name: 'Composite',
                  polymorphic_discriminator: 'type',
                  uber_parent: 'TaskStepUpdateParameters',
                  class_name: 'TaskStepUpdateParameters'
                }
              },
              trigger: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.trigger',
                type: {
                  name: 'Composite',
                  class_name: 'TriggerUpdateParameters'
                }
              },
              credentials: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.credentials',
                type: {
                  name: 'Composite',
                  class_name: 'Credentials'
                }
              },
              tags: {
                client_side_validation: true,
                required: false,
                serialized_name: 'tags',
                type: {
                  name: 'Dictionary',
                  value: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'StringElementType',
                      type: {
                        name: 'String'
                      }
                  }
                }
              }
            }
          }
        }
      end
    end
  end
end
