google-cloud-pubsub-v1 0.11.0 → 1.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +72 -101
  3. data/README.md +32 -22
  4. data/lib/google/cloud/pubsub/v1/{publisher/helpers.rb → _helpers.rb} +4 -10
  5. data/lib/google/cloud/pubsub/v1/iam_policy/client.rb +33 -337
  6. data/lib/google/cloud/pubsub/v1/iam_policy/credentials.rb +6 -2
  7. data/lib/google/cloud/pubsub/v1/iam_policy.rb +5 -31
  8. data/lib/google/cloud/pubsub/v1/publisher/credentials.rb +2 -37
  9. data/lib/google/cloud/pubsub/v1/publisher.rb +2 -35
  10. data/lib/google/cloud/pubsub/v1/schema_service/client.rb +571 -35
  11. data/lib/google/cloud/pubsub/v1/schema_service.rb +1 -1
  12. data/lib/google/cloud/pubsub/v1/subscriber/credentials.rb +2 -37
  13. data/lib/google/cloud/pubsub/v1/subscriber.rb +2 -36
  14. data/lib/google/cloud/pubsub/v1/{subscriber → subscription_admin}/client.rb +299 -208
  15. data/lib/google/cloud/pubsub/v1/subscription_admin/credentials.rb +52 -0
  16. data/lib/google/cloud/pubsub/v1/subscription_admin/helpers.rb +50 -0
  17. data/lib/google/cloud/pubsub/v1/{subscriber → subscription_admin}/paths.rb +3 -3
  18. data/lib/google/cloud/pubsub/v1/subscription_admin.rb +51 -0
  19. data/lib/google/cloud/pubsub/v1/{publisher → topic_admin}/client.rb +199 -108
  20. data/lib/google/cloud/pubsub/v1/topic_admin/credentials.rb +52 -0
  21. data/lib/google/cloud/pubsub/v1/topic_admin/helpers.rb +50 -0
  22. data/lib/google/cloud/pubsub/v1/{publisher → topic_admin}/paths.rb +3 -3
  23. data/lib/google/cloud/pubsub/v1/topic_admin.rb +50 -0
  24. data/lib/google/cloud/pubsub/v1/version.rb +1 -1
  25. data/lib/google/cloud/pubsub/v1.rb +4 -5
  26. data/lib/google/pubsub/v1/pubsub_pb.rb +63 -246
  27. data/lib/google/pubsub/v1/pubsub_services_pb.rb +23 -24
  28. data/lib/google/pubsub/v1/schema_pb.rb +31 -60
  29. data/lib/google/pubsub/v1/schema_services_pb.rb +8 -0
  30. data/proto_docs/google/api/client.rb +473 -0
  31. data/proto_docs/google/api/field_behavior.rb +14 -0
  32. data/proto_docs/google/api/launch_stage.rb +71 -0
  33. data/proto_docs/google/api/resource.rb +7 -2
  34. data/proto_docs/google/protobuf/empty.rb +0 -2
  35. data/proto_docs/google/protobuf/timestamp.rb +1 -3
  36. data/proto_docs/google/pubsub/v1/pubsub.rb +1189 -227
  37. data/proto_docs/google/pubsub/v1/schema.rb +93 -4
  38. metadata +25 -142
  39. data/lib/google/cloud/pubsub/v1/subscriber/helpers.rb +0 -25
  40. data/proto_docs/google/iam/v1/iam_policy.rb +0 -87
  41. data/proto_docs/google/iam/v1/options.rb +0 -50
  42. data/proto_docs/google/iam/v1/policy.rb +0 -418
@@ -35,10 +35,10 @@ module Google
35
35
  self.service_name = 'google.pubsub.v1.Publisher'
36
36
 
37
37
  # Creates the given topic with the given name. See the [resource name rules]
38
- # (https://cloud.google.com/pubsub/docs/admin#resource_names).
38
+ # (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names).
39
39
  rpc :CreateTopic, ::Google::Cloud::PubSub::V1::Topic, ::Google::Cloud::PubSub::V1::Topic
