google-cloud-pubsub-v1 0.1.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -11,16 +11,23 @@ require 'google/protobuf/duration_pb'
11
11
  require 'google/protobuf/empty_pb'
12
12
  require 'google/protobuf/field_mask_pb'
13
13
  require 'google/protobuf/timestamp_pb'
14
+ require 'google/pubsub/v1/schema_pb'
14
15
  Google::Protobuf::DescriptorPool.generated_pool.build do
15
16
  add_file("google/pubsub/v1/pubsub.proto", :syntax => :proto3) do
16
17
  add_message "google.pubsub.v1.MessageStoragePolicy" do
17
18
  repeated :allowed_persistence_regions, :string, 1
18
19
  end
20
+ add_message "google.pubsub.v1.SchemaSettings" do
21
+ optional :schema, :string, 1
22
+ optional :encoding, :enum, 2, "google.pubsub.v1.Encoding"
23
+ end
19
24
  add_message "google.pubsub.v1.Topic" do
20
25
  optional :name, :string, 1
21
26
  map :labels, :string, :string, 2
22
27
  optional :message_storage_policy, :message, 3, "google.pubsub.v1.MessageStoragePolicy"
23
28
  optional :kms_key_name, :string, 5
29
+ optional :schema_settings, :message, 6, "google.pubsub.v1.SchemaSettings"
30
+ optional :satisfies_pzs, :bool, 7
24
31
  end
25
32
  add_message "google.pubsub.v1.PubsubMessage" do
26
33
  optional :data, :bytes, 1
@@ -220,6 +227,7 @@ module Google
220
227
  module PubSub
221
228
  module V1
222
229
  MessageStoragePolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.MessageStoragePolicy").msgclass
230
+ SchemaSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.SchemaSettings").msgclass
223
231
  Topic = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.Topic").msgclass
224
232
  PubsubMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.PubsubMessage").msgclass
225
233
  GetTopicRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.GetTopicRequest").msgclass
@@ -34,40 +34,38 @@ module Google
34
34
  self.unmarshal_class_method = :decode
35
35
  self.service_name = 'google.pubsub.v1.Publisher'
36
36
 
37
- # Creates the given topic with the given name. See the
38
- # <a href="https://cloud.google.com/pubsub/docs/admin#resource_names">
39
- # resource name rules</a>.
40
- rpc :CreateTopic, Google::Cloud::PubSub::V1::Topic, Google::Cloud::PubSub::V1::Topic
37
+ # Creates the given topic with the given name. See the [resource name rules]
38
+ # (https://cloud.google.com/pubsub/docs/admin#resource_names).
39
+ rpc :CreateTopic, ::Google::Cloud::PubSub::V1::Topic, ::Google::Cloud::PubSub::V1::Topic
41
40
  # Updates an existing topic. Note that certain properties of a
42
41
  # topic are not modifiable.
43
- rpc :UpdateTopic, Google::Cloud::PubSub::V1::UpdateTopicRequest, Google::Cloud::PubSub::V1::Topic
42
+ rpc :UpdateTopic, ::Google::Cloud::PubSub::V1::UpdateTopicRequest, ::Google::Cloud::PubSub::V1::Topic
44
43
  # Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic
45
44
  # does not exist.
46
- rpc :Publish, Google::Cloud::PubSub::V1::PublishRequest, Google::Cloud::PubSub::V1::PublishResponse
45
+ rpc :Publish, ::Google::Cloud::PubSub::V1::PublishRequest, ::Google::Cloud::PubSub::V1::PublishResponse
47
46
  # Gets the configuration of a topic.
48
- rpc :GetTopic, Google::Cloud::PubSub::V1::GetTopicRequest, Google::Cloud::PubSub::V1::Topic
47
+ rpc :GetTopic, ::Google::Cloud::PubSub::V1::GetTopicRequest, ::Google::Cloud::PubSub::V1::Topic
49
48
  # Lists matching topics.
