<?php

namespace Drupal\materio_graphql\GraphQL\Response;

use Drupal\Core\Entity\EntityInterface;
use Drupal\graphql\GraphQL\Response\Response;

/**
 * Type of response used when an materiau is returned.
 */
class MateriauResponse extends Response {

  /**
   * The materiau to be served.
   *
   * @var \Drupal\Core\Entity\EntityInterface|null
   */
  protected $materiau;

  /**
   * Sets the content.
   *
   * @param \Drupal\Core\Entity\EntityInterface|null $materiau
   *   The materiau to be served.
   */
  public function setMateriau(?EntityInterface $materiau): void {
    $this->materiau = $materiau;
  }

  /**
   * Gets the materiau to be served.
   *
   * @return \Drupal\Core\Entity\EntityInterface|null
   *   The materiau to be served.
   */
  public function materiau(): ?EntityInterface {
    return $this->materiau;
  }

}