40
- # Updates an existing topic. Note that certain properties of a
41
- # topic are not modifiable.
40
+ # Updates an existing topic by updating the fields specified in the update
41
+ # mask. Note that certain properties of a topic are not modifiable.
42
42
  rpc :UpdateTopic, ::Google::Cloud::PubSub::V1::UpdateTopicRequest, ::Google::Cloud::PubSub::V1::Topic
43
43
  # Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic
44
44
  # does not exist.
@@ -83,21 +83,22 @@ module Google
83
83
  self.service_name = 'google.pubsub.v1.Subscriber'
84
84
 
85
85
  # Creates a subscription to a given topic. See the [resource name rules]
86
- # (https://cloud.google.com/pubsub/docs/admin#resource_names).
86
+ # (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names).
87
87
  # If the subscription already exists, returns `ALREADY_EXISTS`.
88
88
  # If the corresponding topic doesn't exist, returns `NOT_FOUND`.
89
89
  #
90
90
  # If the name is not provided in the request, the server will assign a random
91
91
  # name for this subscription on the same project as the topic, conforming
92
92
  # to the [resource name format]
93
- # (https://cloud.google.com/pubsub/docs/admin#resource_names). The generated
94
- # name is populated in the returned Subscription object. Note that for REST
95
- # API requests, you must specify a name in the request.
93
+ # (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). The
94
+ # generated name is populated in the returned Subscription object. Note that
95
+ # for REST API requests, you must specify a name in the request.
96
96
  rpc :CreateSubscription, ::Google::Cloud::PubSub::V1::Subscription, ::Google::Cloud::PubSub::V1::Subscription
97
97
  # Gets the configuration details of a subscription.
98
98
  rpc :GetSubscription, ::Google::Cloud::PubSub::V1::GetSubscriptionRequest, ::Google::Cloud::PubSub::V1::Subscription
99
- # Updates an existing subscription. Note that certain properties of a
100
- # subscription, such as its topic, are not modifiable.
99
+ # Updates an existing subscription by updating the fields specified in the
100
+ # update mask. Note that certain properties of a subscription, such as its
101
+ # topic, are not modifiable.
101
102
  rpc :UpdateSubscription, ::Google::Cloud::PubSub::V1::UpdateSubscriptionRequest, ::Google::Cloud::PubSub::V1::Subscription
102
103
  # Lists matching subscriptions.
103
104
  rpc :ListSubscriptions, ::Google::Cloud::PubSub::V1::ListSubscriptionsRequest, ::Google::Cloud::PubSub::V1::ListSubscriptionsResponse
@@ -121,12 +122,10 @@ module Google
121
122
  # but such a message may be redelivered later. Acknowledging a message more
122
123
  # than once will not result in an error.
123
124
  rpc :Acknowledge, ::Google::Cloud::PubSub::V1::AcknowledgeRequest, ::Google::Protobuf::Empty
124
- # Pulls messages from the server. The server may return `UNAVAILABLE` if
125
- # there are too many concurrent pull requests pending for the given
126
- # subscription.
125
+ # Pulls messages from the server.
127
126
  rpc :Pull, ::Google::Cloud::PubSub::V1::PullRequest, ::Google::Cloud::PubSub::V1::PullResponse
128
127
  # Establishes a stream with the server, which sends messages down to the
129
- # client. The client streams acknowledgements and ack deadline modifications
128
+ # client. The client streams acknowledgments and ack deadline modifications
130
129
  # back to the server. The server will close the stream and return the status
131
130
  # on any error. The server may close the stream with status `UNAVAILABLE` to
132
131
  # reassign server-side resources, in which case, the client should
@@ -141,10 +140,10 @@ module Google
141
140
  # continuously through the call regardless of changes to the `PushConfig`.
142
141
  rpc :ModifyPushConfig, ::Google::Cloud::PubSub::V1::ModifyPushConfigRequest, ::Google::Protobuf::Empty
143
142
  # Gets the configuration details of a snapshot. Snapshots are used in
