# Cloud Pub/Sub V1 API - Class Google::Cloud::PubSub::V1::SchemaService::Client (v1.16.0)

1.16.0 (latest) 1.15.0 1.14.2 1.13.0 1.12.0 1.11.1 1.10.0 1.9.0 1.8.2 1.7.1 1.6.0 1.5.0 1.4.0 1.3.0 1.2.0 1.1.2 1.0.0 0.25.0 0.24.0 0.23.0 0.22.0 0.21.2 0.20.2 0.19.0 0.18.1 0.17.4 0.16.0 0.15.1 0.14.0 0.13.1 0.12.1 0.11.0 0.10.0 0.9.0 0.8.0 0.7.1 0.6.2 Reference documentation and code samples for the Cloud Pub/Sub V1 API class Google::Cloud::PubSub::V1::SchemaService::Client.

Client for the SchemaService service.


<br />

Service for doing schema-related operations.

## Inherits

- Object

## Includes

- [Google::Cloud::PubSub::V1::SchemaService::Paths](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-SchemaService-Paths)

## Methods

### .configure

    def self.configure() { |config| ... } -> Client::Configuration

Configure the SchemaService Client class.


<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-SchemaService-Client-Configuration "Google::Cloud::PubSub::V1::SchemaService::Client::Configuration (class)")
for a description of the configuration fields.
**Yields**

- (config) --- Configure the Client client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-SchemaService-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-SchemaService-Client-Configuration))
**Example**

```ruby
# Modify the configuration for all SchemaService clients
::Google::Cloud::PubSub::V1::SchemaService::Client.configure do |config|
  config.timeout = 10.0
end
```

### #commit_schema

    def commit_schema(request, options = nil) -> ::Google::Cloud::PubSub::V1::Schema
    def commit_schema(name: nil, schema: nil) -> ::Google::Cloud::PubSub::V1::Schema

Commits a new schema revision to an existing schema.
**Overloads**

    def commit_schema(request, options = nil) -> ::Google::Cloud::PubSub::V1::Schema

Pass arguments to `commit_schema` via a request object, either of type [CommitSchemaRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-CommitSchemaRequest "Google::Cloud::PubSub::V1::CommitSchemaRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::PubSub::V1::CommitSchemaRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-CommitSchemaRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def commit_schema(name: nil, schema: nil) -> ::Google::Cloud::PubSub::V1::Schema

Pass arguments to `commit_schema` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameters**

- **name** (::String) --- Required. The name of the schema we are revising. Format is `projects/{project}/schemas/{schema}`.
- **schema** ([::Google::Cloud::PubSub::V1::Schema](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-Schema), ::Hash) --- Required. The schema revision to commit.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::PubSub::V1::Schema](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-Schema))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::PubSub::V1::Schema](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-Schema))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/pubsub/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::PubSub::V1::SchemaService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::PubSub::V1::CommitSchemaRequest.new

# Call the commit_schema method.
result = client.commit_schema request

# The returned object is of type Google::Cloud::PubSub::V1::Schema.
p result
```

### #configure

    def configure() { |config| ... } -> Client::Configuration

Configure the SchemaService Client instance.


The configuration is set to the derived mode, meaning that values can be changed,
but structural changes (adding new fields, etc.) are not allowed. Structural changes
should be made on [Client.configure](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-SchemaService-Client#Google__Cloud__PubSub__V1__SchemaService__Client_configure_class_ "Google::Cloud::PubSub::V1::SchemaService::Client.configure (method)").

<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-SchemaService-Client-Configuration "Google::Cloud::PubSub::V1::SchemaService::Client::Configuration (class)")
for a description of the configuration fields.
**Yields**

- (config) --- Configure the Client client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-SchemaService-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-SchemaService-Client-Configuration))

### #create_schema

    def create_schema(request, options = nil) -> ::Google::Cloud::PubSub::V1::Schema
    def create_schema(parent: nil, schema: nil, schema_id: nil) -> ::Google::Cloud::PubSub::V1::Schema

Creates a schema.
**Overloads**

    def create_schema(request, options = nil) -> ::Google::Cloud::PubSub::V1::Schema

Pass arguments to `create_schema` via a request object, either of type [CreateSchemaRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-CreateSchemaRequest "Google::Cloud::PubSub::V1::CreateSchemaRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::PubSub::V1::CreateSchemaRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-CreateSchemaRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def create_schema(parent: nil, schema: nil, schema_id: nil) -> ::Google::Cloud::PubSub::V1::Schema

Pass arguments to `create_schema` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameters**

- **parent** (::String) --- Required. The name of the project in which to create the schema. Format is `projects/{project-id}`.
- **schema** ([::Google::Cloud::PubSub::V1::Schema](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-Schema), ::Hash) --- Required. The schema object to create.


  This schema's `name` parameter is ignored. The schema object returned
  by CreateSchema will have a `name` made using the given `parent` and
  `schema_id`.
- **schema_id** (::String) --- The ID to use for the schema, which will become the final component of the schema's resource name.


  See https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names for
  resource name constraints.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::PubSub::V1::Schema](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-Schema))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::PubSub::V1::Schema](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-Schema))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/pubsub/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::PubSub::V1::SchemaService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::PubSub::V1::CreateSchemaRequest.new

# Call the create_schema method.
result = client.create_schema request

# The returned object is of type Google::Cloud::PubSub::V1::Schema.
p result
```

