#
# Copyright 2021 DataRobot, Inc. and its affiliates.
#
# All rights reserved.
#
# DataRobot, Inc.
#
# This is proprietary source code of DataRobot, Inc. and its
# affiliates.
#
# Released under the terms of DataRobot Tool and Utility Agreement.
"""
Autogenerated DataRobot python client file.  Please don't modify.
"""

import trafaret as t
from datarobot.models.api_object import APIObject
from datarobot.models.full_api.generated.model.transformation import Transformation

class ImageAugmentationSamplesRequest(APIObject):
    """
    Attributes
    ----------
    name:str
         The name of the image augmentation list
    number_of_new_images:int
         Number of new rows to add for each existing row
    number_of_rows:int
         Number of images from the original dataset to be augmented
    project_id:str
         The project containing the image data to be augmented
    transformation_probability:float
         Probability that each enabled transformation will be applied to an image. This does not apply to Horizontal or Vertical Flip, which are set to 50% always.
    transformations:[Transformation]
         List of Transformations to possibly apply to each image
    feature_name:str [optional]
         The name of the image feature containing the data to be augmented. 
    id:str [optional]
         Augmentation list id. 
    in_use:bool [optional]
         This is set to true when the Augmentation List has been used to train a model.  if omitted the server will use the default value of False
    initial_list:bool [optional]
         Whether this list will be used during autopilot to perform image augmentation.  if omitted the server will use the default value of False
    """
    _converter = t.Dict(
        {
            t.Key("name"):  t.String(),
            t.Key("number_of_new_images"):  t.Int(),
            t.Key("number_of_rows"):  t.Int(),
            t.Key("project_id"):  t.String(),
            t.Key("transformation_probability"):  t.Float(),
            t.Key("transformations"):  t.List(t.Dict().allow_extra("*")),
            t.Key("feature_name", optional=True):  t.String(),
            t.Key("id", optional=True):  t.String(),
            t.Key("in_use", optional=True):  t.Bool(),
            t.Key("initial_list", optional=True):  t.Bool(),
        }
    ).ignore_extra("*")

    def __init__(
        self,
        name,
        number_of_new_images,
        number_of_rows,
        project_id,
        transformation_probability,
        transformations,
        feature_name=None,
        id=None,
        in_use=None,
        initial_list=None,
    ):
        self.name = name
        self.number_of_new_images = number_of_new_images
        self.number_of_rows = number_of_rows
        self.project_id = project_id
        self.transformation_probability = transformation_probability
        self.transformations = transformations
        self.feature_name = feature_name
        self.id = id
        self.in_use = in_use
        self.initial_list = initial_list

    def __repr__(self):
        return (
            "ImageAugmentationSamplesRequest("
            "name={0.name}, "
            "number_of_new_images={0.number_of_new_images}, "
            "number_of_rows={0.number_of_rows}, "
            "project_id={0.project_id}, "
            "transformation_probability={0.transformation_probability}, "
            "transformations={0.transformations}, "
            "feature_name={0.feature_name}, "
            "id={0.id}, "
            "in_use={0.in_use}, "
            "initial_list={0.initial_list}, "
        ).format(self)