144
- # <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
145
- # operations, which allow you to manage message acknowledgments in bulk. That
146
- # is, you can set the acknowledgment state of messages in an existing
147
- # subscription to the state captured by a snapshot.
143
+ # [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations,
144
+ # which allow you to manage message acknowledgments in bulk. That is, you can
145
+ # set the acknowledgment state of messages in an existing subscription to the
146
+ # state captured by a snapshot.
148
147
  rpc :GetSnapshot, ::Google::Cloud::PubSub::V1::GetSnapshotRequest, ::Google::Cloud::PubSub::V1::Snapshot
149
148
  # Lists the existing snapshots. Snapshots are used in [Seek](
150
149
  # https://cloud.google.com/pubsub/docs/replay-overview) operations, which
@@ -165,16 +164,16 @@ module Google
165
164
  # the request, the server will assign a random
166
165
  # name for this snapshot on the same project as the subscription, conforming
167
166
  # to the [resource name format]
168
- # (https://cloud.google.com/pubsub/docs/admin#resource_names). The
167
+ # (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). The
169
168
  # generated name is populated in the returned Snapshot object. Note that for
170
169
  # REST API requests, you must specify a name in the request.
171
170
  rpc :CreateSnapshot, ::Google::Cloud::PubSub::V1::CreateSnapshotRequest, ::Google::Cloud::PubSub::V1::Snapshot
172
- # Updates an existing snapshot. Snapshots are used in
173
- # <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
174
- # operations, which allow
175
- # you to manage message acknowledgments in bulk. That is, you can set the
176
- # acknowledgment state of messages in an existing subscription to the state
177
- # captured by a snapshot.
171
+ # Updates an existing snapshot by updating the fields specified in the update
172
+ # mask. Snapshots are used in
173
+ # [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations,
174
+ # which allow you to manage message acknowledgments in bulk. That is, you can
175
+ # set the acknowledgment state of messages in an existing subscription to the
176
+ # state captured by a snapshot.
178
177
  rpc :UpdateSnapshot, ::Google::Cloud::PubSub::V1::UpdateSnapshotRequest, ::Google::Cloud::PubSub::V1::Snapshot
179
178
  # Removes an existing snapshot. Snapshots are used in [Seek]
180
179
  # (https://cloud.google.com/pubsub/docs/replay-overview) operations, which
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/pubsub/v1/schema.proto
3
4
 
@@ -8,69 +9,34 @@ require 'google/api/client_pb'
8
9
  require 'google/api/field_behavior_pb'
9
10
  require 'google/api/resource_pb'
10
11
  require 'google/protobuf/empty_pb'
12
+ require 'google/protobuf/timestamp_pb'
11
13
 
