<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/api/serviceusage/v1/resources.proto

namespace Google\Cloud\ServiceUsage\V1;

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

/**
 * The configuration of the service.
 *
 * Generated from protobuf message <code>google.api.serviceusage.v1.ServiceConfig</code>
 */
class ServiceConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * The DNS address at which this service is available.
     * An example DNS address would be:
     * `calendar.googleapis.com`.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     */
    private $name = '';
    /**
     * The product title for this service.
     *
     * Generated from protobuf field <code>string title = 2;</code>
     */
    private $title = '';
    /**
     * A list of API interfaces exported by this service. Contains only the names,
     * versions, and method names of the interfaces.
     *
     * Generated from protobuf field <code>repeated .google.protobuf.Api apis = 3;</code>
     */
    private $apis;
    /**
     * Additional API documentation. Contains only the summary and the
     * documentation URL.
     *
     * Generated from protobuf field <code>.google.api.Documentation documentation = 6;</code>
     */
    private $documentation = null;
    /**
     * Quota configuration.
     *
     * Generated from protobuf field <code>.google.api.Quota quota = 10;</code>
     */
    private $quota = null;
    /**
     * Auth configuration. Contains only the OAuth rules.
     *
     * Generated from protobuf field <code>.google.api.Authentication authentication = 11;</code>
     */
    private $authentication = null;
    /**
     * Configuration controlling usage of this service.
     *
     * Generated from protobuf field <code>.google.api.Usage usage = 15;</code>
     */
    private $usage = null;
    /**
     * Configuration for network endpoints. Contains only the names and aliases
     * of the endpoints.
     *
     * Generated from protobuf field <code>repeated .google.api.Endpoint endpoints = 18;</code>
     */
    private $endpoints;
    /**
     * Defines the monitored resources used by this service. This is required
     * by the [Service.monitoring][google.api.Service.monitoring] and [Service.logging][google.api.Service.logging] configurations.
     *
     * Generated from protobuf field <code>repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25;</code>
     */
    private $monitored_resources;
    /**
     * Monitoring configuration.
     * This should not include the 'producer_destinations' field.
     *
     * Generated from protobuf field <code>.google.api.Monitoring monitoring = 28;</code>
     */
    private $monitoring = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           The DNS address at which this service is available.
     *           An example DNS address would be:
     *           `calendar.googleapis.com`.
     *     @type string $title
     *           The product title for this service.
     *     @type array<\Google\Protobuf\Api>|\Google\Protobuf\Internal\RepeatedField $apis
     *           A list of API interfaces exported by this service. Contains only the names,
     *           versions, and method names of the interfaces.
     *     @type \Google\Api\Documentation $documentation
     *           Additional API documentation. Contains only the summary and the
     *           documentation URL.
     *     @type \Google\Api\Quota $quota
     *           Quota configuration.
     *     @type \Google\Api\Authentication $authentication
     *           Auth configuration. Contains only the OAuth rules.
     *     @type \Google\Api\Usage $usage
     *           Configuration controlling usage of this service.
     *     @type array<\Google\Api\Endpoint>|\Google\Protobuf\Internal\RepeatedField $endpoints
     *           Configuration for network endpoints. Contains only the names and aliases
     *           of the endpoints.
     *     @type array<\Google\Api\MonitoredResourceDescriptor>|\Google\Protobuf\Internal\RepeatedField $monitored_resources
     *           Defines the monitored resources used by this service. This is required
     *           by the [Service.monitoring][google.api.Service.monitoring] and [Service.logging][google.api.Service.logging] configurations.
     *     @type \Google\Api\Monitoring $monitoring
     *           Monitoring configuration.
     *           This should not include the 'producer_destinations' field.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Api\Serviceusage\V1\Resources::initOnce();
        parent::__construct($data);
    }

    /**
     * The DNS address at which this service is available.
     * An example DNS address would be:
     * `calendar.googleapis.com`.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * The DNS address at which this service is available.
     * An example DNS address would be:
     * `calendar.googleapis.com`.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * The product title for this service.
     *
     * Generated from protobuf field <code>string title = 2;</code>
     * @return string
     */
    public function getTitle()
    {
        return $this->title;
    }

    /**
     * The product title for this service.
     *
     * Generated from protobuf field <code>string title = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setTitle($var)
    {
        GPBUtil::checkString($var, True);
        $this->title = $var;

        return $this;
    }

    /**
     * A list of API interfaces exported by this service. Contains only the names,
     * versions, and method names of the interfaces.
     *
     * Generated from protobuf field <code>repeated .google.protobuf.Api apis = 3;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getApis()
    {
        return $this->apis;
    }

    /**
     * A list of API interfaces exported by this service. Contains only the names,
     * versions, and method names of the interfaces.
     *
     * Generated from protobuf field <code>repeated .google.protobuf.Api apis = 3;</code>
     * @param array<\Google\Protobuf\Api>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setApis($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Api::class);
        $this->apis = $arr;

        return $this;
    }

    /**
     * Additional API documentation. Contains only the summary and the
     * documentation URL.
     *
     * Generated from protobuf field <code>.google.api.Documentation documentation = 6;</code>
     * @return \Google\Api\Documentation|null
     */
    public function getDocumentation()
    {
        return $this->documentation;
    }

    public function hasDocumentation()
    {
        return isset($this->documentation);
    }

    public function clearDocumentation()
    {
        unset($this->documentation);
    }

    /**
     * Additional API documentation. Contains only the summary and the
     * documentation URL.
     *
     * Generated from protobuf field <code>.google.api.Documentation documentation = 6;</code>
     * @param \Google\Api\Documentation $var
     * @return $this
     */
    public function setDocumentation($var)
    {
        GPBUtil::checkMessage($var, \Google\Api\Documentation::class);
        $this->documentation = $var;

        return $this;
    }

    /**
     * Quota configuration.
     *
     * Generated from protobuf field <code>.google.api.Quota quota = 10;</code>
     * @return \Google\Api\Quota|null
     */
    public function getQuota()
    {
        return $this->quota;
    }

    public function hasQuota()
    {
        return isset($this->quota);
    }

    public function clearQuota()
    {
        unset($this->quota);
    }

    /**
     * Quota configuration.
     *
     * Generated from protobuf field <code>.google.api.Quota quota = 10;</code>
     * @param \Google\Api\Quota $var
     * @return $this
     */
    public function setQuota($var)
    {
        GPBUtil::checkMessage($var, \Google\Api\Quota::class);
        $this->quota = $var;

        return $this;
    }

    /**
     * Auth configuration. Contains only the OAuth rules.
     *
     * Generated from protobuf field <code>.google.api.Authentication authentication = 11;</code>
     * @return \Google\Api\Authentication|null
     */
    public function getAuthentication()
    {
        return $this->authentication;
    }

    public function hasAuthentication()
    {
        return isset($this->authentication);
    }

    public function clearAuthentication()
    {
        unset($this->authentication);
    }

    /**
     * Auth configuration. Contains only the OAuth rules.
     *
     * Generated from protobuf field <code>.google.api.Authentication authentication = 11;</code>
     * @param \Google\Api\Authentication $var
     * @return $this
     */
    public function setAuthentication($var)
    {
        GPBUtil::checkMessage($var, \Google\Api\Authentication::class);
        $this->authentication = $var;

        return $this;
    }

    /**
     * Configuration controlling usage of this service.
     *
     * Generated from protobuf field <code>.google.api.Usage usage = 15;</code>
     * @return \Google\Api\Usage|null
     */
    public function getUsage()
    {
        return $this->usage;
    }

    public function hasUsage()
    {
        return isset($this->usage);
    }

    public function clearUsage()
    {
        unset($this->usage);
    }

    /**
     * Configuration controlling usage of this service.
     *
     * Generated from protobuf field <code>.google.api.Usage usage = 15;</code>
     * @param \Google\Api\Usage $var
     * @return $this
     */
    public function setUsage($var)
    {
        GPBUtil::checkMessage($var, \Google\Api\Usage::class);
        $this->usage = $var;

        return $this;
    }

    /**
     * Configuration for network endpoints. Contains only the names and aliases
     * of the endpoints.
     *
     * Generated from protobuf field <code>repeated .google.api.Endpoint endpoints = 18;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getEndpoints()
    {
        return $this->endpoints;
    }

    /**
     * Configuration for network endpoints. Contains only the names and aliases
     * of the endpoints.
     *
     * Generated from protobuf field <code>repeated .google.api.Endpoint endpoints = 18;</code>
     * @param array<\Google\Api\Endpoint>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setEndpoints($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\Endpoint::class);
        $this->endpoints = $arr;

        return $this;
    }

    /**
     * Defines the monitored resources used by this service. This is required
     * by the [Service.monitoring][google.api.Service.monitoring] and [Service.logging][google.api.Service.logging] configurations.
     *
     * Generated from protobuf field <code>repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getMonitoredResources()
    {
        return $this->monitored_resources;
    }

    /**
     * Defines the monitored resources used by this service. This is required
     * by the [Service.monitoring][google.api.Service.monitoring] and [Service.logging][google.api.Service.logging] configurations.
     *
     * Generated from protobuf field <code>repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25;</code>
     * @param array<\Google\Api\MonitoredResourceDescriptor>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setMonitoredResources($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\MonitoredResourceDescriptor::class);
        $this->monitored_resources = $arr;

        return $this;
    }

    /**
     * Monitoring configuration.
     * This should not include the 'producer_destinations' field.
     *
     * Generated from protobuf field <code>.google.api.Monitoring monitoring = 28;</code>
     * @return \Google\Api\Monitoring|null
     */
    public function getMonitoring()
    {
        return $this->monitoring;
    }

    public function hasMonitoring()
    {
        return isset($this->monitoring);
    }

    public function clearMonitoring()
    {
        unset($this->monitoring);
    }

    /**
     * Monitoring configuration.
     * This should not include the 'producer_destinations' field.
     *
     * Generated from protobuf field <code>.google.api.Monitoring monitoring = 28;</code>
     * @param \Google\Api\Monitoring $var
     * @return $this
     */
    public function setMonitoring($var)
    {
        GPBUtil::checkMessage($var, \Google\Api\Monitoring::class);
        $this->monitoring = $var;

        return $this;
    }

}

