<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/certificatemanager/v1/certificate_manager.proto

namespace Google\Cloud\CertificateManager\V1\CertificateMap;

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

/**
 * Describes a Target Proxy that uses this Certificate Map.
 *
 * Generated from protobuf message <code>google.cloud.certificatemanager.v1.CertificateMap.GclbTarget</code>
 */
class GclbTarget extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. IP configurations for this Target Proxy where the
     * Certificate Map is serving.
     *
     * Generated from protobuf field <code>repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig ip_configs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $ip_configs;
    protected $target_proxy;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $target_https_proxy
     *           Output only. This field returns the resource name in the following
     *           format:
     *           `//compute.googleapis.com/projects/&#42;&#47;global/targetHttpsProxies/&#42;`.
     *     @type string $target_ssl_proxy
     *           Output only. This field returns the resource name in the following
     *           format:
     *           `//compute.googleapis.com/projects/&#42;&#47;global/targetSslProxies/&#42;`.
     *     @type array<\Google\Cloud\CertificateManager\V1\CertificateMap\GclbTarget\IpConfig>|\Google\Protobuf\Internal\RepeatedField $ip_configs
     *           Output only. IP configurations for this Target Proxy where the
     *           Certificate Map is serving.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. This field returns the resource name in the following
     * format:
     * `//compute.googleapis.com/projects/&#42;&#47;global/targetHttpsProxies/&#42;`.
     *
     * Generated from protobuf field <code>string target_https_proxy = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getTargetHttpsProxy()
    {
        return $this->readOneof(1);
    }

    public function hasTargetHttpsProxy()
    {
        return $this->hasOneof(1);
    }

    /**
     * Output only. This field returns the resource name in the following
     * format:
     * `//compute.googleapis.com/projects/&#42;&#47;global/targetHttpsProxies/&#42;`.
     *
     * Generated from protobuf field <code>string target_https_proxy = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setTargetHttpsProxy($var)
    {
        GPBUtil::checkString($var, True);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * Output only. This field returns the resource name in the following
     * format:
     * `//compute.googleapis.com/projects/&#42;&#47;global/targetSslProxies/&#42;`.
     *
     * Generated from protobuf field <code>string target_ssl_proxy = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getTargetSslProxy()
    {
        return $this->readOneof(3);
    }

    public function hasTargetSslProxy()
    {
        return $this->hasOneof(3);
    }

    /**
     * Output only. This field returns the resource name in the following
     * format:
     * `//compute.googleapis.com/projects/&#42;&#47;global/targetSslProxies/&#42;`.
     *
     * Generated from protobuf field <code>string target_ssl_proxy = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setTargetSslProxy($var)
    {
        GPBUtil::checkString($var, True);
        $this->writeOneof(3, $var);

        return $this;
    }

    /**
     * Output only. IP configurations for this Target Proxy where the
     * Certificate Map is serving.
     *
     * Generated from protobuf field <code>repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig ip_configs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getIpConfigs()
    {
        return $this->ip_configs;
    }

    /**
     * Output only. IP configurations for this Target Proxy where the
     * Certificate Map is serving.
     *
     * Generated from protobuf field <code>repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig ip_configs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param array<\Google\Cloud\CertificateManager\V1\CertificateMap\GclbTarget\IpConfig>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setIpConfigs($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\CertificateManager\V1\CertificateMap\GclbTarget\IpConfig::class);
        $this->ip_configs = $arr;

        return $this;
    }

    /**
     * @return string
     */
    public function getTargetProxy()
    {
        return $this->whichOneof("target_proxy");
    }

}


