|
| 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'); |
0 commit comments