### #delete_schema

    def delete_schema(request, options = nil) -> ::Google::Protobuf::Empty
    def delete_schema(name: nil) -> ::Google::Protobuf::Empty

Deletes a schema.
**Overloads**

    def delete_schema(request, options = nil) -> ::Google::Protobuf::Empty

Pass arguments to `delete_schema` via a request object, either of type [DeleteSchemaRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-DeleteSchemaRequest "Google::Cloud::PubSub::V1::DeleteSchemaRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::PubSub::V1::DeleteSchemaRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-DeleteSchemaRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def delete_schema(name: nil) -> ::Google::Protobuf::Empty

Pass arguments to `delete_schema` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameter**

- **name** (::String) --- Required. Name of the schema to delete. Format is `projects/{project}/schemas/{schema}`.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Protobuf::Empty](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Protobuf-Empty))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Protobuf::Empty](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Protobuf-Empty))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/pubsub/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::PubSub::V1::SchemaService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::PubSub::V1::DeleteSchemaRequest.new

# Call the delete_schema method.
result = client.delete_schema request

# The returned object is of type Google::Protobuf::Empty.
p result
```

### #delete_schema_revision

    def delete_schema_revision(request, options = nil) -> ::Google::Cloud::PubSub::V1::Schema
    def delete_schema_revision(name: nil, revision_id: nil) -> ::Google::Cloud::PubSub::V1::Schema

Deletes a specific schema revision.
**Overloads**

    def delete_schema_revision(request, options = nil) -> ::Google::Cloud::PubSub::V1::Schema

Pass arguments to `delete_schema_revision` via a request object, either of type [DeleteSchemaRevisionRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-DeleteSchemaRevisionRequest "Google::Cloud::PubSub::V1::DeleteSchemaRevisionRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::PubSub::V1::DeleteSchemaRevisionRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-DeleteSchemaRevisionRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def delete_schema_revision(name: nil, revision_id: nil) -> ::Google::Cloud::PubSub::V1::Schema

Pass arguments to `delete_schema_revision` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameters**

- **name** (::String) --- Required. The name of the schema revision to be deleted, with a revision ID explicitly included.


  Example: `projects/123/schemas/my-schema@c7cfa2a8`
- **revision_id** (::String) --- Optional. This field is deprecated and should not be used for specifying the revision ID. The revision ID should be specified via the `name` parameter.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::PubSub::V1::Schema](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-Schema))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::PubSub::V1::Schema](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-Schema))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/pubsub/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::PubSub::V1::SchemaService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::PubSub::V1::DeleteSchemaRevisionRequest.new

# Call the delete_schema_revision method.
result = client.delete_schema_revision request

# The returned object is of type Google::Cloud::PubSub::V1::Schema.
p result
```

### #get_schema

    def get_schema(request, options = nil) -> ::Google::Cloud::PubSub::V1::Schema
    def get_schema(name: nil, view: nil) -> ::Google::Cloud::PubSub::V1::Schema

Gets a schema.
**Overloads**

    def get_schema(request, options = nil) -> ::Google::Cloud::PubSub::V1::Schema

Pass arguments to `get_schema` via a request object, either of type [GetSchemaRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-GetSchemaRequest "Google::Cloud::PubSub::V1::GetSchemaRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::PubSub::V1::GetSchemaRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-GetSchemaRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def get_schema(name: nil, view: nil) -> ::Google::Cloud::PubSub::V1::Schema

Pass arguments to `get_schema` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameters**

- **name** (::String) --- Required. The name of the schema to get. Format is `projects/{project}/schemas/{schema}`.
- **view** ([::Google::Cloud::PubSub::V1::SchemaView](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-SchemaView)) --- The set of fields to return in the response. If not set, returns a Schema with all fields filled out. Set to `BASIC` to omit the `definition`.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::PubSub::V1::Schema](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-Schema))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::PubSub::V1::Schema](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-Schema))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/pubsub/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::PubSub::V1::SchemaService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::PubSub::V1::GetSchemaRequest.new

