# Cloud Run V2 API - Class Google::Cloud::Run::V2::CreateServiceRequest (v0.29.0)

0.29.0 (latest) 0.28.1 0.27.0 0.26.0 0.25.0 0.24.1 0.23.0 0.22.1 0.21.0 0.20.0 0.19.0 0.18.0 0.17.0 0.16.1 0.15.0 0.14.0 0.13.2 0.12.0 0.11.0 0.10.1 0.9.1 0.8.0 0.7.0 0.6.0 0.5.0 0.4.0 0.3.1 0.2.0 0.1.0 Reference documentation and code samples for the Cloud Run V2 API class Google::Cloud::Run::V2::CreateServiceRequest.

Request message for creating a Service.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #parent

    def parent() -> ::String

**Returns**

- (::String) --- Required. The location and project in which this service should be created. Format: projects/{project}/locations/{location}, where {project} can be project id or number. Only lowercase characters, digits, and hyphens.

### #parent=

    def parent=(value) -> ::String

**Parameter**

- **value** (::String) --- Required. The location and project in which this service should be created. Format: projects/{project}/locations/{location}, where {project} can be project id or number. Only lowercase characters, digits, and hyphens.
**Returns**

- (::String) --- Required. The location and project in which this service should be created. Format: projects/{project}/locations/{location}, where {project} can be project id or number. Only lowercase characters, digits, and hyphens.

### #service

    def service() -> ::Google::Cloud::Run::V2::Service

**Returns**

- ([::Google::Cloud::Run::V2::Service](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-run-v2/latest/Google-Cloud-Run-V2-Service)) --- Required. The Service instance to create.

### #service=

    def service=(value) -> ::Google::Cloud::Run::V2::Service

**Parameter**

- **value** ([::Google::Cloud::Run::V2::Service](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-run-v2/latest/Google-Cloud-Run-V2-Service)) --- Required. The Service instance to create.
**Returns**

- ([::Google::Cloud::Run::V2::Service](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-run-v2/latest/Google-Cloud-Run-V2-Service)) --- Required. The Service instance to create.

### #service_id

    def service_id() -> ::String

**Returns**

- (::String) --- Required. The unique identifier for the Service. It must begin with letter, and cannot end with hyphen; must contain fewer than 50 characters. The name of the service becomes {parent}/services/{service_id}.

### #service_id=

    def service_id=(value) -> ::String

**Parameter**

- **value** (::String) --- Required. The unique identifier for the Service. It must begin with letter, and cannot end with hyphen; must contain fewer than 50 characters. The name of the service becomes {parent}/services/{service_id}.
**Returns**

- (::String) --- Required. The unique identifier for the Service. It must begin with letter, and cannot end with hyphen; must contain fewer than 50 characters. The name of the service becomes {parent}/services/{service_id}.

### #validate_only

    def validate_only() -> ::Boolean

**Returns**

- (::Boolean) --- Indicates that the request should be validated and default values populated, without persisting the request or creating any resources.

### #validate_only=

    def validate_only=(value) -> ::Boolean

**Parameter**

- **value** (::Boolean) --- Indicates that the request should be validated and default values populated, without persisting the request or creating any resources.
**Returns**

- (::Boolean) --- Indicates that the request should be validated and default values populated, without persisting the request or creating any resources.