class Service extends Message

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

Generated from protobuf message google.api.Service

Methods

__construct(array $data = NULL)

Constructor.

UInt32Value
getConfigVersion()

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.

$this
setConfigVersion(UInt32Value $var)

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.

string
getName()

The DNS address at which this service is available, e.g. calendar.googleapis.com.

$this
setName(string $var)

The DNS address at which this service is available, e.g. calendar.googleapis.com.

string
getId()

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.

$this
setId(string $var)

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.

string
getTitle()

The product title for this service.

$this
setTitle(string $var)

The product title for this service.

string
getProducerProjectId()

The Google project that owns this service.

$this
setProducerProjectId(string $var)

The Google project that owns this service.

RepeatedField
getApis()

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.

$this
setApis(Api[]|RepeatedField $var)

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.

RepeatedField
getTypes()

A list of all proto message types included in this API service.

$this
setTypes(Type[]|RepeatedField $var)

A list of all proto message types included in this API service.

RepeatedField
getEnums()

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

$this
setEnums(Enum[]|RepeatedField $var)

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

getDocumentation()

Additional API documentation.

$this
setDocumentation(Documentation $var)

Additional API documentation.

getBackend()

API backend configuration.

$this
setBackend(Backend $var)

API backend configuration.

getHttp()

HTTP configuration.

$this
setHttp(Http $var)

HTTP configuration.

getQuota()

Quota configuration.

$this
setQuota(Quota $var)

Quota configuration.

getAuthentication()

Auth configuration.

$this
setAuthentication(Authentication $var)

Auth configuration.

getContext()

Context configuration.

$this
setContext(Context $var)

Context configuration.

getUsage()

Configuration controlling usage of this service.

$this
setUsage(Usage $var)

Configuration controlling usage of this service.

RepeatedField
getEndpoints()

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.

$this
setEndpoints(Endpoint[]|RepeatedField $var)

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.

getControl()

Configuration for the service control plane.

$this
setControl(Control $var)

Configuration for the service control plane.

RepeatedField
getLogs()

Defines the logs used by this service.

$this
setLogs(LogDescriptor[]|RepeatedField $var)

Defines the logs used by this service.

RepeatedField
getMetrics()

Defines the metrics used by this service.

$this
setMetrics(MetricDescriptor[]|RepeatedField $var)

Defines the metrics used by this service.

RepeatedField
getMonitoredResources()

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.

$this
setMonitoredResources(MonitoredResourceDescriptor[]|RepeatedField $var)

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.

getBilling()

Billing configuration.

$this
setBilling(Billing $var)

Billing configuration.

getLogging()

Logging configuration.

$this
setLogging(Logging $var)

Logging configuration.

getMonitoring()

Monitoring configuration.

$this
setMonitoring(Monitoring $var)

Monitoring configuration.

getSystemParameters()

System parameter configuration.

$this
setSystemParameters(SystemParameters $var)

System parameter configuration.

getSourceInfo()

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

$this
setSourceInfo(SourceInfo $var)

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

getExperimental()

Experimental configuration.

$this
setExperimental(Experimental $var)

Experimental configuration.

Details

at line 303
__construct(array $data = NULL)

Constructor.

Parameters