50
- rpc :ListTopics, Google::Cloud::PubSub::V1::ListTopicsRequest, Google::Cloud::PubSub::V1::ListTopicsResponse
49
+ rpc :ListTopics, ::Google::Cloud::PubSub::V1::ListTopicsRequest, ::Google::Cloud::PubSub::V1::ListTopicsResponse
51
50
  # Lists the names of the attached subscriptions on this topic.
52
- rpc :ListTopicSubscriptions, Google::Cloud::PubSub::V1::ListTopicSubscriptionsRequest, Google::Cloud::PubSub::V1::ListTopicSubscriptionsResponse
51
+ rpc :ListTopicSubscriptions, ::Google::Cloud::PubSub::V1::ListTopicSubscriptionsRequest, ::Google::Cloud::PubSub::V1::ListTopicSubscriptionsResponse
53
52
  # Lists the names of the snapshots on this topic. Snapshots are used in
54
- # <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
55
- # operations, which allow
56
- # you to manage message acknowledgments in bulk. That is, you can set the
57
- # acknowledgment state of messages in an existing subscription to the state
58
- # captured by a snapshot.
59
- rpc :ListTopicSnapshots, Google::Cloud::PubSub::V1::ListTopicSnapshotsRequest, Google::Cloud::PubSub::V1::ListTopicSnapshotsResponse
53
+ # [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations,
54
+ # which allow you to manage message acknowledgments in bulk. That is, you can
55
+ # set the acknowledgment state of messages in an existing subscription to the
56
+ # state captured by a snapshot.
57
+ rpc :ListTopicSnapshots, ::Google::Cloud::PubSub::V1::ListTopicSnapshotsRequest, ::Google::Cloud::PubSub::V1::ListTopicSnapshotsResponse
60
58
  # Deletes the topic with the given name. Returns `NOT_FOUND` if the topic
61
59
  # does not exist. After a topic is deleted, a new topic may be created with
62
60
  # the same name; this is an entirely new topic with none of the old
63
61
  # configuration or subscriptions. Existing subscriptions to this topic are
64
62
  # not deleted, but their `topic` field is set to `_deleted-topic_`.
65
- rpc :DeleteTopic, Google::Cloud::PubSub::V1::DeleteTopicRequest, Google::Protobuf::Empty
63
+ rpc :DeleteTopic, ::Google::Cloud::PubSub::V1::DeleteTopicRequest, ::Google::Protobuf::Empty
66
64
  # Detaches a subscription from this topic. All messages retained in the
67
65
  # subscription are dropped. Subsequent `Pull` and `StreamingPull` requests
68
66
  # will return FAILED_PRECONDITION. If the subscription is a push
69
67
  # subscription, pushes to the endpoint will stop.
70
- rpc :DetachSubscription, Google::Cloud::PubSub::V1::DetachSubscriptionRequest, Google::Cloud::PubSub::V1::DetachSubscriptionResponse
68
+ rpc :DetachSubscription, ::Google::Cloud::PubSub::V1::DetachSubscriptionRequest, ::Google::Cloud::PubSub::V1::DetachSubscriptionResponse
71
69
  end
72
70
 
73
71
  Stub = Service.rpc_stub_class
@@ -84,39 +82,37 @@ module Google
84
82
  self.unmarshal_class_method = :decode
85
83
  self.service_name = 'google.pubsub.v1.Subscriber'
86
84
 
87
- # Creates a subscription to a given topic. See the
88
- # <a href="https://cloud.google.com/pubsub/docs/admin#resource_names">
89
- # resource name rules</a>.
85
+ # Creates a subscription to a given topic. See the [resource name rules]
86
+ # (https://cloud.google.com/pubsub/docs/admin#resource_names).
90
87
  # If the subscription already exists, returns `ALREADY_EXISTS`.
91
88
  # If the corresponding topic doesn't exist, returns `NOT_FOUND`.
92
89
  #
93
90
  # If the name is not provided in the request, the server will assign a random
94
91
  # name for this subscription on the same project as the topic, conforming
