# Eventarc V1 API - Class Google::Cloud::Eventarc::V1::GoogleApiSource (v2.8.0)

2.8.0 (latest) 2.7.1 2.6.0 2.5.0 2.4.1 2.3.0 2.2.0 2.1.0 2.0.1 1.3.0 1.2.0 1.1.0 1.0.1 0.10.0 0.9.2 0.8.0 0.7.0 0.6.0 0.5.0 0.4.0 0.3.0 0.2.1 0.1.4 Reference documentation and code samples for the Eventarc V1 API class Google::Cloud::Eventarc::V1::GoogleApiSource.

A GoogleApiSource represents a subscription of 1P events from a MessageBus.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #annotations

    def annotations() -> ::Google::Protobuf::Map{::String => ::String}

**Returns**

- (::Google::Protobuf::Map{::String =\> ::String}) --- Optional. Resource annotations.

### #annotations=

    def annotations=(value) -> ::Google::Protobuf::Map{::String => ::String}

**Parameter**

- **value** (::Google::Protobuf::Map{::String =\> ::String}) --- Optional. Resource annotations.
**Returns**

- (::Google::Protobuf::Map{::String =\> ::String}) --- Optional. Resource annotations.

### #create_time

    def create_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-eventarc-v1/latest/Google-Protobuf-Timestamp)) --- Output only. The creation time.

### #crypto_key_name

    def crypto_key_name() -> ::String

**Returns**

- (::String) --- Optional. Resource name of a KMS crypto key (managed by the user) used to encrypt/decrypt their event data.

  It must match the pattern
  `projects/*/locations/*/keyRings/*/cryptoKeys/*`.

### #crypto_key_name=

    def crypto_key_name=(value) -> ::String

**Parameter**

