<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/configdelivery/v1beta/config_delivery.proto

namespace Google\Cloud\ConfigDelivery\V1beta;

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

/**
 * The fleet where the `FleetPackage` should be deployed.
 *
 * Generated from protobuf message <code>google.cloud.configdelivery.v1beta.Fleet</code>
 */
class Fleet extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The host project for the GKE fleet. Format is
     * `projects/{project}`.
     *
     * Generated from protobuf field <code>string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    protected $project = '';
    /**
     * Optional. selector allows targeting a subset of fleet members using their
     * labels.
     *
     * Generated from protobuf field <code>.google.cloud.configdelivery.v1beta.Fleet.LabelSelector selector = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $selector = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $project
     *           Required. The host project for the GKE fleet. Format is
     *           `projects/{project}`.
     *     @type \Google\Cloud\ConfigDelivery\V1beta\Fleet\LabelSelector $selector
     *           Optional. selector allows targeting a subset of fleet members using their
     *           labels.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Configdelivery\V1Beta\ConfigDelivery::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The host project for the GKE fleet. Format is
     * `projects/{project}`.
     *
     * Generated from protobuf field <code>string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getProject()
    {
        return $this->project;
    }

    /**
     * Required. The host project for the GKE fleet. Format is
     * `projects/{project}`.
     *
     * Generated from protobuf field <code>string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setProject($var)
    {
        GPBUtil::checkString($var, True);
        $this->project = $var;

        return $this;
    }

    /**
     * Optional. selector allows targeting a subset of fleet members using their
     * labels.
     *
     * Generated from protobuf field <code>.google.cloud.configdelivery.v1beta.Fleet.LabelSelector selector = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\ConfigDelivery\V1beta\Fleet\LabelSelector|null
     */
    public function getSelector()
    {
        return $this->selector;
    }

    public function hasSelector()
    {
        return isset($this->selector);
    }

    public function clearSelector()
    {
        unset($this->selector);
    }

    /**
     * Optional. selector allows targeting a subset of fleet members using their
     * labels.
     *
     * Generated from protobuf field <code>.google.cloud.configdelivery.v1beta.Fleet.LabelSelector selector = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\ConfigDelivery\V1beta\Fleet\LabelSelector $var
     * @return $this
     */
    public function setSelector($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\ConfigDelivery\V1beta\Fleet\LabelSelector::class);
        $this->selector = $var;

        return $this;
    }

}