95
- # to the
96
- # [resource name
97
- # format](https://cloud.google.com/pubsub/docs/admin#resource_names). The
98
- # generated name is populated in the returned Subscription object. Note that
99
- # for REST API requests, you must specify a name in the request.
100
- rpc :CreateSubscription, Google::Cloud::PubSub::V1::Subscription, Google::Cloud::PubSub::V1::Subscription
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.
96
+ rpc :CreateSubscription, ::Google::Cloud::PubSub::V1::Subscription, ::Google::Cloud::PubSub::V1::Subscription
101
97
  # Gets the configuration details of a subscription.
102
- rpc :GetSubscription, Google::Cloud::PubSub::V1::GetSubscriptionRequest, Google::Cloud::PubSub::V1::Subscription
98
+ rpc :GetSubscription, ::Google::Cloud::PubSub::V1::GetSubscriptionRequest, ::Google::Cloud::PubSub::V1::Subscription
103
99
  # Updates an existing subscription. Note that certain properties of a
104
100
  # subscription, such as its topic, are not modifiable.
105
- rpc :UpdateSubscription, Google::Cloud::PubSub::V1::UpdateSubscriptionRequest, Google::Cloud::PubSub::V1::Subscription
101
+ rpc :UpdateSubscription, ::Google::Cloud::PubSub::V1::UpdateSubscriptionRequest, ::Google::Cloud::PubSub::V1::Subscription
106
102
  # Lists matching subscriptions.
107
- rpc :ListSubscriptions, Google::Cloud::PubSub::V1::ListSubscriptionsRequest, Google::Cloud::PubSub::V1::ListSubscriptionsResponse
103
+ rpc :ListSubscriptions, ::Google::Cloud::PubSub::V1::ListSubscriptionsRequest, ::Google::Cloud::PubSub::V1::ListSubscriptionsResponse
108
104
  # Deletes an existing subscription. All messages retained in the subscription
109
105
  # are immediately dropped. Calls to `Pull` after deletion will return
110
106
  # `NOT_FOUND`. After a subscription is deleted, a new one may be created with
111
107
  # the same name, but the new one has no association with the old
112
108
  # subscription or its topic unless the same topic is specified.
113
- rpc :DeleteSubscription, Google::Cloud::PubSub::V1::DeleteSubscriptionRequest, Google::Protobuf::Empty
109
+ rpc :DeleteSubscription, ::Google::Cloud::PubSub::V1::DeleteSubscriptionRequest, ::Google::Protobuf::Empty
114
110
  # Modifies the ack deadline for a specific message. This method is useful
115
111
  # to indicate that more time is needed to process a message by the
116
112
  # subscriber, or to make the message available for redelivery if the
117
113
  # processing was interrupted. Note that this does not modify the
118
114
  # subscription-level `ackDeadlineSeconds` used for subsequent messages.
119
- rpc :ModifyAckDeadline, Google::Cloud::PubSub::V1::ModifyAckDeadlineRequest, Google::Protobuf::Empty
115
+ rpc :ModifyAckDeadline, ::Google::Cloud::PubSub::V1::ModifyAckDeadlineRequest, ::Google::Protobuf::Empty
120
116
  # Acknowledges the messages associated with the `ack_ids` in the
121
117
  # `AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages
122
118
  # from the subscription.
@@ -124,11 +120,11 @@ module Google
124
120
  # Acknowledging a message whose ack deadline has expired may succeed,
125
121
  # but such a message may be redelivered later. Acknowledging a message more
126
122
  # than once will not result in an error.
127
- rpc :Acknowledge, Google::Cloud::PubSub::V1::AcknowledgeRequest, Google::Protobuf::Empty
123
+ rpc :Acknowledge, ::Google::Cloud::PubSub::V1::AcknowledgeRequest, ::Google::Protobuf::Empty
128
124
  # Pulls messages from the server. The server may return `UNAVAILABLE` if
129
125
  # there are too many concurrent pull requests pending for the given
130
126
  # subscription.
