<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/gkehub/v1beta1/membership.proto

namespace Google\Cloud\GkeHub\V1beta1;

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

/**
 * Request message for `GkeHubMembershipService.GenerateConnectManifest`
 * method.
 * .
 *
 * Generated from protobuf message <code>google.cloud.gkehub.v1beta1.GenerateConnectManifestRequest</code>
 */
class GenerateConnectManifestRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The Membership resource name the Agent will associate with, in the format
     * `projects/&#42;&#47;locations/&#42;&#47;memberships/&#42;`.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    private $name = '';
    /**
     * Optional. The connect agent to generate manifest for.
     *
     * Generated from protobuf field <code>.google.cloud.gkehub.v1beta1.ConnectAgent connect_agent = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $connect_agent = null;
    /**
     * Optional. The Connect agent version to use. Defaults to the most current version.
     *
     * Generated from protobuf field <code>string version = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $version = '';
    /**
     * Optional. If true, generate the resources for upgrade only. Some resources
     * generated only for installation (e.g. secrets) will be excluded.
     *
     * Generated from protobuf field <code>bool is_upgrade = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $is_upgrade = false;
    /**
     * Optional. The registry to fetch the connect agent image from. Defaults to
     * gcr.io/gkeconnect.
     *
     * Generated from protobuf field <code>string registry = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $registry = '';
    /**
     * Optional. The image pull secret content for the registry, if not public.
     *
     * Generated from protobuf field <code>bytes image_pull_secret_content = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $image_pull_secret_content = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Required. The Membership resource name the Agent will associate with, in the format
     *           `projects/&#42;&#47;locations/&#42;&#47;memberships/&#42;`.
     *     @type \Google\Cloud\GkeHub\V1beta1\ConnectAgent $connect_agent
     *           Optional. The connect agent to generate manifest for.
     *     @type string $version
     *           Optional. The Connect agent version to use. Defaults to the most current version.
     *     @type bool $is_upgrade
     *           Optional. If true, generate the resources for upgrade only. Some resources
     *           generated only for installation (e.g. secrets) will be excluded.
     *     @type string $registry
     *           Optional. The registry to fetch the connect agent image from. Defaults to
     *           gcr.io/gkeconnect.
     *     @type string $image_pull_secret_content
     *           Optional. The image pull secret content for the registry, if not public.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Gkehub\V1Beta1\Membership::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The Membership resource name the Agent will associate with, in the format
     * `projects/&#42;&#47;locations/&#42;&#47;memberships/&#42;`.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Required. The Membership resource name the Agent will associate with, in the format
     * `projects/&#42;&#47;locations/&#42;&#47;memberships/&#42;`.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Optional. The connect agent to generate manifest for.
     *
     * Generated from protobuf field <code>.google.cloud.gkehub.v1beta1.ConnectAgent connect_agent = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\GkeHub\V1beta1\ConnectAgent|null
     */
    public function getConnectAgent()
    {
        return $this->connect_agent;
    }

    public function hasConnectAgent()
    {
        return isset($this->connect_agent);
    }

    public function clearConnectAgent()
    {
        unset($this->connect_agent);
    }

    /**
     * Optional. The connect agent to generate manifest for.
     *
     * Generated from protobuf field <code>.google.cloud.gkehub.v1beta1.ConnectAgent connect_agent = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\GkeHub\V1beta1\ConnectAgent $var
     * @return $this
     */
    public function setConnectAgent($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1beta1\ConnectAgent::class);
        $this->connect_agent = $var;

        return $this;
    }

    /**
     * Optional. The Connect agent version to use. Defaults to the most current version.
     *
     * Generated from protobuf field <code>string version = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getVersion()
    {
        return $this->version;
    }

    /**
     * Optional. The Connect agent version to use. Defaults to the most current version.
     *
     * Generated from protobuf field <code>string version = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setVersion($var)
    {
        GPBUtil::checkString($var, True);
        $this->version = $var;

        return $this;
    }

    /**
     * Optional. If true, generate the resources for upgrade only. Some resources
     * generated only for installation (e.g. secrets) will be excluded.
     *
     * Generated from protobuf field <code>bool is_upgrade = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return bool
     */
    public function getIsUpgrade()
    {
        return $this->is_upgrade;
    }

    /**
     * Optional. If true, generate the resources for upgrade only. Some resources
     * generated only for installation (e.g. secrets) will be excluded.
     *
     * Generated from protobuf field <code>bool is_upgrade = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param bool $var
     * @return $this
     */
    public function setIsUpgrade($var)
    {
        GPBUtil::checkBool($var);
        $this->is_upgrade = $var;

        return $this;
    }

    /**
     * Optional. The registry to fetch the connect agent image from. Defaults to
     * gcr.io/gkeconnect.
     *
     * Generated from protobuf field <code>string registry = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getRegistry()
    {
        return $this->registry;
    }

    /**
     * Optional. The registry to fetch the connect agent image from. Defaults to
     * gcr.io/gkeconnect.
     *
     * Generated from protobuf field <code>string registry = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setRegistry($var)
    {
        GPBUtil::checkString($var, True);
        $this->registry = $var;

        return $this;
    }

    /**
     * Optional. The image pull secret content for the registry, if not public.
     *
     * Generated from protobuf field <code>bytes image_pull_secret_content = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getImagePullSecretContent()
    {
        return $this->image_pull_secret_content;
    }

    /**
     * Optional. The image pull secret content for the registry, if not public.
     *
     * Generated from protobuf field <code>bytes image_pull_secret_content = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setImagePullSecretContent($var)
    {
        GPBUtil::checkString($var, False);
        $this->image_pull_secret_content = $var;

        return $this;
    }

}