12
- Google::Protobuf::DescriptorPool.generated_pool.build do
13
- add_file("google/pubsub/v1/schema.proto", :syntax => :proto3) do
14
- add_message "google.pubsub.v1.Schema" do
15
- optional :name, :string, 1
16
- optional :type, :enum, 2, "google.pubsub.v1.Schema.Type"
17
- optional :definition, :string, 3
18
- end
19
- add_enum "google.pubsub.v1.Schema.Type" do
20
- value :TYPE_UNSPECIFIED, 0
21
- value :PROTOCOL_BUFFER, 1
22
- value :AVRO, 2
23
- end
24
- add_message "google.pubsub.v1.CreateSchemaRequest" do
25
- optional :parent, :string, 1
26
- optional :schema, :message, 2, "google.pubsub.v1.Schema"
27
- optional :schema_id, :string, 3
28
- end
29
- add_message "google.pubsub.v1.GetSchemaRequest" do
30
- optional :name, :string, 1
31
- optional :view, :enum, 2, "google.pubsub.v1.SchemaView"
32
- end
33
- add_message "google.pubsub.v1.ListSchemasRequest" do
34
- optional :parent, :string, 1
35
- optional :view, :enum, 2, "google.pubsub.v1.SchemaView"
36
- optional :page_size, :int32, 3
37
- optional :page_token, :string, 4
38
- end
39
- add_message "google.pubsub.v1.ListSchemasResponse" do
40
- repeated :schemas, :message, 1, "google.pubsub.v1.Schema"
41
- optional :next_page_token, :string, 2
42
- end
43
- add_message "google.pubsub.v1.DeleteSchemaRequest" do
44
- optional :name, :string, 1
45
- end
46
- add_message "google.pubsub.v1.ValidateSchemaRequest" do
47
- optional :parent, :string, 1
48
- optional :schema, :message, 2, "google.pubsub.v1.Schema"
49
- end
50
- add_message "google.pubsub.v1.ValidateSchemaResponse" do
51
- end
52
- add_message "google.pubsub.v1.ValidateMessageRequest" do
53
- optional :parent, :string, 1
54
- optional :message, :bytes, 4
55
- optional :encoding, :enum, 5, "google.pubsub.v1.Encoding"
56
- oneof :schema_spec do
57
- optional :name, :string, 2
58
- optional :schema, :message, 3, "google.pubsub.v1.Schema"
59
- end
60
- end
61
- add_message "google.pubsub.v1.ValidateMessageResponse" do
62
- end
63
- add_enum "google.pubsub.v1.SchemaView" do
64
- value :SCHEMA_VIEW_UNSPECIFIED, 0
65
- value :BASIC, 1
66
- value :FULL, 2
67
- end
68
- add_enum "google.pubsub.v1.Encoding" do
69
- value :ENCODING_UNSPECIFIED, 0
70
- value :JSON, 1
71
- value :BINARY, 2
14
+
15
+ descriptor_data = "\n\x1dgoogle/pubsub/v1/schema.proto\x12\x10google.pubsub.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbd\x02\n\x06Schema\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12+\n\x04type\x18\x02 \x01(\x0e\x32\x1d.google.pubsub.v1.Schema.Type\x12\x12\n\ndefinition\x18\x03 \x01(\t\x12\x1b\n\x0brevision_id\x18\x04 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x03\x12=\n\x14revision_create_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\";\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x13\n\x0fPROTOCOL_BUFFER\x10\x01\x12\x08\n\x04\x41VRO\x10\x02:F\xea\x41\x43\n\x1cpubsub.googleapis.com/Schema\x12#projects/{project}/schemas/{schema}\"\x8d\x01\n\x13\x43reateSchemaRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\x12\x1cpubsub.googleapis.com/Schema\x12-\n\x06schema\x18\x02 \x01(\x0b\x32\x18.google.pubsub.v1.SchemaB\x03\xe0\x41\x02\x12\x11\n\tschema_id\x18\x03 \x01(\t\"r\n\x10GetSchemaRequest\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1cpubsub.googleapis.com/Schema\x12*\n\x04view\x18\x02 \x01(\x0e\x32\x1c.google.pubsub.v1.SchemaView\"\xac\x01\n\x12ListSchemasRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12*\n\x04view\x18\x02 \x01(\x0e\x32\x1c.google.pubsub.v1.SchemaView\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"Y\n\x13ListSchemasResponse\x12)\n\x07schemas\x18\x01 \x03(\x0b\x32\x18.google.pubsub.v1.Schema\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa3\x01\n\x1aListSchemaRevisionsRequest\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1cpubsub.googleapis.com/Schema\x12*\n\x04view\x18\x02 \x01(\x0e\x32\x1c.google.pubsub.v1.SchemaView\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"a\n\x1bListSchemaRevisionsResponse\x12)\n\x07schemas\x18\x01 \x03(\x0b\x32\x18.google.pubsub.v1.Schema\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"x\n\x13\x43ommitSchemaRequest\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1cpubsub.googleapis.com/Schema\x12-\n\x06schema\x18\x02 \x01(\x0b\x32\x18.google.pubsub.v1.SchemaB\x03\xe0\x41\x02\"e\n\x15RollbackSchemaRequest\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1cpubsub.googleapis.com/Schema\x12\x18\n\x0brevision_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"m\n\x1b\x44\x65leteSchemaRevisionRequest\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1cpubsub.googleapis.com/Schema\x12\x1a\n\x0brevision_id\x18\x02 \x01(\tB\x05\x18\x01\xe0\x41\x01\"I\n\x13\x44\x65leteSchemaRequest\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1cpubsub.googleapis.com/Schema\"\x8b\x01\n\x15ValidateSchemaRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12-\n\x06schema\x18\x02 \x01(\x0b\x32\x18.google.pubsub.v1.SchemaB\x03\xe0\x41\x02\"\x18\n\x16ValidateSchemaResponse\"\x8a\x02\n\x16ValidateMessageRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x31\n\x04name\x18\x02 \x01(\tB!\xfa\x41\x1e\n\x1cpubsub.googleapis.com/SchemaH\x00\x12*\n\x06schema\x18\x03 \x01(\x0b\x32\x18.google.pubsub.v1.SchemaH\x00\x12\x0f\n\x07message\x18\x04 \x01(\x0c\x12,\n\x08\x65ncoding\x18\x05 \x01(\x0e\x32\x1a.google.pubsub.v1.EncodingB\r\n\x0bschema_spec\"\x19\n\x17ValidateMessageResponse*>\n\nSchemaView\x12\x1b\n\x17SCHEMA_VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x08\n\x04\x46ULL\x10\x02*:\n\x08\x45ncoding\x12\x18\n\x14\x45NCODING_UNSPECIFIED\x10\x00\x12\x08\n\x04JSON\x10\x01\x12\n\n\x06\x42INARY\x10\x02\x32\x88\r\n\rSchemaService\x12\x9a\x01\n\x0c\x43reateSchema\x12%.google.pubsub.v1.CreateSchemaRequest\x1a\x18.google.pubsub.v1.Schema\"I\xda\x41\x17parent,schema,schema_id\x82\xd3\xe4\x93\x02)\"\x1f/v1/{parent=projects/*}/schemas:\x06schema\x12y\n\tGetSchema\x12\".google.pubsub.v1.GetSchemaRequest\x1a\x18.google.pubsub.v1.Schema\".\xda\x41\x04name\x82\xd3\xe4\x93\x02!\x12\x1f/v1/{name=projects/*/schemas/*}\x12\x8c\x01\n\x0bListSchemas\x12$.google.pubsub.v1.ListSchemasRequest\x1a%.google.pubsub.v1.ListSchemasResponse\"0\xda\x41\x06parent\x82\xd3\xe4\x93\x02!\x12\x1f/v1/{parent=projects/*}/schemas\x12\xb0\x01\n\x13ListSchemaRevisions\x12,.google.pubsub.v1.ListSchemaRevisionsRequest\x1a-.google.pubsub.v1.ListSchemaRevisionsResponse\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/schemas/*}:listRevisions\x12\x90\x01\n\x0c\x43ommitSchema\x12%.google.pubsub.v1.CommitSchemaRequest\x1a\x18.google.pubsub.v1.Schema\"?\xda\x41\x0bname,schema\x82\xd3\xe4\x93\x02+\"&/v1/{name=projects/*/schemas/*}:commit:\x01*\x12\x9b\x01\n\x0eRollbackSchema\x12\'.google.pubsub.v1.RollbackSchemaRequest\x1a\x18.google.pubsub.v1.Schema\"F\xda\x41\x10name,revision_id\x82\xd3\xe4\x93\x02-\"(/v1/{name=projects/*/schemas/*}:rollback:\x01*\x12\xaa\x01\n\x14\x44\x65leteSchemaRevision\x12-.google.pubsub.v1.DeleteSchemaRevisionRequest\x1a\x18.google.pubsub.v1.Schema\"I\xda\x41\x10name,revision_id\x82\xd3\xe4\x93\x02\x30*./v1/{name=projects/*/schemas/*}:deleteRevision\x12}\n\x0c\x44\x65leteSchema\x12%.google.pubsub.v1.DeleteSchemaRequest\x1a\x16.google.protobuf.Empty\".\xda\x41\x04name\x82\xd3\xe4\x93\x02!*\x1f/v1/{name=projects/*/schemas/*}\x12\xa8\x01\n\x0eValidateSchema\x12\'.google.pubsub.v1.ValidateSchemaRequest\x1a(.google.pubsub.v1.ValidateSchemaResponse\"C\xda\x41\rparent,schema\x82\xd3\xe4\x93\x02-\"(/v1/{parent=projects/*}/schemas:validate:\x01*\x12\xa2\x01\n\x0fValidateMessage\x12(.google.pubsub.v1.ValidateMessageRequest\x1a).google.pubsub.v1.ValidateMessageResponse\":\x82\xd3\xe4\x93\x02\x34\"//v1/{parent=projects/*}/schemas:validateMessage:\x01*\x1ap\xca\x41\x15pubsub.googleapis.com\xd2\x41Uhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/pubsubB\xaa\x01\n\x14\x63om.google.pubsub.v1B\x0bSchemaProtoP\x01Z5cloud.google.com/go/pubsub/v2/apiv1/pubsubpb;pubsubpb\xaa\x02\x16Google.Cloud.PubSub.V1\xca\x02\x16Google\\Cloud\\PubSub\\V1\xea\x02\x19Google::Cloud::PubSub::V1b\x06proto3"
16
+
17
+ pool = Google::Protobuf::DescriptorPool.generated_pool
18
+
19
+ begin
20
+ pool.add_serialized_file(descriptor_data)
21
+ rescue TypeError
22
+ # Compatibility code: will be removed in the next major version.
23
+ require 'google/protobuf/descriptor_pb'
24
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
25
+ parsed.clear_dependency
26
+ serialized = parsed.class.encode(parsed)
27
+ file = pool.add_serialized_file(serialized)
28
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
29
+ imports = [
30
+ ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
31
+ ]
32
+ imports.each do |type_name, expected_filename|
33
+ import_file = pool.lookup(type_name).file_descriptor
34
+ if import_file.name != expected_filename
35
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
72
36
  end
73
37
  end
38
+ warn "Each proto file must use a consistent fully-qualified name."
39
+ warn "This will become an error in the next major version."
74
40
  end
75
41
 
76
42
  module Google
@@ -83,6 +49,11 @@ module Google
83
49
  GetSchemaRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.GetSchemaRequest").msgclass
84
50
  ListSchemasRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListSchemasRequest").msgclass
85
51
  ListSchemasResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListSchemasResponse").msgclass
52
+ ListSchemaRevisionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListSchemaRevisionsRequest").msgclass
53
+ ListSchemaRevisionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListSchemaRevisionsResponse").msgclass
54
+ CommitSchemaRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.CommitSchemaRequest").msgclass
55
+ RollbackSchemaRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.RollbackSchemaRequest").msgclass
56
+ DeleteSchemaRevisionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.DeleteSchemaRevisionRequest").msgclass
86
57
  DeleteSchemaRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.DeleteSchemaRequest").msgclass
87
58
  ValidateSchemaRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ValidateSchemaRequest").msgclass
88
59
  ValidateSchemaResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ValidateSchemaResponse").msgclass
@@ -39,6 +39,14 @@ module Google
39
39
  rpc :GetSchema, ::Google::Cloud::PubSub::V1::GetSchemaRequest, ::Google::Cloud::PubSub::V1::Schema
40
40
  # Lists schemas in a project.
41
41
  rpc :ListSchemas, ::Google::Cloud::PubSub::V1::ListSchemasRequest, ::Google::Cloud::PubSub::V1::ListSchemasResponse
42
+ # Lists all schema revisions for the named schema.
43
+ rpc :ListSchemaRevisions, ::Google::Cloud::PubSub::V1::ListSchemaRevisionsRequest, ::Google::Cloud::PubSub::V1::ListSchemaRevisionsResponse
44
+ # Commits a new schema revision to an existing schema.
45
+ rpc :CommitSchema, ::Google::Cloud::PubSub::V1::CommitSchemaRequest, ::Google::Cloud::PubSub::V1::Schema
46
+ # Creates a new schema revision that is a copy of the provided revision_id.
47
+ rpc :RollbackSchema, ::Google::Cloud::PubSub::V1::RollbackSchemaRequest, ::Google::Cloud::PubSub::V1::Schema
48
+ # Deletes a specific schema revision.
49
+ rpc :DeleteSchemaRevision, ::Google::Cloud::PubSub::V1::DeleteSchemaRevisionRequest, ::Google::Cloud::PubSub::V1::Schema
42
50
  # Deletes a schema.
43
51
  rpc :DeleteSchema, ::Google::Cloud::PubSub::V1::DeleteSchemaRequest, ::Google::Protobuf::Empty
44
52
  # Validates a schema.