131
- rpc :Pull, Google::Cloud::PubSub::V1::PullRequest, Google::Cloud::PubSub::V1::PullResponse
127
+ rpc :Pull, ::Google::Cloud::PubSub::V1::PullRequest, ::Google::Cloud::PubSub::V1::PullResponse
132
128
  # Establishes a stream with the server, which sends messages down to the
133
129
  # client. The client streams acknowledgements and ack deadline modifications
134
130
  # back to the server. The server will close the stream and return the status
@@ -136,73 +132,68 @@ module Google
136
132
  # reassign server-side resources, in which case, the client should
137
133
  # re-establish the stream. Flow control can be achieved by configuring the
138
134
  # underlying RPC channel.
139
- rpc :StreamingPull, stream(Google::Cloud::PubSub::V1::StreamingPullRequest), stream(Google::Cloud::PubSub::V1::StreamingPullResponse)
135
+ rpc :StreamingPull, stream(::Google::Cloud::PubSub::V1::StreamingPullRequest), stream(::Google::Cloud::PubSub::V1::StreamingPullResponse)
140
136
  # Modifies the `PushConfig` for a specified subscription.
141
137
  #
142
138
  # This may be used to change a push subscription to a pull one (signified by
143
139
  # an empty `PushConfig`) or vice versa, or change the endpoint URL and other
144
140
  # attributes of a push subscription. Messages will accumulate for delivery
145
141
  # continuously through the call regardless of changes to the `PushConfig`.
146
- rpc :ModifyPushConfig, Google::Cloud::PubSub::V1::ModifyPushConfigRequest, Google::Protobuf::Empty
142
+ rpc :ModifyPushConfig, ::Google::Cloud::PubSub::V1::ModifyPushConfigRequest, ::Google::Protobuf::Empty
147
143
  # Gets the configuration details of a snapshot. Snapshots are used in
148
144
  # <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
149
145
  # operations, which allow you to manage message acknowledgments in bulk. That
150
146
  # is, you can set the acknowledgment state of messages in an existing
151
147
  # subscription to the state captured by a snapshot.
152
- rpc :GetSnapshot, Google::Cloud::PubSub::V1::GetSnapshotRequest, Google::Cloud::PubSub::V1::Snapshot
153
- # Lists the existing snapshots. Snapshots are used in
154
- # <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
155
- # operations, which allow
156
- # you to manage message acknowledgments in bulk. That is, you can set the
157
- # acknowledgment state of messages in an existing subscription to the state
158
- # captured by a snapshot.
159
- rpc :ListSnapshots, Google::Cloud::PubSub::V1::ListSnapshotsRequest, Google::Cloud::PubSub::V1::ListSnapshotsResponse
148
+ rpc :GetSnapshot, ::Google::Cloud::PubSub::V1::GetSnapshotRequest, ::Google::Cloud::PubSub::V1::Snapshot
149
+ # Lists the existing snapshots. Snapshots are used in [Seek](
150
+ # https://cloud.google.com/pubsub/docs/replay-overview) operations, which
151
+ # allow you to manage message acknowledgments in bulk. That is, you can set
152
+ # the acknowledgment state of messages in an existing subscription to the
153
+ # state captured by a snapshot.
154
+ rpc :ListSnapshots, ::Google::Cloud::PubSub::V1::ListSnapshotsRequest, ::Google::Cloud::PubSub::V1::ListSnapshotsResponse
160
155
  # Creates a snapshot from the requested subscription. Snapshots are used in
161
- # <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
162
- # operations, which allow
163
- # you to manage message acknowledgments in bulk. That is, you can set the
164
- # acknowledgment state of messages in an existing subscription to the state
165
- # captured by a snapshot.
166
- # <br><br>If the snapshot already exists, returns `ALREADY_EXISTS`.
156
+ # [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations,
157
+ # which allow you to manage message acknowledgments in bulk. That is, you can
158
+ # set the acknowledgment state of messages in an existing subscription to the
159
+ # state captured by a snapshot.
160
+ # If the snapshot already exists, returns `ALREADY_EXISTS`.
167
161
  # If the requested subscription doesn't exist, returns `NOT_FOUND`.
