src/Api/OpenAPI/Server/Model/CreateStudioErrorResponse.php
<?php

/**
 * CreateStudioErrorResponse.
 *
 * PHP version 8.1.1
 *
 * @category Class
 *
 * @author   OpenAPI Generator team
 *
 * @see     https://github.com/openapitools/openapi-generator
 */

/**
 * Catroweb API.
 *
 * API for the Catrobat Share Platform
 *
 * The version of the OpenAPI document: v1.6.0
 * Contact: webmaster@catrobat.org
 * Generated by: https://github.com/openapitools/openapi-generator.git
 */

/**
 * NOTE: This class is auto generated by the openapi generator program.
 * https://github.com/openapitools/openapi-generator
 * Do not edit the class manually.
 */

namespace OpenAPI\Server\Model;

use JMS\Serializer\Annotation\SerializedName;
use JMS\Serializer\Annotation\Type;
use Symfony\Component\Validator\Constraints as Assert;

/**
 * Class representing the CreateStudioErrorResponse model.
 *
 * @author  OpenAPI Generator team
 */
class CreateStudioErrorResponse
{
  /**
   * @SerializedName("name")
   *
   * @Assert\Choice({ "Name already in use", "Name missing", "Name too short", "Name too long" })
   *
   * @Assert\Type("string")
   *
   * @Type("string")
   */
  protected ?string $name = null;

  /**
   * @SerializedName("description")
   *
   * @Assert\Choice({ "Description too short", "Description too long", "Description missing" })
   *
   * @Assert\Type("string")
   *
   * @Type("string")
   */
  protected ?string $description = null;

  /**
   * @SerializedName("image_file")
   *
   * @Assert\Choice({ "Image size too large", "Image type not supported", "Image invalid" })
   *
   * @Assert\Type("string")
   *
   * @Type("string")
   */
  protected ?string $image_file = null;

  /**
   * Constructor.
   *
   * @param array|null $data Associated array of property values initializing the model
   */
  public function __construct(?array $data = null)
  {
    if (is_array($data)) {
      $this->name = array_key_exists('name', $data) ? $data['name'] : $this->name;
      $this->description = array_key_exists('description', $data) ? $data['description'] : $this->description;
      $this->image_file = array_key_exists('image_file', $data) ? $data['image_file'] : $this->image_file;
    }
  }

  /**
   * Gets name.
   */
  public function getName(): ?string
  {
    return $this->name;
  }

  /**
   * Sets name.
   *
   * @return $this
   */
  public function setName(?string $name = null): self
  {
    $this->name = $name;

    return $this;
  }

  /**
   * Gets description.
   */
  public function getDescription(): ?string
  {
    return $this->description;
  }

  /**
   * Sets description.
   *
   * @return $this
   */
  public function setDescription(?string $description = null): self
  {
    $this->description = $description;

    return $this;
  }

  /**
   * Gets image_file.
   */
  public function getImageFile(): ?string
  {
    return $this->image_file;
  }

  /**
   * Sets image_file.
   *
   * @return $this
   */
  public function setImageFile(?string $image_file = null): self
  {
    $this->image_file = $image_file;

    return $this;
  }
}
