Skip to content

Commit e36b327

Browse files
1 parent f43b6ee commit e36b327

File tree

7 files changed

+285
-5
lines changed

7 files changed

+285
-5
lines changed

src/Pubsub/AwsKinesis.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,15 @@ class AwsKinesis extends \Google\Model
5151
* The Kinesis consumer does not exist.
5252
*/
5353
public const STATE_CONSUMER_NOT_FOUND = 'CONSUMER_NOT_FOUND';
54+
/**
55+
* Indicates an error state where the ingestion source cannot be processed.
56+
* This occurs because there is no overlap between the regions allowed by the
57+
* topic's `MessageStoragePolicy` and the regions permitted by the Regional
58+
* Access Boundary (RAB) restrictions on the project's Pub/Sub service
59+
* account. A common, allowed region is required to determine a valid
60+
* ingestion region.
61+
*/
62+
public const STATE_CONFLICTING_REGION_CONSTRAINTS = 'CONFLICTING_REGION_CONSTRAINTS';
5463
/**
5564
* Required. AWS role ARN to be used for Federated Identity authentication
5665
* with Kinesis. Check the Pub/Sub docs for how to set up this role and the
@@ -148,7 +157,8 @@ public function getGcpServiceAccount()
148157
* ingestion source.
149158
*
150159
* Accepted values: STATE_UNSPECIFIED, ACTIVE, KINESIS_PERMISSION_DENIED,
151-
* PUBLISH_PERMISSION_DENIED, STREAM_NOT_FOUND, CONSUMER_NOT_FOUND
160+
* PUBLISH_PERMISSION_DENIED, STREAM_NOT_FOUND, CONSUMER_NOT_FOUND,
161+
* CONFLICTING_REGION_CONSTRAINTS
152162
*
153163
* @param self::STATE_* $state
154164
*/

src/Pubsub/AwsMsk.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,15 @@ class AwsMsk extends \Google\Model
4343
* The provided topic wasn't found.
4444
*/
4545
public const STATE_TOPIC_NOT_FOUND = 'TOPIC_NOT_FOUND';
46+
/**
47+
* Indicates an error state where the ingestion source cannot be processed.
48+
* This occurs because there is no overlap between the regions allowed by the
49+
* topic's `MessageStoragePolicy` and the regions permitted by the Regional
50+
* Access Boundary (RAB) restrictions on the project's Pub/Sub service
51+
* account. A common, allowed region is required to determine a valid
52+
* ingestion region.
53+
*/
54+
public const STATE_CONFLICTING_REGION_CONSTRAINTS = 'CONFLICTING_REGION_CONSTRAINTS';
4655
/**
4756
* Required. AWS role ARN to be used for Federated Identity authentication
4857
* with Amazon MSK. Check the Pub/Sub docs for how to set up this role and the
@@ -141,7 +150,8 @@ public function getGcpServiceAccount()
141150
* MSK ingestion source.
142151
*
143152
* Accepted values: STATE_UNSPECIFIED, ACTIVE, MSK_PERMISSION_DENIED,
144-
* PUBLISH_PERMISSION_DENIED, CLUSTER_NOT_FOUND, TOPIC_NOT_FOUND
153+
* PUBLISH_PERMISSION_DENIED, CLUSTER_NOT_FOUND, TOPIC_NOT_FOUND,
154+
* CONFLICTING_REGION_CONSTRAINTS
145155
*
146156
* @param self::STATE_* $state
147157
*/

src/Pubsub/AzureEventHubs.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,15 @@ class AzureEventHubs extends \Google\Model
5353
* The provided Event Hubs resource group couldn't be found.
5454
*/
5555
public const STATE_RESOURCE_GROUP_NOT_FOUND = 'RESOURCE_GROUP_NOT_FOUND';
56+
/**
57+
* Indicates an error state where the ingestion source cannot be processed.
58+
* This occurs because there is no overlap between the regions allowed by the
59+
* topic's `MessageStoragePolicy` and the regions permitted by the Regional
60+
* Access Boundary (RAB) restrictions on the project's Pub/Sub service
61+
* account. A common, allowed region is required to determine a valid
62+
* ingestion region.
63+
*/
64+
public const STATE_CONFLICTING_REGION_CONSTRAINTS = 'CONFLICTING_REGION_CONSTRAINTS';
5665
/**
5766
* Optional. The client id of the Azure application that is being used to
5867
* authenticate Pub/Sub.
@@ -194,7 +203,8 @@ public function getResourceGroup()
194203
*
195204
* Accepted values: STATE_UNSPECIFIED, ACTIVE, EVENT_HUBS_PERMISSION_DENIED,
196205
* PUBLISH_PERMISSION_DENIED, NAMESPACE_NOT_FOUND, EVENT_HUB_NOT_FOUND,
197-
* SUBSCRIPTION_NOT_FOUND, RESOURCE_GROUP_NOT_FOUND
206+
* SUBSCRIPTION_NOT_FOUND, RESOURCE_GROUP_NOT_FOUND,
207+
* CONFLICTING_REGION_CONSTRAINTS
198208
*
199209
* @param self::STATE_* $state
200210
*/