# Call the get_schema method.
result = client.get_schema request

# The returned object is of type Google::Cloud::PubSub::V1::Schema.
p result
```

### #iam_policy_client

    def iam_policy_client() -> Google::Iam::V1::IAMPolicy::Client

Get the associated client for mix-in of the IAMPolicy.
**Returns**

- (Google::Iam::V1::IAMPolicy::Client)

### #initialize

    def initialize() { |config| ... } -> Client

Create a new SchemaService client object.
**Yields**

- (config) --- Configure the SchemaService client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-SchemaService-Client-Configuration))
**Returns**

- ([Client](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-SchemaService-Client)) --- a new instance of Client
**Example**

```ruby
# Create a client using the default configuration
client = ::Google::Cloud::PubSub::V1::SchemaService::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::PubSub::V1::SchemaService::Client.new do |config|
  config.timeout = 10.0
end
```

### #list_schema_revisions

    def list_schema_revisions(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::PubSub::V1::Schema>
    def list_schema_revisions(name: nil, view: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::PubSub::V1::Schema>

Lists all schema revisions for the named schema.
**Overloads**

    def list_schema_revisions(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::PubSub::V1::Schema>

Pass arguments to `list_schema_revisions` via a request object, either of type [ListSchemaRevisionsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-ListSchemaRevisionsRequest "Google::Cloud::PubSub::V1::ListSchemaRevisionsRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::PubSub::V1::ListSchemaRevisionsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-ListSchemaRevisionsRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def list_schema_revisions(name: nil, view: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::PubSub::V1::Schema>

Pass arguments to `list_schema_revisions` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameters**

- **name** (::String) --- Required. The name of the schema to list revisions for.
- **view** ([::Google::Cloud::PubSub::V1::SchemaView](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-SchemaView)) --- The set of Schema fields to return in the response. If not set, returns Schemas with `name` and `type`, but not `definition`. Set to `FULL` to retrieve all fields.
- **page_size** (::Integer) --- The maximum number of revisions to return per page.
- **page_token** (::String) --- The page token, received from a previous ListSchemaRevisions call. Provide this to retrieve the subsequent page.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::PagedEnumerable\<[::Google::Cloud::PubSub::V1::Schema](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-Schema)\>)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::PagedEnumerable\<[::Google::Cloud::PubSub::V1::Schema](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-Schema)\>)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/pubsub/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::PubSub::V1::SchemaService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::PubSub::V1::ListSchemaRevisionsRequest.new

# Call the list_schema_revisions method.
result = client.list_schema_revisions request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::PubSub::V1::Schema.
  p item
end
```

