|
| 1 | +// Copyright 2026 Google LLC |
| 2 | +// |
| 3 | +// Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +// you may not use this file except in compliance with the License. |
| 5 | +// You may obtain a copy of the License at |
| 6 | +// |
| 7 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +// |
| 9 | +// Unless required by applicable law or agreed to in writing, software |
| 10 | +// distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +// See the License for the specific language governing permissions and |
| 13 | +// limitations under the License. |
| 14 | + |
| 15 | +syntax = "proto3"; |
| 16 | + |
| 17 | +package google.cloud.dataplex.v1; |
| 18 | + |
| 19 | +import "google/api/annotations.proto"; |
| 20 | +import "google/api/client.proto"; |
| 21 | +import "google/api/field_behavior.proto"; |
| 22 | +import "google/api/field_info.proto"; |
| 23 | +import "google/api/resource.proto"; |
| 24 | +import "google/cloud/dataplex/v1/business_glossary.proto"; |
| 25 | +import "google/cloud/dataplex/v1/catalog.proto"; |
| 26 | +import "google/protobuf/timestamp.proto"; |
| 27 | + |
| 28 | +option csharp_namespace = "Google.Cloud.Dataplex.V1"; |
| 29 | +option go_package = "cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb"; |
| 30 | +option java_multiple_files = true; |
| 31 | +option java_outer_classname = "ApprovalWorkflowProto"; |
| 32 | +option java_package = "com.google.cloud.dataplex.v1"; |
| 33 | +option php_namespace = "Google\\Cloud\\Dataplex\\V1"; |
| 34 | +option ruby_package = "Google::Cloud::Dataplex::V1"; |
| 35 | + |
| 36 | +// Represents a proposed change to a metadata resource. |
| 37 | +message ChangeRequest { |
| 38 | + option (google.api.resource) = { |
| 39 | + type: "dataplex.googleapis.com/ChangeRequest" |
| 40 | + pattern: "projects/{project}/locations/{location}/changeRequests/{change_request}" |
| 41 | + plural: "changeRequests" |
| 42 | + singular: "changeRequest" |
| 43 | + }; |
| 44 | + |
| 45 | + // Possible states of a ChangeRequest. |
| 46 | + enum State { |
| 47 | + // State unspecified. |
| 48 | + STATE_UNSPECIFIED = 0; |
| 49 | + |
| 50 | + // The change is proposed and new. |
| 51 | + NEW = 1; |
| 52 | + |
| 53 | + // The change has been approved. |
| 54 | + APPROVED = 2; |
| 55 | + |
| 56 | + // The change has been rejected. |
| 57 | + REJECTED = 3; |
| 58 | + |
| 59 | + // The change request has expired. |
| 60 | + EXPIRED = 4; |
| 61 | + |
| 62 | + // The approved change has been revoked. |
| 63 | + REVOKED = 5; |
| 64 | + } |
| 65 | + |
| 66 | + // Enum representing the type of change in the payload. |
| 67 | + enum ChangeType { |
| 68 | + // State unspecified. |
| 69 | + CHANGE_TYPE_UNSPECIFIED = 0; |
| 70 | + |
| 71 | + // Request to create an Entry. |
| 72 | + CREATE_ENTRY = 1; |
| 73 | + |
| 74 | + // Request to update an Entry. |
| 75 | + UPDATE_ENTRY = 2; |
| 76 | + |
| 77 | + // Request to delete an Entry. |
| 78 | + DELETE_ENTRY = 3; |
| 79 | + |
| 80 | + // Request to create an EntryLink. |
| 81 | + CREATE_ENTRY_LINK = 4; |
| 82 | + |
| 83 | + // Request to delete an EntryLink. |
| 84 | + DELETE_ENTRY_LINK = 5; |
| 85 | + |
| 86 | + // Request to create a Glossary. |
| 87 | + CREATE_GLOSSARY = 7; |
| 88 | + |
| 89 | + // Request to update a Glossary. |
| 90 | + UPDATE_GLOSSARY = 8; |
| 91 | + |
| 92 | + // Request to delete a Glossary. |
| 93 | + DELETE_GLOSSARY = 9; |
| 94 | + |
| 95 | + // Request to create a GlossaryCategory. |
| 96 | + CREATE_GLOSSARY_CATEGORY = 10; |
| 97 | + |
| 98 | + // Request to update a GlossaryCategory. |
| 99 | + UPDATE_GLOSSARY_CATEGORY = 11; |
| 100 | + |
| 101 | + // Request to delete a GlossaryCategory. |
| 102 | + DELETE_GLOSSARY_CATEGORY = 13; |
| 103 | + |
| 104 | + // Request to create a GlossaryTerm. |
| 105 | + CREATE_GLOSSARY_TERM = 14; |
| 106 | + |
| 107 | + // Request to update a GlossaryTerm. |
| 108 | + UPDATE_GLOSSARY_TERM = 15; |
| 109 | + |
| 110 | + // Request to delete a GlossaryTerm. |
| 111 | + DELETE_GLOSSARY_TERM = 17; |
| 112 | + |
| 113 | + // Request to request Data Product access. |
| 114 | + REQUEST_DATA_PRODUCT_ACCESS = 33; |
| 115 | + } |
| 116 | + |
| 117 | + // Identifier. The relative resource name of the ChangeRequest, of the form: |
| 118 | + // projects/{project_number}/locations/{location_id}/changeRequests/{change_request_id} |
| 119 | + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; |
| 120 | + |
| 121 | + // Output only. System generated globally unique ID for the ChangeRequest. |
| 122 | + string uid = 2 [ |
| 123 | + (google.api.field_info).format = UUID4, |
| 124 | + (google.api.field_behavior) = OUTPUT_ONLY |
| 125 | + ]; |
| 126 | + |
| 127 | + // Output only. The time when the ChangeRequest was created. |
| 128 | + google.protobuf.Timestamp create_time = 3 |
| 129 | + [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 130 | + |
| 131 | + // Output only. The time when the ChangeRequest was last updated. |
| 132 | + google.protobuf.Timestamp update_time = 4 |
| 133 | + [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 134 | + |
| 135 | + // Optional. Justification of the ChangeRequest. This should explain |
| 136 | + // *why* the change is needed or why it should be approved. |
| 137 | + string justification = 5 [(google.api.field_behavior) = OPTIONAL]; |
| 138 | + |
| 139 | + // Optional. User-defined labels for the ChangeRequest. |
| 140 | + map<string, string> labels = 6 [(google.api.field_behavior) = OPTIONAL]; |
| 141 | + |
| 142 | + // Output only. The email address of the user who created the ChangeRequest. |
| 143 | + string author = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 144 | + |
| 145 | + // Output only. The current state of the ChangeRequest. |
| 146 | + State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 147 | + |
| 148 | + // Output only. The full resource name of the target resource to be modified. |
| 149 | + // Example: |
| 150 | + // //dataplex.googleapis.com/projects/my-project/locations/us-central1/entryGroups/my-group/entries/my-entry |
| 151 | + string resource = 9 [ |
| 152 | + (google.api.field_behavior) = OUTPUT_ONLY, |
| 153 | + (google.api.resource_reference) = { type: "*" } |
| 154 | + ]; |
| 155 | + |
| 156 | + // Detailed specification of the change, embedding the original request. |
| 157 | + oneof change_payload { |
| 158 | + // Payload for creating an Entry. |
| 159 | + CreateEntryRequest create_entry = 10; |
| 160 | + |
| 161 | + // Payload for updating an Entry. |
| 162 | + UpdateEntryRequest update_entry = 11; |
| 163 | + |
| 164 | + // Payload for deleting an Entry. |
| 165 | + DeleteEntryRequest delete_entry = 12; |
| 166 | + |
| 167 | + // Payload for creating an EntryLink. |
| 168 | + CreateEntryLinkRequest create_entry_link = 13; |
| 169 | + |
| 170 | + // Payload for deleting an EntryLink. |
| 171 | + DeleteEntryLinkRequest delete_entry_link = 14; |
| 172 | + |
| 173 | + // Payload for creating a Glossary. |
| 174 | + CreateGlossaryRequest create_glossary = 20; |
| 175 | + |
| 176 | + // Payload for updating a Glossary. |
| 177 | + UpdateGlossaryRequest update_glossary = 21; |
| 178 | + |
| 179 | + // Payload for deleting a Glossary. |
| 180 | + DeleteGlossaryRequest delete_glossary = 22; |
| 181 | + |
| 182 | + // Payload for creating a GlossaryCategory. |
| 183 | + CreateGlossaryCategoryRequest create_glossary_category = 23; |
| 184 | + |
| 185 | + // Payload for updating a GlossaryCategory. |
| 186 | + UpdateGlossaryCategoryRequest update_glossary_category = 24; |
| 187 | + |
| 188 | + // Payload for deleting a GlossaryCategory. |
| 189 | + DeleteGlossaryCategoryRequest delete_glossary_category = 26; |
| 190 | + |
| 191 | + // Payload for creating a GlossaryTerm. |
| 192 | + CreateGlossaryTermRequest create_glossary_term = 27; |
| 193 | + |
| 194 | + // Payload for updating a GlossaryTerm. |
| 195 | + UpdateGlossaryTermRequest update_glossary_term = 28; |
| 196 | + |
| 197 | + // Payload for deleting a GlossaryTerm. |
| 198 | + DeleteGlossaryTermRequest delete_glossary_term = 30; |
| 199 | + |
| 200 | + // Payload for Data Product access request. |
| 201 | + DataProductAccessRequest data_product_access_request = 32; |
| 202 | + } |
| 203 | + |
| 204 | + // Output only. The type of change represented by the change_payload. |
| 205 | + // This field is derived from the populated field in the change_payload oneof. |
| 206 | + ChangeType change_type = 19 [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 207 | + |
| 208 | + // Output only. The reason provided for rejecting the ChangeRequest. |
| 209 | + string rejection_comment = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 210 | + |
| 211 | + // Output only. The email address of the user who approved/rejected the |
| 212 | + // ChangeRequest. |
| 213 | + string approver = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 214 | + |
| 215 | + // Optional. This checksum is computed by the service. It can be sent on |
| 216 | + // update and delete requests to ensure the client has an up-to-date value |
| 217 | + // before proceeding. |
| 218 | + string etag = 18 [(google.api.field_behavior) = OPTIONAL]; |
| 219 | +} |
| 220 | + |
| 221 | +// Message for requesting access to a Data Product. This will be used to |
| 222 | +// create a ChangeRequest of type REQUEST_DATA_PRODUCT_ACCESS. |
| 223 | +message DataProductAccessRequest { |
| 224 | + // Required. The resource name of the data product. |
| 225 | + // Format: |
| 226 | + // projects/{project_number}/locations/{location_id}/dataProducts/{data_product_id} |
| 227 | + string parent = 1 [ |
| 228 | + (google.api.field_behavior) = REQUIRED, |
| 229 | + (google.api.resource_reference) = { |
| 230 | + type: "dataplex.googleapis.com/DataProduct" |
| 231 | + } |
| 232 | + ]; |
| 233 | + |
| 234 | + // Required. The ID of the access group for which access is being requested. |
| 235 | + // This corresponds to the unique identifier of the AccessGroup defined in the |
| 236 | + // Data Product. |
| 237 | + string access_group_id = 2 [(google.api.field_behavior) = REQUIRED]; |
| 238 | + |
| 239 | + // Output only. The display name of the access group defined in the Data |
| 240 | + // Product for which access is being requested. |
| 241 | + string access_group_display_name = 4 |
| 242 | + [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 243 | + |
| 244 | + // Optional. The principal for which access is being requested in IAM format. |
| 245 | + // If not specified, the requestor's principal will be used. |
| 246 | + // Example: `serviceAccount:my-sa@my-project.iam.gserviceaccount.com`. |
| 247 | + // Only service account principals are currently supported. |
| 248 | + // https://cloud.google.com/iam/docs/principal-identifiers |
| 249 | + optional string requested_principal = 3 |
| 250 | + [(google.api.field_behavior) = OPTIONAL]; |
| 251 | +} |
0 commit comments