168
162
  # If the backlog in the subscription is too old -- and the resulting snapshot
169
163
  # would expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned.
170
164
  # See also the `Snapshot.expire_time` field. If the name is not provided in
171
165
  # the request, the server will assign a random
172
166
  # name for this snapshot on the same project as the subscription, conforming
173
- # to the
174
- # [resource name
175
- # format](https://cloud.google.com/pubsub/docs/admin#resource_names). The
167
+ # to the [resource name format]
168
+ # (https://cloud.google.com/pubsub/docs/admin#resource_names). The
176
169
  # generated name is populated in the returned Snapshot object. Note that for
177
170
  # REST API requests, you must specify a name in the request.
178
- rpc :CreateSnapshot, Google::Cloud::PubSub::V1::CreateSnapshotRequest, Google::Cloud::PubSub::V1::Snapshot
171
+ rpc :CreateSnapshot, ::Google::Cloud::PubSub::V1::CreateSnapshotRequest, ::Google::Cloud::PubSub::V1::Snapshot
179
172
  # Updates an existing snapshot. Snapshots are used in
180
173
  # <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
181
174
  # operations, which allow
182
175
  # you to manage message acknowledgments in bulk. That is, you can set the
183
176
  # acknowledgment state of messages in an existing subscription to the state
184
177
  # captured by a snapshot.
185
- rpc :UpdateSnapshot, Google::Cloud::PubSub::V1::UpdateSnapshotRequest, Google::Cloud::PubSub::V1::Snapshot
186
- # Removes an existing snapshot. Snapshots are used in
187
- # <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
188
- # operations, which allow
189
- # you to manage message acknowledgments in bulk. That is, you can set the
190
- # acknowledgment state of messages in an existing subscription to the state
191
- # captured by a snapshot.<br><br>
178
+ rpc :UpdateSnapshot, ::Google::Cloud::PubSub::V1::UpdateSnapshotRequest, ::Google::Cloud::PubSub::V1::Snapshot
179
+ # Removes an existing snapshot. Snapshots are used in [Seek]
180
+ # (https://cloud.google.com/pubsub/docs/replay-overview) operations, which
181
+ # allow you to manage message acknowledgments in bulk. That is, you can set
182
+ # the acknowledgment state of messages in an existing subscription to the
183
+ # state captured by a snapshot.
192
184
  # When the snapshot is deleted, all messages retained in the snapshot
193
185
  # are immediately dropped. After a snapshot is deleted, a new one may be
194
186
  # created with the same name, but the new one has no association with the old
195
187
  # snapshot or its subscription, unless the same subscription is specified.
196
- rpc :DeleteSnapshot, Google::Cloud::PubSub::V1::DeleteSnapshotRequest, Google::Protobuf::Empty
188
+ rpc :DeleteSnapshot, ::Google::Cloud::PubSub::V1::DeleteSnapshotRequest, ::Google::Protobuf::Empty
197
189
  # Seeks an existing subscription to a point in time or to a given snapshot,
198
- # whichever is provided in the request. Snapshots are used in
199
- # <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
200
- # operations, which allow
201
- # you to manage message acknowledgments in bulk. That is, you can set the
202
- # acknowledgment state of messages in an existing subscription to the state
203
- # captured by a snapshot. Note that both the subscription and the snapshot
204
- # must be on the same topic.
205
- rpc :Seek, Google::Cloud::PubSub::V1::SeekRequest, Google::Cloud::PubSub::V1::SeekResponse
190
+ # whichever is provided in the request. Snapshots are used in [Seek]
191
+ # (https://cloud.google.com/pubsub/docs/replay-overview) operations, which
192
+ # allow you to manage message acknowledgments in bulk. That is, you can set
193
+ # the acknowledgment state of messages in an existing subscription to the
194
+ # state captured by a snapshot. Note that both the subscription and the
195
+ # snapshot must be on the same topic.
196
+ rpc :Seek, ::Google::Cloud::PubSub::V1::SeekRequest, ::Google::Cloud::PubSub::V1::SeekResponse
206
197
  end
