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

namespace Google\Cloud\NetworkManagement\V1;

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

/**
 * For display only. Metadata associated with a load balancer.
 *
 * Generated from protobuf message <code>google.cloud.networkmanagement.v1.LoadBalancerInfo</code>
 */
class LoadBalancerInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * Type of the load balancer.
     *
     * Generated from protobuf field <code>.google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType load_balancer_type = 1;</code>
     */
    private $load_balancer_type = 0;
    /**
     * URI of the health check for the load balancer.
     *
     * Generated from protobuf field <code>string health_check_uri = 2;</code>
     */
    private $health_check_uri = '';
    /**
     * Information for the loadbalancer backends.
     *
     * Generated from protobuf field <code>repeated .google.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3;</code>
     */
    private $backends;
    /**
     * Type of load balancer's backend configuration.
     *
     * Generated from protobuf field <code>.google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType backend_type = 4;</code>
     */
    private $backend_type = 0;
    /**
     * Backend configuration URI.
     *
     * Generated from protobuf field <code>string backend_uri = 5;</code>
     */
    private $backend_uri = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $load_balancer_type
     *           Type of the load balancer.
     *     @type string $health_check_uri
     *           URI of the health check for the load balancer.
     *     @type array<\Google\Cloud\NetworkManagement\V1\LoadBalancerBackend>|\Google\Protobuf\Internal\RepeatedField $backends
     *           Information for the loadbalancer backends.
     *     @type int $backend_type
     *           Type of load balancer's backend configuration.
     *     @type string $backend_uri
     *           Backend configuration URI.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce();
        parent::__construct($data);
    }

    /**
     * Type of the load balancer.
     *
     * Generated from protobuf field <code>.google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType load_balancer_type = 1;</code>
     * @return int
     */
    public function getLoadBalancerType()
    {
        return $this->load_balancer_type;
    }

    /**
     * Type of the load balancer.
     *
     * Generated from protobuf field <code>.google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType load_balancer_type = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setLoadBalancerType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\LoadBalancerInfo\LoadBalancerType::class);
        $this->load_balancer_type = $var;

        return $this;
    }

    /**
     * URI of the health check for the load balancer.
     *
     * Generated from protobuf field <code>string health_check_uri = 2;</code>
     * @return string
     */
    public function getHealthCheckUri()
    {
        return $this->health_check_uri;
    }

    /**
     * URI of the health check for the load balancer.
     *
     * Generated from protobuf field <code>string health_check_uri = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setHealthCheckUri($var)
    {
        GPBUtil::checkString($var, True);
        $this->health_check_uri = $var;

        return $this;
    }

    /**
     * Information for the loadbalancer backends.
     *
     * Generated from protobuf field <code>repeated .google.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getBackends()
    {
        return $this->backends;
    }

    /**
     * Information for the loadbalancer backends.
     *
     * Generated from protobuf field <code>repeated .google.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3;</code>
     * @param array<\Google\Cloud\NetworkManagement\V1\LoadBalancerBackend>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setBackends($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkManagement\V1\LoadBalancerBackend::class);
        $this->backends = $arr;

        return $this;
    }

    /**
     * Type of load balancer's backend configuration.
     *
     * Generated from protobuf field <code>.google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType backend_type = 4;</code>
     * @return int
     */
    public function getBackendType()
    {
        return $this->backend_type;
    }

    /**
     * Type of load balancer's backend configuration.
     *
     * Generated from protobuf field <code>.google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType backend_type = 4;</code>
     * @param int $var
     * @return $this
     */
    public function setBackendType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\LoadBalancerInfo\BackendType::class);
        $this->backend_type = $var;

        return $this;
    }

    /**
     * Backend configuration URI.
     *
     * Generated from protobuf field <code>string backend_uri = 5;</code>
     * @return string
     */
    public function getBackendUri()
    {
        return $this->backend_uri;
    }

    /**
     * Backend configuration URI.
     *
     * Generated from protobuf field <code>string backend_uri = 5;</code>
     * @param string $var
     * @return $this
     */
    public function setBackendUri($var)
    {
        GPBUtil::checkString($var, True);
        $this->backend_uri = $var;

        return $this;
    }

}

