# 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::V2018_02_01_preview
  module Models
    #
    # The queue build request parameters for a quick build.
    #
    class QuickBuildRequest < QueueBuildRequest

      include MsRestAzure


      def initialize
        @type = "QuickBuild"
      end

      attr_accessor :type

      # @return [Array<String>] The fully qualified image names including the
      # repository and tag.
      attr_accessor :image_names

      # @return [String] The URL(absolute or relative) of the source that needs
      # to be built. For Docker build, it can be an URL to a tar or github
      # repository as supported by Docker.
      # If it is relative URL, the relative path should be obtained from
      # calling getSourceUploadUrl API.
      attr_accessor :source_location

      # @return [Array<BuildArgument>] The collection of build arguments to be
      # used.
      attr_accessor :build_arguments

      # @return [Boolean] The value of this property indicates whether the
      # image built should be pushed to the registry or not. Default value:
      # true .
      attr_accessor :is_push_enabled

      # @return [Boolean] The value of this property indicates whether the
      # image cache is enabled or not. Default value: false .
      attr_accessor :no_cache

      # @return [Integer] Build timeout in seconds. Default value: 3600 .
      attr_accessor :timeout

      # @return [PlatformProperties] The platform properties against which the
      # build will happen.
      attr_accessor :platform

      # @return [String] The Docker file path relative to the source location.
      attr_accessor :docker_file_path


      #
      # Mapper for QuickBuildRequest class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'QuickBuild',
          type: {
            name: 'Composite',
            class_name: 'QuickBuildRequest',
            model_properties: {
              type: {
                client_side_validation: true,
                required: true,
                serialized_name: 'type',
                type: {
                  name: 'String'
                }
              },
              image_names: {
                client_side_validation: true,
                required: false,
                serialized_name: 'imageNames',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'StringElementType',
                      type: {
                        name: 'String'
                      }
                  }
                }
              },
              source_location: {
                client_side_validation: true,
                required: true,
                serialized_name: 'sourceLocation',
                type: {
                  name: 'String'
                }
              },
              build_arguments: {
                client_side_validation: true,
                required: false,
                serialized_name: 'buildArguments',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'BuildArgumentElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'BuildArgument'
                      }
                  }
                }
              },
              is_push_enabled: {
                client_side_validation: true,
                required: false,
                serialized_name: 'isPushEnabled',
                default_value: true,
                type: {
                  name: 'Boolean'
                }
              },
              no_cache: {
                client_side_validation: true,
                required: false,
                serialized_name: 'noCache',
                default_value: false,
                type: {
                  name: 'Boolean'
                }
              },
              timeout: {
                client_side_validation: true,
                required: false,
                serialized_name: 'timeout',
                default_value: 3600,
                constraints: {
                  InclusiveMaximum: 28800,
                  InclusiveMinimum: 300
                },
                type: {
                  name: 'Number'
                }
              },
              platform: {
                client_side_validation: true,
                required: true,
                serialized_name: 'platform',
                type: {
                  name: 'Composite',
                  class_name: 'PlatformProperties'
                }
              },
              docker_file_path: {
                client_side_validation: true,
                required: true,
                serialized_name: 'dockerFilePath',
                type: {
                  name: 'String'
                }
              }
            }
          }
        }
      end
    end
  end
end
