<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/monitoring/v3/service.proto

namespace Google\Cloud\Monitoring\V3\Service;

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

/**
 * Canonical service scoped to an Istio mesh. Anthos clusters running ASM >=
 * 1.6.8 will have their services ingested as this type.
 *
 * Generated from protobuf message <code>google.monitoring.v3.Service.IstioCanonicalService</code>
 */
class IstioCanonicalService extends \Google\Protobuf\Internal\Message
{
    /**
     * Identifier for the Istio mesh in which this canonical service is defined.
     * Corresponds to the `mesh_uid` metric label in
     * [Istio metrics](https://cloud.google.com/monitoring/api/metrics_istio).
     *
     * Generated from protobuf field <code>string mesh_uid = 1;</code>
     */
    private $mesh_uid = '';
    /**
     * The namespace of the canonical service underlying this service.
     * Corresponds to the `destination_canonical_service_namespace` metric
     * label in [Istio
     * metrics](https://cloud.google.com/monitoring/api/metrics_istio).
     *
     * Generated from protobuf field <code>string canonical_service_namespace = 3;</code>
     */
    private $canonical_service_namespace = '';
    /**
     * The name of the canonical service underlying this service.
     * Corresponds to the `destination_canonical_service_name` metric label in
     * label in [Istio
     * metrics](https://cloud.google.com/monitoring/api/metrics_istio).
     *
     * Generated from protobuf field <code>string canonical_service = 4;</code>
     */
    private $canonical_service = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $mesh_uid
     *           Identifier for the Istio mesh in which this canonical service is defined.
     *           Corresponds to the `mesh_uid` metric label in
     *           [Istio metrics](https://cloud.google.com/monitoring/api/metrics_istio).
     *     @type string $canonical_service_namespace
     *           The namespace of the canonical service underlying this service.
     *           Corresponds to the `destination_canonical_service_namespace` metric
     *           label in [Istio
     *           metrics](https://cloud.google.com/monitoring/api/metrics_istio).
     *     @type string $canonical_service
     *           The name of the canonical service underlying this service.
     *           Corresponds to the `destination_canonical_service_name` metric label in
     *           label in [Istio
     *           metrics](https://cloud.google.com/monitoring/api/metrics_istio).
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Monitoring\V3\Service::initOnce();
        parent::__construct($data);
    }

    /**
     * Identifier for the Istio mesh in which this canonical service is defined.
     * Corresponds to the `mesh_uid` metric label in
     * [Istio metrics](https://cloud.google.com/monitoring/api/metrics_istio).
     *
     * Generated from protobuf field <code>string mesh_uid = 1;</code>
     * @return string
     */
    public function getMeshUid()
    {
        return $this->mesh_uid;
    }

    /**
     * Identifier for the Istio mesh in which this canonical service is defined.
     * Corresponds to the `mesh_uid` metric label in
     * [Istio metrics](https://cloud.google.com/monitoring/api/metrics_istio).
     *
     * Generated from protobuf field <code>string mesh_uid = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setMeshUid($var)
    {
        GPBUtil::checkString($var, True);
        $this->mesh_uid = $var;

        return $this;
    }

    /**
     * The namespace of the canonical service underlying this service.
     * Corresponds to the `destination_canonical_service_namespace` metric
     * label in [Istio
     * metrics](https://cloud.google.com/monitoring/api/metrics_istio).
     *
     * Generated from protobuf field <code>string canonical_service_namespace = 3;</code>
     * @return string
     */
    public function getCanonicalServiceNamespace()
    {
        return $this->canonical_service_namespace;
    }

    /**
     * The namespace of the canonical service underlying this service.
     * Corresponds to the `destination_canonical_service_namespace` metric
     * label in [Istio
     * metrics](https://cloud.google.com/monitoring/api/metrics_istio).
     *
     * Generated from protobuf field <code>string canonical_service_namespace = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setCanonicalServiceNamespace($var)
    {
        GPBUtil::checkString($var, True);
        $this->canonical_service_namespace = $var;

        return $this;
    }

    /**
     * The name of the canonical service underlying this service.
     * Corresponds to the `destination_canonical_service_name` metric label in
     * label in [Istio
     * metrics](https://cloud.google.com/monitoring/api/metrics_istio).
     *
     * Generated from protobuf field <code>string canonical_service = 4;</code>
     * @return string
     */
    public function getCanonicalService()
    {
        return $this->canonical_service;
    }

    /**
     * The name of the canonical service underlying this service.
     * Corresponds to the `destination_canonical_service_name` metric label in
     * label in [Istio
     * metrics](https://cloud.google.com/monitoring/api/metrics_istio).
     *
     * Generated from protobuf field <code>string canonical_service = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setCanonicalService($var)
    {
        GPBUtil::checkString($var, True);
        $this->canonical_service = $var;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(IstioCanonicalService::class, \Google\Cloud\Monitoring\V3\Service_IstioCanonicalService::class);