207
198
 
208
199
  Stub = Service.rpc_stub_class
@@ -0,0 +1,95 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/pubsub/v1/schema.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'google/api/annotations_pb'
7
+ require 'google/api/client_pb'
8
+ require 'google/api/field_behavior_pb'
9
+ require 'google/api/resource_pb'
10
+ require 'google/protobuf/empty_pb'
11
+ Google::Protobuf::DescriptorPool.generated_pool.build do
12
+ add_file("google/pubsub/v1/schema.proto", :syntax => :proto3) do
13
+ add_message "google.pubsub.v1.Schema" do
14
+ optional :name, :string, 1
15
+ optional :type, :enum, 2, "google.pubsub.v1.Schema.Type"
16
+ optional :definition, :string, 3
17
+ end
18
+ add_enum "google.pubsub.v1.Schema.Type" do
19
+ value :TYPE_UNSPECIFIED, 0
20
+ value :PROTOCOL_BUFFER, 1
21
+ value :AVRO, 2
22
+ end
23
+ add_message "google.pubsub.v1.CreateSchemaRequest" do
24
+ optional :parent, :string, 1
25
+ optional :schema, :message, 2, "google.pubsub.v1.Schema"
26
+ optional :schema_id, :string, 3
27
+ end
28
+ add_message "google.pubsub.v1.GetSchemaRequest" do
29
+ optional :name, :string, 1
30
+ optional :view, :enum, 2, "google.pubsub.v1.SchemaView"
31
+ end
32
+ add_message "google.pubsub.v1.ListSchemasRequest" do
33
+ optional :parent, :string, 1
34
+ optional :view, :enum, 2, "google.pubsub.v1.SchemaView"
35
+ optional :page_size, :int32, 3
36
+ optional :page_token, :string, 4
37
+ end
38
+ add_message "google.pubsub.v1.ListSchemasResponse" do
39
+ repeated :schemas, :message, 1, "google.pubsub.v1.Schema"
40
+ optional :next_page_token, :string, 2
41
+ end
42
+ add_message "google.pubsub.v1.DeleteSchemaRequest" do
43
+ optional :name, :string, 1
44
+ end
45
+ add_message "google.pubsub.v1.ValidateSchemaRequest" do
46
+ optional :parent, :string, 1
47
+ optional :schema, :message, 2, "google.pubsub.v1.Schema"
48
+ end
49
+ add_message "google.pubsub.v1.ValidateSchemaResponse" do
50
+ end
51
+ add_message "google.pubsub.v1.ValidateMessageRequest" do
52
+ optional :parent, :string, 1
53
+ optional :message, :bytes, 4
54
+ optional :encoding, :enum, 5, "google.pubsub.v1.Encoding"
55
+ oneof :schema_spec do
56
+ optional :name, :string, 2
57
+ optional :schema, :message, 3, "google.pubsub.v1.Schema"
58
+ end
59
+ end
60
+ add_message "google.pubsub.v1.ValidateMessageResponse" do
61
+ end
62
+ add_enum "google.pubsub.v1.SchemaView" do
63
+ value :SCHEMA_VIEW_UNSPECIFIED, 0
64
+ value :BASIC, 1
65
+ value :FULL, 2
66
+ end
67
+ add_enum "google.pubsub.v1.Encoding" do
68
+ value :ENCODING_UNSPECIFIED, 0
69
+ value :JSON, 1
70
+ value :BINARY, 2
71
+ end
72
+ end
73
+ end
74
+
75
+ module Google
76
+ module Cloud
77
+ module PubSub
78
+ module V1
79
+ Schema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.Schema").msgclass
80
+ Schema::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.Schema.Type").enummodule
81
+ CreateSchemaRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.CreateSchemaRequest").msgclass
82
+ GetSchemaRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.GetSchemaRequest").msgclass
83
+ ListSchemasRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListSchemasRequest").msgclass
84
+ ListSchemasResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListSchemasResponse").msgclass
85
+ DeleteSchemaRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.DeleteSchemaRequest").msgclass
86
+ ValidateSchemaRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ValidateSchemaRequest").msgclass
87
+ ValidateSchemaResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ValidateSchemaResponse").msgclass
88
+ ValidateMessageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ValidateMessageRequest").msgclass
89
+ ValidateMessageResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ValidateMessageResponse").msgclass
90
+ SchemaView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.SchemaView").enummodule
91
+ Encoding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.Encoding").enummodule
92
+ end
93
+ end
94
+ end
95
+ end
@@ -0,0 +1,58 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: google/pubsub/v1/schema.proto for package 'Google.Cloud.PubSub.V1'
3
+ # Original file comments:
4
+ # Copyright 2020 Google LLC
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+ #
18
+
19
+ require 'grpc'
20
+ require 'google/pubsub/v1/schema_pb'
21
+
22
+ module Google
23
+ module Cloud
24
+ module PubSub
25
+ module V1
26
+ module SchemaService
27
+ # Service for doing schema-related operations.
28
+ #
29
+ # EXPERIMENTAL: The Schema service is in development and may not work yet.
30
+ #
31
+ class Service
32
+
33
+ include GRPC::GenericService
34
+
35
+ self.marshal_class_method = :encode
36
+ self.unmarshal_class_method = :decode
37
+ self.service_name = 'google.pubsub.v1.SchemaService'
38
+
39
+ # Creates a schema.
40
+ rpc :CreateSchema, ::Google::Cloud::PubSub::V1::CreateSchemaRequest, ::Google::Cloud::PubSub::V1::Schema
41
+ # Gets a schema.
42
+ rpc :GetSchema, ::Google::Cloud::PubSub::V1::GetSchemaRequest, ::Google::Cloud::PubSub::V1::Schema
43
+ # Lists schemas in a project.
44
+ rpc :ListSchemas, ::Google::Cloud::PubSub::V1::ListSchemasRequest, ::Google::Cloud::PubSub::V1::ListSchemasResponse
45
+ # Deletes a schema.
46
+ rpc :DeleteSchema, ::Google::Cloud::PubSub::V1::DeleteSchemaRequest, ::Google::Protobuf::Empty
47
+ # Validates a schema.
48
+ rpc :ValidateSchema, ::Google::Cloud::PubSub::V1::ValidateSchemaRequest, ::Google::Cloud::PubSub::V1::ValidateSchemaResponse
49
+ # Validates a message against a schema.
50
+ rpc :ValidateMessage, ::Google::Cloud::PubSub::V1::ValidateMessageRequest, ::Google::Cloud::PubSub::V1::ValidateMessageResponse
51
+ end
52
+
53
+ Stub = Service.rpc_stub_class
54
+ end
55
+ end
56
+ end
57
+ end
58
+ end
@@ -54,6 +54,12 @@ module Google
54
54
  # This indicates that the field may be set once in a request to create a