src/Pubsub/BigtableConfig.php

Lines changed: 212 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,212 @@
1+
<?php
2+
/*
3+
* Copyright 2014 Google Inc.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
6+
* use this file except in compliance with the License. You may obtain a copy of
7+
* the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14+
* License for the specific language governing permissions and limitations under
15+
* the License.
16+
*/
17+
18+
namespace Google\Service\Pubsub;
19+
20+
class BigtableConfig extends \Google\Model
21+
{
22+
/**
23+
* Default value. This value is unused.
24+
*/
25+
public const STATE_STATE_UNSPECIFIED = 'STATE_UNSPECIFIED';
26+
/**
27+
* The subscription can actively send messages to Bigtable.
28+
*/
29+
public const STATE_ACTIVE = 'ACTIVE';
30+
/**
31+
* Cannot write to Bigtable because the instance, table, or app profile does
32+
* not exist.
33+
*/
34+
public const STATE_NOT_FOUND = 'NOT_FOUND';
35+
/**
36+
* Cannot write to Bigtable because the app profile is not configured for
37+
* single-cluster routing.
38+
*/
39+
public const STATE_APP_PROFILE_MISCONFIGURED = 'APP_PROFILE_MISCONFIGURED';
40+
/**
41+
* Cannot write to Bigtable because of permission denied errors. This can
42+
* happen if: - The Pub/Sub service agent has not been granted the
43+
* [appropriate Bigtable IAM permission bigtable.tables.mutateRows]({$universe
44+
* .dns_names.final_documentation_domain}/bigtable/docs/access-
45+
* control#permissions) - The bigtable.googleapis.com API is not enabled for
46+
* the project
47+
* ([instructions]({$universe.dns_names.final_documentation_domain}/service-
48+
* usage/docs/enable-disable))
49+
*/
50+
public const STATE_PERMISSION_DENIED = 'PERMISSION_DENIED';
51+
/**
52+
* Cannot write to Bigtable because of a missing column family ("data") or if
53+
* there is no structured row key for the subscription name + message ID.
54+
*/
55+
public const STATE_SCHEMA_MISMATCH = 'SCHEMA_MISMATCH';
56+
/**
57+
* Cannot write to the destination because enforce_in_transit is set to true
58+
* and the destination locations are not in the allowed regions.
59+
*/
60+
public const STATE_IN_TRANSIT_LOCATION_RESTRICTION = 'IN_TRANSIT_LOCATION_RESTRICTION';
61+
/**
62+
* Cannot write to Bigtable because the table is not in the same location as
63+
* where Vertex AI models used in `message_transform`s are deployed.
64+
*/
65+
public const STATE_VERTEX_AI_LOCATION_RESTRICTION = 'VERTEX_AI_LOCATION_RESTRICTION';
66+
/**
67+
* Optional. The app profile to use for the Bigtable writes. If not specified,
68+
* the "default" application profile will be used. The app profile must use
69+
* single-cluster routing.
70+
*
71+
* @var string
72+
*/
73+
public $appProfileId;
74+
/**
75+
* Optional. The service account to use to write to Bigtable. The subscription
76+
* creator or updater that specifies this field must have
77+
* `iam.serviceAccounts.actAs` permission on the service account. If not
78+
* specified, the Pub/Sub [service
79+
* agent](https://cloud.google.com/iam/docs/service-agents),
80+
* service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.
81+
*
82+
* @var string
83+
*/
84+
public $serviceAccountEmail;
85+
/**
86+
* Output only. An output-only field that indicates whether or not the
87+
* subscription can receive messages.
88+
*
89+
* @var string
90+
*/
91+
public $state;
92+
/**
93+
* Optional. The unique name of the table to write messages to. Values are of
94+
* the form `projects//instances//tables/`.
95+
*
96+
* @var string
97+
*/
98+
public $table;
99+
/**
100+
* Optional. When true, write the subscription name, message_id, publish_time,
101+
* attributes, and ordering_key to additional columns in the table under the
102+
* pubsub_metadata column family. The subscription name, message_id, and
103+
* publish_time fields are put in their own columns while all other message
104+
* properties (other than data) are written to a JSON object in the attributes
105+
* column.
106+
*
107+
* @var bool
108+
*/
109+
public $writeMetadata;
110+
111+
/**
112+
* Optional. The app profile to use for the Bigtable writes. If not specified,
113+
* the "default" application profile will be used. The app profile must use
114+
* single-cluster routing.
115+
*
116+
* @param string $appProfileId
117+
*/
118+
public function setAppProfileId($appProfileId)
119+
{
120+
$this->appProfileId = $appProfileId;
121+
}
122+
/**
123+
* @return string
124+
*/
125+
public function getAppProfileId()
126+
{
127+
return $this->appProfileId;
128+
}
129+
/**
130+
* Optional. The service account to use to write to Bigtable. The subscription
131+
* creator or updater that specifies this field must have
132+
* `iam.serviceAccounts.actAs` permission on the service account. If not
133+
* specified, the Pub/Sub [service
134+
* agent](https://cloud.google.com/iam/docs/service-agents),
135+
* service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.
136+
*
137+
* @param string $serviceAccountEmail
138+
*/
139+
public function setServiceAccountEmail($serviceAccountEmail)
140+
{
141+
$this->serviceAccountEmail = $serviceAccountEmail;
142+
}
143+
/**
144+
* @return string
145+
*/
146+
public function getServiceAccountEmail()
147+
{
148+
return $this->serviceAccountEmail;
149+
}
150+
/**
151+
* Output only. An output-only field that indicates whether or not the
152+
* subscription can receive messages.
153+
*
154+
* Accepted values: STATE_UNSPECIFIED, ACTIVE, NOT_FOUND,
155+
* APP_PROFILE_MISCONFIGURED, PERMISSION_DENIED, SCHEMA_MISMATCH,
156+
* IN_TRANSIT_LOCATION_RESTRICTION, VERTEX_AI_LOCATION_RESTRICTION
157+
*
158+
* @param self::STATE_* $state
159+
*/
160+
public function setState($state)
161+
{
162+
$this->state = $state;
163+
}
164+
/**
165+
* @return self::STATE_*
166+
*/
167+
public function getState()
168+
{
169+
return $this->state;
170+
}
171+
/**
172+
* Optional. The unique name of the table to write messages to. Values are of
173+
* the form `projects//instances//tables/`.
174+
*
175+
* @param string $table
176+
*/
177+
public function setTable($table)
178+
{
179+
$this->table = $table;
180+
}
181+
/**
182+
* @return string
183+
*/
184+
public function getTable()
185+
{
186+
return $this->table;
187+
}
188+
/**
189+
* Optional. When true, write the subscription name, message_id, publish_time,
190+
* attributes, and ordering_key to additional columns in the table under the
191+
* pubsub_metadata column family. The subscription name, message_id, and
192+
* publish_time fields are put in their own columns while all other message
193+
* properties (other than data) are written to a JSON object in the attributes
194+
* column.
195+
*
196+
* @param bool $writeMetadata
197+
*/
198+
public function setWriteMetadata($writeMetadata)
199+
{
200+
$this->writeMetadata = $writeMetadata;
201+
}
202+
/**
203+
* @return bool
204+
*/
205+
public function getWriteMetadata()
206+
{
207+
return $this->writeMetadata;
208+
}
209+
}
210+
211+
// Adding a class alias for backwards compatibility with the previous class name.
212+
class_alias(BigtableConfig::class, 'Google_Service_Pubsub_BigtableConfig');

