Show / Hide Table of Contents

Class Service

Service is the root object of Google service configuration schema. It describes basic information about a service, such as the name and the title, and delegates other aspects to sub-sections. Each sub-section is either a proto message or a repeated proto message that configures a specific aspect, such as auth. See each proto message definition for details.

Example:

type: google.api.Service config_version: 3 name: calendar.googleapis.com title: Google Calendar API apis:

  • name: google.calendar.v3.Calendar authentication: providers:
    • id: google_calendar_auth jwks_uri: https://www.googleapis.com/oauth2/v1/certs issuer: https://securetoken.google.com rules:
    • selector: "*" requirements: provider_id: google_calendar_auth
Inheritance
System.Object
Service
Implements
IMessage<Service>
IMessage
System.IEquatable<Service>
IDeepCloneable<Service>
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Google.Api
Assembly: Google.Api.CommonProtos.dll
Syntax
public sealed class Service : IMessage<Service>, IMessage, IEquatable<Service>, IDeepCloneable<Service>

Constructors

Service()

Declaration
public Service()

Service(Service)

Declaration
public Service(Service other)
Parameters
Type Name Description
Service other

Fields

ApisFieldNumber

Field number for the "apis" field.

Declaration
public const int ApisFieldNumber = 3
Field Value
Type Description
System.Int32

AuthenticationFieldNumber

Field number for the "authentication" field.

Declaration
public const int AuthenticationFieldNumber = 11
Field Value
Type Description
System.Int32

BackendFieldNumber

Field number for the "backend" field.

Declaration
public const int BackendFieldNumber = 8
Field Value
Type Description
System.Int32

BillingFieldNumber

Field number for the "billing" field.

Declaration
public const int BillingFieldNumber = 26
Field Value
Type Description
System.Int32

ConfigVersionFieldNumber

Field number for the "config_version" field.

Declaration
public const int ConfigVersionFieldNumber = 20
Field Value
Type Description
System.Int32

ContextFieldNumber

Field number for the "context" field.

Declaration
public const int ContextFieldNumber = 12
Field Value
Type Description
System.Int32

ControlFieldNumber

Field number for the "control" field.

Declaration
public const int ControlFieldNumber = 21
Field Value
Type Description
System.Int32

DocumentationFieldNumber

Field number for the "documentation" field.

Declaration
public const int DocumentationFieldNumber = 6
Field Value
Type Description
System.Int32

EndpointsFieldNumber

Field number for the "endpoints" field.

Declaration
public const int EndpointsFieldNumber = 18
Field Value
Type Description
System.Int32

EnumsFieldNumber

Field number for the "enums" field.

Declaration
public const int EnumsFieldNumber = 5
Field Value
Type Description
System.Int32

HttpFieldNumber

Field number for the "http" field.

Declaration
public const int HttpFieldNumber = 9
Field Value
Type Description
System.Int32

IdFieldNumber

Field number for the "id" field.

Declaration
public const int IdFieldNumber = 33
Field Value
Type Description
System.Int32

LoggingFieldNumber

Field number for the "logging" field.

Declaration
public const int LoggingFieldNumber = 27
Field Value
Type Description
System.Int32

LogsFieldNumber

Field number for the "logs" field.

Declaration
public const int LogsFieldNumber = 23
Field Value
Type Description
System.Int32

MetricsFieldNumber

Field number for the "metrics" field.

Declaration
public const int MetricsFieldNumber = 24
Field Value
Type Description
System.Int32

MonitoredResourcesFieldNumber

Field number for the "monitored_resources" field.

Declaration
public const int MonitoredResourcesFieldNumber = 25
Field Value
Type Description
System.Int32

MonitoringFieldNumber

Field number for the "monitoring" field.

Declaration
public const int MonitoringFieldNumber = 28
Field Value
Type Description
System.Int32

NameFieldNumber

Field number for the "name" field.

Declaration
public const int NameFieldNumber = 1
Field Value
Type Description
System.Int32

ProducerProjectIdFieldNumber

Field number for the "producer_project_id" field.

Declaration
public const int ProducerProjectIdFieldNumber = 22
Field Value
Type Description
System.Int32

QuotaFieldNumber

Field number for the "quota" field.

Declaration
public const int QuotaFieldNumber = 10
Field Value
Type Description
System.Int32

SourceInfoFieldNumber

Field number for the "source_info" field.

Declaration
public const int SourceInfoFieldNumber = 37
Field Value
Type Description
System.Int32

SystemParametersFieldNumber

Field number for the "system_parameters" field.

Declaration
public const int SystemParametersFieldNumber = 29
Field Value
Type Description
System.Int32

TitleFieldNumber

Field number for the "title" field.

Declaration
public const int TitleFieldNumber = 2
Field Value
Type Description
System.Int32

Types_FieldNumber

Field number for the "types" field.

Declaration
public const int Types_FieldNumber = 4
Field Value
Type Description
System.Int32

UsageFieldNumber

Field number for the "usage" field.

Declaration
public const int UsageFieldNumber = 15
Field Value
Type Description
System.Int32

Properties

Apis

A list of API interfaces exported by this service. Only the name field of the [google.protobuf.Api][google.protobuf.Api] needs to be provided by the configuration author, as the remaining fields will be derived from the IDL during the normalization process. It is an error to specify an API interface here which cannot be resolved against the associated IDL files.

Declaration
public RepeatedField<Api> Apis { get; }
Property Value
Type Description
RepeatedField<Api>

Authentication

Auth configuration.

Declaration
public Authentication Authentication { get; set; }
Property Value
Type Description
Authentication

Backend

API backend configuration.

Declaration
public Backend Backend { get; set; }
Property Value
Type Description
Backend

Billing

Billing configuration.

