Reference documentation and code samples for the Cloud Pub/Sub V1 API class Google::Cloud::PubSub::V1::Schema.
A schema resource.
Inherits
Object
Extended By
Google::Protobuf::MessageExts::ClassMethods
Includes
Google::Protobuf::MessageExts
Methods
#definition
defdefinition()->::String
Returns
(::String) โ The definition of the schema. This should contain a string representing
the full definition of the schema that is a valid schema definition of
the type specified in type.
#definition=
defdefinition=(value)->::String
Parameter
value (::String) โ The definition of the schema. This should contain a string representing
the full definition of the schema that is a valid schema definition of
the type specified in type.
Returns
(::String) โ The definition of the schema. This should contain a string representing
the full definition of the schema that is a valid schema definition of
the type specified in type.
#name
defname()->::String
Returns
(::String) โ Required. Name of the schema.
Format is projects/{project}/schemas/{schema}.
#name=
defname=(value)->::String
Parameter
value (::String) โ Required. Name of the schema.
Format is projects/{project}/schemas/{schema}.
Returns
(::String) โ Required. Name of the schema.
Format is projects/{project}/schemas/{schema}.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-03 UTC."],[],[],null,["# Cloud Pub/Sub V1 API - Class Google::Cloud::PubSub::V1::Schema (v1.11.1)\n\nVersion latestkeyboard_arrow_down\n\n- [1.11.1 (latest)](/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-Schema)\n- [1.11.0](/ruby/docs/reference/google-cloud-pubsub-v1/1.11.0/Google-Cloud-PubSub-V1-Schema)\n- [1.10.0](/ruby/docs/reference/google-cloud-pubsub-v1/1.10.0/Google-Cloud-PubSub-V1-Schema)\n- [1.9.0](/ruby/docs/reference/google-cloud-pubsub-v1/1.9.0/Google-Cloud-PubSub-V1-Schema)\n- [1.8.2](/ruby/docs/reference/google-cloud-pubsub-v1/1.8.2/Google-Cloud-PubSub-V1-Schema)\n- [1.7.1](/ruby/docs/reference/google-cloud-pubsub-v1/1.7.1/Google-Cloud-PubSub-V1-Schema)\n- [1.6.0](/ruby/docs/reference/google-cloud-pubsub-v1/1.6.0/Google-Cloud-PubSub-V1-Schema)\n- [1.5.0](/ruby/docs/reference/google-cloud-pubsub-v1/1.5.0/Google-Cloud-PubSub-V1-Schema)\n- [1.4.0](/ruby/docs/reference/google-cloud-pubsub-v1/1.4.0/Google-Cloud-PubSub-V1-Schema)\n- [1.3.0](/ruby/docs/reference/google-cloud-pubsub-v1/1.3.0/Google-Cloud-PubSub-V1-Schema)\n- [1.2.0](/ruby/docs/reference/google-cloud-pubsub-v1/1.2.0/Google-Cloud-PubSub-V1-Schema)\n- [1.1.2](/ruby/docs/reference/google-cloud-pubsub-v1/1.1.2/Google-Cloud-PubSub-V1-Schema)\n- [1.0.0](/ruby/docs/reference/google-cloud-pubsub-v1/1.0.0/Google-Cloud-PubSub-V1-Schema)\n- [0.25.0](/ruby/docs/reference/google-cloud-pubsub-v1/0.25.0/Google-Cloud-PubSub-V1-Schema)\n- [0.24.0](/ruby/docs/reference/google-cloud-pubsub-v1/0.24.0/Google-Cloud-PubSub-V1-Schema)\n- [0.23.0](/ruby/docs/reference/google-cloud-pubsub-v1/0.23.0/Google-Cloud-PubSub-V1-Schema)\n- [0.22.0](/ruby/docs/reference/google-cloud-pubsub-v1/0.22.0/Google-Cloud-PubSub-V1-Schema)\n- [0.21.2](/ruby/docs/reference/google-cloud-pubsub-v1/0.21.2/Google-Cloud-PubSub-V1-Schema)\n- [0.20.2](/ruby/docs/reference/google-cloud-pubsub-v1/0.20.2/Google-Cloud-PubSub-V1-Schema)\n- [0.19.0](/ruby/docs/reference/google-cloud-pubsub-v1/0.19.0/Google-Cloud-PubSub-V1-Schema)\n- [0.18.1](/ruby/docs/reference/google-cloud-pubsub-v1/0.18.1/Google-Cloud-PubSub-V1-Schema)\n- [0.17.4](/ruby/docs/reference/google-cloud-pubsub-v1/0.17.4/Google-Cloud-PubSub-V1-Schema)\n- [0.16.0](/ruby/docs/reference/google-cloud-pubsub-v1/0.16.0/Google-Cloud-PubSub-V1-Schema)\n- [0.15.1](/ruby/docs/reference/google-cloud-pubsub-v1/0.15.1/Google-Cloud-PubSub-V1-Schema)\n- [0.14.0](/ruby/docs/reference/google-cloud-pubsub-v1/0.14.0/Google-Cloud-PubSub-V1-Schema)\n- [0.13.1](/ruby/docs/reference/google-cloud-pubsub-v1/0.13.1/Google-Cloud-PubSub-V1-Schema)\n- [0.12.1](/ruby/docs/reference/google-cloud-pubsub-v1/0.12.1/Google-Cloud-PubSub-V1-Schema)\n- [0.11.0](/ruby/docs/reference/google-cloud-pubsub-v1/0.11.0/Google-Cloud-PubSub-V1-Schema)\n- [0.10.0](/ruby/docs/reference/google-cloud-pubsub-v1/0.10.0/Google-Cloud-PubSub-V1-Schema)\n- [0.9.0](/ruby/docs/reference/google-cloud-pubsub-v1/0.9.0/Google-Cloud-PubSub-V1-Schema)\n- [0.8.0](/ruby/docs/reference/google-cloud-pubsub-v1/0.8.0/Google-Cloud-PubSub-V1-Schema)\n- [0.7.1](/ruby/docs/reference/google-cloud-pubsub-v1/0.7.1/Google-Cloud-PubSub-V1-Schema)\n- [0.6.2](/ruby/docs/reference/google-cloud-pubsub-v1/0.6.2/Google-Cloud-PubSub-V1-Schema) \nReference documentation and code samples for the Cloud Pub/Sub V1 API class Google::Cloud::PubSub::V1::Schema.\n\nA schema resource. \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #definition\n\n def definition() -\u003e ::String\n\n**Returns**\n\n- (::String) --- The definition of the schema. This should contain a string representing the full definition of the schema that is a valid schema definition of the type specified in `type`.\n\n### #definition=\n\n def definition=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- The definition of the schema. This should contain a string representing the full definition of the schema that is a valid schema definition of the type specified in `type`. \n**Returns**\n\n- (::String) --- The definition of the schema. This should contain a string representing the full definition of the schema that is a valid schema definition of the type specified in `type`.\n\n### #name\n\n def name() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Required. Name of the schema. Format is `projects/{project}/schemas/{schema}`.\n\n### #name=\n\n def name=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- Required. Name of the schema. Format is `projects/{project}/schemas/{schema}`. \n**Returns**\n\n- (::String) --- Required. Name of the schema. Format is `projects/{project}/schemas/{schema}`.\n\n### #revision_create_time\n\n def revision_create_time() -\u003e ::Google::Protobuf::Timestamp\n\n**Returns**\n\n- ([::Google::Protobuf::Timestamp](./Google-Protobuf-Timestamp)) --- Output only. The timestamp that the revision was created.\n\n### #revision_id\n\n def revision_id() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Output only. Immutable. The revision ID of the schema.\n\n### #type\n\n def type() -\u003e ::Google::Cloud::PubSub::V1::Schema::Type\n\n**Returns**\n\n- ([::Google::Cloud::PubSub::V1::Schema::Type](./Google-Cloud-PubSub-V1-Schema-Type)) --- The type of the schema definition.\n\n### #type=\n\n def type=(value) -\u003e ::Google::Cloud::PubSub::V1::Schema::Type\n\n**Parameter**\n\n- **value** ([::Google::Cloud::PubSub::V1::Schema::Type](./Google-Cloud-PubSub-V1-Schema-Type)) --- The type of the schema definition. \n**Returns**\n\n- ([::Google::Cloud::PubSub::V1::Schema::Type](./Google-Cloud-PubSub-V1-Schema-Type)) --- The type of the schema definition."]]