src/Pubsub/CloudStorage.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,15 @@ class CloudStorage extends \Google\Model
5151
* The Cloud Storage bucket has too many objects, ingestion will be paused.
5252
*/
5353
public const STATE_TOO_MANY_OBJECTS = 'TOO_MANY_OBJECTS';
54+
/**
55+
* Indicates an error state where the ingestion source cannot be processed.
56+
* This occurs because there is no overlap between the regions allowed by the
57+
* topic's `MessageStoragePolicy` and the regions permitted by the Regional
58+
* Access Boundary (RAB) restrictions on the project's Pub/Sub service
59+
* account. A common, allowed region is required to determine a valid
60+
* ingestion region.
61+
*/
62+
public const STATE_CONFLICTING_REGION_CONSTRAINTS = 'CONFLICTING_REGION_CONSTRAINTS';
5463
protected $avroFormatType = AvroFormat::class;
5564
protected $avroFormatDataType = '';
5665
/**
@@ -182,7 +191,7 @@ public function getPubsubAvroFormat()
182191
*
183192
* Accepted values: STATE_UNSPECIFIED, ACTIVE,
184193
* CLOUD_STORAGE_PERMISSION_DENIED, PUBLISH_PERMISSION_DENIED,
185-
* BUCKET_NOT_FOUND, TOO_MANY_OBJECTS
194+
* BUCKET_NOT_FOUND, TOO_MANY_OBJECTS, CONFLICTING_REGION_CONSTRAINTS
186195
*
187196
* @param self::STATE_* $state
188197
*/

