Reference documentation and code samples for the Google API Common Protos Client class Service.
Service
is the root object of Google API service configuration (service
config). It describes the basic information about a logical service,
such as the service name and the user-facing 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.
For more information, see each proto message definition. Example: type: google.api.Service name: calendar.googleapis.com title: Google Calendar API apis:
- name: google.calendar.v3.Calendar
visibility:
rules:
- selector: "google.calendar.v3.*" restriction: PREVIEW backend: rules:
- selector: "google.calendar.v3.*" address: calendar.example.com 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
Namespace
Google \ ApiMethods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ name |
string
The service name, which is a DNS-like logical identifier for the service, such as |
↳ title |
string
The product title for this service, it is the name displayed in Google Cloud Console. |
↳ producer_project_id |
string
The Google project that owns this service. |
↳ id |
string
A unique ID for a specific instance of this message, typically assigned by the client for tracking purpose. Must be no longer than 63 characters and only lower case letters, digits, '.', '_' and '-' are allowed. If empty, the server may choose to generate one instead. |
↳ apis |
array<Google\Protobuf\Api>
A list of API interfaces exported by this service. Only the |
↳ types |
array<Google\Protobuf\Type>
A list of all proto message types included in this API service. Types referenced directly or indirectly by the |
↳ enums |
array<Google\Protobuf\Enum>
A list of all enum types included in this API service. Enums referenced directly or indirectly by the |
↳ documentation |
Google\Api\Documentation
Additional API documentation. |
↳ backend |
Google\Api\Backend
API backend configuration. |
↳ http |
Google\Api\Http
HTTP configuration. |
↳ quota |
Google\Api\Quota
Quota configuration. |
↳ authentication |
Google\Api\Authentication
Auth configuration. |
↳ context |
Google\Api\Context
Context configuration. |
↳ usage |
Google\Api\Usage
Configuration controlling usage of this service. |
↳ endpoints |
array<Google\Api\Endpoint>
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. |
↳ control |
Google\Api\Control
Configuration for the service control plane. |
↳ logs |
array<Google\Api\LogDescriptor>
Defines the logs used by this service. |
↳ metrics |
array<Google\Api\MetricDescriptor>
Defines the metrics used by this service. |
↳ monitored_resources |
array<Google\Api\MonitoredResourceDescriptor>
Defines the monitored resources used by this service. This is required by the Service.monitoring and Service.logging configurations. |
↳ billing |
Google\Api\Billing
Billing configuration. |
↳ logging |
Google\Api\Logging
Logging configuration. |
↳ monitoring |
Google\Api\Monitoring
Monitoring configuration. |
↳ system_parameters |
Google\Api\SystemParameters
System parameter configuration. |
↳ source_info |
Google\Api\SourceInfo
Output only. The source information for this configuration if available. |
↳ publishing |
Google\Api\Publishing
Settings for Google Cloud Client libraries generated from APIs defined as protocol buffers. |
↳ config_version |
Google\Protobuf\UInt32Value
Obsolete. Do not use. This field has no semantic meaning. The service config compiler always sets this field to |
getName
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.
Returns | |
---|---|
Type | Description |
string |
setName
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.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getTitle
The product title for this service, it is the name displayed in Google Cloud Console.
Returns | |
---|---|
Type | Description |
string |
setTitle
The product title for this service, it is the name displayed in Google Cloud Console.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getProducerProjectId
The Google project that owns this service.
Returns | |
---|---|
Type | Description |
string |
setProducerProjectId
The Google project that owns this service.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getId
A unique ID for a specific instance of this message, typically assigned by the client for tracking purpose. Must be no longer than 63 characters and only lower case letters, digits, '.', '_' and '-' are allowed. If empty, the server may choose to generate one instead.
Returns | |
---|---|
Type | Description |
string |
setId
A unique ID for a specific instance of this message, typically assigned by the client for tracking purpose. Must be no longer than 63 characters and only lower case letters, digits, '.', '_' and '-' are allowed. If empty, the server may choose to generate one instead.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getApis
A list of API interfaces exported by this service. Only the name
field
of the 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.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
setApis
A list of API interfaces exported by this service. Only the name
field
of the 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.
Parameter | |
---|---|
Name | Description |
var |
array<Google\Protobuf\Api>
|
Returns | |
---|---|
Type | Description |
$this |
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 by the configuration author. Example:
types:
- name: google.protobuf.Int32
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
setTypes
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 by the configuration author. Example:
types:
- name: google.protobuf.Int32
Parameter | |
---|---|
Name | Description |
var |
array<Google\Protobuf\Type>
|
Returns | |
---|---|
Type | Description |
$this |
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 by the configuration author. Example:
enums:
- name: google.someapi.v1.SomeEnum
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
setEnums
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 by the configuration author. Example:
enums:
- name: google.someapi.v1.SomeEnum
Parameter | |
---|---|
Name | Description |
var |
array<Google\Protobuf\Enum>
|
Returns | |
---|---|
Type | Description |
$this |
getDocumentation
Additional API documentation.
Returns | |
---|---|
Type | Description |
Google\Api\Documentation|null |
hasDocumentation
clearDocumentation
setDocumentation
Additional API documentation.
Parameter | |
---|---|
Name | Description |
var |
Google\Api\Documentation
|
Returns | |
---|---|
Type | Description |
$this |
getBackend
API backend configuration.
Returns | |
---|---|
Type | Description |
Google\Api\Backend|null |
hasBackend
clearBackend
setBackend
API backend configuration.
Parameter | |
---|---|
Name | Description |
var |
Google\Api\Backend
|
Returns | |
---|---|
Type | Description |
$this |
getHttp
HTTP configuration.
Returns | |
---|---|
Type | Description |
Google\Api\Http|null |
hasHttp
clearHttp
setHttp
HTTP configuration.
Parameter | |
---|---|
Name | Description |
var |
Google\Api\Http
|
Returns | |
---|---|
Type | Description |
$this |
getQuota
Quota configuration.
Returns | |
---|---|
Type | Description |
Google\Api\Quota|null |
hasQuota
clearQuota
setQuota
Quota configuration.
Parameter | |
---|---|
Name | Description |
var |
Google\Api\Quota
|
Returns | |
---|---|
Type | Description |
$this |
getAuthentication
Auth configuration.
Returns | |
---|---|
Type | Description |
Google\Api\Authentication|null |
hasAuthentication
clearAuthentication
setAuthentication
Auth configuration.
Parameter | |
---|---|
Name | Description |
var |
Google\Api\Authentication
|
Returns | |
---|---|
Type | Description |
$this |
getContext
Context configuration.
Returns | |
---|---|
Type | Description |
Google\Api\Context|null |
hasContext
clearContext
setContext
Context configuration.
Parameter | |
---|---|
Name | Description |
var |
Google\Api\Context
|
Returns | |
---|---|
Type | Description |
$this |
getUsage
Configuration controlling usage of this service.
Returns | |
---|---|
Type | Description |
Google\Api\Usage|null |
hasUsage
clearUsage
setUsage
Configuration controlling usage of this service.
Parameter | |
---|---|
Name | Description |
var |
Google\Api\Usage
|
Returns | |
---|---|
Type | Description |
$this |
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.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
setEndpoints
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.
Parameter | |
---|---|
Name | Description |
var |
array<Google\Api\Endpoint>
|
Returns | |
---|---|
Type | Description |
$this |
getControl
Configuration for the service control plane.
Returns | |
---|---|
Type | Description |
Google\Api\Control|null |
hasControl
clearControl
setControl
Configuration for the service control plane.
Parameter | |
---|---|
Name | Description |
var |
Google\Api\Control
|
Returns | |
---|---|
Type | Description |
$this |
getLogs
Defines the logs used by this service.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
setLogs
Defines the logs used by this service.
Parameter | |
---|---|
Name | Description |
var |
array<Google\Api\LogDescriptor>
|
Returns | |
---|---|
Type | Description |
$this |
getMetrics
Defines the metrics used by this service.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
setMetrics
Defines the metrics used by this service.
Parameter | |
---|---|
Name | Description |
var |
array<Google\Api\MetricDescriptor>
|
Returns | |
---|---|
Type | Description |
$this |
getMonitoredResources
Defines the monitored resources used by this service. This is required by the Service.monitoring and Service.logging configurations.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
setMonitoredResources
Defines the monitored resources used by this service. This is required by the Service.monitoring and Service.logging configurations.
Parameter | |
---|---|
Name | Description |
var |
array<Google\Api\MonitoredResourceDescriptor>
|
Returns | |
---|---|
Type | Description |
$this |
getBilling
Billing configuration.
Returns | |
---|---|
Type | Description |
Google\Api\Billing|null |
hasBilling
clearBilling
setBilling
Billing configuration.
Parameter | |
---|---|
Name | Description |
var |
Google\Api\Billing
|
Returns | |
---|---|
Type | Description |
$this |
getLogging
Logging configuration.
Returns | |
---|---|
Type | Description |
Google\Api\Logging|null |
hasLogging
clearLogging
setLogging
Logging configuration.
Parameter | |
---|---|
Name | Description |
var |
Google\Api\Logging
|
Returns | |
---|---|
Type | Description |
$this |
getMonitoring
Monitoring configuration.
Returns | |
---|---|
Type | Description |
Google\Api\Monitoring|null |
hasMonitoring
clearMonitoring
setMonitoring
Monitoring configuration.
Parameter | |
---|---|
Name | Description |
var |
Google\Api\Monitoring
|
Returns | |
---|---|
Type | Description |
$this |
getSystemParameters
System parameter configuration.
Returns | |
---|---|
Type | Description |
Google\Api\SystemParameters|null |
hasSystemParameters
clearSystemParameters
setSystemParameters
System parameter configuration.
Parameter | |
---|---|
Name | Description |
var |
Google\Api\SystemParameters
|
Returns | |
---|---|
Type | Description |
$this |
getSourceInfo
Output only. The source information for this configuration if available.
Returns | |
---|---|
Type | Description |
Google\Api\SourceInfo|null |
hasSourceInfo
clearSourceInfo
setSourceInfo
Output only. The source information for this configuration if available.
Parameter | |
---|---|
Name | Description |
var |
Google\Api\SourceInfo
|
Returns | |
---|---|
Type | Description |
$this |
getPublishing
Settings for Google Cloud Client libraries generated from APIs defined as protocol buffers.
Returns | |
---|---|
Type | Description |
Google\Api\Publishing|null |
hasPublishing
clearPublishing
setPublishing
Settings for Google Cloud Client libraries generated from APIs defined as protocol buffers.
Parameter | |
---|---|
Name | Description |
var |
Google\Api\Publishing
|
Returns | |
---|---|
Type | Description |
$this |
getConfigVersion
Obsolete. Do not use.
This field has no semantic meaning. The service config compiler always
sets this field to 3
.
Returns | |
---|---|
Type | Description |
Google\Protobuf\UInt32Value|null |
hasConfigVersion
clearConfigVersion
getConfigVersionUnwrapped
Returns the unboxed value from getConfigVersion()
Obsolete. Do not use.
This field has no semantic meaning. The service config compiler always
sets this field to 3
.
Returns | |
---|---|
Type | Description |
int|null |
setConfigVersion
Obsolete. Do not use.
This field has no semantic meaning. The service config compiler always
sets this field to 3
.
Parameter | |
---|---|
Name | Description |
var |
Google\Protobuf\UInt32Value
|
Returns | |
---|---|
Type | Description |
$this |
setConfigVersionUnwrapped
Sets the field by wrapping a primitive type in a Google\Protobuf\UInt32Value object.
Obsolete. Do not use.
This field has no semantic meaning. The service config compiler always
sets this field to 3
.
Parameter | |
---|---|
Name | Description |
var |
int|null
|
Returns | |
---|---|
Type | Description |
$this |