### #list_schemas

    def list_schemas(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::PubSub::V1::Schema>
    def list_schemas(parent: nil, view: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::PubSub::V1::Schema>

Lists schemas in a project.
**Overloads**

    def list_schemas(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::PubSub::V1::Schema>

Pass arguments to `list_schemas` via a request object, either of type [ListSchemasRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-ListSchemasRequest "Google::Cloud::PubSub::V1::ListSchemasRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::PubSub::V1::ListSchemasRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-ListSchemasRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def list_schemas(parent: nil, view: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::PubSub::V1::Schema>

Pass arguments to `list_schemas` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameters**

- **parent** (::String) --- Required. The name of the project in which to list schemas. Format is `projects/{project-id}`.
- **view** ([::Google::Cloud::PubSub::V1::SchemaView](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-SchemaView)) --- The set of Schema fields to return in the response. If not set, returns Schemas with `name` and `type`, but not `definition`. Set to `FULL` to retrieve all fields.
- **page_size** (::Integer) --- Maximum number of schemas to return.
- **page_token** (::String) --- The value returned by the last `ListSchemasResponse`; indicates that this is a continuation of a prior `ListSchemas` call, and that the system should return the next page of data.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::PagedEnumerable\<[::Google::Cloud::PubSub::V1::Schema](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-Schema)\>)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::PagedEnumerable\<[::Google::Cloud::PubSub::V1::Schema](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-Schema)\>)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/pubsub/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::PubSub::V1::SchemaService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::PubSub::V1::ListSchemasRequest.new

# Call the list_schemas method.
result = client.list_schemas request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::PubSub::V1::Schema.
  p item
end
```

### #logger

    def logger() -> Logger

The logger used for request/response debug logging.
**Returns**

- (Logger)

### #rollback_schema

    def rollback_schema(request, options = nil) -> ::Google::Cloud::PubSub::V1::Schema
    def rollback_schema(name: nil, revision_id: nil) -> ::Google::Cloud::PubSub::V1::Schema

Creates a new schema revision that is a copy of the provided revision_id.
**Overloads**

    def rollback_schema(request, options = nil) -> ::Google::Cloud::PubSub::V1::Schema

Pass arguments to `rollback_schema` via a request object, either of type [RollbackSchemaRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-RollbackSchemaRequest "Google::Cloud::PubSub::V1::RollbackSchemaRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::PubSub::V1::RollbackSchemaRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-RollbackSchemaRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def rollback_schema(name: nil, revision_id: nil) -> ::Google::Cloud::PubSub::V1::Schema

Pass arguments to `rollback_schema` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameters**

- **name** (::String) --- Required. The schema being rolled back with revision id.
- **revision_id** (::String) --- Required. The revision ID to roll back to. It must be a revision of the same schema.


  Example: c7cfa2a8
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::PubSub::V1::Schema](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-Schema))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::PubSub::V1::Schema](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-Schema))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/pubsub/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::PubSub::V1::SchemaService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::PubSub::V1::RollbackSchemaRequest.new

# Call the rollback_schema method.
result = client.rollback_schema request

# The returned object is of type Google::Cloud::PubSub::V1::Schema.
p result
```

### #universe_domain

    def universe_domain() -> String

The effective universe domain
**Returns**

- (String)

### #validate_message

    def validate_message(request, options = nil) -> ::Google::Cloud::PubSub::V1::ValidateMessageResponse
    def validate_message(parent: nil, name: nil, schema: nil, message: nil, encoding: nil) -> ::Google::Cloud::PubSub::V1::ValidateMessageResponse

Validates a message against a schema.
**Overloads**

    def validate_message(request, options = nil) -> ::Google::Cloud::PubSub::V1::ValidateMessageResponse

Pass arguments to `validate_message` via a request object, either of type [ValidateMessageRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-ValidateMessageRequest "Google::Cloud::PubSub::V1::ValidateMessageRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::PubSub::V1::ValidateMessageRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-ValidateMessageRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def validate_message(parent: nil, name: nil, schema: nil, message: nil, encoding: nil) -> ::Google::Cloud::PubSub::V1::ValidateMessageResponse

Pass arguments to `validate_message` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameters**

- **parent** (::String) --- Required. The name of the project in which to validate schemas. Format is `projects/{project-id}`.
- **name** (::String) --- Name of the schema against which to validate.


  Format is `projects/{project}/schemas/{schema}`.

  Note: The following parameters are mutually exclusive: `name`, `schema`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one.
- **schema** ([::Google::Cloud::PubSub::V1::Schema](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-Schema), ::Hash) --- Ad-hoc schema against which to validate


  Note: The following parameters are mutually exclusive: `schema`, `name`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one.
- **message** (::String) --- Message to validate against the provided `schema_spec`.
- **encoding** ([::Google::Cloud::PubSub::V1::Encoding](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-Encoding)) --- The encoding expected for messages
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::PubSub::V1::ValidateMessageResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-ValidateMessageResponse))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::PubSub::V1::ValidateMessageResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-ValidateMessageResponse))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/pubsub/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::PubSub::V1::SchemaService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::PubSub::V1::ValidateMessageRequest.new

# Call the validate_message method.
result = client.validate_message request

# The returned object is of type Google::Cloud::PubSub::V1::ValidateMessageResponse.
p result
```

### #validate_schema

    def validate_schema(request, options = nil) -> ::Google::Cloud::PubSub::V1::ValidateSchemaResponse
    def validate_schema(parent: nil, schema: nil) -> ::Google::Cloud::PubSub::V1::ValidateSchemaResponse

Validates a schema.
**Overloads**

    def validate_schema(request, options = nil) -> ::Google::Cloud::PubSub::V1::ValidateSchemaResponse

Pass arguments to `validate_schema` via a request object, either of type [ValidateSchemaRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-ValidateSchemaRequest "Google::Cloud::PubSub::V1::ValidateSchemaRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::PubSub::V1::ValidateSchemaRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-ValidateSchemaRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def validate_schema(parent: nil, schema: nil) -> ::Google::Cloud::PubSub::V1::ValidateSchemaResponse

Pass arguments to `validate_schema` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameters**

- **parent** (::String) --- Required. The name of the project in which to validate schemas. Format is `projects/{project-id}`.
- **schema** ([::Google::Cloud::PubSub::V1::Schema](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-Schema), ::Hash) --- Required. The schema object to validate.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::PubSub::V1::ValidateSchemaResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-ValidateSchemaResponse))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::PubSub::V1::ValidateSchemaResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-ValidateSchemaResponse))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/pubsub/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::PubSub::V1::SchemaService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::PubSub::V1::ValidateSchemaRequest.new

# Call the validate_schema method.
result = client.validate_schema request

# The returned object is of type Google::Cloud::PubSub::V1::ValidateSchemaResponse.
p result
```