Declaration
public Billing Billing { get; set; }
Property Value
Type Description
Billing

ConfigVersion

The semantic version of the service configuration. The config version affects the interpretation of the service configuration. For example, certain features are enabled by default for certain config versions. The latest config version is 3.

Declaration
public uint? ConfigVersion { get; set; }
Property Value
Type Description
System.Nullable<System.UInt32>

Context

Context configuration.

Declaration
public Context Context { get; set; }
Property Value
Type Description
Context

Control

Configuration for the service control plane.

Declaration
public Control Control { get; set; }
Property Value
Type Description
Control

Descriptor

Declaration
public static MessageDescriptor Descriptor { get; }
Property Value
Type Description
MessageDescriptor

Documentation

Additional API documentation.

Declaration
public Documentation Documentation { get; set; }
Property Value
Type Description
Documentation

Endpoints

Configuration for network endpoints. If this is empty, then an endpoint with the same name as the service is automatically generated to service all defined APIs.

Declaration
public RepeatedField<Endpoint> Endpoints { get; }
Property Value
Type Description
RepeatedField<Endpoint>

Enums

A list of all enum types included in this API service. Enums referenced directly or indirectly by the apis are automatically included. Enums which are not referenced but shall be included should be listed here by name. Example:

enums:

  • name: google.someapi.v1.SomeEnum
Declaration
public RepeatedField<Enum> Enums { get; }
Property Value
Type Description
RepeatedField<Enum>

Http

HTTP configuration.

Declaration
public Http Http { get; set; }
Property Value
Type Description
Http

Id

A unique ID for a specific instance of this message, typically assigned by the client for tracking purpose. If empty, the server may choose to generate one instead. Must be no longer than 60 characters.

Declaration
public string Id { get; set; }
Property Value
Type Description
System.String

Logging

Logging configuration.

Declaration
public Logging Logging { get; set; }
Property Value
Type Description
Logging

Logs

Defines the logs used by this service.

Declaration
public RepeatedField<LogDescriptor> Logs { get; }
Property Value
Type Description
RepeatedField<LogDescriptor>

Metrics

Defines the metrics used by this service.

Declaration
public RepeatedField<MetricDescriptor> Metrics { get; }
Property Value
Type Description
RepeatedField<MetricDescriptor>

MonitoredResources

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.

Declaration
public RepeatedField<MonitoredResourceDescriptor> MonitoredResources { get; }
Property Value
Type Description
RepeatedField<MonitoredResourceDescriptor>

Monitoring

Monitoring configuration.

Declaration
public Monitoring Monitoring { get; set; }
Property Value
Type Description
Monitoring

Name

The service name, which is a DNS-like logical identifier for the service, such as calendar.googleapis.com. The service name typically goes through DNS verification to make sure the owner of the service also owns the DNS name.

Declaration
public string Name { get; set; }
Property Value
Type Description
System.String

Parser

Declaration
public static MessageParser<Service> Parser { get; }
Property Value
Type Description
MessageParser<Service>

ProducerProjectId

The Google project that owns this service.

Declaration
public string ProducerProjectId { get; set; }
Property Value
Type Description
System.String

Quota

Quota configuration.

Declaration
public Quota Quota { get; set; }
Property Value
Type Description
Quota

SourceInfo

Output only. The source information for this configuration if available.

Declaration
public SourceInfo SourceInfo { get; set; }
Property Value
Type Description
SourceInfo

SystemParameters

System parameter configuration.

Declaration
public SystemParameters SystemParameters { get; set; }
Property Value
Type Description
SystemParameters

Title

The product title for this service.

Declaration
public string Title { get; set; }
Property Value
Type Description
System.String

Types_

A list of all proto message types included in this API service. Types referenced directly or indirectly by the apis are automatically included. Messages which are not referenced but shall be included, such as types used by the google.protobuf.Any type, should be listed here by name. Example:

types:

  • name: google.protobuf.Int32
Declaration
public RepeatedField<Type> Types_ { get; }
Property Value
Type Description
RepeatedField<Type>

Usage

Configuration controlling usage of this service.

Declaration
public Usage Usage { get; set; }
Property Value
Type Description
Usage

Methods

CalculateSize()

Declaration
public int CalculateSize()
Returns
Type Description
System.Int32
Implements
IMessage.CalculateSize()

Clone()

Declaration
public Service Clone()
Returns
Type Description
Service
Implements
IDeepCloneable<T>.Clone()

Equals(Service)

Declaration
public bool Equals(Service other)
Parameters
Type Name Description
Service other
Returns
Type Description
System.Boolean
Implements
System.IEquatable<T>.Equals(T)

Equals(Object)

Declaration
public override bool Equals(object other)
Parameters
Type Name Description
System.Object other
Returns
Type Description
System.Boolean
Overrides
System.Object.Equals(System.Object)

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32
Overrides
System.Object.GetHashCode()

MergeFrom(Service)

Declaration
public void MergeFrom(Service other)
Parameters
Type Name Description
Service other
Implements
IMessage<T>.MergeFrom(T)

MergeFrom(CodedInputStream)

Declaration
public void MergeFrom(CodedInputStream input)
Parameters
Type Name Description
CodedInputStream input
Implements
IMessage.MergeFrom(CodedInputStream)

ToString()

Declaration
public override string ToString()
Returns
Type Description
System.String
Overrides
System.Object.ToString()

WriteTo(CodedOutputStream)

Declaration
public void WriteTo(CodedOutputStream output)
Parameters
Type Name Description
CodedOutputStream output
Implements
IMessage.WriteTo(CodedOutputStream)

Explicit Interface Implementations

IMessage.Descriptor

Declaration
MessageDescriptor IMessage.Descriptor { get; }
Returns
Type Description
MessageDescriptor
Implements
IMessage.Descriptor
Back to top