# Service Usage V1 API - Class Google::Cloud::ServiceUsage::V1::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.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::Cloud::ServiceUsage::V1::Service.

A service that is available for use by the consumer.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #config

    def config() -> ::Google::Cloud::ServiceUsage::V1::ServiceConfig

**Returns**

- ([::Google::Cloud::ServiceUsage::V1::ServiceConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_usage-v1/latest/Google-Cloud-ServiceUsage-V1-ServiceConfig)) --- The service configuration of the available service. Some fields may be filtered out of the configuration in responses to the `ListServices` method. These fields are present only in responses to the `GetService` method.

### #config=

    def config=(value) -> ::Google::Cloud::ServiceUsage::V1::ServiceConfig

**Parameter**

- **value** ([::Google::Cloud::ServiceUsage::V1::ServiceConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_usage-v1/latest/Google-Cloud-ServiceUsage-V1-ServiceConfig)) --- The service configuration of the available service. Some fields may be filtered out of the configuration in responses to the `ListServices` method. These fields are present only in responses to the `GetService` method.
**Returns**

- ([::Google::Cloud::ServiceUsage::V1::ServiceConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_usage-v1/latest/Google-Cloud-ServiceUsage-V1-ServiceConfig)) --- The service configuration of the available service. Some fields may be filtered out of the configuration in responses to the `ListServices` method. These fields are present only in responses to the `GetService` method.

### #name

    def name() -> ::String

**Returns**

- (::String) --- The resource name of the consumer and service.

  A valid name would be:
  - projects/123/services/serviceusage.googleapis.com

### #name=

    def name=(value) -> ::String

**Parameter**

- **value** (::String) ---

  The resource name of the consumer and service.

  A valid name would be:
  - projects/123/services/serviceusage.googleapis.com
**Returns**

- (::String) --- The resource name of the consumer and service.

  A valid name would be:
  - projects/123/services/serviceusage.googleapis.com

### #parent

    def parent() -> ::String

**Returns**

- (::String) --- The resource name of the consumer.

  A valid name would be:
  - projects/123

### #parent=

    def parent=(value) -> ::String

**Parameter**

- **value** (::String) ---

  The resource name of the consumer.

  A valid name would be:
  - projects/123
**Returns**

- (::String) --- The resource name of the consumer.

  A valid name would be:
  - projects/123

### #state

    def state() -> ::Google::Cloud::ServiceUsage::V1::State

**Returns**

- ([::Google::Cloud::ServiceUsage::V1::State](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_usage-v1/latest/Google-Cloud-ServiceUsage-V1-State)) --- Whether or not the service has been enabled for use by the consumer.

### #state=

    def state=(value) -> ::Google::Cloud::ServiceUsage::V1::State

**Parameter**

- **value** ([::Google::Cloud::ServiceUsage::V1::State](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_usage-v1/latest/Google-Cloud-ServiceUsage-V1-State)) --- Whether or not the service has been enabled for use by the consumer.
**Returns**

- ([::Google::Cloud::ServiceUsage::V1::State](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_usage-v1/latest/Google-Cloud-ServiceUsage-V1-State)) --- Whether or not the service has been enabled for use by the consumer.