- **value** (::String) --- Optional. Resource name of a KMS crypto key (managed by the user) used to encrypt/decrypt their event data.


  It must match the pattern
  `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
**Returns**

- (::String) --- Optional. Resource name of a KMS crypto key (managed by the user) used to encrypt/decrypt their event data.

  It must match the pattern
  `projects/*/locations/*/keyRings/*/cryptoKeys/*`.

### #destination

    def destination() -> ::String

**Returns**

- (::String) --- Required. Destination is the message bus that the GoogleApiSource is delivering to. It must be point to the full resource name of a MessageBus. Format: "projects/{PROJECT_ID}/locations/{region}/messagesBuses/{MESSAGE_BUS_ID)

### #destination=

    def destination=(value) -> ::String

**Parameter**

- **value** (::String) --- Required. Destination is the message bus that the GoogleApiSource is delivering to. It must be point to the full resource name of a MessageBus. Format: "projects/{PROJECT_ID}/locations/{region}/messagesBuses/{MESSAGE_BUS_ID)
**Returns**

- (::String) --- Required. Destination is the message bus that the GoogleApiSource is delivering to. It must be point to the full resource name of a MessageBus. Format: "projects/{PROJECT_ID}/locations/{region}/messagesBuses/{MESSAGE_BUS_ID)

### #display_name

    def display_name() -> ::String

**Returns**

- (::String) --- Optional. Resource display name.

### #display_name=

    def display_name=(value) -> ::String

**Parameter**

- **value** (::String) --- Optional. Resource display name.
**Returns**

- (::String) --- Optional. Resource display name.

### #etag

    def etag() -> ::String

**Returns**

- (::String) --- Output only. This checksum is computed by the server based on the value of other fields, and might be sent only on update and delete requests to ensure that the client has an up-to-date value before proceeding.

### #labels

    def labels() -> ::Google::Protobuf::Map{::String => ::String}

**Returns**

- (::Google::Protobuf::Map{::String =\> ::String}) --- Optional. Resource labels.

### #labels=

    def labels=(value) -> ::Google::Protobuf::Map{::String => ::String}

**Parameter**

- **value** (::Google::Protobuf::Map{::String =\> ::String}) --- Optional. Resource labels.
**Returns**

- (::Google::Protobuf::Map{::String =\> ::String}) --- Optional. Resource labels.

### #logging_config

    def logging_config() -> ::Google::Cloud::Eventarc::V1::LoggingConfig

**Returns**

- ([::Google::Cloud::Eventarc::V1::LoggingConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-eventarc-v1/latest/Google-Cloud-Eventarc-V1-LoggingConfig)) --- Optional. Config to control Platform logging for the GoogleApiSource.

### #logging_config=

    def logging_config=(value) -> ::Google::Cloud::Eventarc::V1::LoggingConfig

**Parameter**

- **value** ([::Google::Cloud::Eventarc::V1::LoggingConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-eventarc-v1/latest/Google-Cloud-Eventarc-V1-LoggingConfig)) --- Optional. Config to control Platform logging for the GoogleApiSource.
**Returns**

- ([::Google::Cloud::Eventarc::V1::LoggingConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-eventarc-v1/latest/Google-Cloud-Eventarc-V1-LoggingConfig)) --- Optional. Config to control Platform logging for the GoogleApiSource.

### #name

    def name() -> ::String

**Returns**

- (::String) --- Identifier. Resource name of the form projects/{project}/locations/{location}/googleApiSources/{google_api_source}

### #name=

    def name=(value) -> ::String

**Parameter**

- **value** (::String) --- Identifier. Resource name of the form projects/{project}/locations/{location}/googleApiSources/{google_api_source}
**Returns**

- (::String) --- Identifier. Resource name of the form projects/{project}/locations/{location}/googleApiSources/{google_api_source}

### #organization_subscription

    def organization_subscription() -> ::Google::Cloud::Eventarc::V1::GoogleApiSource::OrganizationSubscription

**Returns**

- ([::Google::Cloud::Eventarc::V1::GoogleApiSource::OrganizationSubscription](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-eventarc-v1/latest/Google-Cloud-Eventarc-V1-GoogleApiSource-OrganizationSubscription)) --- Optional. Config to enable subscribing to events from all projects in the GoogleApiSource's org.


  Note: The following fields are mutually exclusive: `organization_subscription`, `project_subscriptions`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #organization_subscription=

    def organization_subscription=(value) -> ::Google::Cloud::Eventarc::V1::GoogleApiSource::OrganizationSubscription

**Parameter**

- **value** ([::Google::Cloud::Eventarc::V1::GoogleApiSource::OrganizationSubscription](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-eventarc-v1/latest/Google-Cloud-Eventarc-V1-GoogleApiSource-OrganizationSubscription)) --- Optional. Config to enable subscribing to events from all projects in the GoogleApiSource's org.


  Note: The following fields are mutually exclusive: `organization_subscription`, `project_subscriptions`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::Eventarc::V1::GoogleApiSource::OrganizationSubscription](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-eventarc-v1/latest/Google-Cloud-Eventarc-V1-GoogleApiSource-OrganizationSubscription)) --- Optional. Config to enable subscribing to events from all projects in the GoogleApiSource's org.


  Note: The following fields are mutually exclusive: `organization_subscription`, `project_subscriptions`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #project_subscriptions

    def project_subscriptions() -> ::Google::Cloud::Eventarc::V1::GoogleApiSource::ProjectSubscriptions

**Returns**

- ([::Google::Cloud::Eventarc::V1::GoogleApiSource::ProjectSubscriptions](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-eventarc-v1/latest/Google-Cloud-Eventarc-V1-GoogleApiSource-ProjectSubscriptions)) --- Optional. Config to enable subscribing to all events from a list of projects.


  All the projects must be in the same org as the GoogleApiSource.

  Note: The following fields are mutually exclusive: `project_subscriptions`, `organization_subscription`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #project_subscriptions=

    def project_subscriptions=(value) -> ::Google::Cloud::Eventarc::V1::GoogleApiSource::ProjectSubscriptions

**Parameter**

- **value** ([::Google::Cloud::Eventarc::V1::GoogleApiSource::ProjectSubscriptions](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-eventarc-v1/latest/Google-Cloud-Eventarc-V1-GoogleApiSource-ProjectSubscriptions)) --- Optional. Config to enable subscribing to all events from a list of projects.


  All the projects must be in the same org as the GoogleApiSource.

  Note: The following fields are mutually exclusive: `project_subscriptions`, `organization_subscription`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::Eventarc::V1::GoogleApiSource::ProjectSubscriptions](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-eventarc-v1/latest/Google-Cloud-Eventarc-V1-GoogleApiSource-ProjectSubscriptions)) --- Optional. Config to enable subscribing to all events from a list of projects.


  All the projects must be in the same org as the GoogleApiSource.

  Note: The following fields are mutually exclusive: `project_subscriptions`, `organization_subscription`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #uid

    def uid() -> ::String

**Returns**

- (::String) --- Output only. Server assigned unique identifier for the channel. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.

### #update_time

    def update_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-eventarc-v1/latest/Google-Protobuf-Timestamp)) --- Output only. The last-modified time.