# Service Usage V1 API - Class Google::Protobuf::Api (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.1 0.7.0 0.6.2 0.5.0 0.4.0 0.3.1 0.2.1 0.1.4 Reference documentation and code samples for the Service Usage V1 API class Google::Protobuf::Api.

Api is a light-weight descriptor for an API Interface.


<br />

Interfaces are also described as "protocol buffer services" in some contexts,
such as by the "service" keyword in a .proto file, but they are different
from API Services, which represent a concrete implementation of an interface
as opposed to simply a description of methods and bindings. They are also
sometimes simply referred to as "APIs" in other contexts, such as the name of
this message itself. See <https://cloud.google.com/apis/design/glossary> for
detailed terminology.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #methods

    def methods() -> ::Array<::Google::Protobuf::Method>

**Returns**

- (::Array\<[::Google::Protobuf::Method](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_usage-v1/latest/Google-Protobuf-Method)\>) --- The methods of this interface, in unspecified order.

### #methods=

    def methods=(value) -> ::Array<::Google::Protobuf::Method>

**Parameter**

- **value** (::Array\<[::Google::Protobuf::Method](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_usage-v1/latest/Google-Protobuf-Method)\>) --- The methods of this interface, in unspecified order.
**Returns**

- (::Array\<[::Google::Protobuf::Method](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_usage-v1/latest/Google-Protobuf-Method)\>) --- The methods of this interface, in unspecified order.

### #mixins

    def mixins() -> ::Array<::Google::Protobuf::Mixin>

**Returns**

- (::Array\<[::Google::Protobuf::Mixin](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_usage-v1/latest/Google-Protobuf-Mixin)\>) --- Included interfaces. See \[Mixin\]\[\].

### #mixins=

    def mixins=(value) -> ::Array<::Google::Protobuf::Mixin>

**Parameter**

- **value** (::Array\<[::Google::Protobuf::Mixin](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_usage-v1/latest/Google-Protobuf-Mixin)\>) --- Included interfaces. See \[Mixin\]\[\].
**Returns**

- (::Array\<[::Google::Protobuf::Mixin](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_usage-v1/latest/Google-Protobuf-Mixin)\>) --- Included interfaces. See \[Mixin\]\[\].

### #name

    def name() -> ::String

**Returns**

- (::String) --- The fully qualified name of this interface, including package name followed by the interface's simple name.

### #name=

    def name=(value) -> ::String

**Parameter**

- **value** (::String) --- The fully qualified name of this interface, including package name followed by the interface's simple name.
**Returns**

- (::String) --- The fully qualified name of this interface, including package name followed by the interface's simple name.

### #options

    def options() -> ::Array<::Google::Protobuf::Option>

**Returns**

- (::Array\<[::Google::Protobuf::Option](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_usage-v1/latest/Google-Protobuf-Option)\>) --- Any metadata attached to the interface.

### #options=

    def options=(value) -> ::Array<::Google::Protobuf::Option>

**Parameter**

- **value** (::Array\<[::Google::Protobuf::Option](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_usage-v1/latest/Google-Protobuf-Option)\>) --- Any metadata attached to the interface.
**Returns**

- (::Array\<[::Google::Protobuf::Option](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_usage-v1/latest/Google-Protobuf-Option)\>) --- Any metadata attached to the interface.

### #source_context

    def source_context() -> ::Google::Protobuf::SourceContext

**Returns**

- ([::Google::Protobuf::SourceContext](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_usage-v1/latest/Google-Protobuf-SourceContext)) --- Source context for the protocol buffer service represented by this message.

### #source_context=

    def source_context=(value) -> ::Google::Protobuf::SourceContext

**Parameter**

- **value** ([::Google::Protobuf::SourceContext](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_usage-v1/latest/Google-Protobuf-SourceContext)) --- Source context for the protocol buffer service represented by this message.
**Returns**

- ([::Google::Protobuf::SourceContext](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_usage-v1/latest/Google-Protobuf-SourceContext)) --- Source context for the protocol buffer service represented by this message.

### #syntax

    def syntax() -> ::Google::Protobuf::Syntax

**Returns**

- ([::Google::Protobuf::Syntax](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_usage-v1/latest/Google-Protobuf-Syntax)) --- The source syntax of the service.

### #syntax=

    def syntax=(value) -> ::Google::Protobuf::Syntax

**Parameter**

- **value** ([::Google::Protobuf::Syntax](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_usage-v1/latest/Google-Protobuf-Syntax)) --- The source syntax of the service.
**Returns**

- ([::Google::Protobuf::Syntax](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_usage-v1/latest/Google-Protobuf-Syntax)) --- The source syntax of the service.

### #version

    def version() -> ::String

**Returns**

- (::String) --- A version string for this interface. If specified, must have the form `major-version.minor-version`, as in `1.10`. If the minor version is omitted, it defaults to zero. If the entire version field is empty, the major version is derived from the package name, as outlined below. If the field is not empty, the version in the package name will be verified to be consistent with what is provided here.


  The versioning schema uses [semantic
  versioning](http://semver.org) where the major version number
  indicates a breaking change and the minor version an additive,
  non-breaking change. Both version numbers are signals to users
  what to expect from different versions, and should be carefully
  chosen based on the product plan.

  The major version is also reflected in the package name of the
  interface, which must end in `v<major-version>`, as in
  `google.feature.v1`. For major versions 0 and 1, the suffix can
  be omitted. Zero major versions must only be used for
  experimental, non-GA interfaces.

### #version=

    def version=(value) -> ::String

**Parameter**

- **value** (::String) --- A version string for this interface. If specified, must have the form `major-version.minor-version`, as in `1.10`. If the minor version is omitted, it defaults to zero. If the entire version field is empty, the major version is derived from the package name, as outlined below. If the field is not empty, the version in the package name will be verified to be consistent with what is provided here.


  The versioning schema uses [semantic
  versioning](http://semver.org) where the major version number
  indicates a breaking change and the minor version an additive,
  non-breaking change. Both version numbers are signals to users
  what to expect from different versions, and should be carefully
  chosen based on the product plan.

  The major version is also reflected in the package name of the
  interface, which must end in `v<major-version>`, as in
  `google.feature.v1`. For major versions 0 and 1, the suffix can
  be omitted. Zero major versions must only be used for
  experimental, non-GA interfaces.
**Returns**

- (::String) --- A version string for this interface. If specified, must have the form `major-version.minor-version`, as in `1.10`. If the minor version is omitted, it defaults to zero. If the entire version field is empty, the major version is derived from the package name, as outlined below. If the field is not empty, the version in the package name will be verified to be consistent with what is provided here.


  The versioning schema uses [semantic
  versioning](http://semver.org) where the major version number
  indicates a breaking change and the minor version an additive,
  non-breaking change. Both version numbers are signals to users
  what to expect from different versions, and should be carefully
  chosen based on the product plan.

  The major version is also reflected in the package name of the
  interface, which must end in `v<major-version>`, as in
  `google.feature.v1`. For major versions 0 and 1, the suffix can
  be omitted. Zero major versions must only be used for
  experimental, non-GA interfaces.