55
55
  # resource, but may not be changed thereafter.
56
56
  IMMUTABLE = 5
57
+
58
+ # Denotes that a (repeated) field is an unordered list.
59
+ # This indicates that the service may provide the elements of the list
60
+ # in any arbitrary order, rather than the order the user originally
61
+ # provided. Additionally, the list's order may or may not be stable.
62
+ UNORDERED_LIST = 6
57
63
  end
58
64
  end
59
65
  end
@@ -43,12 +43,12 @@ module Google
43
43
  #
44
44
  # The ResourceDescriptor Yaml config will look like:
45
45
  #
46
- # resources:
47
- # - type: "pubsub.googleapis.com/Topic"
48
- # name_descriptor:
49
- # - pattern: "projects/\\{project}/topics/\\{topic}"
50
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
51
- # parent_name_extractor: "projects/\\{project}"
46
+ # resources:
47
+ # - type: "pubsub.googleapis.com/Topic"
48
+ # name_descriptor:
49
+ # - pattern: "projects/{project}/topics/{topic}"
50
+ # parent_type: "cloudresourcemanager.googleapis.com/Project"
51
+ # parent_name_extractor: "projects/{project}"
52
52
  #
53
53
  # Sometimes, resources have multiple patterns, typically because they can
54
54
  # live under multiple parents.