array $data { Optional. Data for populating the Message object.

@type \Google\Protobuf\UInt32Value $config_version
      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`.
@type string $name
      The DNS address at which this service is available,
      e.g. `calendar.googleapis.com`.
@type string $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.
@type string $title
      The product title for this service.
@type string $producer_project_id
      The Google project that owns this service.
@type \Google\Protobuf\Api[]|\Google\Protobuf\Internal\RepeatedField $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.
@type \Google\Protobuf\Type[]|\Google\Protobuf\Internal\RepeatedField $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
@type \Google\Protobuf\Enum[]|\Google\Protobuf\Internal\RepeatedField $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
@type \Google\Api\Documentation $documentation
      Additional API documentation.
@type \Google\Api\Backend $backend
      API backend configuration.
@type \Google\Api\Http $http
      HTTP configuration.
@type \Google\Api\Quota $quota
      Quota configuration.
@type \Google\Api\Authentication $authentication
      Auth configuration.
@type \Google\Api\Context $context
      Context configuration.
@type \Google\Api\Usage $usage
      Configuration controlling usage of this service.
@type \Google\Api\Endpoint[]|\Google\Protobuf\Internal\RepeatedField $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.
@type \Google\Api\Control $control
      Configuration for the service control plane.
@type \Google\Api\LogDescriptor[]|\Google\Protobuf\Internal\RepeatedField $logs
      Defines the logs used by this service.
@type \Google\Api\MetricDescriptor[]|\Google\Protobuf\Internal\RepeatedField $metrics
      Defines the metrics used by this service.
@type \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\Billing $billing
      Billing configuration.
@type \Google\Api\Logging $logging
      Logging configuration.
@type \Google\Api\Monitoring $monitoring
      Monitoring configuration.
@type \Google\Api\SystemParameters $system_parameters
      System parameter configuration.
@type \Google\Api\SourceInfo $source_info
      Output only. The source information for this configuration if available.
@type \Google\Api\Experimental $experimental
      Experimental configuration.

}

at line 317
UInt32Value getConfigVersion()

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.

Generated from protobuf field .google.protobuf.UInt32Value config_version = 20;

Return Value

UInt32Value

at line 332
$this setConfigVersion(UInt32Value $var)

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.

Generated from protobuf field .google.protobuf.UInt32Value config_version = 20;

Parameters

UInt32Value $var

Return Value

$this

at line 347
string getName()

The DNS address at which this service is available, e.g. calendar.googleapis.com.

Generated from protobuf field string name = 1;

Return Value

string

at line 360
$this setName(string $var)

The DNS address at which this service is available, e.g. calendar.googleapis.com.

Generated from protobuf field string name = 1;

Parameters

string $var

Return Value

$this

at line 376
string getId()

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.

Generated from protobuf field string id = 33;

Return Value

string

at line 390
$this setId(string $var)

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.

Generated from protobuf field string id = 33;

Parameters

string $var

Return Value

$this

at line 404
string getTitle()

The product title for this service.

Generated from protobuf field string title = 2;

Return Value

string

at line 416
$this setTitle(string $var)

The product title for this service.

Generated from protobuf field string title = 2;

Parameters

string $var

Return Value

$this

at line 430
string getProducerProjectId()

The Google project that owns this service.

Generated from protobuf field string producer_project_id = 22;

Return Value

string

at line 442
$this setProducerProjectId(string $var)

The Google project that owns this service.

Generated from protobuf field string producer_project_id = 22;

Parameters

string $var

Return Value

$this

at line 460
RepeatedField getApis()

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.

Generated from protobuf field repeated .google.protobuf.Api apis = 3;

Return Value

RepeatedField

at line 476
$this setApis(Api[]|RepeatedField $var)

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.

Generated from protobuf field repeated .google.protobuf.Api apis = 3;

Parameters

Api[]|RepeatedField $var

Return Value

$this

at line 496
RepeatedField getTypes()

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

Generated from protobuf field repeated .google.protobuf.Type types = 4;

Return Value

RepeatedField

at line 514
$this setTypes(Type[]|RepeatedField $var)

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

Generated from protobuf field repeated .google.protobuf.Type types = 4;

Parameters

Type[]|RepeatedField $var

Return Value

$this

at line 533
RepeatedField getEnums()

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

Generated from protobuf field repeated .google.protobuf.Enum enums = 5;

Return Value

RepeatedField

at line 550
$this setEnums(Enum[]|RepeatedField $var)

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

Generated from protobuf field repeated .google.protobuf.Enum enums = 5;

Parameters

Enum[]|RepeatedField $var

Return Value

$this

at line 564
Documentation getDocumentation()

Additional API documentation.

Generated from protobuf field .google.api.Documentation documentation = 6;

Return Value

Documentation

at line 576
$this setDocumentation(Documentation $var)

Additional API documentation.

Generated from protobuf field .google.api.Documentation documentation = 6;

Parameters

Documentation $var

Return Value

$this

at line 590
Backend getBackend()

API backend configuration.

Generated from protobuf field .google.api.Backend backend = 8;

Return Value

Backend

at line 602
$this setBackend(Backend $var)

API backend configuration.

Generated from protobuf field .google.api.Backend backend = 8;

Parameters

Backend $var

Return Value

$this

at line 616
Http getHttp()

HTTP configuration.

Generated from protobuf field .google.api.Http http = 9;

Return Value

Http

at line 628
$this setHttp(Http $var)

HTTP configuration.

Generated from protobuf field .google.api.Http http = 9;

Parameters

Http $var

Return Value

$this

at line 642
Quota getQuota()

Quota configuration.

Generated from protobuf field .google.api.Quota quota = 10;

Return Value

Quota

at line 654
$this setQuota(Quota $var)

Quota configuration.

Generated from protobuf field .google.api.Quota quota = 10;

Parameters

Quota $var

Return Value

$this

at line 668
Authentication getAuthentication()

Auth configuration.

Generated from protobuf field .google.api.Authentication authentication = 11;

Return Value

Authentication

at line 680
$this setAuthentication(Authentication $var)

Auth configuration.

Generated from protobuf field .google.api.Authentication authentication = 11;

Parameters

Authentication $var

Return Value

$this

at line 694
Context getContext()

Context configuration.

Generated from protobuf field .google.api.Context context = 12;

Return Value

Context

at line 706
$this setContext(Context $var)

Context configuration.

Generated from protobuf field .google.api.Context context = 12;

Parameters

Context $var

Return Value

$this

at line 720
Usage getUsage()

Configuration controlling usage of this service.

Generated from protobuf field .google.api.Usage usage = 15;

Return Value

Usage

at line 732
$this setUsage(Usage $var)

Configuration controlling usage of this service.

Generated from protobuf field .google.api.Usage usage = 15;

Parameters

Usage $var

Return Value

$this

at line 748
RepeatedField getEndpoints()

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.

Generated from protobuf field repeated .google.api.Endpoint endpoints = 18;

Return Value

RepeatedField

at line 762
$this setEndpoints(Endpoint[]|RepeatedField $var)

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.

Generated from protobuf field repeated .google.api.Endpoint endpoints = 18;

Parameters

Endpoint[]|RepeatedField $var

Return Value

$this

at line 776
Control getControl()

Configuration for the service control plane.

Generated from protobuf field .google.api.Control control = 21;

Return Value

Control

at line 788
$this setControl(Control $var)

Configuration for the service control plane.

Generated from protobuf field .google.api.Control control = 21;

Parameters

Control $var

Return Value

$this

at line 802
RepeatedField getLogs()

Defines the logs used by this service.

Generated from protobuf field repeated .google.api.LogDescriptor logs = 23;

Return Value

RepeatedField

at line 814
$this setLogs(LogDescriptor[]|RepeatedField $var)

Defines the logs used by this service.

Generated from protobuf field repeated .google.api.LogDescriptor logs = 23;

Parameters

LogDescriptor[]|RepeatedField $var

Return Value

$this

at line 828
RepeatedField getMetrics()

Defines the metrics used by this service.

Generated from protobuf field repeated .google.api.MetricDescriptor metrics = 24;

Return Value

RepeatedField

at line 840
$this setMetrics(MetricDescriptor[]|RepeatedField $var)

Defines the metrics used by this service.

Generated from protobuf field repeated .google.api.MetricDescriptor metrics = 24;

Parameters

MetricDescriptor[]|RepeatedField $var

Return Value

$this

at line 855
RepeatedField getMonitoredResources()

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 repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25;

Return Value

RepeatedField

at line 868
$this setMonitoredResources(MonitoredResourceDescriptor[]|RepeatedField $var)

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 repeated .google.api.MonitoredResourceDescriptor monitored_resources = 25;

Parameters

MonitoredResourceDescriptor[]|RepeatedField $var

Return Value

$this

at line 882
Billing getBilling()

Billing configuration.

Generated from protobuf field .google.api.Billing billing = 26;

Return Value

Billing

at line 894
$this setBilling(Billing $var)

Billing configuration.

Generated from protobuf field .google.api.Billing billing = 26;

Parameters

Billing $var

Return Value

$this

at line 908
Logging getLogging()

Logging configuration.

Generated from protobuf field .google.api.Logging logging = 27;

Return Value

Logging

at line 920
$this setLogging(Logging $var)

Logging configuration.

Generated from protobuf field .google.api.Logging logging = 27;

Parameters

Logging $var

Return Value

$this

at line 934
Monitoring getMonitoring()

Monitoring configuration.

Generated from protobuf field .google.api.Monitoring monitoring = 28;

Return Value

Monitoring

at line 946
$this setMonitoring(Monitoring $var)

Monitoring configuration.

Generated from protobuf field .google.api.Monitoring monitoring = 28;

Parameters

Monitoring $var

Return Value

$this

at line 960
SystemParameters getSystemParameters()

System parameter configuration.

Generated from protobuf field .google.api.SystemParameters system_parameters = 29;

Return Value

SystemParameters

at line 972
$this setSystemParameters(SystemParameters $var)

System parameter configuration.

Generated from protobuf field .google.api.SystemParameters system_parameters = 29;

Parameters

SystemParameters $var

Return Value

$this

at line 986
SourceInfo getSourceInfo()

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

Generated from protobuf field .google.api.SourceInfo source_info = 37;

Return Value

SourceInfo

at line 998
$this setSourceInfo(SourceInfo $var)

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

Generated from protobuf field .google.api.SourceInfo source_info = 37;

Parameters

SourceInfo $var

Return Value

$this

at line 1012
Experimental getExperimental()

Experimental configuration.

Generated from protobuf field .google.api.Experimental experimental = 101;

Return Value

Experimental

at line 1024
$this setExperimental(Experimental $var)

Experimental configuration.

Generated from protobuf field .google.api.Experimental experimental = 101;

Parameters

Experimental $var

Return Value

$this