<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/photos/types/media_item.proto

namespace Google\Photos\Types;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * Metadata that is specific to a photo, such as, ISO, focal length and
 * exposure time. Some of these fields may be null or not included.
 *
 * Generated from protobuf message <code>google.photos.types.Photo</code>
 */
class Photo extends \Google\Protobuf\Internal\Message
{
    /**
     * Brand of the camera with which the photo was taken.
     *
     * Generated from protobuf field <code>string camera_make = 1;</code>
     */
    protected $camera_make = '';
    /**
     * Model of the camera with which the photo was taken.
     *
     * Generated from protobuf field <code>string camera_model = 2;</code>
     */
    protected $camera_model = '';
    /**
     * Focal length of the camera lens with which the photo was taken.
     *
     * Generated from protobuf field <code>float focal_length = 3;</code>
     */
    protected $focal_length = 0.0;
    /**
     * Aperture f number of the camera lens with which the photo was taken.
     *
     * Generated from protobuf field <code>float aperture_f_number = 4;</code>
     */
    protected $aperture_f_number = 0.0;
    /**
     * ISO of the camera with which the photo was taken.
     *
     * Generated from protobuf field <code>int32 iso_equivalent = 5;</code>
     */
    protected $iso_equivalent = 0;
    /**
     * Exposure time of the camera aperture when the photo was taken.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration exposure_time = 6;</code>
     */
    protected $exposure_time = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $camera_make
     *           Brand of the camera with which the photo was taken.
     *     @type string $camera_model
     *           Model of the camera with which the photo was taken.
     *     @type float $focal_length
     *           Focal length of the camera lens with which the photo was taken.
     *     @type float $aperture_f_number
     *           Aperture f number of the camera lens with which the photo was taken.
     *     @type int $iso_equivalent
     *           ISO of the camera with which the photo was taken.
     *     @type \Google\Protobuf\Duration $exposure_time
     *           Exposure time of the camera aperture when the photo was taken.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Photos\Types\MediaItem::initOnce();
        parent::__construct($data);
    }

    /**
     * Brand of the camera with which the photo was taken.
     *
     * Generated from protobuf field <code>string camera_make = 1;</code>
     * @return string
     */
    public function getCameraMake()
    {
        return $this->camera_make;
    }

    /**
     * Brand of the camera with which the photo was taken.
     *
     * Generated from protobuf field <code>string camera_make = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setCameraMake($var)
    {
        GPBUtil::checkString($var, True);
        $this->camera_make = $var;

        return $this;
    }

    /**
     * Model of the camera with which the photo was taken.
     *
     * Generated from protobuf field <code>string camera_model = 2;</code>
     * @return string
     */
    public function getCameraModel()
    {
        return $this->camera_model;
    }

    /**
     * Model of the camera with which the photo was taken.
     *
     * Generated from protobuf field <code>string camera_model = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setCameraModel($var)
    {
        GPBUtil::checkString($var, True);
        $this->camera_model = $var;

        return $this;
    }

    /**
     * Focal length of the camera lens with which the photo was taken.
     *
     * Generated from protobuf field <code>float focal_length = 3;</code>
     * @return float
     */
    public function getFocalLength()
    {
        return $this->focal_length;
    }

    /**
     * Focal length of the camera lens with which the photo was taken.
     *
     * Generated from protobuf field <code>float focal_length = 3;</code>
     * @param float $var
     * @return $this
     */
    public function setFocalLength($var)
    {
        GPBUtil::checkFloat($var);
        $this->focal_length = $var;

        return $this;
    }

    /**
     * Aperture f number of the camera lens with which the photo was taken.
     *
     * Generated from protobuf field <code>float aperture_f_number = 4;</code>
     * @return float
     */
    public function getApertureFNumber()
    {
        return $this->aperture_f_number;
    }

    /**
     * Aperture f number of the camera lens with which the photo was taken.
     *
     * Generated from protobuf field <code>float aperture_f_number = 4;</code>
     * @param float $var
     * @return $this
     */
    public function setApertureFNumber($var)
    {
        GPBUtil::checkFloat($var);
        $this->aperture_f_number = $var;

        return $this;
    }

    /**
     * ISO of the camera with which the photo was taken.
     *
     * Generated from protobuf field <code>int32 iso_equivalent = 5;</code>
     * @return int
     */
    public function getIsoEquivalent()
    {
        return $this->iso_equivalent;
    }

    /**
     * ISO of the camera with which the photo was taken.
     *
     * Generated from protobuf field <code>int32 iso_equivalent = 5;</code>
     * @param int $var
     * @return $this
     */
    public function setIsoEquivalent($var)
    {
        GPBUtil::checkInt32($var);
        $this->iso_equivalent = $var;

        return $this;
    }

    /**
     * Exposure time of the camera aperture when the photo was taken.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration exposure_time = 6;</code>
     * @return \Google\Protobuf\Duration|null
     */
    public function getExposureTime()
    {
        return isset($this->exposure_time) ? $this->exposure_time : null;
    }

    public function hasExposureTime()
    {
        return isset($this->exposure_time);
    }

    public function clearExposureTime()
    {
        unset($this->exposure_time);
    }

    /**
     * Exposure time of the camera aperture when the photo was taken.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration exposure_time = 6;</code>
     * @param \Google\Protobuf\Duration $var
     * @return $this
     */
    public function setExposureTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
        $this->exposure_time = $var;

        return $this;
    }

}