src/Pubsub/ConfluentCloud.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,15 @@ class ConfluentCloud extends \Google\Model
4747
* The provided topic wasn't found.
4848
*/
4949
public const STATE_TOPIC_NOT_FOUND = 'TOPIC_NOT_FOUND';
50+
/**
51+
* Indicates an error state where the ingestion source cannot be processed.
52+
* This occurs because there is no overlap between the regions allowed by the
53+
* topic's `MessageStoragePolicy` and the regions permitted by the Regional
54+
* Access Boundary (RAB) restrictions on the project's Pub/Sub service
55+
* account. A common, allowed region is required to determine a valid
56+
* ingestion region.
57+
*/
58+
public const STATE_CONFLICTING_REGION_CONSTRAINTS = 'CONFLICTING_REGION_CONSTRAINTS';
5059
/**
5160
* Required. The address of the bootstrap server. The format is url:port.
5261
*
@@ -166,7 +175,8 @@ public function getIdentityPoolId()
166175
*
167176
* Accepted values: STATE_UNSPECIFIED, ACTIVE,
168177
* CONFLUENT_CLOUD_PERMISSION_DENIED, PUBLISH_PERMISSION_DENIED,
169-
* UNREACHABLE_BOOTSTRAP_SERVER, CLUSTER_NOT_FOUND, TOPIC_NOT_FOUND
178+
* UNREACHABLE_BOOTSTRAP_SERVER, CLUSTER_NOT_FOUND, TOPIC_NOT_FOUND,
179+
* CONFLICTING_REGION_CONSTRAINTS
170180
*
171181
* @param self::STATE_* $state
172182
*/

src/Pubsub/Subscription.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ class Subscription extends \Google\Collection
5858
protected $analyticsHubSubscriptionInfoDataType = '';
5959
protected $bigqueryConfigType = BigQueryConfig::class;
6060
protected $bigqueryConfigDataType = '';
61+
protected $bigtableConfigType = BigtableConfig::class;
62+
protected $bigtableConfigDataType = '';
6163
protected $cloudStorageConfigType = CloudStorageConfig::class;
6264
protected $cloudStorageConfigDataType = '';
6365
protected $deadLetterPolicyType = DeadLetterPolicy::class;
@@ -251,6 +253,23 @@ public function getBigqueryConfig()
251253
{
252254
return $this->bigqueryConfig;
253255
}
256+
/**
257+
* Optional. If delivery to Bigtable is used with this subscription, this
258+
* field is used to configure it.
259+
*
260+
* @param BigtableConfig $bigtableConfig
261+
*/
262+
public function setBigtableConfig(BigtableConfig $bigtableConfig)
263+
{
264+
$this->bigtableConfig = $bigtableConfig;
265+
}
266+
/**
267+
* @return BigtableConfig
268+
*/
269+
public function getBigtableConfig()
270+
{
271+
return $this->bigtableConfig;
272+
}
254273
/**
255274
* Optional. If delivery to Google Cloud Storage is used with this
256275
* subscription, this field is used to configure it.

0 commit comments

Comments
 (0)