@@ -183,15 +183,24 @@ module Google
183
183
  # }
184
184
  # @!attribute [rw] plural
185
185
  # @return [::String]
186
- # The plural name used in the resource name, such as 'projects' for
187
- # the name of 'projects/\\{project}'. It is the same concept of the `plural`
188
- # field in k8s CRD spec
186
+ # The plural name used in the resource name and permission names, such as
187
+ # 'projects' for the resource name of 'projects/\\{project}' and the permission
188
+ # name of 'cloudresourcemanager.googleapis.com/projects.get'. It is the same
189
+ # concept of the `plural` field in k8s CRD spec
189
190
  # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
191
+ #
192
+ # Note: The plural form is required even for singleton resources. See
193
+ # https://aip.dev/156
190
194
  # @!attribute [rw] singular
191
195
  # @return [::String]
192
196
  # The same concept of the `singular` field in k8s CRD spec
193
197
  # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
194
198
  # Such as "project" for the `resourcemanager.googleapis.com/Project` type.
199
+ # @!attribute [rw] style
200
+ # @return [::Array<::Google::Api::ResourceDescriptor::Style>]
201
+ # Style flag(s) for this resource.
202
+ # These indicate that a resource is expected to conform to a given
203
+ # style. See the specific style flags for additional information.
195
204
  class ResourceDescriptor
196
205
  include ::Google::Protobuf::MessageExts
197
206
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -211,6 +220,22 @@ module Google
211
220
  # that from being necessary once there are multiple patterns.)
212
221
  FUTURE_MULTI_PATTERN = 2
213
222
  end
223
+
224
+ # A flag representing a specific style that a resource claims to conform to.
225
+ module Style
226
+ # The unspecified value. Do not use.
227
+ STYLE_UNSPECIFIED = 0
228
+
229
+ # This resource is intended to be "declarative-friendly".
230
+ #
231
+ # Declarative-friendly resources must be more strictly consistent, and
232
+ # setting this to true communicates to tools that this resource should
233
+ # adhere to declarative-friendly expectations.
234
+ #
235
+ # Note: This is used by the API linter (linter.aip.dev) to enable
236
+ # additional checks.
237
+ DECLARATIVE_FRIENDLY = 1
238
+ end
214
239
  end
215
240
 
216
241
  # Defines a proto annotation that describes a string field that refers to
@@ -226,6 +251,17 @@ module Google
226
251
  # type: "pubsub.googleapis.com/Topic"
227
252
  # }];
228
253
  # }
254
+ #
255
+ # Occasionally, a field may reference an arbitrary resource. In this case,
256
+ # APIs use the special value * in their resource reference.
257
+ #
258
+ # Example:
259
+ #
260
+ # message GetIamPolicyRequest {
261
+ # string resource = 2 [(google.api.resource_reference) = {
262
+ # type: "*"
263
+ # }];
264
+ # }
229
265
  # @!attribute [rw] child_type
230
266
  # @return [::String]
231
267
  # The resource type of a child collection that the annotated field
@@ -234,11 +270,11 @@ module Google
234
270
  #
235
271
  # Example:
236
272
  #
237
- # message ListLogEntriesRequest {
238
- # string parent = 1 [(google.api.resource_reference) = {
239
- # child_type: "logging.googleapis.com/LogEntry"
240
- # };
241
- # }
273
+ # message ListLogEntriesRequest {
274
+ # string parent = 1 [(google.api.resource_reference) = {
275
+ # child_type: "logging.googleapis.com/LogEntry"
276
+ # };
277
+ # }
242
278
  class ResourceReference
243
279
  include ::Google::Protobuf::MessageExts
244
280
  extend ::Google::Protobuf::MessageExts::ClassMethods