Class Service

  • All Implemented Interfaces:
    ServiceOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

    public final class Service
    extends com.google.protobuf.GeneratedMessageV3
    implements ServiceOrBuilder
     A `Service` is a discrete, autonomous, and network-accessible unit, designed
     to solve an individual concern
     ([Wikipedia](https://en.wikipedia.org/wiki/Service-orientation)). In
     Cloud Monitoring, a `Service` acts as the root resource under which
     operational aspects of the service are accessible.
     
    Protobuf type google.monitoring.v3.Service
    See Also:
    Serialized Form
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetMapField

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class com.google.protobuf.GeneratedMessageV3
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • getName

        public String getName()
         Resource name for this Service. The format is:
        
             projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]
         
        string name = 1;
        Specified by:
        getName in interface ServiceOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         Resource name for this Service. The format is:
        
             projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]
         
        string name = 1;
        Specified by:
        getNameBytes in interface ServiceOrBuilder
        Returns:
        The bytes for name.
      • getDisplayName

        public String getDisplayName()
         Name used for UI elements listing this Service.
         
        string display_name = 2;
        Specified by:
        getDisplayName in interface ServiceOrBuilder
        Returns:
        The displayName.
      • getDisplayNameBytes

        public com.google.protobuf.ByteString getDisplayNameBytes()
         Name used for UI elements listing this Service.
         
        string display_name = 2;
        Specified by:
        getDisplayNameBytes in interface ServiceOrBuilder
        Returns:
        The bytes for displayName.
      • hasCustom

        public boolean hasCustom()
         Custom service type.
         
        .google.monitoring.v3.Service.Custom custom = 6;
        Specified by:
        hasCustom in interface ServiceOrBuilder
        Returns:
        Whether the custom field is set.
      • hasAppEngine

        public boolean hasAppEngine()
         Type used for App Engine services.
         
        .google.monitoring.v3.Service.AppEngine app_engine = 7;
        Specified by:
        hasAppEngine in interface ServiceOrBuilder
        Returns:
        Whether the appEngine field is set.
      • getAppEngine

        public Service.AppEngine getAppEngine()
         Type used for App Engine services.
         
        .google.monitoring.v3.Service.AppEngine app_engine = 7;
        Specified by:
        getAppEngine in interface ServiceOrBuilder
        Returns:
        The appEngine.
      • hasCloudEndpoints

        public boolean hasCloudEndpoints()
         Type used for Cloud Endpoints services.
         
        .google.monitoring.v3.Service.CloudEndpoints cloud_endpoints = 8;
        Specified by:
        hasCloudEndpoints in interface ServiceOrBuilder
        Returns:
        Whether the cloudEndpoints field is set.
      • hasClusterIstio

        public boolean hasClusterIstio()
         Type used for Istio services that live in a Kubernetes cluster.
         
        .google.monitoring.v3.Service.ClusterIstio cluster_istio = 9;
        Specified by:
        hasClusterIstio in interface ServiceOrBuilder
        Returns:
        Whether the clusterIstio field is set.
      • getClusterIstio

        public Service.ClusterIstio getClusterIstio()
         Type used for Istio services that live in a Kubernetes cluster.
         
        .google.monitoring.v3.Service.ClusterIstio cluster_istio = 9;
        Specified by:
        getClusterIstio in interface ServiceOrBuilder
        Returns:
        The clusterIstio.
      • hasMeshIstio

        public boolean hasMeshIstio()
         Type used for Istio services scoped to an Istio mesh.
         
        .google.monitoring.v3.Service.MeshIstio mesh_istio = 10;
        Specified by:
        hasMeshIstio in interface ServiceOrBuilder
        Returns:
        Whether the meshIstio field is set.
      • getMeshIstio

        public Service.MeshIstio getMeshIstio()
         Type used for Istio services scoped to an Istio mesh.
         
        .google.monitoring.v3.Service.MeshIstio mesh_istio = 10;
        Specified by:
        getMeshIstio in interface ServiceOrBuilder
        Returns:
        The meshIstio.
      • hasIstioCanonicalService

        public boolean hasIstioCanonicalService()
         Type used for canonical services scoped to an Istio mesh.
         Metrics for Istio are
         [documented here](https://istio.io/latest/docs/reference/config/metrics/)
         
        .google.monitoring.v3.Service.IstioCanonicalService istio_canonical_service = 11;
        Specified by:
        hasIstioCanonicalService in interface ServiceOrBuilder
        Returns:
        Whether the istioCanonicalService field is set.
      • getIstioCanonicalService

        public Service.IstioCanonicalService getIstioCanonicalService()
         Type used for canonical services scoped to an Istio mesh.
         Metrics for Istio are
         [documented here](https://istio.io/latest/docs/reference/config/metrics/)
         
        .google.monitoring.v3.Service.IstioCanonicalService istio_canonical_service = 11;
        Specified by:
        getIstioCanonicalService in interface ServiceOrBuilder
        Returns:
        The istioCanonicalService.
      • getIstioCanonicalServiceOrBuilder

        public Service.IstioCanonicalServiceOrBuilder getIstioCanonicalServiceOrBuilder()
         Type used for canonical services scoped to an Istio mesh.
         Metrics for Istio are
         [documented here](https://istio.io/latest/docs/reference/config/metrics/)
         
        .google.monitoring.v3.Service.IstioCanonicalService istio_canonical_service = 11;
        Specified by:
        getIstioCanonicalServiceOrBuilder in interface ServiceOrBuilder
      • hasTelemetry

        public boolean hasTelemetry()
         Configuration for how to query telemetry on a Service.
         
        .google.monitoring.v3.Service.Telemetry telemetry = 13;
        Specified by:
        hasTelemetry in interface ServiceOrBuilder
        Returns:
        Whether the telemetry field is set.
      • getTelemetry

        public Service.Telemetry getTelemetry()
         Configuration for how to query telemetry on a Service.
         
        .google.monitoring.v3.Service.Telemetry telemetry = 13;
        Specified by:
        getTelemetry in interface ServiceOrBuilder
        Returns:
        The telemetry.
      • getUserLabelsCount

        public int getUserLabelsCount()
        Description copied from interface: ServiceOrBuilder
         Labels which have been used to annotate the service. Label keys must start
         with a letter. Label keys and values may contain lowercase letters,
         numbers, underscores, and dashes. Label keys and values have a maximum
         length of 63 characters, and must be less than 128 bytes in size. Up to 64
         label entries may be stored. For labels which do not have a semantic value,
         the empty string may be supplied for the label value.
         
        map<string, string> user_labels = 14;
        Specified by:
        getUserLabelsCount in interface ServiceOrBuilder
      • containsUserLabels

        public boolean containsUserLabels​(String key)
         Labels which have been used to annotate the service. Label keys must start
         with a letter. Label keys and values may contain lowercase letters,
         numbers, underscores, and dashes. Label keys and values have a maximum
         length of 63 characters, and must be less than 128 bytes in size. Up to 64
         label entries may be stored. For labels which do not have a semantic value,
         the empty string may be supplied for the label value.
         
        map<string, string> user_labels = 14;
        Specified by:
        containsUserLabels in interface ServiceOrBuilder
      • getUserLabelsMap

        public Map<String,​String> getUserLabelsMap()
         Labels which have been used to annotate the service. Label keys must start
         with a letter. Label keys and values may contain lowercase letters,
         numbers, underscores, and dashes. Label keys and values have a maximum
         length of 63 characters, and must be less than 128 bytes in size. Up to 64
         label entries may be stored. For labels which do not have a semantic value,
         the empty string may be supplied for the label value.
         
        map<string, string> user_labels = 14;
        Specified by:
        getUserLabelsMap in interface ServiceOrBuilder
      • getUserLabelsOrDefault

        public String getUserLabelsOrDefault​(String key,
                                             String defaultValue)
         Labels which have been used to annotate the service. Label keys must start
         with a letter. Label keys and values may contain lowercase letters,
         numbers, underscores, and dashes. Label keys and values have a maximum
         length of 63 characters, and must be less than 128 bytes in size. Up to 64
         label entries may be stored. For labels which do not have a semantic value,
         the empty string may be supplied for the label value.
         
        map<string, string> user_labels = 14;
        Specified by:
        getUserLabelsOrDefault in interface ServiceOrBuilder
      • getUserLabelsOrThrow

        public String getUserLabelsOrThrow​(String key)
         Labels which have been used to annotate the service. Label keys must start
         with a letter. Label keys and values may contain lowercase letters,
         numbers, underscores, and dashes. Label keys and values have a maximum
         length of 63 characters, and must be less than 128 bytes in size. Up to 64
         label entries may be stored. For labels which do not have a semantic value,
         the empty string may be supplied for the label value.
         
        map<string, string> user_labels = 14;
        Specified by:
        getUserLabelsOrThrow in interface ServiceOrBuilder
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static Service parseFrom​(ByteBuffer data)
                                 throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Service parseFrom​(ByteBuffer data,
                                        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                 throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Service parseFrom​(com.google.protobuf.ByteString data)
                                 throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Service parseFrom​(com.google.protobuf.ByteString data,
                                        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                 throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Service parseFrom​(byte[] data)
                                 throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Service parseFrom​(byte[] data,
                                        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                 throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Service parseFrom​(com.google.protobuf.CodedInputStream input,
                                        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                 throws IOException
        Throws:
        IOException
      • newBuilderForType

        public Service.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public Service.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected Service.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstance

        public static Service getDefaultInstance()
      • parser

        public static com.google.protobuf.Parser<Service> parser()
      • getParserForType

        public com.google.protobuf.Parser<Service> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public Service getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder