# Service Management V1 API - Class Google::Api::Service (v1.8.0)

1.8.0 (latest) 1.7.1 1.6.0 1.5.1 1.4.0 1.3.0 1.2.1 1.1.0 1.0.2 0.11.0 0.10.2 0.9.0 0.8.0 0.7.0 0.6.1 0.5.0 0.4.1 0.3.10 Reference documentation and code samples for the Service Management V1 API class Google::Api::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

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #apis

    def apis() -> ::Array<::Google::Protobuf::Api>

**Returns**

- (::Array\<[::Google::Protobuf::Api](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Protobuf-Api)\>) --- A list of API interfaces exported by this service. Only the `name` field of the [google.protobuf.Api](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Protobuf-Api "Google::Protobuf::Api (class)") 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.

### #apis=

    def apis=(value) -> ::Array<::Google::Protobuf::Api>

**Parameter**

- **value** (::Array\<[::Google::Protobuf::Api](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Protobuf-Api)\>) --- A list of API interfaces exported by this service. Only the `name` field of the [google.protobuf.Api](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Protobuf-Api "Google::Protobuf::Api (class)") 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**

- (::Array\<[::Google::Protobuf::Api](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Protobuf-Api)\>) --- A list of API interfaces exported by this service. Only the `name` field of the [google.protobuf.Api](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Protobuf-Api "Google::Protobuf::Api (class)") 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.

### #authentication

    def authentication() -> ::Google::Api::Authentication

**Returns**

- ([::Google::Api::Authentication](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Api-Authentication)) --- Auth configuration.

### #authentication=

    def authentication=(value) -> ::Google::Api::Authentication

**Parameter**

- **value** ([::Google::Api::Authentication](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Api-Authentication)) --- Auth configuration.
**Returns**

- ([::Google::Api::Authentication](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Api-Authentication)) --- Auth configuration.

### #backend

    def backend() -> ::Google::Api::Backend

**Returns**

- ([::Google::Api::Backend](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Api-Backend)) --- API backend configuration.

### #backend=

    def backend=(value) -> ::Google::Api::Backend

**Parameter**

- **value** ([::Google::Api::Backend](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Api-Backend)) --- API backend configuration.
**Returns**

- ([::Google::Api::Backend](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Api-Backend)) --- API backend configuration.

### #billing

    def billing() -> ::Google::Api::Billing

**Returns**

- ([::Google::Api::Billing](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Api-Billing)) --- Billing configuration.

### #billing=

    def billing=(value) -> ::Google::Api::Billing

**Parameter**

- **value** ([::Google::Api::Billing](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Api-Billing)) --- Billing configuration.
**Returns**

- ([::Google::Api::Billing](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Api-Billing)) --- Billing configuration.

### #config_version

    def config_version() -> ::Google::Protobuf::UInt32Value

**Returns**

- ([::Google::Protobuf::UInt32Value](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Protobuf-UInt32Value)) --- Obsolete. Do not use.


  This field has no semantic meaning. The service config compiler always
  sets this field to `3`.

### #config_version=

    def config_version=(value) -> ::Google::Protobuf::UInt32Value

**Parameter**

- **value** ([::Google::Protobuf::UInt32Value](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Protobuf-UInt32Value)) --- Obsolete. Do not use.


  This field has no semantic meaning. The service config compiler always
  sets this field to `3`.
**Returns**

- ([::Google::Protobuf::UInt32Value](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Protobuf-UInt32Value)) --- Obsolete. Do not use.


  This field has no semantic meaning. The service config compiler always
  sets this field to `3`.

### #context

    def context() -> ::Google::Api::Context

**Returns**

- ([::Google::Api::Context](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Api-Context)) --- Context configuration.

### #context=

    def context=(value) -> ::Google::Api::Context

**Parameter**

- **value** ([::Google::Api::Context](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Api-Context)) --- Context configuration.
**Returns**

- ([::Google::Api::Context](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Api-Context)) --- Context configuration.

### #control

    def control() -> ::Google::Api::Control

**Returns**

- ([::Google::Api::Control](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Api-Control)) --- Configuration for the service control plane.

### #control=

    def control=(value) -> ::Google::Api::Control

**Parameter**

- **value** ([::Google::Api::Control](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Api-Control)) --- Configuration for the service control plane.
**Returns**

- ([::Google::Api::Control](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Api-Control)) --- Configuration for the service control plane.

### #documentation

    def documentation() -> ::Google::Api::Documentation

**Returns**

- ([::Google::Api::Documentation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Api-Documentation)) --- Additional API documentation.

### #documentation=

    def documentation=(value) -> ::Google::Api::Documentation

**Parameter**

- **value** ([::Google::Api::Documentation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Api-Documentation)) --- Additional API documentation.
**Returns**

- ([::Google::Api::Documentation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Api-Documentation)) --- Additional API documentation.

### #endpoints

    def endpoints() -> ::Array<::Google::Api::Endpoint>

**Returns**

- (::Array\<[::Google::Api::Endpoint](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/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.

### #endpoints=

    def endpoints=(value) -> ::Array<::Google::Api::Endpoint>

**Parameter**

- **value** (::Array\<[::Google::Api::Endpoint](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/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.
**Returns**

- (::Array\<[::Google::Api::Endpoint](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/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.

### #enums

    def enums() -> ::Array<::Google::Protobuf::Enum>

**Returns**

- (::Array\<[::Google::Protobuf::Enum](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Protobuf-Enum)\>) ---

  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

### #enums=

    def enums=(value) -> ::Array<::Google::Protobuf::Enum>

**Parameter**

- **value** (::Array\<[::Google::Protobuf::Enum](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Protobuf-Enum)\>) ---

  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**

- (::Array\<[::Google::Protobuf::Enum](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Protobuf-Enum)\>) ---

  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

### #http

    def http() -> ::Google::Api::Http

**Returns**

- (::Google::Api::Http) --- HTTP configuration.

### #http=

    def http=(value) -> ::Google::Api::Http

**Parameter**

- **value** (::Google::Api::Http) --- HTTP configuration.
**Returns**

- (::Google::Api::Http) --- HTTP configuration.

### #id

    def id() -> ::String

**Returns**

- (::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.

### #id=

    def id=(value) -> ::String

**Parameter**

- **value** (::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.
**Returns**

- (::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.

### #logging

    def logging() -> ::Google::Api::Logging

**Returns**

- ([::Google::Api::Logging](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Api-Logging)) --- Logging configuration.

### #logging=

    def logging=(value) -> ::Google::Api::Logging

**Parameter**

- **value** ([::Google::Api::Logging](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Api-Logging)) --- Logging configuration.
**Returns**

- ([::Google::Api::Logging](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Api-Logging)) --- Logging configuration.

### #logs

    def logs() -> ::Array<::Google::Api::LogDescriptor>

**Returns**

- (::Array\<[::Google::Api::LogDescriptor](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Api-LogDescriptor)\>) --- Defines the logs used by this service.

### #logs=

    def logs=(value) -> ::Array<::Google::Api::LogDescriptor>

**Parameter**

- **value** (::Array\<[::Google::Api::LogDescriptor](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Api-LogDescriptor)\>) --- Defines the logs used by this service.
**Returns**

- (::Array\<[::Google::Api::LogDescriptor](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Api-LogDescriptor)\>) --- Defines the logs used by this service.

### #metrics

    def metrics() -> ::Array<::Google::Api::MetricDescriptor>

**Returns**

- (::Array\<[::Google::Api::MetricDescriptor](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Api-MetricDescriptor)\>) --- Defines the metrics used by this service.

### #metrics=

    def metrics=(value) -> ::Array<::Google::Api::MetricDescriptor>

**Parameter**

- **value** (::Array\<[::Google::Api::MetricDescriptor](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Api-MetricDescriptor)\>) --- Defines the metrics used by this service.
**Returns**

- (::Array\<[::Google::Api::MetricDescriptor](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Api-MetricDescriptor)\>) --- Defines the metrics used by this service.

### #monitored_resources

    def monitored_resources() -> ::Array<::Google::Api::MonitoredResourceDescriptor>

**Returns**

- (::Array\<[::Google::Api::MonitoredResourceDescriptor](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Api-MonitoredResourceDescriptor)\>) --- Defines the monitored resources used by this service. This is required by the `Service.monitoring` and `Service.logging` configurations.

### #monitored_resources=

    def monitored_resources=(value) -> ::Array<::Google::Api::MonitoredResourceDescriptor>

**Parameter**

- **value** (::Array\<[::Google::Api::MonitoredResourceDescriptor](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Api-MonitoredResourceDescriptor)\>) --- Defines the monitored resources used by this service. This is required by the `Service.monitoring` and `Service.logging` configurations.
**Returns**

- (::Array\<[::Google::Api::MonitoredResourceDescriptor](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Api-MonitoredResourceDescriptor)\>) --- Defines the monitored resources used by this service. This is required by the `Service.monitoring` and `Service.logging` configurations.

### #monitoring

    def monitoring() -> ::Google::Api::Monitoring

**Returns**

- ([::Google::Api::Monitoring](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Api-Monitoring)) --- Monitoring configuration.

### #monitoring=

    def monitoring=(value) -> ::Google::Api::Monitoring

**Parameter**

- **value** ([::Google::Api::Monitoring](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Api-Monitoring)) --- Monitoring configuration.
**Returns**

- ([::Google::Api::Monitoring](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Api-Monitoring)) --- Monitoring configuration.

### #name

    def name() -> ::String

**Returns**

- (::String) --- 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.

### #name=

    def name=(value) -> ::String

**Parameter**

- **value** (::String) --- 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**

- (::String) --- 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.

### #producer_project_id

    def producer_project_id() -> ::String

**Returns**

- (::String) --- The Google project that owns this service.

### #producer_project_id=

    def producer_project_id=(value) -> ::String

**Parameter**

- **value** (::String) --- The Google project that owns this service.
**Returns**

- (::String) --- The Google project that owns this service.

### #publishing

    def publishing() -> ::Google::Api::Publishing

**Returns**

- ([::Google::Api::Publishing](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Api-Publishing)) --- Settings for [Google Cloud Client
  libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) generated from APIs defined as protocol buffers.

### #publishing=

    def publishing=(value) -> ::Google::Api::Publishing

**Parameter**

- **value** ([::Google::Api::Publishing](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Api-Publishing)) --- Settings for [Google Cloud Client
  libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) generated from APIs defined as protocol buffers.
**Returns**

- ([::Google::Api::Publishing](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Api-Publishing)) --- Settings for [Google Cloud Client
  libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) generated from APIs defined as protocol buffers.

### #quota

    def quota() -> ::Google::Api::Quota

**Returns**

- ([::Google::Api::Quota](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Api-Quota)) --- Quota configuration.

### #quota=

    def quota=(value) -> ::Google::Api::Quota

**Parameter**

- **value** ([::Google::Api::Quota](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Api-Quota)) --- Quota configuration.
**Returns**

- ([::Google::Api::Quota](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Api-Quota)) --- Quota configuration.

### #source_info

    def source_info() -> ::Google::Api::SourceInfo

**Returns**

- ([::Google::Api::SourceInfo](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Api-SourceInfo)) --- Output only. The source information for this configuration if available.

### #source_info=

    def source_info=(value) -> ::Google::Api::SourceInfo

**Parameter**

- **value** ([::Google::Api::SourceInfo](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Api-SourceInfo)) --- Output only. The source information for this configuration if available.
**Returns**

- ([::Google::Api::SourceInfo](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Api-SourceInfo)) --- Output only. The source information for this configuration if available.

### #system_parameters

    def system_parameters() -> ::Google::Api::SystemParameters

**Returns**

- ([::Google::Api::SystemParameters](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Api-SystemParameters)) --- System parameter configuration.

### #system_parameters=

    def system_parameters=(value) -> ::Google::Api::SystemParameters

**Parameter**

- **value** ([::Google::Api::SystemParameters](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Api-SystemParameters)) --- System parameter configuration.
**Returns**

- ([::Google::Api::SystemParameters](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Api-SystemParameters)) --- System parameter configuration.

### #title

    def title() -> ::String

**Returns**

- (::String) --- The product title for this service, it is the name displayed in Google Cloud Console.

### #title=

    def title=(value) -> ::String

**Parameter**

- **value** (::String) --- The product title for this service, it is the name displayed in Google Cloud Console.
**Returns**

- (::String) --- The product title for this service, it is the name displayed in Google Cloud Console.

### #types

    def types() -> ::Array<::Google::Protobuf::Type>

**Returns**

- (::Array\<[::Google::Protobuf::Type](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Protobuf-Type)\>) ---

  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

### #types=

    def types=(value) -> ::Array<::Google::Protobuf::Type>

**Parameter**

- **value** (::Array\<[::Google::Protobuf::Type](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Protobuf-Type)\>) ---

  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**

- (::Array\<[::Google::Protobuf::Type](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Protobuf-Type)\>) ---

  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

### #usage

    def usage() -> ::Google::Api::Usage

**Returns**

- ([::Google::Api::Usage](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Api-Usage)) --- Configuration controlling usage of this service.

### #usage=

    def usage=(value) -> ::Google::Api::Usage

**Parameter**

- **value** ([::Google::Api::Usage](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Api-Usage)) --- Configuration controlling usage of this service.
**Returns**

- ([::Google::Api::Usage](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest/Google-Api-Usage)) --- Configuration controlling usage of this service.