From 599636049cdbda5ff799c9af03d6f1f951789553 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Wed, 5 Jul 2023 20:01:29 +0000 Subject: [PATCH 1/2] feat: added rpc RenameTagTemplateFieldEnumValue feat: returning approximate total size for SearchCatalog feat: returning unreachable locations for SearchCatalog feat: added Entry.usage_signal docs: update docs of SearchCatalogRequest message PiperOrigin-RevId: 545732359 Source-Link: https://github.com/googleapis/googleapis/commit/a1098e771ded306f2f4f28f90e78b23414a45e12 Source-Link: https://github.com/googleapis/googleapis-gen/commit/8b26b4359249c6f5da48b75d1c2b80ceb5075e81 Copy-Tag: eyJwIjoiRGF0YUNhdGFsb2cvLk93bEJvdC55YW1sIiwiaCI6IjhiMjZiNDM1OTI0OWM2ZjVkYTQ4Yjc1ZDFjMmI4MGNlYjUwNzVlODEifQ== --- .../Google/Cloud/Datacatalog/V1/Bigquery.php | Bin 0 -> 1507 bytes .../Google/Cloud/Datacatalog/V1/Common.php | Bin 0 -> 1274 bytes .../Cloud/Datacatalog/V1/DataSource.php | Bin 0 -> 1270 bytes .../Cloud/Datacatalog/V1/Datacatalog.php | Bin 0 -> 21688 bytes .../Cloud/Datacatalog/V1/DataplexSpec.php | 46 + .../Cloud/Datacatalog/V1/DumpContent.php | Bin 0 -> 1441 bytes .../Cloud/Datacatalog/V1/GcsFilesetSpec.php | 37 + .../Cloud/Datacatalog/V1/PhysicalSchema.php | Bin 0 -> 1486 bytes .../Cloud/Datacatalog/V1/Policytagmanager.php | Bin 0 -> 6804 bytes .../V1/Policytagmanagerserialization.php | Bin 0 -> 3430 bytes .../Google/Cloud/Datacatalog/V1/Schema.php | Bin 0 -> 1812 bytes .../Google/Cloud/Datacatalog/V1/Search.php | Bin 0 -> 1629 bytes .../Google/Cloud/Datacatalog/V1/TableSpec.php | Bin 0 -> 1633 bytes .../Google/Cloud/Datacatalog/V1/Tags.php | Bin 0 -> 2882 bytes .../Cloud/Datacatalog/V1/Timestamps.php | 33 + .../Google/Cloud/Datacatalog/V1/Usage.php | Bin 0 -> 1739 bytes .../DataCatalog/V1/BigQueryConnectionSpec.php | 147 + .../BigQueryConnectionSpec/ConnectionType.php | 57 + .../V1/BigQueryDateShardedSpec.php | 192 ++ .../DataCatalog/V1/BigQueryRoutineSpec.php | 67 + .../DataCatalog/V1/BigQueryTableSpec.php | 148 + .../Cloud/DataCatalog/V1/BusinessContext.php | 121 + .../V1/CloudBigtableInstanceSpec.php | 69 + .../CloudBigtableClusterSpec.php | 172 + .../V1/CloudBigtableSystemSpec.php | 73 + .../V1/CloudSqlBigQueryConnectionSpec.php | 135 + .../DatabaseType.php | 64 + .../Cloud/DataCatalog/V1/ColumnSchema.php | 422 +++ .../V1/ColumnSchema/IndexingType.php | 78 + .../V1/ColumnSchema/LookerColumnSpec.php | 70 + .../LookerColumnSpec/LookerColumnType.php | 85 + .../Cloud/DataCatalog/V1/CommonUsageStats.php | 78 + .../Google/Cloud/DataCatalog/V1/Contacts.php | 67 + .../Cloud/DataCatalog/V1/Contacts/Person.php | 108 + .../V1/CreateEntryGroupRequest.php | 196 ++ .../DataCatalog/V1/CreateEntryRequest.php | 191 ++ .../DataCatalog/V1/CreatePolicyTagRequest.php | 128 + .../Cloud/DataCatalog/V1/CreateTagRequest.php | 150 + .../V1/CreateTagTemplateFieldRequest.php | 196 ++ .../V1/CreateTagTemplateRequest.php | 185 ++ .../DataCatalog/V1/CreateTaxonomyRequest.php | 128 + .../DataCatalog/V1/CrossRegionalSource.php | 68 + .../Cloud/DataCatalog/V1/DataSource.php | 181 ++ .../DataCatalog/V1/DataSource/Service.php | 64 + .../V1/DataSourceConnectionSpec.php | 80 + .../DataCatalog/V1/DatabaseTableSpec.php | 164 + .../V1/DatabaseTableSpec/DatabaseViewSpec.php | 145 + .../DatabaseViewSpec/ViewType.php | 64 + .../V1/DatabaseTableSpec/TableType.php | 64 + .../DataCatalog/V1/DataplexExternalTable.php | 175 ++ .../DataCatalog/V1/DataplexFilesetSpec.php | 77 + .../Cloud/DataCatalog/V1/DataplexSpec.php | 195 ++ .../DataCatalog/V1/DataplexTableSpec.php | 153 + .../V1/DeleteEntryGroupRequest.php | 116 + .../DataCatalog/V1/DeleteEntryRequest.php | 82 + .../DataCatalog/V1/DeletePolicyTagRequest.php | 88 + .../Cloud/DataCatalog/V1/DeleteTagRequest.php | 82 + .../V1/DeleteTagTemplateFieldRequest.php | 124 + .../V1/DeleteTagTemplateRequest.php | 124 + .../DataCatalog/V1/DeleteTaxonomyRequest.php | 88 + .../Google/Cloud/DataCatalog/V1/DumpItem.php | 75 + .../src/Google/Cloud/DataCatalog/V1/Entry.php | 1272 ++++++++ .../Cloud/DataCatalog/V1/EntryGroup.php | 201 ++ .../Cloud/DataCatalog/V1/EntryOverview.php | 87 + .../Google/Cloud/DataCatalog/V1/EntryType.php | 171 + .../V1/ExportTaxonomiesRequest.php | 151 + .../V1/ExportTaxonomiesResponse.php | 68 + .../Google/Cloud/DataCatalog/V1/FieldType.php | 106 + .../DataCatalog/V1/FieldType/EnumType.php | 92 + .../V1/FieldType/EnumType/EnumValue.php | 84 + .../V1/FieldType/PrimitiveType.php | 83 + .../Cloud/DataCatalog/V1/FilesetSpec.php | 82 + .../Cloud/DataCatalog/V1/GcsFileSpec.php | 149 + .../Cloud/DataCatalog/V1/GcsFilesetSpec.php | 193 ++ .../DataCatalog/V1/GetEntryGroupRequest.php | 142 + .../Cloud/DataCatalog/V1/GetEntryRequest.php | 82 + .../DataCatalog/V1/GetPolicyTagRequest.php | 82 + .../DataCatalog/V1/GetTagTemplateRequest.php | 82 + .../DataCatalog/V1/GetTaxonomyRequest.php | 82 + .../DataCatalog/V1/ImportEntriesMetadata.php | 115 + .../V1/ImportEntriesMetadata/ImportState.php | 78 + .../DataCatalog/V1/ImportEntriesRequest.php | 149 + .../DataCatalog/V1/ImportEntriesResponse.php | 127 + .../V1/ImportTaxonomiesRequest.php | 147 + .../V1/ImportTaxonomiesResponse.php | 68 + .../Cloud/DataCatalog/V1/InlineSource.php | 67 + .../Cloud/DataCatalog/V1/IntegratedSystem.php | 103 + .../DataCatalog/V1/ListEntriesRequest.php | 220 ++ .../DataCatalog/V1/ListEntriesResponse.php | 106 + .../DataCatalog/V1/ListEntryGroupsRequest.php | 168 + .../V1/ListEntryGroupsResponse.php | 106 + .../DataCatalog/V1/ListPolicyTagsRequest.php | 166 + .../DataCatalog/V1/ListPolicyTagsResponse.php | 106 + .../Cloud/DataCatalog/V1/ListTagsRequest.php | 170 + .../Cloud/DataCatalog/V1/ListTagsResponse.php | 106 + .../DataCatalog/V1/ListTaxonomiesRequest.php | 200 ++ .../DataCatalog/V1/ListTaxonomiesResponse.php | 106 + .../Cloud/DataCatalog/V1/LookerSystemSpec.php | 243 ++ .../DataCatalog/V1/LookupEntryRequest.php | 295 ++ .../Cloud/DataCatalog/V1/ManagingSystem.php | 62 + .../V1/ModifyEntryContactsRequest.php | 112 + .../V1/ModifyEntryOverviewRequest.php | 112 + .../Cloud/DataCatalog/V1/PersonalDetails.php | 111 + .../Cloud/DataCatalog/V1/PhysicalSchema.php | 241 ++ .../V1/PhysicalSchema/AvroSchema.php | 70 + .../V1/PhysicalSchema/CsvSchema.php | 36 + .../V1/PhysicalSchema/OrcSchema.php | 36 + .../V1/PhysicalSchema/ParquetSchema.php | 36 + .../V1/PhysicalSchema/ProtobufSchema.php | 70 + .../V1/PhysicalSchema/ThriftSchema.php | 70 + .../Google/Cloud/DataCatalog/V1/PolicyTag.php | 255 ++ .../DataCatalog/V1/ReconcileTagsMetadata.php | 107 + .../ReconciliationState.php | 71 + .../DataCatalog/V1/ReconcileTagsRequest.php | 190 ++ .../DataCatalog/V1/ReconcileTagsResponse.php | 137 + ...RenameTagTemplateFieldEnumValueRequest.php | 123 + .../V1/RenameTagTemplateFieldRequest.php | 123 + .../DataCatalog/V1/ReplaceTaxonomyRequest.php | 112 + .../Cloud/DataCatalog/V1/RoutineSpec.php | 262 ++ .../DataCatalog/V1/RoutineSpec/Argument.php | 146 + .../V1/RoutineSpec/Argument/Mode.php | 71 + .../V1/RoutineSpec/RoutineType.php | 64 + .../Google/Cloud/DataCatalog/V1/Schema.php | 75 + .../DataCatalog/V1/SearchCatalogRequest.php | 368 +++ .../V1/SearchCatalogRequest/Scope.php | 313 ++ .../DataCatalog/V1/SearchCatalogResponse.php | 190 ++ .../DataCatalog/V1/SearchCatalogResult.php | 474 +++ .../Cloud/DataCatalog/V1/SearchResultType.php | 68 + .../DataCatalog/V1/SerializedPolicyTag.php | 186 ++ .../DataCatalog/V1/SerializedTaxonomy.php | 179 ++ .../Cloud/DataCatalog/V1/ServiceSpec.php | 79 + .../DataCatalog/V1/SqlDatabaseSystemSpec.php | 197 ++ .../Cloud/DataCatalog/V1/StarEntryRequest.php | 82 + .../DataCatalog/V1/StarEntryResponse.php | 35 + .../DataCatalog/V1/StorageProperties.php | 169 + .../Cloud/DataCatalog/V1/SystemTimestamps.php | 189 ++ .../Cloud/DataCatalog/V1/TableSourceType.php | 68 + .../Google/Cloud/DataCatalog/V1/TableSpec.php | 83 + .../src/Google/Cloud/DataCatalog/V1/Tag.php | 256 ++ .../Google/Cloud/DataCatalog/V1/TagField.php | 344 ++ .../DataCatalog/V1/TagField/EnumValue.php | 70 + .../Cloud/DataCatalog/V1/TagTemplate.php | 244 ++ .../Cloud/DataCatalog/V1/TagTemplateField.php | 303 ++ .../Cloud/DataCatalog/V1/TaggedEntry.php | 152 + .../Google/Cloud/DataCatalog/V1/Taxonomy.php | 354 +++ .../DataCatalog/V1/Taxonomy/PolicyType.php | 58 + .../Cloud/DataCatalog/V1/Taxonomy/Service.php | 104 + .../DataCatalog/V1/UnstarEntryRequest.php | 82 + .../DataCatalog/V1/UnstarEntryResponse.php | 35 + .../V1/UpdateEntryGroupRequest.php | 166 + .../DataCatalog/V1/UpdateEntryRequest.php | 258 ++ .../DataCatalog/V1/UpdatePolicyTagRequest.php | 156 + .../Cloud/DataCatalog/V1/UpdateTagRequest.php | 171 + .../V1/UpdateTagTemplateFieldRequest.php | 253 ++ .../V1/UpdateTagTemplateRequest.php | 182 ++ .../DataCatalog/V1/UpdateTaxonomyRequest.php | 152 + .../Cloud/DataCatalog/V1/UsageSignal.php | 203 ++ .../Cloud/DataCatalog/V1/UsageStats.php | 176 ++ .../Google/Cloud/DataCatalog/V1/ViewSpec.php | 67 + .../V1/DataCatalogClient/create_entry.php | 88 + .../DataCatalogClient/create_entry_group.php | 102 + .../V1/DataCatalogClient/create_tag.php | 100 + .../DataCatalogClient/create_tag_template.php | 83 + .../create_tag_template_field.php | 92 + .../V1/DataCatalogClient/delete_entry.php | 78 + .../DataCatalogClient/delete_entry_group.php | 69 + .../V1/DataCatalogClient/delete_tag.php | 69 + .../DataCatalogClient/delete_tag_template.php | 72 + .../delete_tag_template_field.php | 78 + .../V1/DataCatalogClient/get_entry.php | 71 + .../V1/DataCatalogClient/get_entry_group.php | 66 + .../V1/DataCatalogClient/get_iam_policy.php | 86 + .../V1/DataCatalogClient/get_tag_template.php | 66 + .../V1/DataCatalogClient/import_entries.php | 95 + .../V1/DataCatalogClient/list_entries.php | 77 + .../DataCatalogClient/list_entry_groups.php | 73 + .../V1/DataCatalogClient/list_tags.php | 82 + .../V1/DataCatalogClient/lookup_entry.php | 55 + .../modify_entry_contacts.php | 78 + .../modify_entry_overview.php | 78 + .../V1/DataCatalogClient/reconcile_tags.php | 102 + .../rename_tag_template_field.php | 80 + .../rename_tag_template_field_enum_value.php | 82 + .../V1/DataCatalogClient/search_catalog.php | 99 + .../V1/DataCatalogClient/set_iam_policy.php | 85 + .../V1/DataCatalogClient/star_entry.php | 72 + .../test_iam_permissions.php | 87 + .../V1/DataCatalogClient/unstar_entry.php | 72 + .../V1/DataCatalogClient/update_entry.php | 61 + .../DataCatalogClient/update_entry_group.php | 61 + .../V1/DataCatalogClient/update_tag.php | 75 + .../DataCatalogClient/update_tag_template.php | 66 + .../update_tag_template_field.php | 84 + .../create_policy_tag.php | 66 + .../create_taxonomy.php | 68 + .../delete_policy_tag.php | 76 + .../delete_taxonomy.php | 68 + .../PolicyTagManagerClient/get_iam_policy.php | 66 + .../PolicyTagManagerClient/get_policy_tag.php | 71 + .../PolicyTagManagerClient/get_taxonomy.php | 66 + .../list_policy_tags.php | 71 + .../list_taxonomies.php | 72 + .../PolicyTagManagerClient/set_iam_policy.php | 69 + .../test_iam_permissions.php | 75 + .../update_policy_tag.php | 54 + .../update_taxonomy.php | 54 + .../export_taxonomies.php | 87 + .../import_taxonomies.php | 74 + .../replace_taxonomy.php | 95 + .../BaseClient/DataCatalogBaseClient.php | 1486 +++++++++ .../BaseClient/PolicyTagManagerBaseClient.php | 608 ++++ ...olicyTagManagerSerializationBaseClient.php | 337 ++ .../v1/src/V1/Client/DataCatalogClient.php | 40 + .../src/V1/Client/PolicyTagManagerClient.php | 40 + .../PolicyTagManagerSerializationClient.php | 40 + .../v1/src/V1/DataCatalogClient.php | 34 + .../src/V1/Gapic/DataCatalogGapicClient.php | 2616 ++++++++++++++++ .../V1/Gapic/PolicyTagManagerGapicClient.php | 992 ++++++ ...licyTagManagerSerializationGapicClient.php | 460 +++ .../v1/src/V1/PolicyTagManagerClient.php | 34 + .../PolicyTagManagerSerializationClient.php | 34 + .../DataCatalog/v1/src/V1/gapic_metadata.json | 286 ++ .../resources/data_catalog_client_config.json | 206 ++ .../data_catalog_descriptor_config.php | 459 +++ .../data_catalog_rest_client_config.php | 515 +++ .../policy_tag_manager_client_config.json | 107 + .../policy_tag_manager_descriptor_config.php | 187 ++ .../policy_tag_manager_rest_client_config.php | 227 ++ ...g_manager_serialization_client_config.json | 47 + ...anager_serialization_descriptor_config.php | 48 + ...nager_serialization_rest_client_config.php | 89 + .../Unit/V1/Client/DataCatalogClientTest.php | 2770 +++++++++++++++++ .../V1/Client/PolicyTagManagerClientTest.php | 991 ++++++ ...olicyTagManagerSerializationClientTest.php | 314 ++ .../tests/Unit/V1/DataCatalogClientTest.php | 2515 +++++++++++++++ .../Unit/V1/PolicyTagManagerClientTest.php | 891 ++++++ ...olicyTagManagerSerializationClientTest.php | 262 ++ 237 files changed, 41316 insertions(+) create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/Bigquery.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/Common.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/DataSource.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/Datacatalog.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/DataplexSpec.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/DumpContent.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/GcsFilesetSpec.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/PhysicalSchema.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/Policytagmanager.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/Policytagmanagerserialization.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/Schema.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/Search.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/TableSpec.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/Tags.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/Timestamps.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/Usage.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/BigQueryConnectionSpec.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/BigQueryConnectionSpec/ConnectionType.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/BigQueryDateShardedSpec.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/BigQueryRoutineSpec.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/BigQueryTableSpec.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/BusinessContext.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CloudBigtableInstanceSpec.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CloudBigtableInstanceSpec/CloudBigtableClusterSpec.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CloudBigtableSystemSpec.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CloudSqlBigQueryConnectionSpec.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CloudSqlBigQueryConnectionSpec/DatabaseType.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ColumnSchema.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ColumnSchema/IndexingType.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ColumnSchema/LookerColumnSpec.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ColumnSchema/LookerColumnSpec/LookerColumnType.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CommonUsageStats.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Contacts.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Contacts/Person.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CreateEntryGroupRequest.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CreateEntryRequest.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CreatePolicyTagRequest.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CreateTagRequest.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CreateTagTemplateFieldRequest.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CreateTagTemplateRequest.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CreateTaxonomyRequest.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CrossRegionalSource.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DataSource.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DataSource/Service.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DataSourceConnectionSpec.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DatabaseTableSpec.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DatabaseTableSpec/DatabaseViewSpec.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DatabaseTableSpec/DatabaseViewSpec/ViewType.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DatabaseTableSpec/TableType.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DataplexExternalTable.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DataplexFilesetSpec.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DataplexSpec.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DataplexTableSpec.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DeleteEntryGroupRequest.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DeleteEntryRequest.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DeletePolicyTagRequest.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DeleteTagRequest.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DeleteTagTemplateFieldRequest.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DeleteTagTemplateRequest.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DeleteTaxonomyRequest.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DumpItem.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Entry.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/EntryGroup.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/EntryOverview.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/EntryType.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ExportTaxonomiesRequest.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ExportTaxonomiesResponse.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/FieldType.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/FieldType/EnumType.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/FieldType/EnumType/EnumValue.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/FieldType/PrimitiveType.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/FilesetSpec.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/GcsFileSpec.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/GcsFilesetSpec.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/GetEntryGroupRequest.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/GetEntryRequest.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/GetPolicyTagRequest.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/GetTagTemplateRequest.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/GetTaxonomyRequest.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ImportEntriesMetadata.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ImportEntriesMetadata/ImportState.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ImportEntriesRequest.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ImportEntriesResponse.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ImportTaxonomiesRequest.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ImportTaxonomiesResponse.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/InlineSource.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/IntegratedSystem.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListEntriesRequest.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListEntriesResponse.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListEntryGroupsRequest.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListEntryGroupsResponse.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListPolicyTagsRequest.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListPolicyTagsResponse.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListTagsRequest.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListTagsResponse.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListTaxonomiesRequest.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListTaxonomiesResponse.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/LookerSystemSpec.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/LookupEntryRequest.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ManagingSystem.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ModifyEntryContactsRequest.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ModifyEntryOverviewRequest.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PersonalDetails.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PhysicalSchema.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PhysicalSchema/AvroSchema.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PhysicalSchema/CsvSchema.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PhysicalSchema/OrcSchema.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PhysicalSchema/ParquetSchema.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PhysicalSchema/ProtobufSchema.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PhysicalSchema/ThriftSchema.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PolicyTag.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ReconcileTagsMetadata.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ReconcileTagsMetadata/ReconciliationState.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ReconcileTagsRequest.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ReconcileTagsResponse.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/RenameTagTemplateFieldEnumValueRequest.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/RenameTagTemplateFieldRequest.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ReplaceTaxonomyRequest.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/RoutineSpec.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/RoutineSpec/Argument.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/RoutineSpec/Argument/Mode.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/RoutineSpec/RoutineType.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Schema.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SearchCatalogRequest.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SearchCatalogRequest/Scope.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SearchCatalogResponse.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SearchCatalogResult.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SearchResultType.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SerializedPolicyTag.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SerializedTaxonomy.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ServiceSpec.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SqlDatabaseSystemSpec.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/StarEntryRequest.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/StarEntryResponse.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/StorageProperties.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SystemTimestamps.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/TableSourceType.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/TableSpec.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Tag.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/TagField.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/TagField/EnumValue.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/TagTemplate.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/TagTemplateField.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/TaggedEntry.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Taxonomy.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Taxonomy/PolicyType.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Taxonomy/Service.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UnstarEntryRequest.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UnstarEntryResponse.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UpdateEntryGroupRequest.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UpdateEntryRequest.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UpdatePolicyTagRequest.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UpdateTagRequest.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UpdateTagTemplateFieldRequest.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UpdateTagTemplateRequest.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UpdateTaxonomyRequest.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UsageSignal.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UsageStats.php create mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ViewSpec.php create mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/create_entry.php create mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/create_entry_group.php create mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/create_tag.php create mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/create_tag_template.php create mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/create_tag_template_field.php create mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/delete_entry.php create mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/delete_entry_group.php create mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/delete_tag.php create mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/delete_tag_template.php create mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/delete_tag_template_field.php create mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/get_entry.php create mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/get_entry_group.php create mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/get_iam_policy.php create mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/get_tag_template.php create mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/import_entries.php create mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/list_entries.php create mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/list_entry_groups.php create mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/list_tags.php create mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/lookup_entry.php create mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/modify_entry_contacts.php create mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/modify_entry_overview.php create mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/reconcile_tags.php create mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/rename_tag_template_field.php create mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/rename_tag_template_field_enum_value.php create mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/search_catalog.php create mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/set_iam_policy.php create mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/star_entry.php create mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/test_iam_permissions.php create mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/unstar_entry.php create mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/update_entry.php create mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/update_entry_group.php create mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/update_tag.php create mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/update_tag_template.php create mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/update_tag_template_field.php create mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/create_policy_tag.php create mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/create_taxonomy.php create mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/delete_policy_tag.php create mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/delete_taxonomy.php create mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/get_iam_policy.php create mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/get_policy_tag.php create mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/get_taxonomy.php create mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/list_policy_tags.php create mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/list_taxonomies.php create mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/set_iam_policy.php create mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/test_iam_permissions.php create mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/update_policy_tag.php create mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/update_taxonomy.php create mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerSerializationClient/export_taxonomies.php create mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerSerializationClient/import_taxonomies.php create mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerSerializationClient/replace_taxonomy.php create mode 100644 owl-bot-staging/DataCatalog/v1/src/V1/Client/BaseClient/DataCatalogBaseClient.php create mode 100644 owl-bot-staging/DataCatalog/v1/src/V1/Client/BaseClient/PolicyTagManagerBaseClient.php create mode 100644 owl-bot-staging/DataCatalog/v1/src/V1/Client/BaseClient/PolicyTagManagerSerializationBaseClient.php create mode 100644 owl-bot-staging/DataCatalog/v1/src/V1/Client/DataCatalogClient.php create mode 100644 owl-bot-staging/DataCatalog/v1/src/V1/Client/PolicyTagManagerClient.php create mode 100644 owl-bot-staging/DataCatalog/v1/src/V1/Client/PolicyTagManagerSerializationClient.php create mode 100644 owl-bot-staging/DataCatalog/v1/src/V1/DataCatalogClient.php create mode 100644 owl-bot-staging/DataCatalog/v1/src/V1/Gapic/DataCatalogGapicClient.php create mode 100644 owl-bot-staging/DataCatalog/v1/src/V1/Gapic/PolicyTagManagerGapicClient.php create mode 100644 owl-bot-staging/DataCatalog/v1/src/V1/Gapic/PolicyTagManagerSerializationGapicClient.php create mode 100644 owl-bot-staging/DataCatalog/v1/src/V1/PolicyTagManagerClient.php create mode 100644 owl-bot-staging/DataCatalog/v1/src/V1/PolicyTagManagerSerializationClient.php create mode 100644 owl-bot-staging/DataCatalog/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/DataCatalog/v1/src/V1/resources/data_catalog_client_config.json create mode 100644 owl-bot-staging/DataCatalog/v1/src/V1/resources/data_catalog_descriptor_config.php create mode 100644 owl-bot-staging/DataCatalog/v1/src/V1/resources/data_catalog_rest_client_config.php create mode 100644 owl-bot-staging/DataCatalog/v1/src/V1/resources/policy_tag_manager_client_config.json create mode 100644 owl-bot-staging/DataCatalog/v1/src/V1/resources/policy_tag_manager_descriptor_config.php create mode 100644 owl-bot-staging/DataCatalog/v1/src/V1/resources/policy_tag_manager_rest_client_config.php create mode 100644 owl-bot-staging/DataCatalog/v1/src/V1/resources/policy_tag_manager_serialization_client_config.json create mode 100644 owl-bot-staging/DataCatalog/v1/src/V1/resources/policy_tag_manager_serialization_descriptor_config.php create mode 100644 owl-bot-staging/DataCatalog/v1/src/V1/resources/policy_tag_manager_serialization_rest_client_config.php create mode 100644 owl-bot-staging/DataCatalog/v1/tests/Unit/V1/Client/DataCatalogClientTest.php create mode 100644 owl-bot-staging/DataCatalog/v1/tests/Unit/V1/Client/PolicyTagManagerClientTest.php create mode 100644 owl-bot-staging/DataCatalog/v1/tests/Unit/V1/Client/PolicyTagManagerSerializationClientTest.php create mode 100644 owl-bot-staging/DataCatalog/v1/tests/Unit/V1/DataCatalogClientTest.php create mode 100644 owl-bot-staging/DataCatalog/v1/tests/Unit/V1/PolicyTagManagerClientTest.php create mode 100644 owl-bot-staging/DataCatalog/v1/tests/Unit/V1/PolicyTagManagerSerializationClientTest.php diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/Bigquery.php b/owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/Bigquery.php new file mode 100644 index 0000000000000000000000000000000000000000..ee848a4826c8ee574ff897f7e962dddde95853f0 GIT binary patch literal 1507 zcmbtU+iuf95Uo?Fnr$0`D^-Pxb_tc5B5;)Q=1?H_MrsqcNh1|3S-xzNl^n0Twks9X zAL5y>;GJ(k;tO~|Vs~>b4G|KSBFFa3nVB&vf+?3T%q~kWh_ktL98MKpiBusxyq)##J~ny-6%OAi4d;G=-uYI&B zK`EU$C@6CfmDy;@1iZzNWDUecKSprrZpIkw%0X@}tPo%G(wz-|v>5kk>%Gc-%NI8O_t< zq*Qo#i->@6llm@!?fD(a>tF?YOj}IB26hB>aXAT=`2s96Kw|2++y?gqwY=HH!O?$k zpzxE)kvYMs3RsX-1iA(&SbdQq9(;CU_&mZa_4HGcKF7AI!mAXq9KlGDvBKO=X=lHVzUo6O6J9p_t}`?H5!)W5 qtE$LXRZihBKvmmWYf1RztG)4wd@=BdDNFgQoruW6p}zq)0Q?3z!0Chl literal 0 HcmV?d00001 diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/Common.php b/owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/Common.php new file mode 100644 index 0000000000000000000000000000000000000000..4b9e78194ba73e422fe71561d0022821920625c7 GIT binary patch literal 1274 zcma)6+iuf95XAv{S$Z*+K!pO`LZzk^brg7WDaeUk6OqJD;#3q_iZ;&1HFCU`y{S}C zzk`3^A9&?~PvHxAWW7$@^nyerEAi}{nKN_tfkPZ4iU+WN2I&cgQA{Xt zNdWuf;Sk5rC8Nj>a4bWpnXqZvP}geqCW9tq9J^S79wA`K0xB*HMSmkxVR{+^38utU= zg$YHJeQo(k&kud-qrm^d<~V>u6eO5IujdZOp-X)d!W3YJE-voCtY(_K6%jV~0h}_j z(p9iEIJJ=CI7ES?;lz#oh?3Z1sfyxZnlCVo6n7?V({lb07Bh~Da*gBxr12Qfc84&= zbR38KoOfE_Jpbj~u&R1EVyufQe5$>-{$vJqFvuw%GGU8(leFbF_;wc* z|5s6IJL|O&&jA!I}Vt;)1jX7SlkFvKiJ2 zEOhVHV|h}PUmCW4IUjKMhXBM>43A&g&RIh7NZJHXYfW1>+N!N2xb%L3#)zO|@04ZB}~?-Bvrc+1AC| zDUQeM`bY7ObRR5dxQ?YZn|fQElO(W`g;;r8t<-gKURnl=leAV{T#x{mtDEKrmcF?A z8LTu=h&(^^CgeB3dP8lhMy+YwO#KO1yPA+w5~N4q!PQgKe$RRpDnA9V!R$BP=1me= z!Y4J0Pjw`tl1DC?7)3tw@r<-lfB(|kA3^wDSU0$dWo}|QHE}ij6OfO}zow_o#N*uL xlXHi;{CDA523Hi0SCp9oigHx$&+)tPdON?XFEjhhxb2@#x*B#I`18I#sYELF$9Yy+?FD78wrWq%t+ipbq@ePKv4vf!{V zSykOc6RC&W4h7~R3fv}+d`_64yemU(dxFJW$>gNGou*Cb$QYJ&jkbNI$O9;Nj2E** z$gzldxToq)2rlRU+`nj6W5hiqI2hIO8JZHxZ9D5KBT-H5yd-H0wb5u^@u3`Wd7dN5 zxCK7n1UvsVS#w>7TWS%kg+;KY)r~JX0J8a+ufcMJ`IPv$WI&^Qcei3)gSIlH)z>hy z2v#`On^nq5idFLwDClPohk{>}^2upE|D%>SkANA;S)mE`oIgyWx1J$NjF;XdkwnW^u_}19uunozte*Kk4*pEvIOh z1+Y?Yx89vPz4ygjy#PQ~%EmreyOPO#019I{8IK{6tesRUFWX!LtLju-FswVTe>cDr z>C@{Pso%>qRO{R|KGgK2X2R3+%7p%5V8lr3;ndP>xVJD@HvDB6Uvuj%6D^7bb~n3iw#6>?quU3HwpgGoihlHWTP)CirDzLu`{e@LqTP=o{n@rC`a*%8 zbMC#vnGrc0N)8ZMoO|!N=Y7sS=gz$LdSkc2F2?T~HKSQ<89VXq{djBFh&P(`R=rfO z#<$xK9vIDdslL~!RE=gL9$(7D*E9KedTAwp0hXHecC%!p;^lh1Ts7uP)p~npey7+f zmf-(ty*&Tun*C>jATw4g?ipsISTf>wHx|~6RuPwM-6bGfiwIc(56`|8~*vSQrrWdxCQ@g)WP=+U;%RF zpvzY4wQ{pvt5s^{txN-h#b8dx@}1zh(tC~802o_K$>FRO&4>Q^lx>u@a^Ml$J>)|! z{_5?Dbm;odj^)46a%L@$i~jdA`-ATW*wuj|9X}_gCrTL85<8ukmUwh6HX~sb8x@G0 z=z>Ljj6H7~cz}Mkuq_>}oN(4Qp((wo9Ga6uw4*)tVkq90E>q5(^_mMoAN-=6*_Z5s zaOraTycb~P0=l?@2|i9PNO~>}Yd|PBTl_6H zVwM1n=x97J8%};PA+YRfKZ$M-5;NN>JN=tbf_~o!p7>&9iv&;-j9ypfB`w3g2m1KLK&fgj5?AJ^4D0{Hb{CBPHtWHWI+eE_9@`K*#JDc;H^7B zqiPNSS}68BFpIz!(AXq;F@>G7$AlFzwJ!(QnY%`-gQDW%O*V{YF&7V+Paa-nA&}0F zUo75dGfPI*=*E@f;Q@yJpbqCy;)JjR?UMkTUagomnoULYaaCvfkPi{2*UOP;AF!E2 zs7O1z#l~%#ri{(Es-Yip8x(rAkoMaF#%;FKk9NNzpJHPIU#G!bXCw4j>Y}D}v0L7g zAT=aS)(#lA8Hz&Ef+noPFEl=|U92*0)5y;DcB7aj$D*-#Kfj`_unA>k#|8DPAidRk z{b9R7%u?XavWaS?_7L2@%KC)mEhkkFP=1z1ue0ISK4b`}=BJXE`fFMqW&@$mvdOjy!5p(r!3P2pL7*_4VW;sNP^Lmy z!Q3|?WJXWZ9#=j0z;cjSm7_(d*h9+!{ydv zzC=J@^+aA{10*hHNF_ag~-6CXzJA#`NJ_uK!K}beUEJg{b4c6GCC3_pvQ6ESvv0F$l z5A&@pb`IgmlUSituhk&?gw#=Be2(D$lqWL~t|((ITB}K^hWQ(891^8gr6x{5(engu z))QP-Ea*V6pW>nyd_b@juz*Cs0WA1Yr6h5f^8q0z7DybT!zi60!pV!Ct3{m+ zyirsfsFew~tWzR6<#5v5kcF9b>QnqS8>f>aB;#eMT}My)U>#MZax@>-k5-G@M%9d- zqT_(KQBinEtkMDzDj@B(DQENyZQm!&>1ZRF4EVJO98k?V;9uB*ra=X;iTRMohFr8H z))27RRTj467iL2bjeQYK`AIhNs90@_7!yhbZv;{wey+FsrvUtI8B5LikK|tm^D3Ic zGxg`eykQ+^;4%FW2N5w+G1Sw8g>lBjIEJf*G0-LvW*{nyzsS57!YqUn#E(%nY=WoJ z{$iM&MlND}v3vz+wuqpZU7bqa@YKgcs}lqVV=Bnw6v~upIj{#D+b|}Flis?45OIlx zj}Y#Aj3Y3LgpVr5W8t*WKEuh^2SiaJeGlNE;m3X<$Rh5C{5=+;jVKKeyjVWwMhV=J zcyop^BBjF@Ofn`}2t&T8O2`aN%djzP*;zJqZzcURh5Wl4>B8oEZX><8a%UyI6nO?J z7bkOheSJyKE){T2B*3TG=`}r{&aUXIEBDj#ad2UhotDmH$9O=^uzF3?S%^4J*u~g% zUSC*EciV@t(RDq)axV=VjI*)yJFvmJz8VQ?@3OGXAM-a^1SLk|myVt6r(dlA1%Zof zu;7Fg#mC)Z58q@_D-gSbnm8c5;wd&2hMgfz`?Fydwgo64#|m&ZjqpxwZ0i&9Z{jcJ z(8XH04V5Oci4b39r<*c-LMq+f1CutP;((QvYo6HKx6tKE3|OK)SRhnIz=C|bBk#g? zeMeTU_}gsCVxU3--Gj`vyem73dp10lpNV}hz{V_W#_dG}zQl(2>N_ewzdkT=i8WXa znkRe|8Hsj-4b#&zEV7naa$CkI3$Cn#ww_=^nazA8$U|&oWgY(<0^?FbCc&I%(JTzC ztanxYNj8yN)K~Rv;m+pzVtyrqP*1YZMmDpUUfRs2BSAb2+1#!MS=Ut8JRHkkXzNC; z3^{}hEKy-H!pT8Y!fb<%>tMbO;K^MBPTQ^&x8l`;}U=epx&SQ*=(ie2P=3+%jm%#rYj-9T03EEHAMs(wN3@vLLOu~w+rG&?1ykoSb0=_twLENXx5Sc%o# z5J+*R$5{XlXHym}j+I1}_J09(*0FR&5{}-Tx7m5u5d{jfaDEeKJylc5cxqx#=n2Qj zq5w=mrNW}U#<)Ar6vD9|t%V>QYL3Mm_lcNzu6@kHwmg>q>>+|J=8;_sujp-h4%F@J zTzgXaH~W2N>! z*WdSBozah-$!dQR01Kh=J@nf1vIC(?S#Y2b?n3Z!AwgxfS$+x0mQ+h^u*&x~Fi<3# zus1d=7lxDu`63&)k4p9OKCRlI6A*2aO+h`+_E_Qmnq8_2bLJCs?N@*;qUhNLv>S0@ z%7Y<3cpbC~=@(VzyI^!IVzCG3D$NJAFR_TF7K)|UUFvX&)FIBF^Hv9*WJ9fDS;{x= z={|rqA=k$&V)0+?FX0Gw`-3w$o0s7fqS&l9e$}B%KFQX87+}v@JXEGd{T>Ckhkg0g zQm(NnV64?Rga$m`Lx5;cPD@zXI^&1uQ0CIlKY=V9SPQ}YGf-to#xbs_(jDA-g_Ptf zd)Zq_9FTZ-q(%JkE~<1zn!oC7#-aNTCq0^RNNPa)29TOHFgCcMK1EV5v9mQeNgtMx zQ;yni2H2(U$fRrSy?a;+QCPj{5Ws6Bfa~nl0R&)yX zYZ;D1nhLF_pcmadRfA1n;|@e*H4l&KsJdJ{fD?kd53aoj`M$NI>=7p5ECd+H?4_@B z>fICkF|>iR2IO2NxJ_dx>W0hv`tEtbY432L4GkI+spEqUTqx^df4Hz$F`@EWCRZ}X z75&4Mz4fJEd&s6-R7ys|!Kp;~$PU^BmUY|m{=g6(s@l|3cZ{J9(wIQZF@}~tqnO1%po-JU!z8|S#OF9C*kDnBfw1)0LoKi zP?@#;n<1$!YhoaAaNxX_b8Y~W%Y6i2mR4zS5?sJ_7B+4N#&eQ{-V1xiYp^#W9| z^6uk1)Vy4?-rh`aLd`1x&C8f;Xl10s+jhlvi=i!DVlq2M@~Qto)!x;o7u&50V2nGT9jeO zaG9*!MnZgy4X^5Nr6Uagx{oeDj1zL{?7fx6bmSB&gMwSgEiR|m^vDEOa+mbn@h#>?-Loz$=5rU;NJ!mCG&F!7BPyb(_{f|-4EN8xer0MnTnuZ8ox|L+?*4# z@NL32^rd^^*u7OAl6!YU)HH>hAEl9q^5Y}=CAg&1xdq#YmA09KU>hU0p5YW`QJko> zRoWH9PFPtmJno0Up#x{kySHuwZAJYzg_I@pJRL(1i|e?EzlC#om+Y5&zgE*_h2rM` z`K|U25t7x`$mWist|@3vyEFGxV2=N_lPr}q`zK4SP-OXRJ3d{C6cR|$KL*%o;h~`_ zrwW|h`>y7p`HC9f%_6NzB6>snLVxdmFb@?og_)Uh6#bs)7o~59Ih~FHxOn?-{zn0J z3fzgELhrQLIeBpMUMKRBT#)Cbfp*%!%_~3o?;sWtaqLKYi{;S#!SOyIyw{SqNGx_9 zdIl{Q5pEf|L>9Hfbp$Y|ot+k8$v@SH<}0du1+%n}&D;@WLtl@$LS04vX^>4HG6d>_ z@sy8z$VQ;Oc@`V252Sr9K-6S>rAaO^%~NB|Om*p`J<;d8*_G&IZX8$X^6V|=Y)kj;pFFGQ3 zgx5`LZ}bg}J(<&_&LKpOC;D?lc+WN;|5lJa-yQuLxIlndfeMM zt$7N`{{6G>3iJJHK&t2fNvQ3xfeC||!rK}5Z)w;2XBh5m)>;mPJ;nIEt zs$eN)A9h&t6gzt9>(>PnKA!9EqWaK(|HhmUJ({Gi8k*vq%EA5v&Z>A$$^$q0oK@8{ zMV_}|bY{zv%r8o+xuE(OT7UlrKcd2S&TgMW#Z&cEsaMavE1r(IiUZFo$8P(|Lm~q& z(NI5G`>LQgqrEw(d3H3N4hAN;-;%gi072<9J>lw!tJ5uaHs)1R3H@=%>L~WnVr!lv z())E2+jJ@C4f4i|+HE4*zhcVT0Ggx;ZBB~5RPLoxoUL2gr%Yg*sYviH6F3$~BCimBS_WmTG-93^{!RJq0cp{VE((d?z=HSjjsynbvZDVj? zc2;)<%l{sNfukMYCm1;9Do*za1|K^-$^g;NdSx+Hp_>`NREhvDB!m#T^TvdV0I~JY z^jPmpgny$ac3Um@%-a0?edt4 z2;A4jbM=uS_(Dv%?)YXF>;bJ!8)A*^n~q=q6$t!(@Z4Sca;11xBw=eFC+=PQOpR{I z4_nfgEoCct3qIradGI;0Je8t%GEylUfK&=5=syS?@rLEs0#-M+&-QL@@YTXA$>09S8c$2m3UCx8;QEK14a@qQ%+7internalAddGeneratedFile( + ' + +/google/cloud/datacatalog/v1/dataplex_spec.protogoogle.cloud.datacatalog.v11google/cloud/datacatalog/v1/physical_schema.proto" + DataplexSpec +asset ( @ + data_format ( 2+.google.cloud.datacatalog.v1.PhysicalSchema +compression_format (  + +project_id ( "W +DataplexFilesetSpec@ + dataplex_spec ( 2).google.cloud.datacatalog.v1.DataplexSpec" +DataplexTableSpecK +external_tables ( 22.google.cloud.datacatalog.v1.DataplexExternalTable@ + dataplex_spec ( 2).google.cloud.datacatalog.v1.DataplexSpec + user_managed (" +DataplexExternalTable= +system (2-.google.cloud.datacatalog.v1.IntegratedSystem +fully_qualified_name (  +google_cloud_resource (  +data_catalog_entry ( B +com.google.cloud.datacatalog.v1BDataplexSpecProtoPZAcloud.google.com/go/datacatalog/apiv1/datacatalogpb;datacatalogpbGoogle.Cloud.DataCatalog.V1Google\\Cloud\\DataCatalog\\V1Google::Cloud::DataCatalog::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/DumpContent.php b/owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/DumpContent.php new file mode 100644 index 0000000000000000000000000000000000000000..93abced0982c92f02b61a28898d76109fa771dc6 GIT binary patch literal 1441 zcmbtUU279T6z#UQmPsEZPo)LD)?!nz8&biCiB+>no902AhtLOE2$S8(W?-{3%+3a? z^!Et<5y4;JqtE^VADx-aCykL}V96$X&zXD9-g{oZ6$62uL6as_5=BGk-GCZU5Rxk% z@ECeozfUCud?;8fY;EAG%axFDN2^rEwVvEPmav_>CEhe_g2}6vQM=p`qF8IT`wl zKz~Hmi&+4vB1(T9vb4(*rWlFYCoSm=`Xo-N#^0^&XGx$KPrv}Kl7N3Dpsp<{h0CYXQ0XdHTUKt_y9jAyE5B+H=7{GPY}KbbltN|#euhfm(H zv7fatoZ5Gx=dCmqY~&xIFPq4{-=G!u^Lp0~raL#7?x?bNvXX2ze)-VuJzrI>w8*^f z;G2UAT609h^F+y;;w!X0s&w`6%bQ&XoKoTRU@T*4TdqZ2t`)0jM@X7#VArtkuEU1L z!b+?@*W376bBY)hNN;iysXq=Oy9VRuzK)?^>yL9d#ukt990A7HmEM+3xR*!M*?p0( S_FNMDH3e*CzN@$B7NI|XG~D$7 literal 0 HcmV?d00001 diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/GcsFilesetSpec.php b/owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/GcsFilesetSpec.php new file mode 100644 index 000000000000..2350c774ebd3 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/GcsFilesetSpec.php @@ -0,0 +1,37 @@ +internalAddGeneratedFile( + ' + +2google/cloud/datacatalog/v1/gcs_fileset_spec.protogoogle.cloud.datacatalog.v1,google/cloud/datacatalog/v1/timestamps.proto"z +GcsFilesetSpec + file_patterns ( BAL +sample_gcs_file_specs ( 2(.google.cloud.datacatalog.v1.GcsFileSpecBA" + GcsFileSpec + file_path ( BAJ +gcs_timestamps ( 2-.google.cloud.datacatalog.v1.SystemTimestampsBA + +size_bytes (BAB +com.google.cloud.datacatalog.v1PZAcloud.google.com/go/datacatalog/apiv1/datacatalogpb;datacatalogpbGoogle.Cloud.DataCatalog.V1Google\\Cloud\\DataCatalog\\V1Google::Cloud::DataCatalog::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/PhysicalSchema.php b/owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/PhysicalSchema.php new file mode 100644 index 0000000000000000000000000000000000000000..a23ebb0ee67868f70ca71d05a93f144e8f4428de GIT binary patch literal 1486 zcmb7^-)_?|6vpXRy6tR$RBoyc4Fi+bNsy`_5Tq2;KdcPF8i}eGDAMG*ZfhxxgY8rd z)Ysr4cobd%@d7*nmpD$FrJI=4N>P*ed_SL@bNs!09gG8bfZEij0xLQ|{WGM-6a|7S zPPm8q;c!R=B771sj|vN+RtKGQy68>oxO-1aB@YFmHX3n0@@ScOJRFn4lVrYD?UC+QDG7{Z2k?CZDl4}szZ**|(^)Ik zS!-Ik|2qpemz$A4f-Ig2UdW(KY5Var>k7HGEVb%d7q|57wfsBCsj*-~Rai5m=c|yq zMwzfqVAIT;?pk5p(Ck%ci;gF}_plLQ@j0ZbkTtj$E8${kLTkY~7o>3Ake;qW>Ijmi z5IHU6R;M)ObU`T=0nWRS-+`>6UzF+PR`Cw(r0aTNbx%*i{A9$m3+uPwhLisA;x=q0 z`9}{)8jVfJNprFrzcO%Fd(TxhY203(B9nxZ`BaYwb}@c@QXcUoW5NN`-jo{XpkG~j z`kTr8SlewIKeCJ;S&<(#V`H;=m7j}McWzh4ujcEnHmpBud$HWMjo!9X0Nd_W`Z+U~ ZPY#l!`Y?8YlwthWEKFqV3p1Dj`~#T@b z;=)Std6*iw4ZlKkwdT4tn`A4t+o)!%W@uL6zwOqtyE9qOwXI4sG;4L!F>Bz3xktz` z>m=~Z3Q?B}^S4Q8(s`w2=BbpYo=OXCPo=vvvj|meGYHf|!XtW!RQTsLwqPYS2+a^a zE?Ys_a;(rYZR=f#ZBE@b?SO!jy|&v8rxIGOqtXfMPK8WfQMpfQd)ad#7jvq_R-oyD z)Rb17kob;imljA+@hvZO{Q{WkdX0opQt59duZU%-J8N5=`uD4@qyV!4H-nNJn_BUtAB6fA2?3lZj>-RTx zg9rkp2HA}lrMz3OyH5J0yE-XaK*!LmdwryA#jFD_OYp%dnI3|e+3&Q7dQkYqx)(On zuNX~b^}1~a_qxwzY`^-NCAe)=s}Yr#Km;Zu@=+?jgg%-^x&FH!pXYNjOffPs#mMZ= zOq>%AP0s>Jp^W63F>x_AuuW-K-V(eM2G7O}d_gWTG%1GIib;(Eg#!i&%jsU0VMG&Q zeL+}TW}T`Xe3ZH3iSdcf@s2T(g)CDnV*Dsr4Ck(9c(7f|n%QgyA*r|fj61x8#!L|3UAh5@ z%$38YM}qNV>fq$5+_j!QW%wE1Nky1Q-6}Ybjt9iwwJK!%cnWNhpG`iAVVk&%j*Fl1 ztFiQ+%DvnZ)NQ)aSx$`yj7QK3s|qBx!sa+Dfp!a_HeP%lohz)buH@e=7vC%_mhY@> z78dg>ODl^DBhTQA=={>k+G2Tm!+?*4vXRd(Zf=(I>ubf0_0Q}iHXW?))>`>@C9_HvSUGix2YHa#|8zn_4k#hMhji;5p^5sokN8!jxR;C zM$^U)9<(u9+NTN{&HDssD-*my-f6%Vf@je&9+&9Fm;W#Z{xM#_sfu(RoscPKWEsxA z(35L&acu*QE)bjSg%fA)(7XVXiZR*;5aS&Wvb-n8I83TIX<_0l8g4L;Wh!JM#0eRq z)VfTxNogMghE*#FMW8^+|0K_6(2xhG(Q*KXLx$og#t5-rh3-8fBoUuN$F?mSj(MDz znvKSiU;+=?hk!sJQ8<7Il^;x>lXK{_LmogIP(XZjt`qABFB2JgQ^tLWf_|o;F;3d3 zKcv?i3D!nbcf~zqI7MqeFUL$ z?sjn-2g~W35^VqceUH;O0uj;oa0ySxU(Mlsjjt~FI*W$AsA7_^X|u2|V_!#Sfw9qY zl3a%=rv-c6@s zyXaJW_tYaPe`1{Gv!G5wL!13LF zs`bQRr%3!0pzBor1JHFEOLQsoTV!DKx$7*yGDVrxsN;!_a*n@;7&^uJfEYTBWel&# z40n~WWoXC{HmbSi46t! zPFTWP!cD0>T7@NcMVmdi6+4+7JILuV`F~=FL+Er{4e=w0DzPOU5LLojMzvpe-eOVA zP4OtwW<3@{w%w|~0ocSwcL3OgwFH~C1T_Y}m|Nl{h&GYb{n{BvXEkD_!9R-zj?_O$ z(ZFqE8CP#U(gu#t5e>Y`D})cjvvxOsr=XMZeG&Kmt2S;bqexpFK`jCNaMXIrVMq5{ zSd%IQ*Bo$DlL4U7paeRau;IzozE)U9zf`oFj5qRnCe^k?Z&ag&bY<$T*R|EYy(DOt zaEWQKo3Ul~1REdxUxN)|DE^~h6E5)=0|*!4k5!sf;@7PppqBu6GEuv|CNl6VDJ(@R zJ>r%BM$s1gu31YD_n@RHc|+Ui+gGCgT^&!XJvJuxzgGCg$n1n6ToGrp_wU~qDTr=b z%tpAw-$1UyrCYe|`t|wW6?749VPv+togwB&BmEJ_+X8)IC@60k++1F&!DUX(?YO#x zrQt*x!|QF$cKr0WqC6Tnzsw$0GI{!_l39R9l{|l*$=scJEJsV?&4oR>i18BKZa*Ek tz^Cgvo3HCJ2fBWDX6qO`dcN{fbTd57A2DKY9{av`FiZX}(LybR{slVOE|>rS literal 0 HcmV?d00001 diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/Policytagmanagerserialization.php b/owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/Policytagmanagerserialization.php new file mode 100644 index 0000000000000000000000000000000000000000..104108eed9895c30af198ae652af86b01a939fd8 GIT binary patch literal 3430 zcmcIn-EJF26z)1DN+&Hp8?|*)L56LsI)Uzzl!Dk`f}NyEgxa`ih!C=5jn`v)(0XUt z9VZP{Zg>UW0VJ+?0wk`GdI{G^T=c3hP{bAUxAw+%96J?}BH5lfXTI+{KXc~Om9QCt z8*l>$I6@59VD%8PCWc`|8TF_StL=InN6@3KkoY*VAza&r54U&W`r6j+yWBLU?a0F} zY*5w2wBhV8IwAFmcgRqqg#y&TQH&#keDWP)ga)=e3xEK%a2z5J z!;Mn$0cJ=zDQ`%(m@r>={W3|D=E12&$`eS-a35jW93q0xAzJ6NaI$RGzLNx3&U27{1c zyz?2+K`Yd1ofzHcd7ta3Dm1Gx^iI4im_7_WA87{Ue(@FNO(yJ-Bp>) z&ZQRWLflGKtE)F$OKpg>gnDU7FO5{A%EtQ30On&|uDG^~p3s1{4$W)eVvWS1j}9xM zZnFk7au(5& z32PBtB7si=Tv3fdqnsa#a!Xn~mY3A#InMX87tuJbM7Y7T6ZwfR5wX+4vMMZhv|-}1 zI0YsZ9_uS`F@2o534m6VOTZb6oIjhUyI^L(;btC8bwZ{paGc; zWR|Uu#N75&w3R%c&%VJPi=73>r+lgtlLPJl4$cNqFRI7;zwiELYf!>^n}Z|G0q(7Sy!4*gb|Ltb+D*c_Jw zmX$aA@L6H@{44{5ERPV-E(7gXdlfd{|vR_U#|T_&IZZL%s}bIrQ0U{AIAJ9vt@G z;c*YWPmg>LSLt#wDIRWHKK9oU#?)gcNn2QN)mM6!Hpf1 zVJ5MU1Ip*#N0%KL$tw67OwDIF^li`V;m8R|z-VajP(_(zwpw6fY3$@>6F4$MjjTsS zxz^-9VquJn)e#CYi$i}e?K=UuSp75Ku&;JN%macww}Th<8KI$~tfyLoq(go69mz*% zyY8yv1I}w>RU@hR1b*Lw#!U$oA7qhoO1)g5UOsEpdr-+(6BXFx2P$6rkyJwEMs;^b zen+C*O=Gj%`l|}uDH_BNp^||~6(lsaI^{pxCGi8;VCMmrgtbY6s++UL3Fn3LU?B-! zQWs0*wdp==yLe{D9<$DDFUHb)Yu`ht(aE-S=|Ksj5jHe)al>UT6E5os(06UV% zo2%|BH*fAJ#mJf92tV8s@4@EWvBKEHQgyYi`+o~idp%e@E%0-9_wfIhm5b2HqUyiA zRxdG%b$E27>xb&d>gq?6!O$9?8mcuJ9vf;`JJ8f#?UuL=TRm-{4v#f`SQGfUdVlq3 z^+)=|sFg&3%7Jz?R!6n6ScT1j+CH9))Y?XpY_v!1ftvVk*MAk@PLV$GA$+0@d+Jkd z*nd;)k3qcZ9_mAtH}NS**X+D)?Z=7AyOH4DRd4PoUoU5jv_X4xY8|SlwT;d;RHO5V z;blsG=MMosHmEQn3B|}Z)we}7{a9)fp-sDxU^dxocc<;d>CU=4+oT%) zkPrS0AN&@9=m(ngld5_S<&-*TOJ^n{%H$N!k zW8_9&PnVb49jYm3X@>@OI?_Z=V+S0q}?$$FL=Nz$XCtCrsJ| zdoX4$<6ql2c5r|hb_xE-bsWHsOJc;KS93c_;4w@CC;;`qL%Ch3I7RMuNV)C55I! zSRAB10(UP{#YtPT&2hFxZ3Enk5aEU&AaR!*Jx9z_HZ9NZgB5~<_sE}|X0OYGJXq>e zA9se15S6{jgGyt;+>fnxetFGJ%PCSem>Sq@?>|c_^lqgh7f=cP{#q^tN z+9tT0#3*v&5P7(Rd5I&^MNuG6cnH=y2_Zx0L&9fRW=Lf~3RnZnK8{1;4wc?z8C?ZS z{%9EaJZEo-U}*u&E9$2{$Xx007T9Q+#b)`9(==NrZ!O0Cmzm5|E9V@X1MnNOZ4bHt literal 0 HcmV?d00001 diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/TableSpec.php b/owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/TableSpec.php new file mode 100644 index 0000000000000000000000000000000000000000..d766306c82d11e54dac334c8c3a3dbeb76f317c3 GIT binary patch literal 1633 zcmb7EZBNrs7-gU$52Db-I3VhEpbmpwhMz1T*;tuNKn9E%Nt32)@5W7PTW@bsB>W*0 z|AZg>;IHtb@fR3Bd0)CRqYz!vZ0(+N?s?Ah^sKB!hY`%7Iu0;(81_)-7_mc)A{w&L z4Sm!}x?N0>8@`T+kExDOZ5zGVZXvVQXx-z`I83OE4b%(6o{vkeA0}SObC~1u%MW{{ zqjHHk9Ut3qgk4<{0|d@%97m3eQN3B+!pso}t1daLb-`iP&N!@gc^Sa&ICd$CSV)_^)G&IOWj=~0#f9`(K}Wi%s5BbJA0k%~ zqX`~79U+QYLW5LTVUiU7eAf2i?W#82^frRy=-2 z(#9*Em-V^9m!g;{6FMKlr%_n^pKZ`)Rkbd6M<3W7{ir-Mol-dwDbZA>+M>d@986V7 zZzsX@I9m&C6Qy z@umA0vb1@%SkLD}+6q9bgx}{!B>2IF;H-=1L)CE@6Vm0$g*mv|C)REONJ(!*-?FnY zskN{PV;OS0gxragsGfsZju&;MsyZ5pmAQzDAHDTfw9*aY4H%tO14I5EYD8NmhONg1R z3i^wXzr;;d=tn1TLv^1`P`d}WTb1gjY42_C@2;D6>s8aV_h0Na&Gp7c!>mmXX;Uy! zZPa)6&D~dayJ5bZ9M&|ro;{NA$;;Xun8}`PRa)k5qq5mJFl!1kTK$}ZyWF~qhTF^? zRMdv|mylcC3xCT>J^~(>1EYyL%fH?I$mKo^&(>v5>M|#FJ{xD9Up#B|cKJ*HUn`AK ynWO3d77x+iFeKhE1_%tJUG7|w8U5s8_F6Bhcp6BvbCXO~s=PUcQ-EJ~@(e@( literal 0 HcmV?d00001 diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/Tags.php b/owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/Tags.php new file mode 100644 index 0000000000000000000000000000000000000000..d6799ad6d0a4091072adbd71037d71cb63f3e6d2 GIT binary patch literal 2882 zcmb_e&2HO95RN3vkw%H5vQD8Wg|kspM?n)3c2l6C;}()7I|5=`wHc!=2naN}lG#us zORn6yh6?16K1vULf!=%Qp-<7XPd)b7*(E8-e~J$kK!}{(nVtFOo7s8(rGMbVM`VM# zG%y&o$o>&w2bB1M$2`+>$o`<)r2#R$zHd7;kO^sQldWxyG#f4LKB|V^ATX&)dY;#F zsA4+az)~!O874lC*HaFc6lU~7S(pTHjXn*1!=z-RUEie4;CuBAp{=iRZM`wp*7ufH z08GaSL!zM-I0k}0f3WY^CJC9r@b7^gc5K&Xw&B=6VGOIJYd9fA#q)c+1J`7>=Mt{4 z?V7auh(tE|-Uq&iF|U%upEid9A<$bcqk(HUdV_{$VEfDq+PGC!dz6j9u1n+OEX;f;+j;0*)GpkSjv!0 zwXpnHo)V0V&d4IUVbf*7kvO=lL198B6(IAP9>u;sh3ui>3?fGh%OAhXx-g`sKToM| zQYW>aVPO)@$TI{ol(F;`j*PA&c;8Wzh01aKHdGuB%N)xIWy$MMq1@q(z#I4|79X7+ z|B6;@nn;JDF(}8(=nd=FAsd>WPb+_;;}pOmEgXxC^Z_n;*av859Civ} zMtR5r+wH~jObq`#z&;jeEageb;qK4i)`$x65>H}bxt!paP(~h+9@Uxv)E)F=jai|g zBpMfyljl=}BsWoSk0%PvlwdBf%>zb%WU;AS?5zY@FR*A(x{iXZh`4+o@*`zw{z7DC zVdk~%T9uPD6!1hXChr+qpVbxAmOg}eY@|_Zb&fg##nz1QmN*_csda|EPu~@7a`t%^ z>-rQLKR-?5Cs#dYOlSY3)`!LEY)+h$)~-rwBx$0A{Kc;hi@_aMeosSj0_}*p@5P;j zlSA~4%*8pAp1}+|@{_tNyd5xoxuOj$s`AJ_r4u&?k;q0owNDXh$>{YWp9-N&2!kah$nyx!-Q zr*mzjFSiqAju4ht1M;FuC*Yl4q+?UO&>}14w<*XapVC(_XE=`c1GS=p4YB+3X8!DI zX%p4Y?T*_(d2zC=FKu|~iVHVS1t={*xxLfcY-z2%W=H#`-R!*D+HE)2TI;Q5qj*gM zm~Cvos=sU&Q~Z5b+i7iW6w^`;X6oD9FN+yuMP6%dHg~n!X1h3pT_U&BT6>{2zt)P` zdI9nrxQ<0lr~YRO?%_=^Ey{N4+gjB6l6wtrj-GdF7{nU|=fMfq`THxUzWz<6eoNoo z5aXaM#zDD(Wmj3C( Y(HQbL8pS3iw@arsu``;jhA;&94_^wBQvd(} literal 0 HcmV?d00001 diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/Timestamps.php b/owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/Timestamps.php new file mode 100644 index 000000000000..cbfa95d8ad26 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/Timestamps.php @@ -0,0 +1,33 @@ +internalAddGeneratedFile( + ' + +,google/cloud/datacatalog/v1/timestamps.protogoogle.cloud.datacatalog.v1google/protobuf/timestamp.proto" +SystemTimestamps/ + create_time ( 2.google.protobuf.Timestamp/ + update_time ( 2.google.protobuf.Timestamp4 + expire_time ( 2.google.protobuf.TimestampBAB +com.google.cloud.datacatalog.v1PZAcloud.google.com/go/datacatalog/apiv1/datacatalogpb;datacatalogpbGoogle.Cloud.DataCatalog.V1Google\\Cloud\\DataCatalog\\V1Google::Cloud::DataCatalog::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/Usage.php b/owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/Usage.php new file mode 100644 index 0000000000000000000000000000000000000000..0207a8caefe7ad06496ba913040540765965cf9c GIT binary patch literal 1739 zcma)6(M}UV6m?rPdK*z{B2W?-(WE8HHig8P1vHdG;Xxsan3zpA)9tjKINjOI&KA+| z?yJAxqlv%agJ0pZU*MxNvu)Xif;4Hm-I;Umxo6It^%r3$gomh30wS;^P1HC+vO`cP zxa2-(s1dhXL?EAcL&}J-5vuK@SNn%(yS8`uKtUrO3!gZs&3T)Vvd?(jEH|;lzWOrW zF83PsTA-t5*5+}+Y}w{`}1k1A^bKEqLj-s&>&8Ibyf zaf4AGMG{N(^N21x|-g?ijf?L+b8O!kSgm!9B`_IM^Xo=OJ-79FH}EEI+6H z@i&{z;j}x-5v3tN&9(?XZh~99q8IXW$wu3l#!i{W?o|p4{VK*b>IBMiKs0gE;#Uj6 zSmKQ`L6o0`Dan=PJndCR^btoh7P3m2{C${AmRgvySdeHYW8Tlfy*>mhA26o8q(ND; zxC)PxMe>pOv0m{s1FywJx`o%JjL~RjLW33^xVy!>T^^)}O#}2OIaZ)JkcLrq_u3cB zs@{g2ceb+lZ31!$jJB20@@2@yp%R6dz6O|EDcF6@2C~@0^UHT&I@VXjJEpQj`*Z~k z+C%Z1TwgV|ns@dP0*?b7|N@X>scTvNvX}EjkhAGv? zwaw4LWDEDWph}KJNG*6GWT6SOhWuD$4zeG}iIMMC{wZAVVHRsaEG39ryaGY(E+_NM zDul4`Kbj-W)<>HyU)n2G+4xy^tWLolZ*=VHPYV{5_LtQ#oY}KbiRi?l=bT jIH>}Tb5v>EFeY9t4m0FQl8C7Qy)Zn@&LrYa;S}H>KJPjz literal 0 HcmV?d00001 diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/BigQueryConnectionSpec.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/BigQueryConnectionSpec.php new file mode 100644 index 000000000000..4e2d0f006d00 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/BigQueryConnectionSpec.php @@ -0,0 +1,147 @@ +google.cloud.datacatalog.v1.BigQueryConnectionSpec + */ +class BigQueryConnectionSpec extends \Google\Protobuf\Internal\Message +{ + /** + * The type of the BigQuery connection. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.BigQueryConnectionSpec.ConnectionType connection_type = 1; + */ + protected $connection_type = 0; + /** + * True if there are credentials attached to the BigQuery connection; false + * otherwise. + * + * Generated from protobuf field bool has_credential = 3; + */ + protected $has_credential = false; + protected $connection_spec; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $connection_type + * The type of the BigQuery connection. + * @type \Google\Cloud\DataCatalog\V1\CloudSqlBigQueryConnectionSpec $cloud_sql + * Specification for the BigQuery connection to a Cloud SQL instance. + * @type bool $has_credential + * True if there are credentials attached to the BigQuery connection; false + * otherwise. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Bigquery::initOnce(); + parent::__construct($data); + } + + /** + * The type of the BigQuery connection. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.BigQueryConnectionSpec.ConnectionType connection_type = 1; + * @return int + */ + public function getConnectionType() + { + return $this->connection_type; + } + + /** + * The type of the BigQuery connection. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.BigQueryConnectionSpec.ConnectionType connection_type = 1; + * @param int $var + * @return $this + */ + public function setConnectionType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DataCatalog\V1\BigQueryConnectionSpec\ConnectionType::class); + $this->connection_type = $var; + + return $this; + } + + /** + * Specification for the BigQuery connection to a Cloud SQL instance. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec cloud_sql = 2; + * @return \Google\Cloud\DataCatalog\V1\CloudSqlBigQueryConnectionSpec|null + */ + public function getCloudSql() + { + return $this->readOneof(2); + } + + public function hasCloudSql() + { + return $this->hasOneof(2); + } + + /** + * Specification for the BigQuery connection to a Cloud SQL instance. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec cloud_sql = 2; + * @param \Google\Cloud\DataCatalog\V1\CloudSqlBigQueryConnectionSpec $var + * @return $this + */ + public function setCloudSql($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\CloudSqlBigQueryConnectionSpec::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * True if there are credentials attached to the BigQuery connection; false + * otherwise. + * + * Generated from protobuf field bool has_credential = 3; + * @return bool + */ + public function getHasCredential() + { + return $this->has_credential; + } + + /** + * True if there are credentials attached to the BigQuery connection; false + * otherwise. + * + * Generated from protobuf field bool has_credential = 3; + * @param bool $var + * @return $this + */ + public function setHasCredential($var) + { + GPBUtil::checkBool($var); + $this->has_credential = $var; + + return $this; + } + + /** + * @return string + */ + public function getConnectionSpec() + { + return $this->whichOneof("connection_spec"); + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/BigQueryConnectionSpec/ConnectionType.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/BigQueryConnectionSpec/ConnectionType.php new file mode 100644 index 000000000000..7d8e9296d0aa --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/BigQueryConnectionSpec/ConnectionType.php @@ -0,0 +1,57 @@ +google.cloud.datacatalog.v1.BigQueryConnectionSpec.ConnectionType + */ +class ConnectionType +{ + /** + * Unspecified type. + * + * Generated from protobuf enum CONNECTION_TYPE_UNSPECIFIED = 0; + */ + const CONNECTION_TYPE_UNSPECIFIED = 0; + /** + * Cloud SQL connection. + * + * Generated from protobuf enum CLOUD_SQL = 1; + */ + const CLOUD_SQL = 1; + + private static $valueToName = [ + self::CONNECTION_TYPE_UNSPECIFIED => 'CONNECTION_TYPE_UNSPECIFIED', + self::CLOUD_SQL => 'CLOUD_SQL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ConnectionType::class, \Google\Cloud\DataCatalog\V1\BigQueryConnectionSpec_ConnectionType::class); + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/BigQueryDateShardedSpec.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/BigQueryDateShardedSpec.php new file mode 100644 index 000000000000..d2a24365367c --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/BigQueryDateShardedSpec.php @@ -0,0 +1,192 @@ +google.cloud.datacatalog.v1.BigQueryDateShardedSpec + */ +class BigQueryDateShardedSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The Data Catalog resource name of the dataset entry the + * current table belongs to. For example: + * `projects/{PROJECT_ID}/locations/{LOCATION}/entrygroups/{ENTRY_GROUP_ID}/entries/{ENTRY_ID}`. + * + * Generated from protobuf field string dataset = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $dataset = ''; + /** + * Output only. The table name prefix of the shards. + * The name of any given shard is `[table_prefix]YYYYMMDD`. + * For example, for the `MyTable20180101` shard, the + * `table_prefix` is `MyTable`. + * + * Generated from protobuf field string table_prefix = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $table_prefix = ''; + /** + * Output only. Total number of shards. + * + * Generated from protobuf field int64 shard_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $shard_count = 0; + /** + * Output only. BigQuery resource name of the latest shard. + * + * Generated from protobuf field string latest_shard_resource = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $latest_shard_resource = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $dataset + * Output only. The Data Catalog resource name of the dataset entry the + * current table belongs to. For example: + * `projects/{PROJECT_ID}/locations/{LOCATION}/entrygroups/{ENTRY_GROUP_ID}/entries/{ENTRY_ID}`. + * @type string $table_prefix + * Output only. The table name prefix of the shards. + * The name of any given shard is `[table_prefix]YYYYMMDD`. + * For example, for the `MyTable20180101` shard, the + * `table_prefix` is `MyTable`. + * @type int|string $shard_count + * Output only. Total number of shards. + * @type string $latest_shard_resource + * Output only. BigQuery resource name of the latest shard. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\TableSpec::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The Data Catalog resource name of the dataset entry the + * current table belongs to. For example: + * `projects/{PROJECT_ID}/locations/{LOCATION}/entrygroups/{ENTRY_GROUP_ID}/entries/{ENTRY_ID}`. + * + * Generated from protobuf field string dataset = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getDataset() + { + return $this->dataset; + } + + /** + * Output only. The Data Catalog resource name of the dataset entry the + * current table belongs to. For example: + * `projects/{PROJECT_ID}/locations/{LOCATION}/entrygroups/{ENTRY_GROUP_ID}/entries/{ENTRY_ID}`. + * + * Generated from protobuf field string dataset = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setDataset($var) + { + GPBUtil::checkString($var, True); + $this->dataset = $var; + + return $this; + } + + /** + * Output only. The table name prefix of the shards. + * The name of any given shard is `[table_prefix]YYYYMMDD`. + * For example, for the `MyTable20180101` shard, the + * `table_prefix` is `MyTable`. + * + * Generated from protobuf field string table_prefix = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getTablePrefix() + { + return $this->table_prefix; + } + + /** + * Output only. The table name prefix of the shards. + * The name of any given shard is `[table_prefix]YYYYMMDD`. + * For example, for the `MyTable20180101` shard, the + * `table_prefix` is `MyTable`. + * + * Generated from protobuf field string table_prefix = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setTablePrefix($var) + { + GPBUtil::checkString($var, True); + $this->table_prefix = $var; + + return $this; + } + + /** + * Output only. Total number of shards. + * + * Generated from protobuf field int64 shard_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getShardCount() + { + return $this->shard_count; + } + + /** + * Output only. Total number of shards. + * + * Generated from protobuf field int64 shard_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setShardCount($var) + { + GPBUtil::checkInt64($var); + $this->shard_count = $var; + + return $this; + } + + /** + * Output only. BigQuery resource name of the latest shard. + * + * Generated from protobuf field string latest_shard_resource = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getLatestShardResource() + { + return $this->latest_shard_resource; + } + + /** + * Output only. BigQuery resource name of the latest shard. + * + * Generated from protobuf field string latest_shard_resource = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setLatestShardResource($var) + { + GPBUtil::checkString($var, True); + $this->latest_shard_resource = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/BigQueryRoutineSpec.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/BigQueryRoutineSpec.php new file mode 100644 index 000000000000..e83b2495d5ff --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/BigQueryRoutineSpec.php @@ -0,0 +1,67 @@ +google.cloud.datacatalog.v1.BigQueryRoutineSpec + */ +class BigQueryRoutineSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Paths of the imported libraries. + * + * Generated from protobuf field repeated string imported_libraries = 1; + */ + private $imported_libraries; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $imported_libraries + * Paths of the imported libraries. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Bigquery::initOnce(); + parent::__construct($data); + } + + /** + * Paths of the imported libraries. + * + * Generated from protobuf field repeated string imported_libraries = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getImportedLibraries() + { + return $this->imported_libraries; + } + + /** + * Paths of the imported libraries. + * + * Generated from protobuf field repeated string imported_libraries = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setImportedLibraries($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->imported_libraries = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/BigQueryTableSpec.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/BigQueryTableSpec.php new file mode 100644 index 000000000000..0cb87b4b854f --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/BigQueryTableSpec.php @@ -0,0 +1,148 @@ +google.cloud.datacatalog.v1.BigQueryTableSpec + */ +class BigQueryTableSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The table source type. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.TableSourceType table_source_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $table_source_type = 0; + protected $type_spec; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $table_source_type + * Output only. The table source type. + * @type \Google\Cloud\DataCatalog\V1\ViewSpec $view_spec + * Table view specification. Populated only if + * the `table_source_type` is `BIGQUERY_VIEW`. + * @type \Google\Cloud\DataCatalog\V1\TableSpec $table_spec + * Specification of a BigQuery table. Populated only if + * the `table_source_type` is `BIGQUERY_TABLE`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\TableSpec::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The table source type. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.TableSourceType table_source_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getTableSourceType() + { + return $this->table_source_type; + } + + /** + * Output only. The table source type. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.TableSourceType table_source_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setTableSourceType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DataCatalog\V1\TableSourceType::class); + $this->table_source_type = $var; + + return $this; + } + + /** + * Table view specification. Populated only if + * the `table_source_type` is `BIGQUERY_VIEW`. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.ViewSpec view_spec = 2; + * @return \Google\Cloud\DataCatalog\V1\ViewSpec|null + */ + public function getViewSpec() + { + return $this->readOneof(2); + } + + public function hasViewSpec() + { + return $this->hasOneof(2); + } + + /** + * Table view specification. Populated only if + * the `table_source_type` is `BIGQUERY_VIEW`. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.ViewSpec view_spec = 2; + * @param \Google\Cloud\DataCatalog\V1\ViewSpec $var + * @return $this + */ + public function setViewSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\ViewSpec::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Specification of a BigQuery table. Populated only if + * the `table_source_type` is `BIGQUERY_TABLE`. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.TableSpec table_spec = 3; + * @return \Google\Cloud\DataCatalog\V1\TableSpec|null + */ + public function getTableSpec() + { + return $this->readOneof(3); + } + + public function hasTableSpec() + { + return $this->hasOneof(3); + } + + /** + * Specification of a BigQuery table. Populated only if + * the `table_source_type` is `BIGQUERY_TABLE`. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.TableSpec table_spec = 3; + * @param \Google\Cloud\DataCatalog\V1\TableSpec $var + * @return $this + */ + public function setTableSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\TableSpec::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getTypeSpec() + { + return $this->whichOneof("type_spec"); + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/BusinessContext.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/BusinessContext.php new file mode 100644 index 000000000000..21c5c7db22dc --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/BusinessContext.php @@ -0,0 +1,121 @@ +google.cloud.datacatalog.v1.BusinessContext + */ +class BusinessContext extends \Google\Protobuf\Internal\Message +{ + /** + * Entry overview fields for rich text descriptions of entries. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.EntryOverview entry_overview = 1; + */ + protected $entry_overview = null; + /** + * Contact people for the entry. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.Contacts contacts = 2; + */ + protected $contacts = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DataCatalog\V1\EntryOverview $entry_overview + * Entry overview fields for rich text descriptions of entries. + * @type \Google\Cloud\DataCatalog\V1\Contacts $contacts + * Contact people for the entry. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * Entry overview fields for rich text descriptions of entries. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.EntryOverview entry_overview = 1; + * @return \Google\Cloud\DataCatalog\V1\EntryOverview|null + */ + public function getEntryOverview() + { + return $this->entry_overview; + } + + public function hasEntryOverview() + { + return isset($this->entry_overview); + } + + public function clearEntryOverview() + { + unset($this->entry_overview); + } + + /** + * Entry overview fields for rich text descriptions of entries. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.EntryOverview entry_overview = 1; + * @param \Google\Cloud\DataCatalog\V1\EntryOverview $var + * @return $this + */ + public function setEntryOverview($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\EntryOverview::class); + $this->entry_overview = $var; + + return $this; + } + + /** + * Contact people for the entry. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.Contacts contacts = 2; + * @return \Google\Cloud\DataCatalog\V1\Contacts|null + */ + public function getContacts() + { + return $this->contacts; + } + + public function hasContacts() + { + return isset($this->contacts); + } + + public function clearContacts() + { + unset($this->contacts); + } + + /** + * Contact people for the entry. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.Contacts contacts = 2; + * @param \Google\Cloud\DataCatalog\V1\Contacts $var + * @return $this + */ + public function setContacts($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\Contacts::class); + $this->contacts = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CloudBigtableInstanceSpec.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CloudBigtableInstanceSpec.php new file mode 100644 index 000000000000..58a2f17b3fcd --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CloudBigtableInstanceSpec.php @@ -0,0 +1,69 @@ +google.cloud.datacatalog.v1.CloudBigtableInstanceSpec + */ +class CloudBigtableInstanceSpec extends \Google\Protobuf\Internal\Message +{ + /** + * The list of clusters for the Instance. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec cloud_bigtable_cluster_specs = 1; + */ + private $cloud_bigtable_cluster_specs; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\DataCatalog\V1\CloudBigtableInstanceSpec\CloudBigtableClusterSpec>|\Google\Protobuf\Internal\RepeatedField $cloud_bigtable_cluster_specs + * The list of clusters for the Instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * The list of clusters for the Instance. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec cloud_bigtable_cluster_specs = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCloudBigtableClusterSpecs() + { + return $this->cloud_bigtable_cluster_specs; + } + + /** + * The list of clusters for the Instance. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec cloud_bigtable_cluster_specs = 1; + * @param array<\Google\Cloud\DataCatalog\V1\CloudBigtableInstanceSpec\CloudBigtableClusterSpec>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCloudBigtableClusterSpecs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DataCatalog\V1\CloudBigtableInstanceSpec\CloudBigtableClusterSpec::class); + $this->cloud_bigtable_cluster_specs = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CloudBigtableInstanceSpec/CloudBigtableClusterSpec.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CloudBigtableInstanceSpec/CloudBigtableClusterSpec.php new file mode 100644 index 000000000000..089284475331 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CloudBigtableInstanceSpec/CloudBigtableClusterSpec.php @@ -0,0 +1,172 @@ +google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec + */ +class CloudBigtableClusterSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the cluster. + * + * Generated from protobuf field string display_name = 1; + */ + protected $display_name = ''; + /** + * Location of the cluster, typically a Cloud zone. + * + * Generated from protobuf field string location = 2; + */ + protected $location = ''; + /** + * Type of the resource. For a cluster this would be "CLUSTER". + * + * Generated from protobuf field string type = 3; + */ + protected $type = ''; + /** + * A link back to the parent resource, in this case Instance. + * + * Generated from protobuf field string linked_resource = 4; + */ + protected $linked_resource = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $display_name + * Name of the cluster. + * @type string $location + * Location of the cluster, typically a Cloud zone. + * @type string $type + * Type of the resource. For a cluster this would be "CLUSTER". + * @type string $linked_resource + * A link back to the parent resource, in this case Instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * Name of the cluster. + * + * Generated from protobuf field string display_name = 1; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Name of the cluster. + * + * Generated from protobuf field string display_name = 1; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Location of the cluster, typically a Cloud zone. + * + * Generated from protobuf field string location = 2; + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * Location of the cluster, typically a Cloud zone. + * + * Generated from protobuf field string location = 2; + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + + /** + * Type of the resource. For a cluster this would be "CLUSTER". + * + * Generated from protobuf field string type = 3; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * Type of the resource. For a cluster this would be "CLUSTER". + * + * Generated from protobuf field string type = 3; + * @param string $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkString($var, True); + $this->type = $var; + + return $this; + } + + /** + * A link back to the parent resource, in this case Instance. + * + * Generated from protobuf field string linked_resource = 4; + * @return string + */ + public function getLinkedResource() + { + return $this->linked_resource; + } + + /** + * A link back to the parent resource, in this case Instance. + * + * Generated from protobuf field string linked_resource = 4; + * @param string $var + * @return $this + */ + public function setLinkedResource($var) + { + GPBUtil::checkString($var, True); + $this->linked_resource = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CloudBigtableClusterSpec::class, \Google\Cloud\DataCatalog\V1\CloudBigtableInstanceSpec_CloudBigtableClusterSpec::class); + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CloudBigtableSystemSpec.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CloudBigtableSystemSpec.php new file mode 100644 index 000000000000..4e0008126b26 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CloudBigtableSystemSpec.php @@ -0,0 +1,73 @@ +google.cloud.datacatalog.v1.CloudBigtableSystemSpec + */ +class CloudBigtableSystemSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Display name of the Instance. This is user specified and different from + * the resource name. + * + * Generated from protobuf field string instance_display_name = 1; + */ + protected $instance_display_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance_display_name + * Display name of the Instance. This is user specified and different from + * the resource name. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * Display name of the Instance. This is user specified and different from + * the resource name. + * + * Generated from protobuf field string instance_display_name = 1; + * @return string + */ + public function getInstanceDisplayName() + { + return $this->instance_display_name; + } + + /** + * Display name of the Instance. This is user specified and different from + * the resource name. + * + * Generated from protobuf field string instance_display_name = 1; + * @param string $var + * @return $this + */ + public function setInstanceDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->instance_display_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CloudSqlBigQueryConnectionSpec.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CloudSqlBigQueryConnectionSpec.php new file mode 100644 index 000000000000..5069ad521666 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CloudSqlBigQueryConnectionSpec.php @@ -0,0 +1,135 @@ +google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec + */ +class CloudSqlBigQueryConnectionSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID in the format of `project:location:instance`. + * + * Generated from protobuf field string instance_id = 1; + */ + protected $instance_id = ''; + /** + * Database name. + * + * Generated from protobuf field string database = 2; + */ + protected $database = ''; + /** + * Type of the Cloud SQL database. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec.DatabaseType type = 3; + */ + protected $type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance_id + * Cloud SQL instance ID in the format of `project:location:instance`. + * @type string $database + * Database name. + * @type int $type + * Type of the Cloud SQL database. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Bigquery::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID in the format of `project:location:instance`. + * + * Generated from protobuf field string instance_id = 1; + * @return string + */ + public function getInstanceId() + { + return $this->instance_id; + } + + /** + * Cloud SQL instance ID in the format of `project:location:instance`. + * + * Generated from protobuf field string instance_id = 1; + * @param string $var + * @return $this + */ + public function setInstanceId($var) + { + GPBUtil::checkString($var, True); + $this->instance_id = $var; + + return $this; + } + + /** + * Database name. + * + * Generated from protobuf field string database = 2; + * @return string + */ + public function getDatabase() + { + return $this->database; + } + + /** + * Database name. + * + * Generated from protobuf field string database = 2; + * @param string $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkString($var, True); + $this->database = $var; + + return $this; + } + + /** + * Type of the Cloud SQL database. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec.DatabaseType type = 3; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Type of the Cloud SQL database. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec.DatabaseType type = 3; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DataCatalog\V1\CloudSqlBigQueryConnectionSpec\DatabaseType::class); + $this->type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CloudSqlBigQueryConnectionSpec/DatabaseType.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CloudSqlBigQueryConnectionSpec/DatabaseType.php new file mode 100644 index 000000000000..97f9d2e09bcd --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CloudSqlBigQueryConnectionSpec/DatabaseType.php @@ -0,0 +1,64 @@ +google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec.DatabaseType + */ +class DatabaseType +{ + /** + * Unspecified database type. + * + * Generated from protobuf enum DATABASE_TYPE_UNSPECIFIED = 0; + */ + const DATABASE_TYPE_UNSPECIFIED = 0; + /** + * Cloud SQL for PostgreSQL. + * + * Generated from protobuf enum POSTGRES = 1; + */ + const POSTGRES = 1; + /** + * Cloud SQL for MySQL. + * + * Generated from protobuf enum MYSQL = 2; + */ + const MYSQL = 2; + + private static $valueToName = [ + self::DATABASE_TYPE_UNSPECIFIED => 'DATABASE_TYPE_UNSPECIFIED', + self::POSTGRES => 'POSTGRES', + self::MYSQL => 'MYSQL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DatabaseType::class, \Google\Cloud\DataCatalog\V1\CloudSqlBigQueryConnectionSpec_DatabaseType::class); + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ColumnSchema.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ColumnSchema.php new file mode 100644 index 000000000000..d2ce3a54127a --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ColumnSchema.php @@ -0,0 +1,422 @@ +google.cloud.datacatalog.v1.ColumnSchema + */ +class ColumnSchema extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the column. + * Must be a UTF-8 string without dots (.). + * The maximum size is 64 bytes. + * + * Generated from protobuf field string column = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $column = ''; + /** + * Required. Type of the column. + * Must be a UTF-8 string with the maximum size of 128 bytes. + * + * Generated from protobuf field string type = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $type = ''; + /** + * Optional. Description of the column. Default value is an empty string. + * The description must be a UTF-8 string with the maximum size of 2000 + * bytes. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Optional. A column's mode indicates whether values in this column are + * required, nullable, or repeated. + * Only `NULLABLE`, `REQUIRED`, and `REPEATED` values are supported. + * Default mode is `NULLABLE`. + * + * Generated from protobuf field string mode = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $mode = ''; + /** + * Optional. Default value for the column. + * + * Generated from protobuf field string default_value = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $default_value = ''; + /** + * Optional. Ordinal position + * + * Generated from protobuf field int32 ordinal_position = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $ordinal_position = 0; + /** + * Optional. Most important inclusion of this column. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.ColumnSchema.IndexingType highest_indexing_type = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $highest_indexing_type = 0; + /** + * Optional. Schema of sub-columns. A column can have zero or more + * sub-columns. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.ColumnSchema subcolumns = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $subcolumns; + /** + * Optional. Garbage collection policy for the column or column family. + * Applies to systems like Cloud Bigtable. + * + * Generated from protobuf field string gc_rule = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $gc_rule = ''; + protected $system_spec; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $column + * Required. Name of the column. + * Must be a UTF-8 string without dots (.). + * The maximum size is 64 bytes. + * @type string $type + * Required. Type of the column. + * Must be a UTF-8 string with the maximum size of 128 bytes. + * @type string $description + * Optional. Description of the column. Default value is an empty string. + * The description must be a UTF-8 string with the maximum size of 2000 + * bytes. + * @type string $mode + * Optional. A column's mode indicates whether values in this column are + * required, nullable, or repeated. + * Only `NULLABLE`, `REQUIRED`, and `REPEATED` values are supported. + * Default mode is `NULLABLE`. + * @type string $default_value + * Optional. Default value for the column. + * @type int $ordinal_position + * Optional. Ordinal position + * @type int $highest_indexing_type + * Optional. Most important inclusion of this column. + * @type array<\Google\Cloud\DataCatalog\V1\ColumnSchema>|\Google\Protobuf\Internal\RepeatedField $subcolumns + * Optional. Schema of sub-columns. A column can have zero or more + * sub-columns. + * @type \Google\Cloud\DataCatalog\V1\ColumnSchema\LookerColumnSpec $looker_column_spec + * Looker specific column info of this column. + * @type string $gc_rule + * Optional. Garbage collection policy for the column or column family. + * Applies to systems like Cloud Bigtable. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Schema::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the column. + * Must be a UTF-8 string without dots (.). + * The maximum size is 64 bytes. + * + * Generated from protobuf field string column = 6 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getColumn() + { + return $this->column; + } + + /** + * Required. Name of the column. + * Must be a UTF-8 string without dots (.). + * The maximum size is 64 bytes. + * + * Generated from protobuf field string column = 6 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setColumn($var) + { + GPBUtil::checkString($var, True); + $this->column = $var; + + return $this; + } + + /** + * Required. Type of the column. + * Must be a UTF-8 string with the maximum size of 128 bytes. + * + * Generated from protobuf field string type = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * Required. Type of the column. + * Must be a UTF-8 string with the maximum size of 128 bytes. + * + * Generated from protobuf field string type = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkString($var, True); + $this->type = $var; + + return $this; + } + + /** + * Optional. Description of the column. Default value is an empty string. + * The description must be a UTF-8 string with the maximum size of 2000 + * bytes. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. Description of the column. Default value is an empty string. + * The description must be a UTF-8 string with the maximum size of 2000 + * bytes. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Optional. A column's mode indicates whether values in this column are + * required, nullable, or repeated. + * Only `NULLABLE`, `REQUIRED`, and `REPEATED` values are supported. + * Default mode is `NULLABLE`. + * + * Generated from protobuf field string mode = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getMode() + { + return $this->mode; + } + + /** + * Optional. A column's mode indicates whether values in this column are + * required, nullable, or repeated. + * Only `NULLABLE`, `REQUIRED`, and `REPEATED` values are supported. + * Default mode is `NULLABLE`. + * + * Generated from protobuf field string mode = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setMode($var) + { + GPBUtil::checkString($var, True); + $this->mode = $var; + + return $this; + } + + /** + * Optional. Default value for the column. + * + * Generated from protobuf field string default_value = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDefaultValue() + { + return $this->default_value; + } + + /** + * Optional. Default value for the column. + * + * Generated from protobuf field string default_value = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDefaultValue($var) + { + GPBUtil::checkString($var, True); + $this->default_value = $var; + + return $this; + } + + /** + * Optional. Ordinal position + * + * Generated from protobuf field int32 ordinal_position = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getOrdinalPosition() + { + return $this->ordinal_position; + } + + /** + * Optional. Ordinal position + * + * Generated from protobuf field int32 ordinal_position = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setOrdinalPosition($var) + { + GPBUtil::checkInt32($var); + $this->ordinal_position = $var; + + return $this; + } + + /** + * Optional. Most important inclusion of this column. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.ColumnSchema.IndexingType highest_indexing_type = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getHighestIndexingType() + { + return $this->highest_indexing_type; + } + + /** + * Optional. Most important inclusion of this column. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.ColumnSchema.IndexingType highest_indexing_type = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setHighestIndexingType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DataCatalog\V1\ColumnSchema\IndexingType::class); + $this->highest_indexing_type = $var; + + return $this; + } + + /** + * Optional. Schema of sub-columns. A column can have zero or more + * sub-columns. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.ColumnSchema subcolumns = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSubcolumns() + { + return $this->subcolumns; + } + + /** + * Optional. Schema of sub-columns. A column can have zero or more + * sub-columns. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.ColumnSchema subcolumns = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\DataCatalog\V1\ColumnSchema>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSubcolumns($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DataCatalog\V1\ColumnSchema::class); + $this->subcolumns = $arr; + + return $this; + } + + /** + * Looker specific column info of this column. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec looker_column_spec = 18; + * @return \Google\Cloud\DataCatalog\V1\ColumnSchema\LookerColumnSpec|null + */ + public function getLookerColumnSpec() + { + return $this->readOneof(18); + } + + public function hasLookerColumnSpec() + { + return $this->hasOneof(18); + } + + /** + * Looker specific column info of this column. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec looker_column_spec = 18; + * @param \Google\Cloud\DataCatalog\V1\ColumnSchema\LookerColumnSpec $var + * @return $this + */ + public function setLookerColumnSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\ColumnSchema\LookerColumnSpec::class); + $this->writeOneof(18, $var); + + return $this; + } + + /** + * Optional. Garbage collection policy for the column or column family. + * Applies to systems like Cloud Bigtable. + * + * Generated from protobuf field string gc_rule = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getGcRule() + { + return $this->gc_rule; + } + + /** + * Optional. Garbage collection policy for the column or column family. + * Applies to systems like Cloud Bigtable. + * + * Generated from protobuf field string gc_rule = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setGcRule($var) + { + GPBUtil::checkString($var, True); + $this->gc_rule = $var; + + return $this; + } + + /** + * @return string + */ + public function getSystemSpec() + { + return $this->whichOneof("system_spec"); + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ColumnSchema/IndexingType.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ColumnSchema/IndexingType.php new file mode 100644 index 000000000000..88e5298ab423 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ColumnSchema/IndexingType.php @@ -0,0 +1,78 @@ +google.cloud.datacatalog.v1.ColumnSchema.IndexingType + */ +class IndexingType +{ + /** + * Unspecified. + * + * Generated from protobuf enum INDEXING_TYPE_UNSPECIFIED = 0; + */ + const INDEXING_TYPE_UNSPECIFIED = 0; + /** + * Column not a part of an index. + * + * Generated from protobuf enum INDEXING_TYPE_NONE = 1; + */ + const INDEXING_TYPE_NONE = 1; + /** + * Column Part of non unique index. + * + * Generated from protobuf enum INDEXING_TYPE_NON_UNIQUE = 2; + */ + const INDEXING_TYPE_NON_UNIQUE = 2; + /** + * Column part of unique index. + * + * Generated from protobuf enum INDEXING_TYPE_UNIQUE = 3; + */ + const INDEXING_TYPE_UNIQUE = 3; + /** + * Column part of the primary key. + * + * Generated from protobuf enum INDEXING_TYPE_PRIMARY_KEY = 4; + */ + const INDEXING_TYPE_PRIMARY_KEY = 4; + + private static $valueToName = [ + self::INDEXING_TYPE_UNSPECIFIED => 'INDEXING_TYPE_UNSPECIFIED', + self::INDEXING_TYPE_NONE => 'INDEXING_TYPE_NONE', + self::INDEXING_TYPE_NON_UNIQUE => 'INDEXING_TYPE_NON_UNIQUE', + self::INDEXING_TYPE_UNIQUE => 'INDEXING_TYPE_UNIQUE', + self::INDEXING_TYPE_PRIMARY_KEY => 'INDEXING_TYPE_PRIMARY_KEY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(IndexingType::class, \Google\Cloud\DataCatalog\V1\ColumnSchema_IndexingType::class); + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ColumnSchema/LookerColumnSpec.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ColumnSchema/LookerColumnSpec.php new file mode 100644 index 000000000000..7fa381a72a8f --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ColumnSchema/LookerColumnSpec.php @@ -0,0 +1,70 @@ +google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec + */ +class LookerColumnSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Looker specific column type of this column. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec.LookerColumnType type = 1; + */ + protected $type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * Looker specific column type of this column. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Schema::initOnce(); + parent::__construct($data); + } + + /** + * Looker specific column type of this column. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec.LookerColumnType type = 1; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Looker specific column type of this column. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec.LookerColumnType type = 1; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DataCatalog\V1\ColumnSchema\LookerColumnSpec\LookerColumnType::class); + $this->type = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(LookerColumnSpec::class, \Google\Cloud\DataCatalog\V1\ColumnSchema_LookerColumnSpec::class); + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ColumnSchema/LookerColumnSpec/LookerColumnType.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ColumnSchema/LookerColumnSpec/LookerColumnType.php new file mode 100644 index 000000000000..b2db79f640d0 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ColumnSchema/LookerColumnSpec/LookerColumnType.php @@ -0,0 +1,85 @@ +google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec.LookerColumnType + */ +class LookerColumnType +{ + /** + * Unspecified. + * + * Generated from protobuf enum LOOKER_COLUMN_TYPE_UNSPECIFIED = 0; + */ + const LOOKER_COLUMN_TYPE_UNSPECIFIED = 0; + /** + * Dimension. + * + * Generated from protobuf enum DIMENSION = 1; + */ + const DIMENSION = 1; + /** + * Dimension group - parent for Dimension. + * + * Generated from protobuf enum DIMENSION_GROUP = 2; + */ + const DIMENSION_GROUP = 2; + /** + * Filter. + * + * Generated from protobuf enum FILTER = 3; + */ + const FILTER = 3; + /** + * Measure. + * + * Generated from protobuf enum MEASURE = 4; + */ + const MEASURE = 4; + /** + * Parameter. + * + * Generated from protobuf enum PARAMETER = 5; + */ + const PARAMETER = 5; + + private static $valueToName = [ + self::LOOKER_COLUMN_TYPE_UNSPECIFIED => 'LOOKER_COLUMN_TYPE_UNSPECIFIED', + self::DIMENSION => 'DIMENSION', + self::DIMENSION_GROUP => 'DIMENSION_GROUP', + self::FILTER => 'FILTER', + self::MEASURE => 'MEASURE', + self::PARAMETER => 'PARAMETER', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(LookerColumnType::class, \Google\Cloud\DataCatalog\V1\ColumnSchema_LookerColumnSpec_LookerColumnType::class); + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CommonUsageStats.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CommonUsageStats.php new file mode 100644 index 000000000000..a3f5a8bd425a --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CommonUsageStats.php @@ -0,0 +1,78 @@ +google.cloud.datacatalog.v1.CommonUsageStats + */ +class CommonUsageStats extends \Google\Protobuf\Internal\Message +{ + /** + * View count in source system. + * + * Generated from protobuf field optional int64 view_count = 1; + */ + protected $view_count = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $view_count + * View count in source system. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Usage::initOnce(); + parent::__construct($data); + } + + /** + * View count in source system. + * + * Generated from protobuf field optional int64 view_count = 1; + * @return int|string + */ + public function getViewCount() + { + return isset($this->view_count) ? $this->view_count : 0; + } + + public function hasViewCount() + { + return isset($this->view_count); + } + + public function clearViewCount() + { + unset($this->view_count); + } + + /** + * View count in source system. + * + * Generated from protobuf field optional int64 view_count = 1; + * @param int|string $var + * @return $this + */ + public function setViewCount($var) + { + GPBUtil::checkInt64($var); + $this->view_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Contacts.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Contacts.php new file mode 100644 index 000000000000..3da08ebbe67c --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Contacts.php @@ -0,0 +1,67 @@ +google.cloud.datacatalog.v1.Contacts + */ +class Contacts extends \Google\Protobuf\Internal\Message +{ + /** + * The list of contact people for the entry. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Contacts.Person people = 1; + */ + private $people; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\DataCatalog\V1\Contacts\Person>|\Google\Protobuf\Internal\RepeatedField $people + * The list of contact people for the entry. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * The list of contact people for the entry. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Contacts.Person people = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPeople() + { + return $this->people; + } + + /** + * The list of contact people for the entry. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Contacts.Person people = 1; + * @param array<\Google\Cloud\DataCatalog\V1\Contacts\Person>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPeople($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DataCatalog\V1\Contacts\Person::class); + $this->people = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Contacts/Person.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Contacts/Person.php new file mode 100644 index 000000000000..a517a943a789 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Contacts/Person.php @@ -0,0 +1,108 @@ +google.cloud.datacatalog.v1.Contacts.Person + */ +class Person extends \Google\Protobuf\Internal\Message +{ + /** + * Designation of the person, for example, Data Steward. + * + * Generated from protobuf field string designation = 1; + */ + protected $designation = ''; + /** + * Email of the person in the format of `john.doe@xyz`, + * ``, or `John Doe`. + * + * Generated from protobuf field string email = 2; + */ + protected $email = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $designation + * Designation of the person, for example, Data Steward. + * @type string $email + * Email of the person in the format of `john.doe@xyz`, + * ``, or `John Doe`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * Designation of the person, for example, Data Steward. + * + * Generated from protobuf field string designation = 1; + * @return string + */ + public function getDesignation() + { + return $this->designation; + } + + /** + * Designation of the person, for example, Data Steward. + * + * Generated from protobuf field string designation = 1; + * @param string $var + * @return $this + */ + public function setDesignation($var) + { + GPBUtil::checkString($var, True); + $this->designation = $var; + + return $this; + } + + /** + * Email of the person in the format of `john.doe@xyz`, + * ``, or `John Doe`. + * + * Generated from protobuf field string email = 2; + * @return string + */ + public function getEmail() + { + return $this->email; + } + + /** + * Email of the person in the format of `john.doe@xyz`, + * ``, or `John Doe`. + * + * Generated from protobuf field string email = 2; + * @param string $var + * @return $this + */ + public function setEmail($var) + { + GPBUtil::checkString($var, True); + $this->email = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Person::class, \Google\Cloud\DataCatalog\V1\Contacts_Person::class); + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CreateEntryGroupRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CreateEntryGroupRequest.php new file mode 100644 index 000000000000..39f4d66f8d5e --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CreateEntryGroupRequest.php @@ -0,0 +1,196 @@ +google.cloud.datacatalog.v1.CreateEntryGroupRequest + */ +class CreateEntryGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The names of the project and location that the new entry group + * belongs to. + * Note: The entry group itself and its child resources might not be + * stored in the location specified in its name. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The ID of the entry group to create. + * The ID must contain only letters (a-z, A-Z), numbers (0-9), + * underscores (_), and must start with a letter or underscore. + * The maximum size is 64 bytes when encoded in UTF-8. + * + * Generated from protobuf field string entry_group_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $entry_group_id = ''; + /** + * The entry group to create. Defaults to empty. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.EntryGroup entry_group = 2; + */ + protected $entry_group = null; + + /** + * @param string $parent Required. The names of the project and location that the new entry group + * belongs to. + * + * Note: The entry group itself and its child resources might not be + * stored in the location specified in its name. Please see + * {@see DataCatalogClient::locationName()} for help formatting this field. + * @param string $entryGroupId Required. The ID of the entry group to create. + * + * The ID must contain only letters (a-z, A-Z), numbers (0-9), + * underscores (_), and must start with a letter or underscore. + * The maximum size is 64 bytes when encoded in UTF-8. + * @param \Google\Cloud\DataCatalog\V1\EntryGroup $entryGroup The entry group to create. Defaults to empty. + * + * @return \Google\Cloud\DataCatalog\V1\CreateEntryGroupRequest + * + * @experimental + */ + public static function build(string $parent, string $entryGroupId, \Google\Cloud\DataCatalog\V1\EntryGroup $entryGroup): self + { + return (new self()) + ->setParent($parent) + ->setEntryGroupId($entryGroupId) + ->setEntryGroup($entryGroup); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The names of the project and location that the new entry group + * belongs to. + * Note: The entry group itself and its child resources might not be + * stored in the location specified in its name. + * @type string $entry_group_id + * Required. The ID of the entry group to create. + * The ID must contain only letters (a-z, A-Z), numbers (0-9), + * underscores (_), and must start with a letter or underscore. + * The maximum size is 64 bytes when encoded in UTF-8. + * @type \Google\Cloud\DataCatalog\V1\EntryGroup $entry_group + * The entry group to create. Defaults to empty. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * Required. The names of the project and location that the new entry group + * belongs to. + * Note: The entry group itself and its child resources might not be + * stored in the location specified in its name. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The names of the project and location that the new entry group + * belongs to. + * Note: The entry group itself and its child resources might not be + * stored in the location specified in its name. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The ID of the entry group to create. + * The ID must contain only letters (a-z, A-Z), numbers (0-9), + * underscores (_), and must start with a letter or underscore. + * The maximum size is 64 bytes when encoded in UTF-8. + * + * Generated from protobuf field string entry_group_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getEntryGroupId() + { + return $this->entry_group_id; + } + + /** + * Required. The ID of the entry group to create. + * The ID must contain only letters (a-z, A-Z), numbers (0-9), + * underscores (_), and must start with a letter or underscore. + * The maximum size is 64 bytes when encoded in UTF-8. + * + * Generated from protobuf field string entry_group_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setEntryGroupId($var) + { + GPBUtil::checkString($var, True); + $this->entry_group_id = $var; + + return $this; + } + + /** + * The entry group to create. Defaults to empty. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.EntryGroup entry_group = 2; + * @return \Google\Cloud\DataCatalog\V1\EntryGroup|null + */ + public function getEntryGroup() + { + return $this->entry_group; + } + + public function hasEntryGroup() + { + return isset($this->entry_group); + } + + public function clearEntryGroup() + { + unset($this->entry_group); + } + + /** + * The entry group to create. Defaults to empty. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.EntryGroup entry_group = 2; + * @param \Google\Cloud\DataCatalog\V1\EntryGroup $var + * @return $this + */ + public function setEntryGroup($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\EntryGroup::class); + $this->entry_group = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CreateEntryRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CreateEntryRequest.php new file mode 100644 index 000000000000..fd4686b7581c --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CreateEntryRequest.php @@ -0,0 +1,191 @@ +google.cloud.datacatalog.v1.CreateEntryRequest + */ +class CreateEntryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the entry group this entry belongs to. + * Note: The entry itself and its child resources might not be stored in + * the location specified in its name. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The ID of the entry to create. + * The ID must contain only letters (a-z, A-Z), numbers (0-9), + * and underscores (_). + * The maximum size is 64 bytes when encoded in UTF-8. + * + * Generated from protobuf field string entry_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $entry_id = ''; + /** + * Required. The entry to create. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.Entry entry = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $entry = null; + + /** + * @param string $parent Required. The name of the entry group this entry belongs to. + * + * Note: The entry itself and its child resources might not be stored in + * the location specified in its name. Please see + * {@see DataCatalogClient::entryGroupName()} for help formatting this field. + * @param string $entryId Required. The ID of the entry to create. + * + * The ID must contain only letters (a-z, A-Z), numbers (0-9), + * and underscores (_). + * The maximum size is 64 bytes when encoded in UTF-8. + * @param \Google\Cloud\DataCatalog\V1\Entry $entry Required. The entry to create. + * + * @return \Google\Cloud\DataCatalog\V1\CreateEntryRequest + * + * @experimental + */ + public static function build(string $parent, string $entryId, \Google\Cloud\DataCatalog\V1\Entry $entry): self + { + return (new self()) + ->setParent($parent) + ->setEntryId($entryId) + ->setEntry($entry); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the entry group this entry belongs to. + * Note: The entry itself and its child resources might not be stored in + * the location specified in its name. + * @type string $entry_id + * Required. The ID of the entry to create. + * The ID must contain only letters (a-z, A-Z), numbers (0-9), + * and underscores (_). + * The maximum size is 64 bytes when encoded in UTF-8. + * @type \Google\Cloud\DataCatalog\V1\Entry $entry + * Required. The entry to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the entry group this entry belongs to. + * Note: The entry itself and its child resources might not be stored in + * the location specified in its name. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The name of the entry group this entry belongs to. + * Note: The entry itself and its child resources might not be stored in + * the location specified in its name. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The ID of the entry to create. + * The ID must contain only letters (a-z, A-Z), numbers (0-9), + * and underscores (_). + * The maximum size is 64 bytes when encoded in UTF-8. + * + * Generated from protobuf field string entry_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getEntryId() + { + return $this->entry_id; + } + + /** + * Required. The ID of the entry to create. + * The ID must contain only letters (a-z, A-Z), numbers (0-9), + * and underscores (_). + * The maximum size is 64 bytes when encoded in UTF-8. + * + * Generated from protobuf field string entry_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setEntryId($var) + { + GPBUtil::checkString($var, True); + $this->entry_id = $var; + + return $this; + } + + /** + * Required. The entry to create. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.Entry entry = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\DataCatalog\V1\Entry|null + */ + public function getEntry() + { + return $this->entry; + } + + public function hasEntry() + { + return isset($this->entry); + } + + public function clearEntry() + { + unset($this->entry); + } + + /** + * Required. The entry to create. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.Entry entry = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\DataCatalog\V1\Entry $var + * @return $this + */ + public function setEntry($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\Entry::class); + $this->entry = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CreatePolicyTagRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CreatePolicyTagRequest.php new file mode 100644 index 000000000000..064c852d0a2b --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CreatePolicyTagRequest.php @@ -0,0 +1,128 @@ +google.cloud.datacatalog.v1.CreatePolicyTagRequest + */ +class CreatePolicyTagRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the taxonomy that the policy tag will belong to. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The policy tag to create. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.PolicyTag policy_tag = 2; + */ + protected $policy_tag = null; + + /** + * @param string $parent Required. Resource name of the taxonomy that the policy tag will belong to. Please see + * {@see PolicyTagManagerClient::taxonomyName()} for help formatting this field. + * @param \Google\Cloud\DataCatalog\V1\PolicyTag $policyTag The policy tag to create. + * + * @return \Google\Cloud\DataCatalog\V1\CreatePolicyTagRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\DataCatalog\V1\PolicyTag $policyTag): self + { + return (new self()) + ->setParent($parent) + ->setPolicyTag($policyTag); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Resource name of the taxonomy that the policy tag will belong to. + * @type \Google\Cloud\DataCatalog\V1\PolicyTag $policy_tag + * The policy tag to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Policytagmanager::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the taxonomy that the policy tag will belong to. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Resource name of the taxonomy that the policy tag will belong to. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The policy tag to create. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.PolicyTag policy_tag = 2; + * @return \Google\Cloud\DataCatalog\V1\PolicyTag|null + */ + public function getPolicyTag() + { + return $this->policy_tag; + } + + public function hasPolicyTag() + { + return isset($this->policy_tag); + } + + public function clearPolicyTag() + { + unset($this->policy_tag); + } + + /** + * The policy tag to create. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.PolicyTag policy_tag = 2; + * @param \Google\Cloud\DataCatalog\V1\PolicyTag $var + * @return $this + */ + public function setPolicyTag($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\PolicyTag::class); + $this->policy_tag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CreateTagRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CreateTagRequest.php new file mode 100644 index 000000000000..a226f5e17c49 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CreateTagRequest.php @@ -0,0 +1,150 @@ +google.cloud.datacatalog.v1.CreateTagRequest + */ +class CreateTagRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the resource to attach this tag to. + * Tags can be attached to entries or entry groups. An entry can have up to + * 1000 attached tags. + * Note: The tag and its child resources might not be stored in + * the location specified in its name. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The tag to create. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.Tag tag = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $tag = null; + + /** + * @param string $parent Required. The name of the resource to attach this tag to. + * + * Tags can be attached to entries or entry groups. An entry can have up to + * 1000 attached tags. + * + * Note: The tag and its child resources might not be stored in + * the location specified in its name. Please see + * {@see DataCatalogClient::entryName()} for help formatting this field. + * @param \Google\Cloud\DataCatalog\V1\Tag $tag Required. The tag to create. + * + * @return \Google\Cloud\DataCatalog\V1\CreateTagRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\DataCatalog\V1\Tag $tag): self + { + return (new self()) + ->setParent($parent) + ->setTag($tag); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the resource to attach this tag to. + * Tags can be attached to entries or entry groups. An entry can have up to + * 1000 attached tags. + * Note: The tag and its child resources might not be stored in + * the location specified in its name. + * @type \Google\Cloud\DataCatalog\V1\Tag $tag + * Required. The tag to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the resource to attach this tag to. + * Tags can be attached to entries or entry groups. An entry can have up to + * 1000 attached tags. + * Note: The tag and its child resources might not be stored in + * the location specified in its name. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The name of the resource to attach this tag to. + * Tags can be attached to entries or entry groups. An entry can have up to + * 1000 attached tags. + * Note: The tag and its child resources might not be stored in + * the location specified in its name. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The tag to create. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.Tag tag = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\DataCatalog\V1\Tag|null + */ + public function getTag() + { + return $this->tag; + } + + public function hasTag() + { + return isset($this->tag); + } + + public function clearTag() + { + unset($this->tag); + } + + /** + * Required. The tag to create. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.Tag tag = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\DataCatalog\V1\Tag $var + * @return $this + */ + public function setTag($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\Tag::class); + $this->tag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CreateTagTemplateFieldRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CreateTagTemplateFieldRequest.php new file mode 100644 index 000000000000..e9b59f4f670e --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CreateTagTemplateFieldRequest.php @@ -0,0 +1,196 @@ +google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest + */ +class CreateTagTemplateFieldRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the project and the template location + * [region](https://cloud.google.com/data-catalog/docs/concepts/regions). + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The ID of the tag template field to create. + * Note: Adding a required field to an existing template is *not* allowed. + * Field IDs can contain letters (both uppercase and lowercase), numbers + * (0-9), underscores (_) and dashes (-). Field IDs must be at least 1 + * character long and at most 128 characters long. Field IDs must also be + * unique within their template. + * + * Generated from protobuf field string tag_template_field_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $tag_template_field_id = ''; + /** + * Required. The tag template field to create. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.TagTemplateField tag_template_field = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $tag_template_field = null; + + /** + * @param string $parent Required. The name of the project and the template location + * [region](https://cloud.google.com/data-catalog/docs/concepts/regions). Please see + * {@see DataCatalogClient::tagTemplateName()} for help formatting this field. + * @param string $tagTemplateFieldId Required. The ID of the tag template field to create. + * + * Note: Adding a required field to an existing template is *not* allowed. + * + * Field IDs can contain letters (both uppercase and lowercase), numbers + * (0-9), underscores (_) and dashes (-). Field IDs must be at least 1 + * character long and at most 128 characters long. Field IDs must also be + * unique within their template. + * @param \Google\Cloud\DataCatalog\V1\TagTemplateField $tagTemplateField Required. The tag template field to create. + * + * @return \Google\Cloud\DataCatalog\V1\CreateTagTemplateFieldRequest + * + * @experimental + */ + public static function build(string $parent, string $tagTemplateFieldId, \Google\Cloud\DataCatalog\V1\TagTemplateField $tagTemplateField): self + { + return (new self()) + ->setParent($parent) + ->setTagTemplateFieldId($tagTemplateFieldId) + ->setTagTemplateField($tagTemplateField); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the project and the template location + * [region](https://cloud.google.com/data-catalog/docs/concepts/regions). + * @type string $tag_template_field_id + * Required. The ID of the tag template field to create. + * Note: Adding a required field to an existing template is *not* allowed. + * Field IDs can contain letters (both uppercase and lowercase), numbers + * (0-9), underscores (_) and dashes (-). Field IDs must be at least 1 + * character long and at most 128 characters long. Field IDs must also be + * unique within their template. + * @type \Google\Cloud\DataCatalog\V1\TagTemplateField $tag_template_field + * Required. The tag template field to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the project and the template location + * [region](https://cloud.google.com/data-catalog/docs/concepts/regions). + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The name of the project and the template location + * [region](https://cloud.google.com/data-catalog/docs/concepts/regions). + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The ID of the tag template field to create. + * Note: Adding a required field to an existing template is *not* allowed. + * Field IDs can contain letters (both uppercase and lowercase), numbers + * (0-9), underscores (_) and dashes (-). Field IDs must be at least 1 + * character long and at most 128 characters long. Field IDs must also be + * unique within their template. + * + * Generated from protobuf field string tag_template_field_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTagTemplateFieldId() + { + return $this->tag_template_field_id; + } + + /** + * Required. The ID of the tag template field to create. + * Note: Adding a required field to an existing template is *not* allowed. + * Field IDs can contain letters (both uppercase and lowercase), numbers + * (0-9), underscores (_) and dashes (-). Field IDs must be at least 1 + * character long and at most 128 characters long. Field IDs must also be + * unique within their template. + * + * Generated from protobuf field string tag_template_field_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTagTemplateFieldId($var) + { + GPBUtil::checkString($var, True); + $this->tag_template_field_id = $var; + + return $this; + } + + /** + * Required. The tag template field to create. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.TagTemplateField tag_template_field = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\DataCatalog\V1\TagTemplateField|null + */ + public function getTagTemplateField() + { + return $this->tag_template_field; + } + + public function hasTagTemplateField() + { + return isset($this->tag_template_field); + } + + public function clearTagTemplateField() + { + unset($this->tag_template_field); + } + + /** + * Required. The tag template field to create. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.TagTemplateField tag_template_field = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\DataCatalog\V1\TagTemplateField $var + * @return $this + */ + public function setTagTemplateField($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\TagTemplateField::class); + $this->tag_template_field = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CreateTagTemplateRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CreateTagTemplateRequest.php new file mode 100644 index 000000000000..59ff04cc98e8 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CreateTagTemplateRequest.php @@ -0,0 +1,185 @@ +google.cloud.datacatalog.v1.CreateTagTemplateRequest + */ +class CreateTagTemplateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the project and the template location + * [region](https://cloud.google.com/data-catalog/docs/concepts/regions). + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The ID of the tag template to create. + * The ID must contain only lowercase letters (a-z), numbers (0-9), + * or underscores (_), and must start with a letter or underscore. + * The maximum size is 64 bytes when encoded in UTF-8. + * + * Generated from protobuf field string tag_template_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $tag_template_id = ''; + /** + * Required. The tag template to create. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.TagTemplate tag_template = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $tag_template = null; + + /** + * @param string $parent Required. The name of the project and the template location + * [region](https://cloud.google.com/data-catalog/docs/concepts/regions). Please see + * {@see DataCatalogClient::locationName()} for help formatting this field. + * @param string $tagTemplateId Required. The ID of the tag template to create. + * + * The ID must contain only lowercase letters (a-z), numbers (0-9), + * or underscores (_), and must start with a letter or underscore. + * The maximum size is 64 bytes when encoded in UTF-8. + * @param \Google\Cloud\DataCatalog\V1\TagTemplate $tagTemplate Required. The tag template to create. + * + * @return \Google\Cloud\DataCatalog\V1\CreateTagTemplateRequest + * + * @experimental + */ + public static function build(string $parent, string $tagTemplateId, \Google\Cloud\DataCatalog\V1\TagTemplate $tagTemplate): self + { + return (new self()) + ->setParent($parent) + ->setTagTemplateId($tagTemplateId) + ->setTagTemplate($tagTemplate); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the project and the template location + * [region](https://cloud.google.com/data-catalog/docs/concepts/regions). + * @type string $tag_template_id + * Required. The ID of the tag template to create. + * The ID must contain only lowercase letters (a-z), numbers (0-9), + * or underscores (_), and must start with a letter or underscore. + * The maximum size is 64 bytes when encoded in UTF-8. + * @type \Google\Cloud\DataCatalog\V1\TagTemplate $tag_template + * Required. The tag template to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the project and the template location + * [region](https://cloud.google.com/data-catalog/docs/concepts/regions). + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The name of the project and the template location + * [region](https://cloud.google.com/data-catalog/docs/concepts/regions). + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The ID of the tag template to create. + * The ID must contain only lowercase letters (a-z), numbers (0-9), + * or underscores (_), and must start with a letter or underscore. + * The maximum size is 64 bytes when encoded in UTF-8. + * + * Generated from protobuf field string tag_template_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTagTemplateId() + { + return $this->tag_template_id; + } + + /** + * Required. The ID of the tag template to create. + * The ID must contain only lowercase letters (a-z), numbers (0-9), + * or underscores (_), and must start with a letter or underscore. + * The maximum size is 64 bytes when encoded in UTF-8. + * + * Generated from protobuf field string tag_template_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTagTemplateId($var) + { + GPBUtil::checkString($var, True); + $this->tag_template_id = $var; + + return $this; + } + + /** + * Required. The tag template to create. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.TagTemplate tag_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\DataCatalog\V1\TagTemplate|null + */ + public function getTagTemplate() + { + return $this->tag_template; + } + + public function hasTagTemplate() + { + return isset($this->tag_template); + } + + public function clearTagTemplate() + { + unset($this->tag_template); + } + + /** + * Required. The tag template to create. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.TagTemplate tag_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\DataCatalog\V1\TagTemplate $var + * @return $this + */ + public function setTagTemplate($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\TagTemplate::class); + $this->tag_template = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CreateTaxonomyRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CreateTaxonomyRequest.php new file mode 100644 index 000000000000..915bbd53a633 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CreateTaxonomyRequest.php @@ -0,0 +1,128 @@ +google.cloud.datacatalog.v1.CreateTaxonomyRequest + */ +class CreateTaxonomyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the project that the taxonomy will belong to. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The taxonomy to create. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.Taxonomy taxonomy = 2; + */ + protected $taxonomy = null; + + /** + * @param string $parent Required. Resource name of the project that the taxonomy will belong to. Please see + * {@see PolicyTagManagerClient::locationName()} for help formatting this field. + * @param \Google\Cloud\DataCatalog\V1\Taxonomy $taxonomy The taxonomy to create. + * + * @return \Google\Cloud\DataCatalog\V1\CreateTaxonomyRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\DataCatalog\V1\Taxonomy $taxonomy): self + { + return (new self()) + ->setParent($parent) + ->setTaxonomy($taxonomy); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Resource name of the project that the taxonomy will belong to. + * @type \Google\Cloud\DataCatalog\V1\Taxonomy $taxonomy + * The taxonomy to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Policytagmanager::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the project that the taxonomy will belong to. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Resource name of the project that the taxonomy will belong to. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The taxonomy to create. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.Taxonomy taxonomy = 2; + * @return \Google\Cloud\DataCatalog\V1\Taxonomy|null + */ + public function getTaxonomy() + { + return $this->taxonomy; + } + + public function hasTaxonomy() + { + return isset($this->taxonomy); + } + + public function clearTaxonomy() + { + unset($this->taxonomy); + } + + /** + * The taxonomy to create. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.Taxonomy taxonomy = 2; + * @param \Google\Cloud\DataCatalog\V1\Taxonomy $var + * @return $this + */ + public function setTaxonomy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\Taxonomy::class); + $this->taxonomy = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CrossRegionalSource.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CrossRegionalSource.php new file mode 100644 index 000000000000..fd871a9080bf --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CrossRegionalSource.php @@ -0,0 +1,68 @@ +google.cloud.datacatalog.v1.CrossRegionalSource + */ +class CrossRegionalSource extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the source taxonomy to import. + * + * Generated from protobuf field string taxonomy = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $taxonomy = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $taxonomy + * Required. The resource name of the source taxonomy to import. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Policytagmanagerserialization::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the source taxonomy to import. + * + * Generated from protobuf field string taxonomy = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getTaxonomy() + { + return $this->taxonomy; + } + + /** + * Required. The resource name of the source taxonomy to import. + * + * Generated from protobuf field string taxonomy = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setTaxonomy($var) + { + GPBUtil::checkString($var, True); + $this->taxonomy = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DataSource.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DataSource.php new file mode 100644 index 000000000000..09404782fe65 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DataSource.php @@ -0,0 +1,181 @@ +google.cloud.datacatalog.v1.DataSource + */ +class DataSource extends \Google\Protobuf\Internal\Message +{ + /** + * Service that physically stores the data. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.DataSource.Service service = 1; + */ + protected $service = 0; + /** + * Full name of a resource as defined by the service. For example: + * `//bigquery.googleapis.com/projects/{PROJECT_ID}/locations/{LOCATION}/datasets/{DATASET_ID}/tables/{TABLE_ID}` + * + * Generated from protobuf field string resource = 2; + */ + protected $resource = ''; + /** + * Output only. Data Catalog entry name, if applicable. + * + * Generated from protobuf field string source_entry = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $source_entry = ''; + protected $properties; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $service + * Service that physically stores the data. + * @type string $resource + * Full name of a resource as defined by the service. For example: + * `//bigquery.googleapis.com/projects/{PROJECT_ID}/locations/{LOCATION}/datasets/{DATASET_ID}/tables/{TABLE_ID}` + * @type string $source_entry + * Output only. Data Catalog entry name, if applicable. + * @type \Google\Cloud\DataCatalog\V1\StorageProperties $storage_properties + * Detailed properties of the underlying storage. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\DataSource::initOnce(); + parent::__construct($data); + } + + /** + * Service that physically stores the data. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.DataSource.Service service = 1; + * @return int + */ + public function getService() + { + return $this->service; + } + + /** + * Service that physically stores the data. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.DataSource.Service service = 1; + * @param int $var + * @return $this + */ + public function setService($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DataCatalog\V1\DataSource\Service::class); + $this->service = $var; + + return $this; + } + + /** + * Full name of a resource as defined by the service. For example: + * `//bigquery.googleapis.com/projects/{PROJECT_ID}/locations/{LOCATION}/datasets/{DATASET_ID}/tables/{TABLE_ID}` + * + * Generated from protobuf field string resource = 2; + * @return string + */ + public function getResource() + { + return $this->resource; + } + + /** + * Full name of a resource as defined by the service. For example: + * `//bigquery.googleapis.com/projects/{PROJECT_ID}/locations/{LOCATION}/datasets/{DATASET_ID}/tables/{TABLE_ID}` + * + * Generated from protobuf field string resource = 2; + * @param string $var + * @return $this + */ + public function setResource($var) + { + GPBUtil::checkString($var, True); + $this->resource = $var; + + return $this; + } + + /** + * Output only. Data Catalog entry name, if applicable. + * + * Generated from protobuf field string source_entry = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getSourceEntry() + { + return $this->source_entry; + } + + /** + * Output only. Data Catalog entry name, if applicable. + * + * Generated from protobuf field string source_entry = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setSourceEntry($var) + { + GPBUtil::checkString($var, True); + $this->source_entry = $var; + + return $this; + } + + /** + * Detailed properties of the underlying storage. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.StorageProperties storage_properties = 4; + * @return \Google\Cloud\DataCatalog\V1\StorageProperties|null + */ + public function getStorageProperties() + { + return $this->readOneof(4); + } + + public function hasStorageProperties() + { + return $this->hasOneof(4); + } + + /** + * Detailed properties of the underlying storage. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.StorageProperties storage_properties = 4; + * @param \Google\Cloud\DataCatalog\V1\StorageProperties $var + * @return $this + */ + public function setStorageProperties($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\StorageProperties::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * @return string + */ + public function getProperties() + { + return $this->whichOneof("properties"); + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DataSource/Service.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DataSource/Service.php new file mode 100644 index 000000000000..57568d1de5b2 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DataSource/Service.php @@ -0,0 +1,64 @@ +google.cloud.datacatalog.v1.DataSource.Service + */ +class Service +{ + /** + * Default unknown service. + * + * Generated from protobuf enum SERVICE_UNSPECIFIED = 0; + */ + const SERVICE_UNSPECIFIED = 0; + /** + * Google Cloud Storage service. + * + * Generated from protobuf enum CLOUD_STORAGE = 1; + */ + const CLOUD_STORAGE = 1; + /** + * BigQuery service. + * + * Generated from protobuf enum BIGQUERY = 2; + */ + const BIGQUERY = 2; + + private static $valueToName = [ + self::SERVICE_UNSPECIFIED => 'SERVICE_UNSPECIFIED', + self::CLOUD_STORAGE => 'CLOUD_STORAGE', + self::BIGQUERY => 'BIGQUERY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Service::class, \Google\Cloud\DataCatalog\V1\DataSource_Service::class); + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DataSourceConnectionSpec.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DataSourceConnectionSpec.php new file mode 100644 index 000000000000..79706866f1ef --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DataSourceConnectionSpec.php @@ -0,0 +1,80 @@ +google.cloud.datacatalog.v1.DataSourceConnectionSpec + */ +class DataSourceConnectionSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Fields specific to BigQuery connections. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.BigQueryConnectionSpec bigquery_connection_spec = 1; + */ + protected $bigquery_connection_spec = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DataCatalog\V1\BigQueryConnectionSpec $bigquery_connection_spec + * Output only. Fields specific to BigQuery connections. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Fields specific to BigQuery connections. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.BigQueryConnectionSpec bigquery_connection_spec = 1; + * @return \Google\Cloud\DataCatalog\V1\BigQueryConnectionSpec|null + */ + public function getBigqueryConnectionSpec() + { + return $this->bigquery_connection_spec; + } + + public function hasBigqueryConnectionSpec() + { + return isset($this->bigquery_connection_spec); + } + + public function clearBigqueryConnectionSpec() + { + unset($this->bigquery_connection_spec); + } + + /** + * Output only. Fields specific to BigQuery connections. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.BigQueryConnectionSpec bigquery_connection_spec = 1; + * @param \Google\Cloud\DataCatalog\V1\BigQueryConnectionSpec $var + * @return $this + */ + public function setBigqueryConnectionSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\BigQueryConnectionSpec::class); + $this->bigquery_connection_spec = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DatabaseTableSpec.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DatabaseTableSpec.php new file mode 100644 index 000000000000..8baa72ed9130 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DatabaseTableSpec.php @@ -0,0 +1,164 @@ +google.cloud.datacatalog.v1.DatabaseTableSpec + */ +class DatabaseTableSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Type of this table. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.DatabaseTableSpec.TableType type = 1; + */ + protected $type = 0; + /** + * Output only. Fields specific to a Dataplex table and present only in the + * Dataplex table entries. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.DataplexTableSpec dataplex_table = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $dataplex_table = null; + /** + * Spec what aplies to tables that are actually views. + * Not set for "real" tables. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec database_view_spec = 3; + */ + protected $database_view_spec = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * Type of this table. + * @type \Google\Cloud\DataCatalog\V1\DataplexTableSpec $dataplex_table + * Output only. Fields specific to a Dataplex table and present only in the + * Dataplex table entries. + * @type \Google\Cloud\DataCatalog\V1\DatabaseTableSpec\DatabaseViewSpec $database_view_spec + * Spec what aplies to tables that are actually views. + * Not set for "real" tables. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * Type of this table. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.DatabaseTableSpec.TableType type = 1; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Type of this table. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.DatabaseTableSpec.TableType type = 1; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DataCatalog\V1\DatabaseTableSpec\TableType::class); + $this->type = $var; + + return $this; + } + + /** + * Output only. Fields specific to a Dataplex table and present only in the + * Dataplex table entries. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.DataplexTableSpec dataplex_table = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\DataCatalog\V1\DataplexTableSpec|null + */ + public function getDataplexTable() + { + return $this->dataplex_table; + } + + public function hasDataplexTable() + { + return isset($this->dataplex_table); + } + + public function clearDataplexTable() + { + unset($this->dataplex_table); + } + + /** + * Output only. Fields specific to a Dataplex table and present only in the + * Dataplex table entries. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.DataplexTableSpec dataplex_table = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\DataCatalog\V1\DataplexTableSpec $var + * @return $this + */ + public function setDataplexTable($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\DataplexTableSpec::class); + $this->dataplex_table = $var; + + return $this; + } + + /** + * Spec what aplies to tables that are actually views. + * Not set for "real" tables. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec database_view_spec = 3; + * @return \Google\Cloud\DataCatalog\V1\DatabaseTableSpec\DatabaseViewSpec|null + */ + public function getDatabaseViewSpec() + { + return $this->database_view_spec; + } + + public function hasDatabaseViewSpec() + { + return isset($this->database_view_spec); + } + + public function clearDatabaseViewSpec() + { + unset($this->database_view_spec); + } + + /** + * Spec what aplies to tables that are actually views. + * Not set for "real" tables. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec database_view_spec = 3; + * @param \Google\Cloud\DataCatalog\V1\DatabaseTableSpec\DatabaseViewSpec $var + * @return $this + */ + public function setDatabaseViewSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\DatabaseTableSpec\DatabaseViewSpec::class); + $this->database_view_spec = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DatabaseTableSpec/DatabaseViewSpec.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DatabaseTableSpec/DatabaseViewSpec.php new file mode 100644 index 000000000000..6be384655ea3 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DatabaseTableSpec/DatabaseViewSpec.php @@ -0,0 +1,145 @@ +google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec + */ +class DatabaseViewSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Type of this view. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec.ViewType view_type = 1; + */ + protected $view_type = 0; + protected $source_definition; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $view_type + * Type of this view. + * @type string $base_table + * Name of a singular table this view reflects one to one. + * @type string $sql_query + * SQL query used to generate this view. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * Type of this view. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec.ViewType view_type = 1; + * @return int + */ + public function getViewType() + { + return $this->view_type; + } + + /** + * Type of this view. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec.ViewType view_type = 1; + * @param int $var + * @return $this + */ + public function setViewType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DataCatalog\V1\DatabaseTableSpec\DatabaseViewSpec\ViewType::class); + $this->view_type = $var; + + return $this; + } + + /** + * Name of a singular table this view reflects one to one. + * + * Generated from protobuf field string base_table = 2; + * @return string + */ + public function getBaseTable() + { + return $this->readOneof(2); + } + + public function hasBaseTable() + { + return $this->hasOneof(2); + } + + /** + * Name of a singular table this view reflects one to one. + * + * Generated from protobuf field string base_table = 2; + * @param string $var + * @return $this + */ + public function setBaseTable($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * SQL query used to generate this view. + * + * Generated from protobuf field string sql_query = 3; + * @return string + */ + public function getSqlQuery() + { + return $this->readOneof(3); + } + + public function hasSqlQuery() + { + return $this->hasOneof(3); + } + + /** + * SQL query used to generate this view. + * + * Generated from protobuf field string sql_query = 3; + * @param string $var + * @return $this + */ + public function setSqlQuery($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getSourceDefinition() + { + return $this->whichOneof("source_definition"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DatabaseViewSpec::class, \Google\Cloud\DataCatalog\V1\DatabaseTableSpec_DatabaseViewSpec::class); + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DatabaseTableSpec/DatabaseViewSpec/ViewType.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DatabaseTableSpec/DatabaseViewSpec/ViewType.php new file mode 100644 index 000000000000..6e0092c6b218 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DatabaseTableSpec/DatabaseViewSpec/ViewType.php @@ -0,0 +1,64 @@ +google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec.ViewType + */ +class ViewType +{ + /** + * Default unknown view type. + * + * Generated from protobuf enum VIEW_TYPE_UNSPECIFIED = 0; + */ + const VIEW_TYPE_UNSPECIFIED = 0; + /** + * Standard view. + * + * Generated from protobuf enum STANDARD_VIEW = 1; + */ + const STANDARD_VIEW = 1; + /** + * Materialized view. + * + * Generated from protobuf enum MATERIALIZED_VIEW = 2; + */ + const MATERIALIZED_VIEW = 2; + + private static $valueToName = [ + self::VIEW_TYPE_UNSPECIFIED => 'VIEW_TYPE_UNSPECIFIED', + self::STANDARD_VIEW => 'STANDARD_VIEW', + self::MATERIALIZED_VIEW => 'MATERIALIZED_VIEW', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ViewType::class, \Google\Cloud\DataCatalog\V1\DatabaseTableSpec_DatabaseViewSpec_ViewType::class); + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DatabaseTableSpec/TableType.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DatabaseTableSpec/TableType.php new file mode 100644 index 000000000000..c25cc7a54b26 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DatabaseTableSpec/TableType.php @@ -0,0 +1,64 @@ +google.cloud.datacatalog.v1.DatabaseTableSpec.TableType + */ +class TableType +{ + /** + * Default unknown table type. + * + * Generated from protobuf enum TABLE_TYPE_UNSPECIFIED = 0; + */ + const TABLE_TYPE_UNSPECIFIED = 0; + /** + * Native table. + * + * Generated from protobuf enum NATIVE = 1; + */ + const NATIVE = 1; + /** + * External table. + * + * Generated from protobuf enum EXTERNAL = 2; + */ + const EXTERNAL = 2; + + private static $valueToName = [ + self::TABLE_TYPE_UNSPECIFIED => 'TABLE_TYPE_UNSPECIFIED', + self::NATIVE => 'NATIVE', + self::EXTERNAL => 'EXTERNAL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TableType::class, \Google\Cloud\DataCatalog\V1\DatabaseTableSpec_TableType::class); + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DataplexExternalTable.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DataplexExternalTable.php new file mode 100644 index 000000000000..b80f582eeee2 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DataplexExternalTable.php @@ -0,0 +1,175 @@ +google.cloud.datacatalog.v1.DataplexExternalTable + */ +class DataplexExternalTable extends \Google\Protobuf\Internal\Message +{ + /** + * Service in which the external table is registered. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.IntegratedSystem system = 1; + */ + protected $system = 0; + /** + * Fully qualified name (FQN) of the external table. + * + * Generated from protobuf field string fully_qualified_name = 28; + */ + protected $fully_qualified_name = ''; + /** + * Google Cloud resource name of the external table. + * + * Generated from protobuf field string google_cloud_resource = 3; + */ + protected $google_cloud_resource = ''; + /** + * Name of the Data Catalog entry representing the external table. + * + * Generated from protobuf field string data_catalog_entry = 4; + */ + protected $data_catalog_entry = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $system + * Service in which the external table is registered. + * @type string $fully_qualified_name + * Fully qualified name (FQN) of the external table. + * @type string $google_cloud_resource + * Google Cloud resource name of the external table. + * @type string $data_catalog_entry + * Name of the Data Catalog entry representing the external table. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\DataplexSpec::initOnce(); + parent::__construct($data); + } + + /** + * Service in which the external table is registered. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.IntegratedSystem system = 1; + * @return int + */ + public function getSystem() + { + return $this->system; + } + + /** + * Service in which the external table is registered. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.IntegratedSystem system = 1; + * @param int $var + * @return $this + */ + public function setSystem($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DataCatalog\V1\IntegratedSystem::class); + $this->system = $var; + + return $this; + } + + /** + * Fully qualified name (FQN) of the external table. + * + * Generated from protobuf field string fully_qualified_name = 28; + * @return string + */ + public function getFullyQualifiedName() + { + return $this->fully_qualified_name; + } + + /** + * Fully qualified name (FQN) of the external table. + * + * Generated from protobuf field string fully_qualified_name = 28; + * @param string $var + * @return $this + */ + public function setFullyQualifiedName($var) + { + GPBUtil::checkString($var, True); + $this->fully_qualified_name = $var; + + return $this; + } + + /** + * Google Cloud resource name of the external table. + * + * Generated from protobuf field string google_cloud_resource = 3; + * @return string + */ + public function getGoogleCloudResource() + { + return $this->google_cloud_resource; + } + + /** + * Google Cloud resource name of the external table. + * + * Generated from protobuf field string google_cloud_resource = 3; + * @param string $var + * @return $this + */ + public function setGoogleCloudResource($var) + { + GPBUtil::checkString($var, True); + $this->google_cloud_resource = $var; + + return $this; + } + + /** + * Name of the Data Catalog entry representing the external table. + * + * Generated from protobuf field string data_catalog_entry = 4; + * @return string + */ + public function getDataCatalogEntry() + { + return $this->data_catalog_entry; + } + + /** + * Name of the Data Catalog entry representing the external table. + * + * Generated from protobuf field string data_catalog_entry = 4; + * @param string $var + * @return $this + */ + public function setDataCatalogEntry($var) + { + GPBUtil::checkString($var, True); + $this->data_catalog_entry = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DataplexFilesetSpec.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DataplexFilesetSpec.php new file mode 100644 index 000000000000..2d446c2e89ed --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DataplexFilesetSpec.php @@ -0,0 +1,77 @@ +google.cloud.datacatalog.v1.DataplexFilesetSpec + */ +class DataplexFilesetSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Common Dataplex fields. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.DataplexSpec dataplex_spec = 1; + */ + protected $dataplex_spec = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DataCatalog\V1\DataplexSpec $dataplex_spec + * Common Dataplex fields. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\DataplexSpec::initOnce(); + parent::__construct($data); + } + + /** + * Common Dataplex fields. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.DataplexSpec dataplex_spec = 1; + * @return \Google\Cloud\DataCatalog\V1\DataplexSpec|null + */ + public function getDataplexSpec() + { + return $this->dataplex_spec; + } + + public function hasDataplexSpec() + { + return isset($this->dataplex_spec); + } + + public function clearDataplexSpec() + { + unset($this->dataplex_spec); + } + + /** + * Common Dataplex fields. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.DataplexSpec dataplex_spec = 1; + * @param \Google\Cloud\DataCatalog\V1\DataplexSpec $var + * @return $this + */ + public function setDataplexSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\DataplexSpec::class); + $this->dataplex_spec = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DataplexSpec.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DataplexSpec.php new file mode 100644 index 000000000000..1cd799f4c9ca --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DataplexSpec.php @@ -0,0 +1,195 @@ +google.cloud.datacatalog.v1.DataplexSpec + */ +class DataplexSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Fully qualified resource name of an asset in Dataplex, to which the + * underlying data source (Cloud Storage bucket or BigQuery dataset) of the + * entity is attached. + * + * Generated from protobuf field string asset = 1; + */ + protected $asset = ''; + /** + * Format of the data. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.PhysicalSchema data_format = 2; + */ + protected $data_format = null; + /** + * Compression format of the data, e.g., zip, gzip etc. + * + * Generated from protobuf field string compression_format = 3; + */ + protected $compression_format = ''; + /** + * Project ID of the underlying Cloud Storage or BigQuery data. Note that + * this may not be the same project as the correspondingly Dataplex lake / + * zone / asset. + * + * Generated from protobuf field string project_id = 4; + */ + protected $project_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $asset + * Fully qualified resource name of an asset in Dataplex, to which the + * underlying data source (Cloud Storage bucket or BigQuery dataset) of the + * entity is attached. + * @type \Google\Cloud\DataCatalog\V1\PhysicalSchema $data_format + * Format of the data. + * @type string $compression_format + * Compression format of the data, e.g., zip, gzip etc. + * @type string $project_id + * Project ID of the underlying Cloud Storage or BigQuery data. Note that + * this may not be the same project as the correspondingly Dataplex lake / + * zone / asset. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\DataplexSpec::initOnce(); + parent::__construct($data); + } + + /** + * Fully qualified resource name of an asset in Dataplex, to which the + * underlying data source (Cloud Storage bucket or BigQuery dataset) of the + * entity is attached. + * + * Generated from protobuf field string asset = 1; + * @return string + */ + public function getAsset() + { + return $this->asset; + } + + /** + * Fully qualified resource name of an asset in Dataplex, to which the + * underlying data source (Cloud Storage bucket or BigQuery dataset) of the + * entity is attached. + * + * Generated from protobuf field string asset = 1; + * @param string $var + * @return $this + */ + public function setAsset($var) + { + GPBUtil::checkString($var, True); + $this->asset = $var; + + return $this; + } + + /** + * Format of the data. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.PhysicalSchema data_format = 2; + * @return \Google\Cloud\DataCatalog\V1\PhysicalSchema|null + */ + public function getDataFormat() + { + return $this->data_format; + } + + public function hasDataFormat() + { + return isset($this->data_format); + } + + public function clearDataFormat() + { + unset($this->data_format); + } + + /** + * Format of the data. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.PhysicalSchema data_format = 2; + * @param \Google\Cloud\DataCatalog\V1\PhysicalSchema $var + * @return $this + */ + public function setDataFormat($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\PhysicalSchema::class); + $this->data_format = $var; + + return $this; + } + + /** + * Compression format of the data, e.g., zip, gzip etc. + * + * Generated from protobuf field string compression_format = 3; + * @return string + */ + public function getCompressionFormat() + { + return $this->compression_format; + } + + /** + * Compression format of the data, e.g., zip, gzip etc. + * + * Generated from protobuf field string compression_format = 3; + * @param string $var + * @return $this + */ + public function setCompressionFormat($var) + { + GPBUtil::checkString($var, True); + $this->compression_format = $var; + + return $this; + } + + /** + * Project ID of the underlying Cloud Storage or BigQuery data. Note that + * this may not be the same project as the correspondingly Dataplex lake / + * zone / asset. + * + * Generated from protobuf field string project_id = 4; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * Project ID of the underlying Cloud Storage or BigQuery data. Note that + * this may not be the same project as the correspondingly Dataplex lake / + * zone / asset. + * + * Generated from protobuf field string project_id = 4; + * @param string $var + * @return $this + */ + public function setProjectId($var) + { + GPBUtil::checkString($var, True); + $this->project_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DataplexTableSpec.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DataplexTableSpec.php new file mode 100644 index 000000000000..307535cce500 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DataplexTableSpec.php @@ -0,0 +1,153 @@ +google.cloud.datacatalog.v1.DataplexTableSpec + */ +class DataplexTableSpec extends \Google\Protobuf\Internal\Message +{ + /** + * List of external tables registered by Dataplex in other systems based on + * the same underlying data. + * External tables allow to query this data in those systems. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.DataplexExternalTable external_tables = 1; + */ + private $external_tables; + /** + * Common Dataplex fields. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.DataplexSpec dataplex_spec = 2; + */ + protected $dataplex_spec = null; + /** + * Indicates if the table schema is managed by the user or not. + * + * Generated from protobuf field bool user_managed = 3; + */ + protected $user_managed = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\DataCatalog\V1\DataplexExternalTable>|\Google\Protobuf\Internal\RepeatedField $external_tables + * List of external tables registered by Dataplex in other systems based on + * the same underlying data. + * External tables allow to query this data in those systems. + * @type \Google\Cloud\DataCatalog\V1\DataplexSpec $dataplex_spec + * Common Dataplex fields. + * @type bool $user_managed + * Indicates if the table schema is managed by the user or not. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\DataplexSpec::initOnce(); + parent::__construct($data); + } + + /** + * List of external tables registered by Dataplex in other systems based on + * the same underlying data. + * External tables allow to query this data in those systems. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.DataplexExternalTable external_tables = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExternalTables() + { + return $this->external_tables; + } + + /** + * List of external tables registered by Dataplex in other systems based on + * the same underlying data. + * External tables allow to query this data in those systems. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.DataplexExternalTable external_tables = 1; + * @param array<\Google\Cloud\DataCatalog\V1\DataplexExternalTable>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExternalTables($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DataCatalog\V1\DataplexExternalTable::class); + $this->external_tables = $arr; + + return $this; + } + + /** + * Common Dataplex fields. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.DataplexSpec dataplex_spec = 2; + * @return \Google\Cloud\DataCatalog\V1\DataplexSpec|null + */ + public function getDataplexSpec() + { + return $this->dataplex_spec; + } + + public function hasDataplexSpec() + { + return isset($this->dataplex_spec); + } + + public function clearDataplexSpec() + { + unset($this->dataplex_spec); + } + + /** + * Common Dataplex fields. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.DataplexSpec dataplex_spec = 2; + * @param \Google\Cloud\DataCatalog\V1\DataplexSpec $var + * @return $this + */ + public function setDataplexSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\DataplexSpec::class); + $this->dataplex_spec = $var; + + return $this; + } + + /** + * Indicates if the table schema is managed by the user or not. + * + * Generated from protobuf field bool user_managed = 3; + * @return bool + */ + public function getUserManaged() + { + return $this->user_managed; + } + + /** + * Indicates if the table schema is managed by the user or not. + * + * Generated from protobuf field bool user_managed = 3; + * @param bool $var + * @return $this + */ + public function setUserManaged($var) + { + GPBUtil::checkBool($var); + $this->user_managed = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DeleteEntryGroupRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DeleteEntryGroupRequest.php new file mode 100644 index 000000000000..18b895c7bc8b --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DeleteEntryGroupRequest.php @@ -0,0 +1,116 @@ +google.cloud.datacatalog.v1.DeleteEntryGroupRequest + */ +class DeleteEntryGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the entry group to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. If true, deletes all entries in the entry group. + * + * Generated from protobuf field bool force = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $force = false; + + /** + * @param string $name Required. The name of the entry group to delete. Please see + * {@see DataCatalogClient::entryGroupName()} for help formatting this field. + * + * @return \Google\Cloud\DataCatalog\V1\DeleteEntryGroupRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the entry group to delete. + * @type bool $force + * Optional. If true, deletes all entries in the entry group. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the entry group to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the entry group to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. If true, deletes all entries in the entry group. + * + * Generated from protobuf field bool force = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * Optional. If true, deletes all entries in the entry group. + * + * Generated from protobuf field bool force = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setForce($var) + { + GPBUtil::checkBool($var); + $this->force = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DeleteEntryRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DeleteEntryRequest.php new file mode 100644 index 000000000000..42fa737bce1e --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DeleteEntryRequest.php @@ -0,0 +1,82 @@ +google.cloud.datacatalog.v1.DeleteEntryRequest + */ +class DeleteEntryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the entry to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the entry to delete. Please see + * {@see DataCatalogClient::entryName()} for help formatting this field. + * + * @return \Google\Cloud\DataCatalog\V1\DeleteEntryRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the entry to delete. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the entry to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the entry to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DeletePolicyTagRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DeletePolicyTagRequest.php new file mode 100644 index 000000000000..bf6f2daa89c2 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DeletePolicyTagRequest.php @@ -0,0 +1,88 @@ +google.cloud.datacatalog.v1.DeletePolicyTagRequest + */ +class DeletePolicyTagRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the policy tag to delete. + * Note: All of its descendant policy tags are also deleted. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Resource name of the policy tag to delete. + * + * Note: All of its descendant policy tags are also deleted. Please see + * {@see PolicyTagManagerClient::policyTagName()} for help formatting this field. + * + * @return \Google\Cloud\DataCatalog\V1\DeletePolicyTagRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Resource name of the policy tag to delete. + * Note: All of its descendant policy tags are also deleted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Policytagmanager::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the policy tag to delete. + * Note: All of its descendant policy tags are also deleted. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Resource name of the policy tag to delete. + * Note: All of its descendant policy tags are also deleted. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DeleteTagRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DeleteTagRequest.php new file mode 100644 index 000000000000..b2313041c5e7 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DeleteTagRequest.php @@ -0,0 +1,82 @@ +google.cloud.datacatalog.v1.DeleteTagRequest + */ +class DeleteTagRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the tag to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the tag to delete. Please see + * {@see DataCatalogClient::entryName()} for help formatting this field. + * + * @return \Google\Cloud\DataCatalog\V1\DeleteTagRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the tag to delete. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the tag to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the tag to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DeleteTagTemplateFieldRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DeleteTagTemplateFieldRequest.php new file mode 100644 index 000000000000..e50e145c3d78 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DeleteTagTemplateFieldRequest.php @@ -0,0 +1,124 @@ +google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest + */ +class DeleteTagTemplateFieldRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the tag template field to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. If true, deletes this field from any tags that use it. + * Currently, `true` is the only supported value. + * + * Generated from protobuf field bool force = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $force = false; + + /** + * @param string $name Required. The name of the tag template field to delete. Please see + * {@see DataCatalogClient::tagTemplateFieldName()} for help formatting this field. + * @param bool $force Required. If true, deletes this field from any tags that use it. + * + * Currently, `true` is the only supported value. + * + * @return \Google\Cloud\DataCatalog\V1\DeleteTagTemplateFieldRequest + * + * @experimental + */ + public static function build(string $name, bool $force): self + { + return (new self()) + ->setName($name) + ->setForce($force); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the tag template field to delete. + * @type bool $force + * Required. If true, deletes this field from any tags that use it. + * Currently, `true` is the only supported value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the tag template field to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the tag template field to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. If true, deletes this field from any tags that use it. + * Currently, `true` is the only supported value. + * + * Generated from protobuf field bool force = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * Required. If true, deletes this field from any tags that use it. + * Currently, `true` is the only supported value. + * + * Generated from protobuf field bool force = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param bool $var + * @return $this + */ + public function setForce($var) + { + GPBUtil::checkBool($var); + $this->force = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DeleteTagTemplateRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DeleteTagTemplateRequest.php new file mode 100644 index 000000000000..68b359b7f6fc --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DeleteTagTemplateRequest.php @@ -0,0 +1,124 @@ +google.cloud.datacatalog.v1.DeleteTagTemplateRequest + */ +class DeleteTagTemplateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the tag template to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. If true, deletes all tags that use this template. + * Currently, `true` is the only supported value. + * + * Generated from protobuf field bool force = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $force = false; + + /** + * @param string $name Required. The name of the tag template to delete. Please see + * {@see DataCatalogClient::tagTemplateName()} for help formatting this field. + * @param bool $force Required. If true, deletes all tags that use this template. + * + * Currently, `true` is the only supported value. + * + * @return \Google\Cloud\DataCatalog\V1\DeleteTagTemplateRequest + * + * @experimental + */ + public static function build(string $name, bool $force): self + { + return (new self()) + ->setName($name) + ->setForce($force); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the tag template to delete. + * @type bool $force + * Required. If true, deletes all tags that use this template. + * Currently, `true` is the only supported value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the tag template to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the tag template to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. If true, deletes all tags that use this template. + * Currently, `true` is the only supported value. + * + * Generated from protobuf field bool force = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * Required. If true, deletes all tags that use this template. + * Currently, `true` is the only supported value. + * + * Generated from protobuf field bool force = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param bool $var + * @return $this + */ + public function setForce($var) + { + GPBUtil::checkBool($var); + $this->force = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DeleteTaxonomyRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DeleteTaxonomyRequest.php new file mode 100644 index 000000000000..f0bcf2735ebc --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DeleteTaxonomyRequest.php @@ -0,0 +1,88 @@ +google.cloud.datacatalog.v1.DeleteTaxonomyRequest + */ +class DeleteTaxonomyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the taxonomy to delete. + * Note: All policy tags in this taxonomy are also deleted. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Resource name of the taxonomy to delete. + * + * Note: All policy tags in this taxonomy are also deleted. Please see + * {@see PolicyTagManagerClient::taxonomyName()} for help formatting this field. + * + * @return \Google\Cloud\DataCatalog\V1\DeleteTaxonomyRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Resource name of the taxonomy to delete. + * Note: All policy tags in this taxonomy are also deleted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Policytagmanager::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the taxonomy to delete. + * Note: All policy tags in this taxonomy are also deleted. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Resource name of the taxonomy to delete. + * Note: All policy tags in this taxonomy are also deleted. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DumpItem.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DumpItem.php new file mode 100644 index 000000000000..c664523acfae --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DumpItem.php @@ -0,0 +1,75 @@ +google.cloud.datacatalog.v1.DumpItem + */ +class DumpItem extends \Google\Protobuf\Internal\Message +{ + protected $item; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DataCatalog\V1\TaggedEntry $tagged_entry + * Entry and its tags. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\DumpContent::initOnce(); + parent::__construct($data); + } + + /** + * Entry and its tags. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.TaggedEntry tagged_entry = 1; + * @return \Google\Cloud\DataCatalog\V1\TaggedEntry|null + */ + public function getTaggedEntry() + { + return $this->readOneof(1); + } + + public function hasTaggedEntry() + { + return $this->hasOneof(1); + } + + /** + * Entry and its tags. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.TaggedEntry tagged_entry = 1; + * @param \Google\Cloud\DataCatalog\V1\TaggedEntry $var + * @return $this + */ + public function setTaggedEntry($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\TaggedEntry::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getItem() + { + return $this->whichOneof("item"); + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Entry.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Entry.php new file mode 100644 index 000000000000..56259566562b --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Entry.php @@ -0,0 +1,1272 @@ +google.cloud.datacatalog.v1.Entry + */ +class Entry extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of an entry in URL format. + * Note: The entry itself and its child resources might not be + * stored in the location specified in its name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The resource this metadata entry refers to. + * For Google Cloud Platform resources, `linked_resource` is the + * [Full Resource Name] + * (https://cloud.google.com/apis/design/resource_names#full_resource_name). + * For example, the `linked_resource` for a table resource from BigQuery is: + * `//bigquery.googleapis.com/projects/{PROJECT_ID}/datasets/{DATASET_ID}/tables/{TABLE_ID}` + * Output only when the entry is one of the types in the `EntryType` enum. + * For entries with a `user_specified_type`, this field is optional and + * defaults to an empty string. + * The resource string must contain only letters (a-z, A-Z), numbers (0-9), + * underscores (_), periods (.), colons (:), slashes (/), dashes (-), + * and hashes (#). + * The maximum size is 200 bytes when encoded in UTF-8. + * + * Generated from protobuf field string linked_resource = 9; + */ + protected $linked_resource = ''; + /** + * [Fully Qualified Name + * (FQN)](https://cloud.google.com//data-catalog/docs/fully-qualified-names) + * of the resource. Set automatically for entries representing resources from + * synced systems. Settable only during creation, and read-only later. Can + * be used for search and lookup of the entries. + * + * Generated from protobuf field string fully_qualified_name = 29; + */ + protected $fully_qualified_name = ''; + /** + * Display name of an entry. + * The maximum size is 500 bytes when encoded in UTF-8. + * Default value is an empty string. + * + * Generated from protobuf field string display_name = 3; + */ + protected $display_name = ''; + /** + * Entry description that can consist of several sentences or paragraphs + * that describe entry contents. + * The description must not contain Unicode non-characters as well as C0 + * and C1 control codes except tabs (HT), new lines (LF), carriage returns + * (CR), and page breaks (FF). + * The maximum size is 2000 bytes when encoded in UTF-8. + * Default value is an empty string. + * + * Generated from protobuf field string description = 4; + */ + protected $description = ''; + /** + * Business Context of the entry. Not supported for BigQuery datasets + * + * Generated from protobuf field .google.cloud.datacatalog.v1.BusinessContext business_context = 37; + */ + protected $business_context = null; + /** + * Schema of the entry. An entry might not have any schema attached to it. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.Schema schema = 5; + */ + protected $schema = null; + /** + * Timestamps from the underlying resource, not from the Data Catalog + * entry. + * Output only when the entry has a system listed in the `IntegratedSystem` + * enum. For entries with `user_specified_system`, this field is optional + * and defaults to an empty timestamp. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.SystemTimestamps source_system_timestamps = 7; + */ + protected $source_system_timestamps = null; + /** + * Resource usage statistics. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.UsageSignal usage_signal = 13; + */ + protected $usage_signal = null; + /** + * Cloud labels attached to the entry. + * In Data Catalog, you can create and modify labels attached only to custom + * entries. Synced entries have unmodifiable labels that come from the source + * system. + * + * Generated from protobuf field map labels = 14; + */ + private $labels; + /** + * Output only. Physical location of the entry. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.DataSource data_source = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $data_source = null; + /** + * Output only. Additional information related to the entry. Private to the + * current user. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.PersonalDetails personal_details = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $personal_details = null; + protected $entry_type; + protected $system; + protected $system_spec; + protected $type_spec; + protected $spec; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name of an entry in URL format. + * Note: The entry itself and its child resources might not be + * stored in the location specified in its name. + * @type string $linked_resource + * The resource this metadata entry refers to. + * For Google Cloud Platform resources, `linked_resource` is the + * [Full Resource Name] + * (https://cloud.google.com/apis/design/resource_names#full_resource_name). + * For example, the `linked_resource` for a table resource from BigQuery is: + * `//bigquery.googleapis.com/projects/{PROJECT_ID}/datasets/{DATASET_ID}/tables/{TABLE_ID}` + * Output only when the entry is one of the types in the `EntryType` enum. + * For entries with a `user_specified_type`, this field is optional and + * defaults to an empty string. + * The resource string must contain only letters (a-z, A-Z), numbers (0-9), + * underscores (_), periods (.), colons (:), slashes (/), dashes (-), + * and hashes (#). + * The maximum size is 200 bytes when encoded in UTF-8. + * @type string $fully_qualified_name + * [Fully Qualified Name + * (FQN)](https://cloud.google.com//data-catalog/docs/fully-qualified-names) + * of the resource. Set automatically for entries representing resources from + * synced systems. Settable only during creation, and read-only later. Can + * be used for search and lookup of the entries. + * @type int $type + * The type of the entry. + * For details, see [`EntryType`](#entrytype). + * @type string $user_specified_type + * Custom entry type that doesn't match any of the values allowed for input + * and listed in the `EntryType` enum. + * When creating an entry, first check the type values in the enum. + * If there are no appropriate types for the new entry, + * provide a custom value, for example, `my_special_type`. + * The `user_specified_type` string has the following limitations: + * * Is case insensitive. + * * Must begin with a letter or underscore. + * * Can only contain letters, numbers, and underscores. + * * Must be at least 1 character and at most 64 characters long. + * @type int $integrated_system + * Output only. Indicates the entry's source system that Data Catalog + * integrates with, such as BigQuery, Pub/Sub, or Dataproc Metastore. + * @type string $user_specified_system + * Indicates the entry's source system that Data Catalog doesn't + * automatically integrate with. + * The `user_specified_system` string has the following limitations: + * * Is case insensitive. + * * Must begin with a letter or underscore. + * * Can only contain letters, numbers, and underscores. + * * Must be at least 1 character and at most 64 characters long. + * @type \Google\Cloud\DataCatalog\V1\SqlDatabaseSystemSpec $sql_database_system_spec + * Specification that applies to a relational database system. Only settable + * when `user_specified_system` is equal to `SQL_DATABASE` + * @type \Google\Cloud\DataCatalog\V1\LookerSystemSpec $looker_system_spec + * Specification that applies to Looker sysstem. Only settable when + * `user_specified_system` is equal to `LOOKER` + * @type \Google\Cloud\DataCatalog\V1\CloudBigtableSystemSpec $cloud_bigtable_system_spec + * Specification that applies to Cloud Bigtable system. Only settable when + * `integrated_system` is equal to `CLOUD_BIGTABLE` + * @type \Google\Cloud\DataCatalog\V1\GcsFilesetSpec $gcs_fileset_spec + * Specification that applies to a Cloud Storage fileset. Valid only + * for entries with the `FILESET` type. + * @type \Google\Cloud\DataCatalog\V1\BigQueryTableSpec $bigquery_table_spec + * Output only. Specification that applies to a BigQuery table. Valid only + * for entries with the `TABLE` type. + * @type \Google\Cloud\DataCatalog\V1\BigQueryDateShardedSpec $bigquery_date_sharded_spec + * Output only. Specification for a group of BigQuery tables with + * the `[prefix]YYYYMMDD` name pattern. + * For more information, see [Introduction to partitioned tables] + * (https://cloud.google.com/bigquery/docs/partitioned-tables#partitioning_versus_sharding). + * @type \Google\Cloud\DataCatalog\V1\DatabaseTableSpec $database_table_spec + * Specification that applies to a table resource. Valid only + * for entries with the `TABLE` or `EXPLORE` type. + * @type \Google\Cloud\DataCatalog\V1\DataSourceConnectionSpec $data_source_connection_spec + * Specification that applies to a data source connection. Valid only + * for entries with the `DATA_SOURCE_CONNECTION` type. + * @type \Google\Cloud\DataCatalog\V1\RoutineSpec $routine_spec + * Specification that applies to a user-defined function or procedure. Valid + * only for entries with the `ROUTINE` type. + * @type \Google\Cloud\DataCatalog\V1\FilesetSpec $fileset_spec + * Specification that applies to a fileset resource. Valid only + * for entries with the `FILESET` type. + * @type \Google\Cloud\DataCatalog\V1\ServiceSpec $service_spec + * Specification that applies to a Service resource. + * @type string $display_name + * Display name of an entry. + * The maximum size is 500 bytes when encoded in UTF-8. + * Default value is an empty string. + * @type string $description + * Entry description that can consist of several sentences or paragraphs + * that describe entry contents. + * The description must not contain Unicode non-characters as well as C0 + * and C1 control codes except tabs (HT), new lines (LF), carriage returns + * (CR), and page breaks (FF). + * The maximum size is 2000 bytes when encoded in UTF-8. + * Default value is an empty string. + * @type \Google\Cloud\DataCatalog\V1\BusinessContext $business_context + * Business Context of the entry. Not supported for BigQuery datasets + * @type \Google\Cloud\DataCatalog\V1\Schema $schema + * Schema of the entry. An entry might not have any schema attached to it. + * @type \Google\Cloud\DataCatalog\V1\SystemTimestamps $source_system_timestamps + * Timestamps from the underlying resource, not from the Data Catalog + * entry. + * Output only when the entry has a system listed in the `IntegratedSystem` + * enum. For entries with `user_specified_system`, this field is optional + * and defaults to an empty timestamp. + * @type \Google\Cloud\DataCatalog\V1\UsageSignal $usage_signal + * Resource usage statistics. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Cloud labels attached to the entry. + * In Data Catalog, you can create and modify labels attached only to custom + * entries. Synced entries have unmodifiable labels that come from the source + * system. + * @type \Google\Cloud\DataCatalog\V1\DataSource $data_source + * Output only. Physical location of the entry. + * @type \Google\Cloud\DataCatalog\V1\PersonalDetails $personal_details + * Output only. Additional information related to the entry. Private to the + * current user. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name of an entry in URL format. + * Note: The entry itself and its child resources might not be + * stored in the location specified in its name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The resource name of an entry in URL format. + * Note: The entry itself and its child resources might not be + * stored in the location specified in its name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The resource this metadata entry refers to. + * For Google Cloud Platform resources, `linked_resource` is the + * [Full Resource Name] + * (https://cloud.google.com/apis/design/resource_names#full_resource_name). + * For example, the `linked_resource` for a table resource from BigQuery is: + * `//bigquery.googleapis.com/projects/{PROJECT_ID}/datasets/{DATASET_ID}/tables/{TABLE_ID}` + * Output only when the entry is one of the types in the `EntryType` enum. + * For entries with a `user_specified_type`, this field is optional and + * defaults to an empty string. + * The resource string must contain only letters (a-z, A-Z), numbers (0-9), + * underscores (_), periods (.), colons (:), slashes (/), dashes (-), + * and hashes (#). + * The maximum size is 200 bytes when encoded in UTF-8. + * + * Generated from protobuf field string linked_resource = 9; + * @return string + */ + public function getLinkedResource() + { + return $this->linked_resource; + } + + /** + * The resource this metadata entry refers to. + * For Google Cloud Platform resources, `linked_resource` is the + * [Full Resource Name] + * (https://cloud.google.com/apis/design/resource_names#full_resource_name). + * For example, the `linked_resource` for a table resource from BigQuery is: + * `//bigquery.googleapis.com/projects/{PROJECT_ID}/datasets/{DATASET_ID}/tables/{TABLE_ID}` + * Output only when the entry is one of the types in the `EntryType` enum. + * For entries with a `user_specified_type`, this field is optional and + * defaults to an empty string. + * The resource string must contain only letters (a-z, A-Z), numbers (0-9), + * underscores (_), periods (.), colons (:), slashes (/), dashes (-), + * and hashes (#). + * The maximum size is 200 bytes when encoded in UTF-8. + * + * Generated from protobuf field string linked_resource = 9; + * @param string $var + * @return $this + */ + public function setLinkedResource($var) + { + GPBUtil::checkString($var, True); + $this->linked_resource = $var; + + return $this; + } + + /** + * [Fully Qualified Name + * (FQN)](https://cloud.google.com//data-catalog/docs/fully-qualified-names) + * of the resource. Set automatically for entries representing resources from + * synced systems. Settable only during creation, and read-only later. Can + * be used for search and lookup of the entries. + * + * Generated from protobuf field string fully_qualified_name = 29; + * @return string + */ + public function getFullyQualifiedName() + { + return $this->fully_qualified_name; + } + + /** + * [Fully Qualified Name + * (FQN)](https://cloud.google.com//data-catalog/docs/fully-qualified-names) + * of the resource. Set automatically for entries representing resources from + * synced systems. Settable only during creation, and read-only later. Can + * be used for search and lookup of the entries. + * + * Generated from protobuf field string fully_qualified_name = 29; + * @param string $var + * @return $this + */ + public function setFullyQualifiedName($var) + { + GPBUtil::checkString($var, True); + $this->fully_qualified_name = $var; + + return $this; + } + + /** + * The type of the entry. + * For details, see [`EntryType`](#entrytype). + * + * Generated from protobuf field .google.cloud.datacatalog.v1.EntryType type = 2; + * @return int + */ + public function getType() + { + return $this->readOneof(2); + } + + public function hasType() + { + return $this->hasOneof(2); + } + + /** + * The type of the entry. + * For details, see [`EntryType`](#entrytype). + * + * Generated from protobuf field .google.cloud.datacatalog.v1.EntryType type = 2; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DataCatalog\V1\EntryType::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Custom entry type that doesn't match any of the values allowed for input + * and listed in the `EntryType` enum. + * When creating an entry, first check the type values in the enum. + * If there are no appropriate types for the new entry, + * provide a custom value, for example, `my_special_type`. + * The `user_specified_type` string has the following limitations: + * * Is case insensitive. + * * Must begin with a letter or underscore. + * * Can only contain letters, numbers, and underscores. + * * Must be at least 1 character and at most 64 characters long. + * + * Generated from protobuf field string user_specified_type = 16; + * @return string + */ + public function getUserSpecifiedType() + { + return $this->readOneof(16); + } + + public function hasUserSpecifiedType() + { + return $this->hasOneof(16); + } + + /** + * Custom entry type that doesn't match any of the values allowed for input + * and listed in the `EntryType` enum. + * When creating an entry, first check the type values in the enum. + * If there are no appropriate types for the new entry, + * provide a custom value, for example, `my_special_type`. + * The `user_specified_type` string has the following limitations: + * * Is case insensitive. + * * Must begin with a letter or underscore. + * * Can only contain letters, numbers, and underscores. + * * Must be at least 1 character and at most 64 characters long. + * + * Generated from protobuf field string user_specified_type = 16; + * @param string $var + * @return $this + */ + public function setUserSpecifiedType($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(16, $var); + + return $this; + } + + /** + * Output only. Indicates the entry's source system that Data Catalog + * integrates with, such as BigQuery, Pub/Sub, or Dataproc Metastore. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.IntegratedSystem integrated_system = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getIntegratedSystem() + { + return $this->readOneof(17); + } + + public function hasIntegratedSystem() + { + return $this->hasOneof(17); + } + + /** + * Output only. Indicates the entry's source system that Data Catalog + * integrates with, such as BigQuery, Pub/Sub, or Dataproc Metastore. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.IntegratedSystem integrated_system = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setIntegratedSystem($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DataCatalog\V1\IntegratedSystem::class); + $this->writeOneof(17, $var); + + return $this; + } + + /** + * Indicates the entry's source system that Data Catalog doesn't + * automatically integrate with. + * The `user_specified_system` string has the following limitations: + * * Is case insensitive. + * * Must begin with a letter or underscore. + * * Can only contain letters, numbers, and underscores. + * * Must be at least 1 character and at most 64 characters long. + * + * Generated from protobuf field string user_specified_system = 18; + * @return string + */ + public function getUserSpecifiedSystem() + { + return $this->readOneof(18); + } + + public function hasUserSpecifiedSystem() + { + return $this->hasOneof(18); + } + + /** + * Indicates the entry's source system that Data Catalog doesn't + * automatically integrate with. + * The `user_specified_system` string has the following limitations: + * * Is case insensitive. + * * Must begin with a letter or underscore. + * * Can only contain letters, numbers, and underscores. + * * Must be at least 1 character and at most 64 characters long. + * + * Generated from protobuf field string user_specified_system = 18; + * @param string $var + * @return $this + */ + public function setUserSpecifiedSystem($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(18, $var); + + return $this; + } + + /** + * Specification that applies to a relational database system. Only settable + * when `user_specified_system` is equal to `SQL_DATABASE` + * + * Generated from protobuf field .google.cloud.datacatalog.v1.SqlDatabaseSystemSpec sql_database_system_spec = 39; + * @return \Google\Cloud\DataCatalog\V1\SqlDatabaseSystemSpec|null + */ + public function getSqlDatabaseSystemSpec() + { + return $this->readOneof(39); + } + + public function hasSqlDatabaseSystemSpec() + { + return $this->hasOneof(39); + } + + /** + * Specification that applies to a relational database system. Only settable + * when `user_specified_system` is equal to `SQL_DATABASE` + * + * Generated from protobuf field .google.cloud.datacatalog.v1.SqlDatabaseSystemSpec sql_database_system_spec = 39; + * @param \Google\Cloud\DataCatalog\V1\SqlDatabaseSystemSpec $var + * @return $this + */ + public function setSqlDatabaseSystemSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\SqlDatabaseSystemSpec::class); + $this->writeOneof(39, $var); + + return $this; + } + + /** + * Specification that applies to Looker sysstem. Only settable when + * `user_specified_system` is equal to `LOOKER` + * + * Generated from protobuf field .google.cloud.datacatalog.v1.LookerSystemSpec looker_system_spec = 40; + * @return \Google\Cloud\DataCatalog\V1\LookerSystemSpec|null + */ + public function getLookerSystemSpec() + { + return $this->readOneof(40); + } + + public function hasLookerSystemSpec() + { + return $this->hasOneof(40); + } + + /** + * Specification that applies to Looker sysstem. Only settable when + * `user_specified_system` is equal to `LOOKER` + * + * Generated from protobuf field .google.cloud.datacatalog.v1.LookerSystemSpec looker_system_spec = 40; + * @param \Google\Cloud\DataCatalog\V1\LookerSystemSpec $var + * @return $this + */ + public function setLookerSystemSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\LookerSystemSpec::class); + $this->writeOneof(40, $var); + + return $this; + } + + /** + * Specification that applies to Cloud Bigtable system. Only settable when + * `integrated_system` is equal to `CLOUD_BIGTABLE` + * + * Generated from protobuf field .google.cloud.datacatalog.v1.CloudBigtableSystemSpec cloud_bigtable_system_spec = 41; + * @return \Google\Cloud\DataCatalog\V1\CloudBigtableSystemSpec|null + */ + public function getCloudBigtableSystemSpec() + { + return $this->readOneof(41); + } + + public function hasCloudBigtableSystemSpec() + { + return $this->hasOneof(41); + } + + /** + * Specification that applies to Cloud Bigtable system. Only settable when + * `integrated_system` is equal to `CLOUD_BIGTABLE` + * + * Generated from protobuf field .google.cloud.datacatalog.v1.CloudBigtableSystemSpec cloud_bigtable_system_spec = 41; + * @param \Google\Cloud\DataCatalog\V1\CloudBigtableSystemSpec $var + * @return $this + */ + public function setCloudBigtableSystemSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\CloudBigtableSystemSpec::class); + $this->writeOneof(41, $var); + + return $this; + } + + /** + * Specification that applies to a Cloud Storage fileset. Valid only + * for entries with the `FILESET` type. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.GcsFilesetSpec gcs_fileset_spec = 6; + * @return \Google\Cloud\DataCatalog\V1\GcsFilesetSpec|null + */ + public function getGcsFilesetSpec() + { + return $this->readOneof(6); + } + + public function hasGcsFilesetSpec() + { + return $this->hasOneof(6); + } + + /** + * Specification that applies to a Cloud Storage fileset. Valid only + * for entries with the `FILESET` type. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.GcsFilesetSpec gcs_fileset_spec = 6; + * @param \Google\Cloud\DataCatalog\V1\GcsFilesetSpec $var + * @return $this + */ + public function setGcsFilesetSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\GcsFilesetSpec::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Output only. Specification that applies to a BigQuery table. Valid only + * for entries with the `TABLE` type. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.BigQueryTableSpec bigquery_table_spec = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\DataCatalog\V1\BigQueryTableSpec|null + */ + public function getBigqueryTableSpec() + { + return $this->readOneof(12); + } + + public function hasBigqueryTableSpec() + { + return $this->hasOneof(12); + } + + /** + * Output only. Specification that applies to a BigQuery table. Valid only + * for entries with the `TABLE` type. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.BigQueryTableSpec bigquery_table_spec = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\DataCatalog\V1\BigQueryTableSpec $var + * @return $this + */ + public function setBigqueryTableSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\BigQueryTableSpec::class); + $this->writeOneof(12, $var); + + return $this; + } + + /** + * Output only. Specification for a group of BigQuery tables with + * the `[prefix]YYYYMMDD` name pattern. + * For more information, see [Introduction to partitioned tables] + * (https://cloud.google.com/bigquery/docs/partitioned-tables#partitioning_versus_sharding). + * + * Generated from protobuf field .google.cloud.datacatalog.v1.BigQueryDateShardedSpec bigquery_date_sharded_spec = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\DataCatalog\V1\BigQueryDateShardedSpec|null + */ + public function getBigqueryDateShardedSpec() + { + return $this->readOneof(15); + } + + public function hasBigqueryDateShardedSpec() + { + return $this->hasOneof(15); + } + + /** + * Output only. Specification for a group of BigQuery tables with + * the `[prefix]YYYYMMDD` name pattern. + * For more information, see [Introduction to partitioned tables] + * (https://cloud.google.com/bigquery/docs/partitioned-tables#partitioning_versus_sharding). + * + * Generated from protobuf field .google.cloud.datacatalog.v1.BigQueryDateShardedSpec bigquery_date_sharded_spec = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\DataCatalog\V1\BigQueryDateShardedSpec $var + * @return $this + */ + public function setBigqueryDateShardedSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\BigQueryDateShardedSpec::class); + $this->writeOneof(15, $var); + + return $this; + } + + /** + * Specification that applies to a table resource. Valid only + * for entries with the `TABLE` or `EXPLORE` type. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.DatabaseTableSpec database_table_spec = 24; + * @return \Google\Cloud\DataCatalog\V1\DatabaseTableSpec|null + */ + public function getDatabaseTableSpec() + { + return $this->readOneof(24); + } + + public function hasDatabaseTableSpec() + { + return $this->hasOneof(24); + } + + /** + * Specification that applies to a table resource. Valid only + * for entries with the `TABLE` or `EXPLORE` type. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.DatabaseTableSpec database_table_spec = 24; + * @param \Google\Cloud\DataCatalog\V1\DatabaseTableSpec $var + * @return $this + */ + public function setDatabaseTableSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\DatabaseTableSpec::class); + $this->writeOneof(24, $var); + + return $this; + } + + /** + * Specification that applies to a data source connection. Valid only + * for entries with the `DATA_SOURCE_CONNECTION` type. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.DataSourceConnectionSpec data_source_connection_spec = 27; + * @return \Google\Cloud\DataCatalog\V1\DataSourceConnectionSpec|null + */ + public function getDataSourceConnectionSpec() + { + return $this->readOneof(27); + } + + public function hasDataSourceConnectionSpec() + { + return $this->hasOneof(27); + } + + /** + * Specification that applies to a data source connection. Valid only + * for entries with the `DATA_SOURCE_CONNECTION` type. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.DataSourceConnectionSpec data_source_connection_spec = 27; + * @param \Google\Cloud\DataCatalog\V1\DataSourceConnectionSpec $var + * @return $this + */ + public function setDataSourceConnectionSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\DataSourceConnectionSpec::class); + $this->writeOneof(27, $var); + + return $this; + } + + /** + * Specification that applies to a user-defined function or procedure. Valid + * only for entries with the `ROUTINE` type. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.RoutineSpec routine_spec = 28; + * @return \Google\Cloud\DataCatalog\V1\RoutineSpec|null + */ + public function getRoutineSpec() + { + return $this->readOneof(28); + } + + public function hasRoutineSpec() + { + return $this->hasOneof(28); + } + + /** + * Specification that applies to a user-defined function or procedure. Valid + * only for entries with the `ROUTINE` type. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.RoutineSpec routine_spec = 28; + * @param \Google\Cloud\DataCatalog\V1\RoutineSpec $var + * @return $this + */ + public function setRoutineSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\RoutineSpec::class); + $this->writeOneof(28, $var); + + return $this; + } + + /** + * Specification that applies to a fileset resource. Valid only + * for entries with the `FILESET` type. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.FilesetSpec fileset_spec = 33; + * @return \Google\Cloud\DataCatalog\V1\FilesetSpec|null + */ + public function getFilesetSpec() + { + return $this->readOneof(33); + } + + public function hasFilesetSpec() + { + return $this->hasOneof(33); + } + + /** + * Specification that applies to a fileset resource. Valid only + * for entries with the `FILESET` type. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.FilesetSpec fileset_spec = 33; + * @param \Google\Cloud\DataCatalog\V1\FilesetSpec $var + * @return $this + */ + public function setFilesetSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\FilesetSpec::class); + $this->writeOneof(33, $var); + + return $this; + } + + /** + * Specification that applies to a Service resource. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.ServiceSpec service_spec = 42; + * @return \Google\Cloud\DataCatalog\V1\ServiceSpec|null + */ + public function getServiceSpec() + { + return $this->readOneof(42); + } + + public function hasServiceSpec() + { + return $this->hasOneof(42); + } + + /** + * Specification that applies to a Service resource. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.ServiceSpec service_spec = 42; + * @param \Google\Cloud\DataCatalog\V1\ServiceSpec $var + * @return $this + */ + public function setServiceSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\ServiceSpec::class); + $this->writeOneof(42, $var); + + return $this; + } + + /** + * Display name of an entry. + * The maximum size is 500 bytes when encoded in UTF-8. + * Default value is an empty string. + * + * Generated from protobuf field string display_name = 3; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Display name of an entry. + * The maximum size is 500 bytes when encoded in UTF-8. + * Default value is an empty string. + * + * Generated from protobuf field string display_name = 3; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Entry description that can consist of several sentences or paragraphs + * that describe entry contents. + * The description must not contain Unicode non-characters as well as C0 + * and C1 control codes except tabs (HT), new lines (LF), carriage returns + * (CR), and page breaks (FF). + * The maximum size is 2000 bytes when encoded in UTF-8. + * Default value is an empty string. + * + * Generated from protobuf field string description = 4; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Entry description that can consist of several sentences or paragraphs + * that describe entry contents. + * The description must not contain Unicode non-characters as well as C0 + * and C1 control codes except tabs (HT), new lines (LF), carriage returns + * (CR), and page breaks (FF). + * The maximum size is 2000 bytes when encoded in UTF-8. + * Default value is an empty string. + * + * Generated from protobuf field string description = 4; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Business Context of the entry. Not supported for BigQuery datasets + * + * Generated from protobuf field .google.cloud.datacatalog.v1.BusinessContext business_context = 37; + * @return \Google\Cloud\DataCatalog\V1\BusinessContext|null + */ + public function getBusinessContext() + { + return $this->business_context; + } + + public function hasBusinessContext() + { + return isset($this->business_context); + } + + public function clearBusinessContext() + { + unset($this->business_context); + } + + /** + * Business Context of the entry. Not supported for BigQuery datasets + * + * Generated from protobuf field .google.cloud.datacatalog.v1.BusinessContext business_context = 37; + * @param \Google\Cloud\DataCatalog\V1\BusinessContext $var + * @return $this + */ + public function setBusinessContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\BusinessContext::class); + $this->business_context = $var; + + return $this; + } + + /** + * Schema of the entry. An entry might not have any schema attached to it. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.Schema schema = 5; + * @return \Google\Cloud\DataCatalog\V1\Schema|null + */ + public function getSchema() + { + return $this->schema; + } + + public function hasSchema() + { + return isset($this->schema); + } + + public function clearSchema() + { + unset($this->schema); + } + + /** + * Schema of the entry. An entry might not have any schema attached to it. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.Schema schema = 5; + * @param \Google\Cloud\DataCatalog\V1\Schema $var + * @return $this + */ + public function setSchema($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\Schema::class); + $this->schema = $var; + + return $this; + } + + /** + * Timestamps from the underlying resource, not from the Data Catalog + * entry. + * Output only when the entry has a system listed in the `IntegratedSystem` + * enum. For entries with `user_specified_system`, this field is optional + * and defaults to an empty timestamp. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.SystemTimestamps source_system_timestamps = 7; + * @return \Google\Cloud\DataCatalog\V1\SystemTimestamps|null + */ + public function getSourceSystemTimestamps() + { + return $this->source_system_timestamps; + } + + public function hasSourceSystemTimestamps() + { + return isset($this->source_system_timestamps); + } + + public function clearSourceSystemTimestamps() + { + unset($this->source_system_timestamps); + } + + /** + * Timestamps from the underlying resource, not from the Data Catalog + * entry. + * Output only when the entry has a system listed in the `IntegratedSystem` + * enum. For entries with `user_specified_system`, this field is optional + * and defaults to an empty timestamp. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.SystemTimestamps source_system_timestamps = 7; + * @param \Google\Cloud\DataCatalog\V1\SystemTimestamps $var + * @return $this + */ + public function setSourceSystemTimestamps($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\SystemTimestamps::class); + $this->source_system_timestamps = $var; + + return $this; + } + + /** + * Resource usage statistics. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.UsageSignal usage_signal = 13; + * @return \Google\Cloud\DataCatalog\V1\UsageSignal|null + */ + public function getUsageSignal() + { + return $this->usage_signal; + } + + public function hasUsageSignal() + { + return isset($this->usage_signal); + } + + public function clearUsageSignal() + { + unset($this->usage_signal); + } + + /** + * Resource usage statistics. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.UsageSignal usage_signal = 13; + * @param \Google\Cloud\DataCatalog\V1\UsageSignal $var + * @return $this + */ + public function setUsageSignal($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\UsageSignal::class); + $this->usage_signal = $var; + + return $this; + } + + /** + * Cloud labels attached to the entry. + * In Data Catalog, you can create and modify labels attached only to custom + * entries. Synced entries have unmodifiable labels that come from the source + * system. + * + * Generated from protobuf field map labels = 14; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Cloud labels attached to the entry. + * In Data Catalog, you can create and modify labels attached only to custom + * entries. Synced entries have unmodifiable labels that come from the source + * system. + * + * Generated from protobuf field map labels = 14; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Output only. Physical location of the entry. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.DataSource data_source = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\DataCatalog\V1\DataSource|null + */ + public function getDataSource() + { + return $this->data_source; + } + + public function hasDataSource() + { + return isset($this->data_source); + } + + public function clearDataSource() + { + unset($this->data_source); + } + + /** + * Output only. Physical location of the entry. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.DataSource data_source = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\DataCatalog\V1\DataSource $var + * @return $this + */ + public function setDataSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\DataSource::class); + $this->data_source = $var; + + return $this; + } + + /** + * Output only. Additional information related to the entry. Private to the + * current user. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.PersonalDetails personal_details = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\DataCatalog\V1\PersonalDetails|null + */ + public function getPersonalDetails() + { + return $this->personal_details; + } + + public function hasPersonalDetails() + { + return isset($this->personal_details); + } + + public function clearPersonalDetails() + { + unset($this->personal_details); + } + + /** + * Output only. Additional information related to the entry. Private to the + * current user. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.PersonalDetails personal_details = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\DataCatalog\V1\PersonalDetails $var + * @return $this + */ + public function setPersonalDetails($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\PersonalDetails::class); + $this->personal_details = $var; + + return $this; + } + + /** + * @return string + */ + public function getEntryType() + { + return $this->whichOneof("entry_type"); + } + + /** + * @return string + */ + public function getSystem() + { + return $this->whichOneof("system"); + } + + /** + * @return string + */ + public function getSystemSpec() + { + return $this->whichOneof("system_spec"); + } + + /** + * @return string + */ + public function getTypeSpec() + { + return $this->whichOneof("type_spec"); + } + + /** + * @return string + */ + public function getSpec() + { + return $this->whichOneof("spec"); + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/EntryGroup.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/EntryGroup.php new file mode 100644 index 000000000000..0b5f74f3273d --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/EntryGroup.php @@ -0,0 +1,201 @@ +google.cloud.datacatalog.v1.EntryGroup + */ +class EntryGroup extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the entry group in URL format. + * Note: The entry group itself and its child resources might not be + * stored in the location specified in its name. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * A short name to identify the entry group, for example, + * "analytics data - jan 2011". Default value is an empty string. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * Entry group description. Can consist of several sentences or + * paragraphs that describe the entry group contents. + * Default value is an empty string. + * + * Generated from protobuf field string description = 3; + */ + protected $description = ''; + /** + * Output only. Timestamps of the entry group. Default value is empty. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.SystemTimestamps data_catalog_timestamps = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $data_catalog_timestamps = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the entry group in URL format. + * Note: The entry group itself and its child resources might not be + * stored in the location specified in its name. + * @type string $display_name + * A short name to identify the entry group, for example, + * "analytics data - jan 2011". Default value is an empty string. + * @type string $description + * Entry group description. Can consist of several sentences or + * paragraphs that describe the entry group contents. + * Default value is an empty string. + * @type \Google\Cloud\DataCatalog\V1\SystemTimestamps $data_catalog_timestamps + * Output only. Timestamps of the entry group. Default value is empty. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the entry group in URL format. + * Note: The entry group itself and its child resources might not be + * stored in the location specified in its name. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the entry group in URL format. + * Note: The entry group itself and its child resources might not be + * stored in the location specified in its name. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * A short name to identify the entry group, for example, + * "analytics data - jan 2011". Default value is an empty string. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * A short name to identify the entry group, for example, + * "analytics data - jan 2011". Default value is an empty string. + * + * Generated from protobuf field string display_name = 2; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Entry group description. Can consist of several sentences or + * paragraphs that describe the entry group contents. + * Default value is an empty string. + * + * Generated from protobuf field string description = 3; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Entry group description. Can consist of several sentences or + * paragraphs that describe the entry group contents. + * Default value is an empty string. + * + * Generated from protobuf field string description = 3; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. Timestamps of the entry group. Default value is empty. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.SystemTimestamps data_catalog_timestamps = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\DataCatalog\V1\SystemTimestamps|null + */ + public function getDataCatalogTimestamps() + { + return $this->data_catalog_timestamps; + } + + public function hasDataCatalogTimestamps() + { + return isset($this->data_catalog_timestamps); + } + + public function clearDataCatalogTimestamps() + { + unset($this->data_catalog_timestamps); + } + + /** + * Output only. Timestamps of the entry group. Default value is empty. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.SystemTimestamps data_catalog_timestamps = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\DataCatalog\V1\SystemTimestamps $var + * @return $this + */ + public function setDataCatalogTimestamps($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\SystemTimestamps::class); + $this->data_catalog_timestamps = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/EntryOverview.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/EntryOverview.php new file mode 100644 index 000000000000..b4ff526f9098 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/EntryOverview.php @@ -0,0 +1,87 @@ +google.cloud.datacatalog.v1.EntryOverview + */ +class EntryOverview extends \Google\Protobuf\Internal\Message +{ + /** + * Entry overview with support for rich text. + * The overview must only contain Unicode characters, and should be + * formatted using HTML. + * The maximum length is 10 MiB as this value holds HTML descriptions + * including encoded images. The maximum length of the text without images + * is 100 KiB. + * + * Generated from protobuf field string overview = 1; + */ + protected $overview = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $overview + * Entry overview with support for rich text. + * The overview must only contain Unicode characters, and should be + * formatted using HTML. + * The maximum length is 10 MiB as this value holds HTML descriptions + * including encoded images. The maximum length of the text without images + * is 100 KiB. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * Entry overview with support for rich text. + * The overview must only contain Unicode characters, and should be + * formatted using HTML. + * The maximum length is 10 MiB as this value holds HTML descriptions + * including encoded images. The maximum length of the text without images + * is 100 KiB. + * + * Generated from protobuf field string overview = 1; + * @return string + */ + public function getOverview() + { + return $this->overview; + } + + /** + * Entry overview with support for rich text. + * The overview must only contain Unicode characters, and should be + * formatted using HTML. + * The maximum length is 10 MiB as this value holds HTML descriptions + * including encoded images. The maximum length of the text without images + * is 100 KiB. + * + * Generated from protobuf field string overview = 1; + * @param string $var + * @return $this + */ + public function setOverview($var) + { + GPBUtil::checkString($var, True); + $this->overview = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/EntryType.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/EntryType.php new file mode 100644 index 000000000000..77a152984899 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/EntryType.php @@ -0,0 +1,171 @@ +google.cloud.datacatalog.v1.EntryType + */ +class EntryType +{ + /** + * Default unknown type. + * + * Generated from protobuf enum ENTRY_TYPE_UNSPECIFIED = 0; + */ + const ENTRY_TYPE_UNSPECIFIED = 0; + /** + * The entry type that has a GoogleSQL schema, including + * logical views. + * + * Generated from protobuf enum TABLE = 2; + */ + const TABLE = 2; + /** + * The type of models. + * For more information, see [Supported models in BigQuery + * ML](/bigquery/docs/bqml-introduction#supported_models). + * + * Generated from protobuf enum MODEL = 5; + */ + const MODEL = 5; + /** + * An entry type for streaming entries. For example, a Pub/Sub topic. + * + * Generated from protobuf enum DATA_STREAM = 3; + */ + const DATA_STREAM = 3; + /** + * An entry type for a set of files or objects. For example, a + * Cloud Storage fileset. + * + * Generated from protobuf enum FILESET = 4; + */ + const FILESET = 4; + /** + * A group of servers that work together. For example, a Kafka cluster. + * + * Generated from protobuf enum CLUSTER = 6; + */ + const CLUSTER = 6; + /** + * A database. + * + * Generated from protobuf enum DATABASE = 7; + */ + const DATABASE = 7; + /** + * Connection to a data source. For example, a BigQuery + * connection. + * + * Generated from protobuf enum DATA_SOURCE_CONNECTION = 8; + */ + const DATA_SOURCE_CONNECTION = 8; + /** + * Routine, for example, a BigQuery routine. + * + * Generated from protobuf enum ROUTINE = 9; + */ + const ROUTINE = 9; + /** + * A Dataplex lake. + * + * Generated from protobuf enum LAKE = 10; + */ + const LAKE = 10; + /** + * A Dataplex zone. + * + * Generated from protobuf enum ZONE = 11; + */ + const ZONE = 11; + /** + * A service, for example, a Dataproc Metastore service. + * + * Generated from protobuf enum SERVICE = 14; + */ + const SERVICE = 14; + /** + * Schema within a relational database. + * + * Generated from protobuf enum DATABASE_SCHEMA = 15; + */ + const DATABASE_SCHEMA = 15; + /** + * A Dashboard, for example from Looker. + * + * Generated from protobuf enum DASHBOARD = 16; + */ + const DASHBOARD = 16; + /** + * A Looker Explore. + * For more information, see [Looker Explore API] + * (https://developers.looker.com/api/explorer/4.0/methods/LookmlModel/lookml_model_explore). + * + * Generated from protobuf enum EXPLORE = 17; + */ + const EXPLORE = 17; + /** + * A Looker Look. + * For more information, see [Looker Look API] + * (https://developers.looker.com/api/explorer/4.0/methods/Look). + * + * Generated from protobuf enum LOOK = 18; + */ + const LOOK = 18; + + private static $valueToName = [ + self::ENTRY_TYPE_UNSPECIFIED => 'ENTRY_TYPE_UNSPECIFIED', + self::TABLE => 'TABLE', + self::MODEL => 'MODEL', + self::DATA_STREAM => 'DATA_STREAM', + self::FILESET => 'FILESET', + self::CLUSTER => 'CLUSTER', + self::DATABASE => 'DATABASE', + self::DATA_SOURCE_CONNECTION => 'DATA_SOURCE_CONNECTION', + self::ROUTINE => 'ROUTINE', + self::LAKE => 'LAKE', + self::ZONE => 'ZONE', + self::SERVICE => 'SERVICE', + self::DATABASE_SCHEMA => 'DATABASE_SCHEMA', + self::DASHBOARD => 'DASHBOARD', + self::EXPLORE => 'EXPLORE', + self::LOOK => 'LOOK', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ExportTaxonomiesRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ExportTaxonomiesRequest.php new file mode 100644 index 000000000000..1bc6ad77ffb2 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ExportTaxonomiesRequest.php @@ -0,0 +1,151 @@ +google.cloud.datacatalog.v1.ExportTaxonomiesRequest + */ +class ExportTaxonomiesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the project that the exported taxonomies belong + * to. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Resource names of the taxonomies to export. + * + * Generated from protobuf field repeated string taxonomies = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $taxonomies; + protected $destination; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Resource name of the project that the exported taxonomies belong + * to. + * @type array|\Google\Protobuf\Internal\RepeatedField $taxonomies + * Required. Resource names of the taxonomies to export. + * @type bool $serialized_taxonomies + * Serialized export taxonomies that contain all the policy + * tags as nested protocol buffers. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Policytagmanagerserialization::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the project that the exported taxonomies belong + * to. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Resource name of the project that the exported taxonomies belong + * to. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. Resource names of the taxonomies to export. + * + * Generated from protobuf field repeated string taxonomies = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTaxonomies() + { + return $this->taxonomies; + } + + /** + * Required. Resource names of the taxonomies to export. + * + * Generated from protobuf field repeated string taxonomies = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTaxonomies($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->taxonomies = $arr; + + return $this; + } + + /** + * Serialized export taxonomies that contain all the policy + * tags as nested protocol buffers. + * + * Generated from protobuf field bool serialized_taxonomies = 3; + * @return bool + */ + public function getSerializedTaxonomies() + { + return $this->readOneof(3); + } + + public function hasSerializedTaxonomies() + { + return $this->hasOneof(3); + } + + /** + * Serialized export taxonomies that contain all the policy + * tags as nested protocol buffers. + * + * Generated from protobuf field bool serialized_taxonomies = 3; + * @param bool $var + * @return $this + */ + public function setSerializedTaxonomies($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getDestination() + { + return $this->whichOneof("destination"); + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ExportTaxonomiesResponse.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ExportTaxonomiesResponse.php new file mode 100644 index 000000000000..95c8a255a460 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ExportTaxonomiesResponse.php @@ -0,0 +1,68 @@ +google.cloud.datacatalog.v1.ExportTaxonomiesResponse + */ +class ExportTaxonomiesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of taxonomies and policy tags as nested protocol buffers. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1; + */ + private $taxonomies; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\DataCatalog\V1\SerializedTaxonomy>|\Google\Protobuf\Internal\RepeatedField $taxonomies + * List of taxonomies and policy tags as nested protocol buffers. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Policytagmanagerserialization::initOnce(); + parent::__construct($data); + } + + /** + * List of taxonomies and policy tags as nested protocol buffers. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTaxonomies() + { + return $this->taxonomies; + } + + /** + * List of taxonomies and policy tags as nested protocol buffers. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1; + * @param array<\Google\Cloud\DataCatalog\V1\SerializedTaxonomy>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTaxonomies($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DataCatalog\V1\SerializedTaxonomy::class); + $this->taxonomies = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/FieldType.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/FieldType.php new file mode 100644 index 000000000000..5d952db4056b --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/FieldType.php @@ -0,0 +1,106 @@ +google.cloud.datacatalog.v1.FieldType + */ +class FieldType extends \Google\Protobuf\Internal\Message +{ + protected $type_decl; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $primitive_type + * Primitive types, such as string, boolean, etc. + * @type \Google\Cloud\DataCatalog\V1\FieldType\EnumType $enum_type + * An enum type. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Tags::initOnce(); + parent::__construct($data); + } + + /** + * Primitive types, such as string, boolean, etc. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.FieldType.PrimitiveType primitive_type = 1; + * @return int + */ + public function getPrimitiveType() + { + return $this->readOneof(1); + } + + public function hasPrimitiveType() + { + return $this->hasOneof(1); + } + + /** + * Primitive types, such as string, boolean, etc. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.FieldType.PrimitiveType primitive_type = 1; + * @param int $var + * @return $this + */ + public function setPrimitiveType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DataCatalog\V1\FieldType\PrimitiveType::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * An enum type. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.FieldType.EnumType enum_type = 2; + * @return \Google\Cloud\DataCatalog\V1\FieldType\EnumType|null + */ + public function getEnumType() + { + return $this->readOneof(2); + } + + public function hasEnumType() + { + return $this->hasOneof(2); + } + + /** + * An enum type. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.FieldType.EnumType enum_type = 2; + * @param \Google\Cloud\DataCatalog\V1\FieldType\EnumType $var + * @return $this + */ + public function setEnumType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\FieldType\EnumType::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getTypeDecl() + { + return $this->whichOneof("type_decl"); + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/FieldType/EnumType.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/FieldType/EnumType.php new file mode 100644 index 000000000000..1c20119a3004 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/FieldType/EnumType.php @@ -0,0 +1,92 @@ +google.cloud.datacatalog.v1.FieldType.EnumType + */ +class EnumType extends \Google\Protobuf\Internal\Message +{ + /** + * The set of allowed values for this enum. + * This set must not be empty and can include up to 100 allowed values. + * The display names of the values in this set must not be empty and must + * be case-insensitively unique within this set. + * The order of items in this set is preserved. This field can be used to + * create, remove, and reorder enum values. To rename enum values, use the + * `RenameTagTemplateFieldEnumValue` method. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue allowed_values = 1; + */ + private $allowed_values; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\DataCatalog\V1\FieldType\EnumType\EnumValue>|\Google\Protobuf\Internal\RepeatedField $allowed_values + * The set of allowed values for this enum. + * This set must not be empty and can include up to 100 allowed values. + * The display names of the values in this set must not be empty and must + * be case-insensitively unique within this set. + * The order of items in this set is preserved. This field can be used to + * create, remove, and reorder enum values. To rename enum values, use the + * `RenameTagTemplateFieldEnumValue` method. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Tags::initOnce(); + parent::__construct($data); + } + + /** + * The set of allowed values for this enum. + * This set must not be empty and can include up to 100 allowed values. + * The display names of the values in this set must not be empty and must + * be case-insensitively unique within this set. + * The order of items in this set is preserved. This field can be used to + * create, remove, and reorder enum values. To rename enum values, use the + * `RenameTagTemplateFieldEnumValue` method. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue allowed_values = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAllowedValues() + { + return $this->allowed_values; + } + + /** + * The set of allowed values for this enum. + * This set must not be empty and can include up to 100 allowed values. + * The display names of the values in this set must not be empty and must + * be case-insensitively unique within this set. + * The order of items in this set is preserved. This field can be used to + * create, remove, and reorder enum values. To rename enum values, use the + * `RenameTagTemplateFieldEnumValue` method. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue allowed_values = 1; + * @param array<\Google\Cloud\DataCatalog\V1\FieldType\EnumType\EnumValue>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAllowedValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DataCatalog\V1\FieldType\EnumType\EnumValue::class); + $this->allowed_values = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(EnumType::class, \Google\Cloud\DataCatalog\V1\FieldType_EnumType::class); + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/FieldType/EnumType/EnumValue.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/FieldType/EnumType/EnumValue.php new file mode 100644 index 000000000000..25183374dd76 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/FieldType/EnumType/EnumValue.php @@ -0,0 +1,84 @@ +google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue + */ +class EnumValue extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The display name of the enum value. Must not be an empty + * string. + * The name must contain only Unicode letters, numbers (0-9), underscores + * (_), dashes (-), spaces ( ), and can't start or end with spaces. The + * maximum length is 200 characters. + * + * Generated from protobuf field string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $display_name + * Required. The display name of the enum value. Must not be an empty + * string. + * The name must contain only Unicode letters, numbers (0-9), underscores + * (_), dashes (-), spaces ( ), and can't start or end with spaces. The + * maximum length is 200 characters. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Tags::initOnce(); + parent::__construct($data); + } + + /** + * Required. The display name of the enum value. Must not be an empty + * string. + * The name must contain only Unicode letters, numbers (0-9), underscores + * (_), dashes (-), spaces ( ), and can't start or end with spaces. The + * maximum length is 200 characters. + * + * Generated from protobuf field string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. The display name of the enum value. Must not be an empty + * string. + * The name must contain only Unicode letters, numbers (0-9), underscores + * (_), dashes (-), spaces ( ), and can't start or end with spaces. The + * maximum length is 200 characters. + * + * Generated from protobuf field string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(EnumValue::class, \Google\Cloud\DataCatalog\V1\FieldType_EnumType_EnumValue::class); + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/FieldType/PrimitiveType.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/FieldType/PrimitiveType.php new file mode 100644 index 000000000000..66a488a3619c --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/FieldType/PrimitiveType.php @@ -0,0 +1,83 @@ +google.cloud.datacatalog.v1.FieldType.PrimitiveType + */ +class PrimitiveType +{ + /** + * The default invalid value for a type. + * + * Generated from protobuf enum PRIMITIVE_TYPE_UNSPECIFIED = 0; + */ + const PRIMITIVE_TYPE_UNSPECIFIED = 0; + /** + * A double precision number. + * + * Generated from protobuf enum DOUBLE = 1; + */ + const DOUBLE = 1; + /** + * An UTF-8 string. + * + * Generated from protobuf enum STRING = 2; + */ + const STRING = 2; + /** + * A boolean value. + * + * Generated from protobuf enum BOOL = 3; + */ + const BOOL = 3; + /** + * A timestamp. + * + * Generated from protobuf enum TIMESTAMP = 4; + */ + const TIMESTAMP = 4; + /** + * A Richtext description. + * + * Generated from protobuf enum RICHTEXT = 5; + */ + const RICHTEXT = 5; + + private static $valueToName = [ + self::PRIMITIVE_TYPE_UNSPECIFIED => 'PRIMITIVE_TYPE_UNSPECIFIED', + self::DOUBLE => 'DOUBLE', + self::STRING => 'STRING', + self::BOOL => 'BOOL', + self::TIMESTAMP => 'TIMESTAMP', + self::RICHTEXT => 'RICHTEXT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PrimitiveType::class, \Google\Cloud\DataCatalog\V1\FieldType_PrimitiveType::class); + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/FilesetSpec.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/FilesetSpec.php new file mode 100644 index 000000000000..1034f0dffb15 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/FilesetSpec.php @@ -0,0 +1,82 @@ +google.cloud.datacatalog.v1.FilesetSpec + */ +class FilesetSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Fields specific to a Dataplex fileset and present only in the Dataplex + * fileset entries. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.DataplexFilesetSpec dataplex_fileset = 1; + */ + protected $dataplex_fileset = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DataCatalog\V1\DataplexFilesetSpec $dataplex_fileset + * Fields specific to a Dataplex fileset and present only in the Dataplex + * fileset entries. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * Fields specific to a Dataplex fileset and present only in the Dataplex + * fileset entries. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.DataplexFilesetSpec dataplex_fileset = 1; + * @return \Google\Cloud\DataCatalog\V1\DataplexFilesetSpec|null + */ + public function getDataplexFileset() + { + return $this->dataplex_fileset; + } + + public function hasDataplexFileset() + { + return isset($this->dataplex_fileset); + } + + public function clearDataplexFileset() + { + unset($this->dataplex_fileset); + } + + /** + * Fields specific to a Dataplex fileset and present only in the Dataplex + * fileset entries. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.DataplexFilesetSpec dataplex_fileset = 1; + * @param \Google\Cloud\DataCatalog\V1\DataplexFilesetSpec $var + * @return $this + */ + public function setDataplexFileset($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\DataplexFilesetSpec::class); + $this->dataplex_fileset = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/GcsFileSpec.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/GcsFileSpec.php new file mode 100644 index 000000000000..1d7a9dc320c3 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/GcsFileSpec.php @@ -0,0 +1,149 @@ +google.cloud.datacatalog.v1.GcsFileSpec + */ +class GcsFileSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Full file path. Example: `gs://bucket_name/a/b.txt`. + * + * Generated from protobuf field string file_path = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $file_path = ''; + /** + * Output only. Creation, modification, and expiration timestamps of a Cloud + * Storage file. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.SystemTimestamps gcs_timestamps = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $gcs_timestamps = null; + /** + * Output only. File size in bytes. + * + * Generated from protobuf field int64 size_bytes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $size_bytes = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $file_path + * Required. Full file path. Example: `gs://bucket_name/a/b.txt`. + * @type \Google\Cloud\DataCatalog\V1\SystemTimestamps $gcs_timestamps + * Output only. Creation, modification, and expiration timestamps of a Cloud + * Storage file. + * @type int|string $size_bytes + * Output only. File size in bytes. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\GcsFilesetSpec::initOnce(); + parent::__construct($data); + } + + /** + * Required. Full file path. Example: `gs://bucket_name/a/b.txt`. + * + * Generated from protobuf field string file_path = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getFilePath() + { + return $this->file_path; + } + + /** + * Required. Full file path. Example: `gs://bucket_name/a/b.txt`. + * + * Generated from protobuf field string file_path = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setFilePath($var) + { + GPBUtil::checkString($var, True); + $this->file_path = $var; + + return $this; + } + + /** + * Output only. Creation, modification, and expiration timestamps of a Cloud + * Storage file. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.SystemTimestamps gcs_timestamps = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\DataCatalog\V1\SystemTimestamps|null + */ + public function getGcsTimestamps() + { + return $this->gcs_timestamps; + } + + public function hasGcsTimestamps() + { + return isset($this->gcs_timestamps); + } + + public function clearGcsTimestamps() + { + unset($this->gcs_timestamps); + } + + /** + * Output only. Creation, modification, and expiration timestamps of a Cloud + * Storage file. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.SystemTimestamps gcs_timestamps = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\DataCatalog\V1\SystemTimestamps $var + * @return $this + */ + public function setGcsTimestamps($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\SystemTimestamps::class); + $this->gcs_timestamps = $var; + + return $this; + } + + /** + * Output only. File size in bytes. + * + * Generated from protobuf field int64 size_bytes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getSizeBytes() + { + return $this->size_bytes; + } + + /** + * Output only. File size in bytes. + * + * Generated from protobuf field int64 size_bytes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setSizeBytes($var) + { + GPBUtil::checkInt64($var); + $this->size_bytes = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/GcsFilesetSpec.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/GcsFilesetSpec.php new file mode 100644 index 000000000000..c124b211405d --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/GcsFilesetSpec.php @@ -0,0 +1,193 @@ +google.cloud.datacatalog.v1.GcsFilesetSpec + */ +class GcsFilesetSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Patterns to identify a set of files in Google Cloud Storage. + * For more information, see [Wildcard Names] + * (https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames). + * Note: Currently, bucket wildcards are not supported. + * Examples of valid `file_patterns`: + * * `gs://bucket_name/dir/*`: matches all files in `bucket_name/dir` + * directory + * * `gs://bucket_name/dir/**`: matches all files in `bucket_name/dir` + * and all subdirectories + * * `gs://bucket_name/file*`: matches files prefixed by `file` in + * `bucket_name` + * * `gs://bucket_name/??.txt`: matches files with two characters followed by + * `.txt` in `bucket_name` + * * `gs://bucket_name/[aeiou].txt`: matches files that contain a single + * vowel character followed by `.txt` in + * `bucket_name` + * * `gs://bucket_name/[a-m].txt`: matches files that contain `a`, `b`, ... + * or `m` followed by `.txt` in `bucket_name` + * * `gs://bucket_name/a/*/b`: matches all files in `bucket_name` that match + * the `a/*/b` pattern, such as `a/c/b`, `a/d/b` + * * `gs://another_bucket/a.txt`: matches `gs://another_bucket/a.txt` + * You can combine wildcards to match complex sets of files, for example: + * `gs://bucket_name/[a-m]??.j*g` + * + * Generated from protobuf field repeated string file_patterns = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $file_patterns; + /** + * Output only. Sample files contained in this fileset, not all files + * contained in this fileset are represented here. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.GcsFileSpec sample_gcs_file_specs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $sample_gcs_file_specs; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $file_patterns + * Required. Patterns to identify a set of files in Google Cloud Storage. + * For more information, see [Wildcard Names] + * (https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames). + * Note: Currently, bucket wildcards are not supported. + * Examples of valid `file_patterns`: + * * `gs://bucket_name/dir/*`: matches all files in `bucket_name/dir` + * directory + * * `gs://bucket_name/dir/**`: matches all files in `bucket_name/dir` + * and all subdirectories + * * `gs://bucket_name/file*`: matches files prefixed by `file` in + * `bucket_name` + * * `gs://bucket_name/??.txt`: matches files with two characters followed by + * `.txt` in `bucket_name` + * * `gs://bucket_name/[aeiou].txt`: matches files that contain a single + * vowel character followed by `.txt` in + * `bucket_name` + * * `gs://bucket_name/[a-m].txt`: matches files that contain `a`, `b`, ... + * or `m` followed by `.txt` in `bucket_name` + * * `gs://bucket_name/a/*/b`: matches all files in `bucket_name` that match + * the `a/*/b` pattern, such as `a/c/b`, `a/d/b` + * * `gs://another_bucket/a.txt`: matches `gs://another_bucket/a.txt` + * You can combine wildcards to match complex sets of files, for example: + * `gs://bucket_name/[a-m]??.j*g` + * @type array<\Google\Cloud\DataCatalog\V1\GcsFileSpec>|\Google\Protobuf\Internal\RepeatedField $sample_gcs_file_specs + * Output only. Sample files contained in this fileset, not all files + * contained in this fileset are represented here. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\GcsFilesetSpec::initOnce(); + parent::__construct($data); + } + + /** + * Required. Patterns to identify a set of files in Google Cloud Storage. + * For more information, see [Wildcard Names] + * (https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames). + * Note: Currently, bucket wildcards are not supported. + * Examples of valid `file_patterns`: + * * `gs://bucket_name/dir/*`: matches all files in `bucket_name/dir` + * directory + * * `gs://bucket_name/dir/**`: matches all files in `bucket_name/dir` + * and all subdirectories + * * `gs://bucket_name/file*`: matches files prefixed by `file` in + * `bucket_name` + * * `gs://bucket_name/??.txt`: matches files with two characters followed by + * `.txt` in `bucket_name` + * * `gs://bucket_name/[aeiou].txt`: matches files that contain a single + * vowel character followed by `.txt` in + * `bucket_name` + * * `gs://bucket_name/[a-m].txt`: matches files that contain `a`, `b`, ... + * or `m` followed by `.txt` in `bucket_name` + * * `gs://bucket_name/a/*/b`: matches all files in `bucket_name` that match + * the `a/*/b` pattern, such as `a/c/b`, `a/d/b` + * * `gs://another_bucket/a.txt`: matches `gs://another_bucket/a.txt` + * You can combine wildcards to match complex sets of files, for example: + * `gs://bucket_name/[a-m]??.j*g` + * + * Generated from protobuf field repeated string file_patterns = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFilePatterns() + { + return $this->file_patterns; + } + + /** + * Required. Patterns to identify a set of files in Google Cloud Storage. + * For more information, see [Wildcard Names] + * (https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames). + * Note: Currently, bucket wildcards are not supported. + * Examples of valid `file_patterns`: + * * `gs://bucket_name/dir/*`: matches all files in `bucket_name/dir` + * directory + * * `gs://bucket_name/dir/**`: matches all files in `bucket_name/dir` + * and all subdirectories + * * `gs://bucket_name/file*`: matches files prefixed by `file` in + * `bucket_name` + * * `gs://bucket_name/??.txt`: matches files with two characters followed by + * `.txt` in `bucket_name` + * * `gs://bucket_name/[aeiou].txt`: matches files that contain a single + * vowel character followed by `.txt` in + * `bucket_name` + * * `gs://bucket_name/[a-m].txt`: matches files that contain `a`, `b`, ... + * or `m` followed by `.txt` in `bucket_name` + * * `gs://bucket_name/a/*/b`: matches all files in `bucket_name` that match + * the `a/*/b` pattern, such as `a/c/b`, `a/d/b` + * * `gs://another_bucket/a.txt`: matches `gs://another_bucket/a.txt` + * You can combine wildcards to match complex sets of files, for example: + * `gs://bucket_name/[a-m]??.j*g` + * + * Generated from protobuf field repeated string file_patterns = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFilePatterns($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->file_patterns = $arr; + + return $this; + } + + /** + * Output only. Sample files contained in this fileset, not all files + * contained in this fileset are represented here. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.GcsFileSpec sample_gcs_file_specs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSampleGcsFileSpecs() + { + return $this->sample_gcs_file_specs; + } + + /** + * Output only. Sample files contained in this fileset, not all files + * contained in this fileset are represented here. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.GcsFileSpec sample_gcs_file_specs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\DataCatalog\V1\GcsFileSpec>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSampleGcsFileSpecs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DataCatalog\V1\GcsFileSpec::class); + $this->sample_gcs_file_specs = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/GetEntryGroupRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/GetEntryGroupRequest.php new file mode 100644 index 000000000000..76b61e38e9bd --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/GetEntryGroupRequest.php @@ -0,0 +1,142 @@ +google.cloud.datacatalog.v1.GetEntryGroupRequest + */ +class GetEntryGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the entry group to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The fields to return. If empty or omitted, all fields are returned. + * + * Generated from protobuf field .google.protobuf.FieldMask read_mask = 2; + */ + protected $read_mask = null; + + /** + * @param string $name Required. The name of the entry group to get. Please see + * {@see DataCatalogClient::entryGroupName()} for help formatting this field. + * + * @return \Google\Cloud\DataCatalog\V1\GetEntryGroupRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * @param string $name Required. The name of the entry group to get. Please see + * {@see DataCatalogClient::entryGroupName()} for help formatting this field. + * @param \Google\Protobuf\FieldMask $readMask The fields to return. If empty or omitted, all fields are returned. + * + * @return \Google\Cloud\DataCatalog\V1\GetEntryGroupRequest + * + * @experimental + */ + public static function buildFromNameReadMask(string $name, \Google\Protobuf\FieldMask $readMask): self + { + return (new self()) + ->setName($name) + ->setReadMask($readMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the entry group to get. + * @type \Google\Protobuf\FieldMask $read_mask + * The fields to return. If empty or omitted, all fields are returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the entry group to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the entry group to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The fields to return. If empty or omitted, all fields are returned. + * + * Generated from protobuf field .google.protobuf.FieldMask read_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getReadMask() + { + return $this->read_mask; + } + + public function hasReadMask() + { + return isset($this->read_mask); + } + + public function clearReadMask() + { + unset($this->read_mask); + } + + /** + * The fields to return. If empty or omitted, all fields are returned. + * + * Generated from protobuf field .google.protobuf.FieldMask read_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setReadMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->read_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/GetEntryRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/GetEntryRequest.php new file mode 100644 index 000000000000..d75c330de5f0 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/GetEntryRequest.php @@ -0,0 +1,82 @@ +google.cloud.datacatalog.v1.GetEntryRequest + */ +class GetEntryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the entry to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the entry to get. Please see + * {@see DataCatalogClient::entryName()} for help formatting this field. + * + * @return \Google\Cloud\DataCatalog\V1\GetEntryRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the entry to get. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the entry to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the entry to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/GetPolicyTagRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/GetPolicyTagRequest.php new file mode 100644 index 000000000000..69deebd11459 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/GetPolicyTagRequest.php @@ -0,0 +1,82 @@ +google.cloud.datacatalog.v1.GetPolicyTagRequest + */ +class GetPolicyTagRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the policy tag. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Resource name of the policy tag. Please see + * {@see PolicyTagManagerClient::policyTagName()} for help formatting this field. + * + * @return \Google\Cloud\DataCatalog\V1\GetPolicyTagRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Resource name of the policy tag. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Policytagmanager::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the policy tag. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Resource name of the policy tag. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/GetTagTemplateRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/GetTagTemplateRequest.php new file mode 100644 index 000000000000..2abfb6facd24 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/GetTagTemplateRequest.php @@ -0,0 +1,82 @@ +google.cloud.datacatalog.v1.GetTagTemplateRequest + */ +class GetTagTemplateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the tag template to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the tag template to get. Please see + * {@see DataCatalogClient::tagTemplateName()} for help formatting this field. + * + * @return \Google\Cloud\DataCatalog\V1\GetTagTemplateRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the tag template to get. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the tag template to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the tag template to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/GetTaxonomyRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/GetTaxonomyRequest.php new file mode 100644 index 000000000000..6efa888ac7b1 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/GetTaxonomyRequest.php @@ -0,0 +1,82 @@ +google.cloud.datacatalog.v1.GetTaxonomyRequest + */ +class GetTaxonomyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the taxonomy to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Resource name of the taxonomy to get. Please see + * {@see PolicyTagManagerClient::taxonomyName()} for help formatting this field. + * + * @return \Google\Cloud\DataCatalog\V1\GetTaxonomyRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Resource name of the taxonomy to get. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Policytagmanager::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the taxonomy to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Resource name of the taxonomy to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ImportEntriesMetadata.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ImportEntriesMetadata.php new file mode 100644 index 000000000000..d5afa31cf075 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ImportEntriesMetadata.php @@ -0,0 +1,115 @@ +google.cloud.datacatalog.v1.ImportEntriesMetadata + */ +class ImportEntriesMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * State of the import operation. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.ImportEntriesMetadata.ImportState state = 1; + */ + protected $state = 0; + /** + * Partial errors that are encountered during the ImportEntries operation. + * There is no guarantee that all the encountered errors are reported. + * However, if no errors are reported, it means that no errors were + * encountered. + * + * Generated from protobuf field repeated .google.rpc.Status errors = 2; + */ + private $errors; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $state + * State of the import operation. + * @type array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $errors + * Partial errors that are encountered during the ImportEntries operation. + * There is no guarantee that all the encountered errors are reported. + * However, if no errors are reported, it means that no errors were + * encountered. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * State of the import operation. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.ImportEntriesMetadata.ImportState state = 1; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * State of the import operation. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.ImportEntriesMetadata.ImportState state = 1; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DataCatalog\V1\ImportEntriesMetadata\ImportState::class); + $this->state = $var; + + return $this; + } + + /** + * Partial errors that are encountered during the ImportEntries operation. + * There is no guarantee that all the encountered errors are reported. + * However, if no errors are reported, it means that no errors were + * encountered. + * + * Generated from protobuf field repeated .google.rpc.Status errors = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getErrors() + { + return $this->errors; + } + + /** + * Partial errors that are encountered during the ImportEntries operation. + * There is no guarantee that all the encountered errors are reported. + * However, if no errors are reported, it means that no errors were + * encountered. + * + * Generated from protobuf field repeated .google.rpc.Status errors = 2; + * @param array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setErrors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Status::class); + $this->errors = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ImportEntriesMetadata/ImportState.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ImportEntriesMetadata/ImportState.php new file mode 100644 index 000000000000..00f1fae63c91 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ImportEntriesMetadata/ImportState.php @@ -0,0 +1,78 @@ +google.cloud.datacatalog.v1.ImportEntriesMetadata.ImportState + */ +class ImportState +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum IMPORT_STATE_UNSPECIFIED = 0; + */ + const IMPORT_STATE_UNSPECIFIED = 0; + /** + * The dump with entries has been queued for import. + * + * Generated from protobuf enum IMPORT_QUEUED = 1; + */ + const IMPORT_QUEUED = 1; + /** + * The import of entries is in progress. + * + * Generated from protobuf enum IMPORT_IN_PROGRESS = 2; + */ + const IMPORT_IN_PROGRESS = 2; + /** + * The import of entries has been finished. + * + * Generated from protobuf enum IMPORT_DONE = 3; + */ + const IMPORT_DONE = 3; + /** + * The import of entries has been abandoned in favor of a newer request. + * + * Generated from protobuf enum IMPORT_OBSOLETE = 4; + */ + const IMPORT_OBSOLETE = 4; + + private static $valueToName = [ + self::IMPORT_STATE_UNSPECIFIED => 'IMPORT_STATE_UNSPECIFIED', + self::IMPORT_QUEUED => 'IMPORT_QUEUED', + self::IMPORT_IN_PROGRESS => 'IMPORT_IN_PROGRESS', + self::IMPORT_DONE => 'IMPORT_DONE', + self::IMPORT_OBSOLETE => 'IMPORT_OBSOLETE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ImportState::class, \Google\Cloud\DataCatalog\V1\ImportEntriesMetadata_ImportState::class); + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ImportEntriesRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ImportEntriesRequest.php new file mode 100644 index 000000000000..fa7fc355ef12 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ImportEntriesRequest.php @@ -0,0 +1,149 @@ +google.cloud.datacatalog.v1.ImportEntriesRequest + */ +class ImportEntriesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Target entry group for ingested entries. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. (Optional) Dataplex task job id, if specified will be used as + * part of ImportEntries LRO ID + * + * Generated from protobuf field string job_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $job_id = ''; + protected $source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Target entry group for ingested entries. + * @type string $gcs_bucket_path + * Path to a Cloud Storage bucket that contains a dump ready for ingestion. + * @type string $job_id + * Optional. (Optional) Dataplex task job id, if specified will be used as + * part of ImportEntries LRO ID + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * Required. Target entry group for ingested entries. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Target entry group for ingested entries. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Path to a Cloud Storage bucket that contains a dump ready for ingestion. + * + * Generated from protobuf field string gcs_bucket_path = 2; + * @return string + */ + public function getGcsBucketPath() + { + return $this->readOneof(2); + } + + public function hasGcsBucketPath() + { + return $this->hasOneof(2); + } + + /** + * Path to a Cloud Storage bucket that contains a dump ready for ingestion. + * + * Generated from protobuf field string gcs_bucket_path = 2; + * @param string $var + * @return $this + */ + public function setGcsBucketPath($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Optional. (Optional) Dataplex task job id, if specified will be used as + * part of ImportEntries LRO ID + * + * Generated from protobuf field string job_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getJobId() + { + return $this->job_id; + } + + /** + * Optional. (Optional) Dataplex task job id, if specified will be used as + * part of ImportEntries LRO ID + * + * Generated from protobuf field string job_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setJobId($var) + { + GPBUtil::checkString($var, True); + $this->job_id = $var; + + return $this; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ImportEntriesResponse.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ImportEntriesResponse.php new file mode 100644 index 000000000000..01f193e90eef --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ImportEntriesResponse.php @@ -0,0 +1,127 @@ +google.cloud.datacatalog.v1.ImportEntriesResponse + */ +class ImportEntriesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Cumulative number of entries created and entries updated as a result of + * import operation. + * + * Generated from protobuf field optional int64 upserted_entries_count = 5; + */ + protected $upserted_entries_count = null; + /** + * Number of entries deleted as a result of import operation. + * + * Generated from protobuf field optional int64 deleted_entries_count = 6; + */ + protected $deleted_entries_count = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $upserted_entries_count + * Cumulative number of entries created and entries updated as a result of + * import operation. + * @type int|string $deleted_entries_count + * Number of entries deleted as a result of import operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * Cumulative number of entries created and entries updated as a result of + * import operation. + * + * Generated from protobuf field optional int64 upserted_entries_count = 5; + * @return int|string + */ + public function getUpsertedEntriesCount() + { + return isset($this->upserted_entries_count) ? $this->upserted_entries_count : 0; + } + + public function hasUpsertedEntriesCount() + { + return isset($this->upserted_entries_count); + } + + public function clearUpsertedEntriesCount() + { + unset($this->upserted_entries_count); + } + + /** + * Cumulative number of entries created and entries updated as a result of + * import operation. + * + * Generated from protobuf field optional int64 upserted_entries_count = 5; + * @param int|string $var + * @return $this + */ + public function setUpsertedEntriesCount($var) + { + GPBUtil::checkInt64($var); + $this->upserted_entries_count = $var; + + return $this; + } + + /** + * Number of entries deleted as a result of import operation. + * + * Generated from protobuf field optional int64 deleted_entries_count = 6; + * @return int|string + */ + public function getDeletedEntriesCount() + { + return isset($this->deleted_entries_count) ? $this->deleted_entries_count : 0; + } + + public function hasDeletedEntriesCount() + { + return isset($this->deleted_entries_count); + } + + public function clearDeletedEntriesCount() + { + unset($this->deleted_entries_count); + } + + /** + * Number of entries deleted as a result of import operation. + * + * Generated from protobuf field optional int64 deleted_entries_count = 6; + * @param int|string $var + * @return $this + */ + public function setDeletedEntriesCount($var) + { + GPBUtil::checkInt64($var); + $this->deleted_entries_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ImportTaxonomiesRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ImportTaxonomiesRequest.php new file mode 100644 index 000000000000..f725b621eb8c --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ImportTaxonomiesRequest.php @@ -0,0 +1,147 @@ +google.cloud.datacatalog.v1.ImportTaxonomiesRequest + */ +class ImportTaxonomiesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of project that the imported taxonomies will belong + * to. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + protected $source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Resource name of project that the imported taxonomies will belong + * to. + * @type \Google\Cloud\DataCatalog\V1\InlineSource $inline_source + * Inline source taxonomy to import. + * @type \Google\Cloud\DataCatalog\V1\CrossRegionalSource $cross_regional_source + * Cross-regional source taxonomy to import. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Policytagmanagerserialization::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of project that the imported taxonomies will belong + * to. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Resource name of project that the imported taxonomies will belong + * to. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Inline source taxonomy to import. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.InlineSource inline_source = 2; + * @return \Google\Cloud\DataCatalog\V1\InlineSource|null + */ + public function getInlineSource() + { + return $this->readOneof(2); + } + + public function hasInlineSource() + { + return $this->hasOneof(2); + } + + /** + * Inline source taxonomy to import. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.InlineSource inline_source = 2; + * @param \Google\Cloud\DataCatalog\V1\InlineSource $var + * @return $this + */ + public function setInlineSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\InlineSource::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Cross-regional source taxonomy to import. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.CrossRegionalSource cross_regional_source = 3; + * @return \Google\Cloud\DataCatalog\V1\CrossRegionalSource|null + */ + public function getCrossRegionalSource() + { + return $this->readOneof(3); + } + + public function hasCrossRegionalSource() + { + return $this->hasOneof(3); + } + + /** + * Cross-regional source taxonomy to import. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.CrossRegionalSource cross_regional_source = 3; + * @param \Google\Cloud\DataCatalog\V1\CrossRegionalSource $var + * @return $this + */ + public function setCrossRegionalSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\CrossRegionalSource::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ImportTaxonomiesResponse.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ImportTaxonomiesResponse.php new file mode 100644 index 000000000000..7035fcae827c --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ImportTaxonomiesResponse.php @@ -0,0 +1,68 @@ +google.cloud.datacatalog.v1.ImportTaxonomiesResponse + */ +class ImportTaxonomiesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Imported taxonomies. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + private $taxonomies; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\DataCatalog\V1\Taxonomy>|\Google\Protobuf\Internal\RepeatedField $taxonomies + * Imported taxonomies. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Policytagmanagerserialization::initOnce(); + parent::__construct($data); + } + + /** + * Imported taxonomies. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTaxonomies() + { + return $this->taxonomies; + } + + /** + * Imported taxonomies. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + * @param array<\Google\Cloud\DataCatalog\V1\Taxonomy>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTaxonomies($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DataCatalog\V1\Taxonomy::class); + $this->taxonomies = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/InlineSource.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/InlineSource.php new file mode 100644 index 000000000000..10b938fcf9fd --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/InlineSource.php @@ -0,0 +1,67 @@ +google.cloud.datacatalog.v1.InlineSource + */ +class InlineSource extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Taxonomies to import. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $taxonomies; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\DataCatalog\V1\SerializedTaxonomy>|\Google\Protobuf\Internal\RepeatedField $taxonomies + * Required. Taxonomies to import. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Policytagmanagerserialization::initOnce(); + parent::__construct($data); + } + + /** + * Required. Taxonomies to import. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTaxonomies() + { + return $this->taxonomies; + } + + /** + * Required. Taxonomies to import. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\DataCatalog\V1\SerializedTaxonomy>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTaxonomies($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DataCatalog\V1\SerializedTaxonomy::class); + $this->taxonomies = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/IntegratedSystem.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/IntegratedSystem.php new file mode 100644 index 000000000000..904268fbeca7 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/IntegratedSystem.php @@ -0,0 +1,103 @@ +google.cloud.datacatalog.v1.IntegratedSystem + */ +class IntegratedSystem +{ + /** + * Default unknown system. + * + * Generated from protobuf enum INTEGRATED_SYSTEM_UNSPECIFIED = 0; + */ + const INTEGRATED_SYSTEM_UNSPECIFIED = 0; + /** + * BigQuery. + * + * Generated from protobuf enum BIGQUERY = 1; + */ + const BIGQUERY = 1; + /** + * Cloud Pub/Sub. + * + * Generated from protobuf enum CLOUD_PUBSUB = 2; + */ + const CLOUD_PUBSUB = 2; + /** + * Dataproc Metastore. + * + * Generated from protobuf enum DATAPROC_METASTORE = 3; + */ + const DATAPROC_METASTORE = 3; + /** + * Dataplex. + * + * Generated from protobuf enum DATAPLEX = 4; + */ + const DATAPLEX = 4; + /** + * Cloud Spanner + * + * Generated from protobuf enum CLOUD_SPANNER = 6; + */ + const CLOUD_SPANNER = 6; + /** + * Cloud Bigtable + * + * Generated from protobuf enum CLOUD_BIGTABLE = 7; + */ + const CLOUD_BIGTABLE = 7; + /** + * Cloud Sql + * + * Generated from protobuf enum CLOUD_SQL = 8; + */ + const CLOUD_SQL = 8; + /** + * Looker + * + * Generated from protobuf enum LOOKER = 9; + */ + const LOOKER = 9; + + private static $valueToName = [ + self::INTEGRATED_SYSTEM_UNSPECIFIED => 'INTEGRATED_SYSTEM_UNSPECIFIED', + self::BIGQUERY => 'BIGQUERY', + self::CLOUD_PUBSUB => 'CLOUD_PUBSUB', + self::DATAPROC_METASTORE => 'DATAPROC_METASTORE', + self::DATAPLEX => 'DATAPLEX', + self::CLOUD_SPANNER => 'CLOUD_SPANNER', + self::CLOUD_BIGTABLE => 'CLOUD_BIGTABLE', + self::CLOUD_SQL => 'CLOUD_SQL', + self::LOOKER => 'LOOKER', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListEntriesRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListEntriesRequest.php new file mode 100644 index 000000000000..40e55423d130 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListEntriesRequest.php @@ -0,0 +1,220 @@ +google.cloud.datacatalog.v1.ListEntriesRequest + */ +class ListEntriesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the entry group that contains the entries to list. + * Can be provided in URL format. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return. Default is 10. Maximum limit is + * 1000. Throws an invalid argument if `page_size` is more than 1000. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * Pagination token that specifies the next page to return. If empty, the + * first page is returned. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * The fields to return for each entry. If empty or omitted, all + * fields are returned. + * For example, to return a list of entries with only the `name` field, + * set `read_mask` to only one path with the `name` value. + * + * Generated from protobuf field .google.protobuf.FieldMask read_mask = 4; + */ + protected $read_mask = null; + + /** + * @param string $parent Required. The name of the entry group that contains the entries to list. + * + * Can be provided in URL format. Please see + * {@see DataCatalogClient::entryGroupName()} for help formatting this field. + * + * @return \Google\Cloud\DataCatalog\V1\ListEntriesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the entry group that contains the entries to list. + * Can be provided in URL format. + * @type int $page_size + * The maximum number of items to return. Default is 10. Maximum limit is + * 1000. Throws an invalid argument if `page_size` is more than 1000. + * @type string $page_token + * Pagination token that specifies the next page to return. If empty, the + * first page is returned. + * @type \Google\Protobuf\FieldMask $read_mask + * The fields to return for each entry. If empty or omitted, all + * fields are returned. + * For example, to return a list of entries with only the `name` field, + * set `read_mask` to only one path with the `name` value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the entry group that contains the entries to list. + * Can be provided in URL format. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The name of the entry group that contains the entries to list. + * Can be provided in URL format. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of items to return. Default is 10. Maximum limit is + * 1000. Throws an invalid argument if `page_size` is more than 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items to return. Default is 10. Maximum limit is + * 1000. Throws an invalid argument if `page_size` is more than 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Pagination token that specifies the next page to return. If empty, the + * first page is returned. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Pagination token that specifies the next page to return. If empty, the + * first page is returned. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * The fields to return for each entry. If empty or omitted, all + * fields are returned. + * For example, to return a list of entries with only the `name` field, + * set `read_mask` to only one path with the `name` value. + * + * Generated from protobuf field .google.protobuf.FieldMask read_mask = 4; + * @return \Google\Protobuf\FieldMask|null + */ + public function getReadMask() + { + return $this->read_mask; + } + + public function hasReadMask() + { + return isset($this->read_mask); + } + + public function clearReadMask() + { + unset($this->read_mask); + } + + /** + * The fields to return for each entry. If empty or omitted, all + * fields are returned. + * For example, to return a list of entries with only the `name` field, + * set `read_mask` to only one path with the `name` value. + * + * Generated from protobuf field .google.protobuf.FieldMask read_mask = 4; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setReadMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->read_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListEntriesResponse.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListEntriesResponse.php new file mode 100644 index 000000000000..095ade948b0a --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListEntriesResponse.php @@ -0,0 +1,106 @@ +google.cloud.datacatalog.v1.ListEntriesResponse + */ +class ListEntriesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Entry details. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Entry entries = 1; + */ + private $entries; + /** + * Pagination token of the next results page. Empty if there are no more items + * in results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\DataCatalog\V1\Entry>|\Google\Protobuf\Internal\RepeatedField $entries + * Entry details. + * @type string $next_page_token + * Pagination token of the next results page. Empty if there are no more items + * in results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * Entry details. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Entry entries = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEntries() + { + return $this->entries; + } + + /** + * Entry details. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Entry entries = 1; + * @param array<\Google\Cloud\DataCatalog\V1\Entry>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEntries($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DataCatalog\V1\Entry::class); + $this->entries = $arr; + + return $this; + } + + /** + * Pagination token of the next results page. Empty if there are no more items + * in results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Pagination token of the next results page. Empty if there are no more items + * in results. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListEntryGroupsRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListEntryGroupsRequest.php new file mode 100644 index 000000000000..5aeb672daa93 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListEntryGroupsRequest.php @@ -0,0 +1,168 @@ +google.cloud.datacatalog.v1.ListEntryGroupsRequest + */ +class ListEntryGroupsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the location that contains the entry groups to list. + * Can be provided as a URL. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of items to return. + * Default is 10. Maximum limit is 1000. + * Throws an invalid argument if `page_size` is greater than 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. Pagination token that specifies the next page to return. + * If empty, returns the first page. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The name of the location that contains the entry groups to list. + * + * Can be provided as a URL. Please see + * {@see DataCatalogClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\DataCatalog\V1\ListEntryGroupsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the location that contains the entry groups to list. + * Can be provided as a URL. + * @type int $page_size + * Optional. The maximum number of items to return. + * Default is 10. Maximum limit is 1000. + * Throws an invalid argument if `page_size` is greater than 1000. + * @type string $page_token + * Optional. Pagination token that specifies the next page to return. + * If empty, returns the first page. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the location that contains the entry groups to list. + * Can be provided as a URL. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The name of the location that contains the entry groups to list. + * Can be provided as a URL. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of items to return. + * Default is 10. Maximum limit is 1000. + * Throws an invalid argument if `page_size` is greater than 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of items to return. + * Default is 10. Maximum limit is 1000. + * Throws an invalid argument if `page_size` is greater than 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. Pagination token that specifies the next page to return. + * If empty, returns the first page. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. Pagination token that specifies the next page to return. + * If empty, returns the first page. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListEntryGroupsResponse.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListEntryGroupsResponse.php new file mode 100644 index 000000000000..01ce90d13e57 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListEntryGroupsResponse.php @@ -0,0 +1,106 @@ +google.cloud.datacatalog.v1.ListEntryGroupsResponse + */ +class ListEntryGroupsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Entry group details. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.EntryGroup entry_groups = 1; + */ + private $entry_groups; + /** + * Pagination token to specify in the next call to retrieve the next page of + * results. Empty if there are no more items. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\DataCatalog\V1\EntryGroup>|\Google\Protobuf\Internal\RepeatedField $entry_groups + * Entry group details. + * @type string $next_page_token + * Pagination token to specify in the next call to retrieve the next page of + * results. Empty if there are no more items. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * Entry group details. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.EntryGroup entry_groups = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEntryGroups() + { + return $this->entry_groups; + } + + /** + * Entry group details. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.EntryGroup entry_groups = 1; + * @param array<\Google\Cloud\DataCatalog\V1\EntryGroup>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEntryGroups($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DataCatalog\V1\EntryGroup::class); + $this->entry_groups = $arr; + + return $this; + } + + /** + * Pagination token to specify in the next call to retrieve the next page of + * results. Empty if there are no more items. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Pagination token to specify in the next call to retrieve the next page of + * results. Empty if there are no more items. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListPolicyTagsRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListPolicyTagsRequest.php new file mode 100644 index 000000000000..0f1f7cbcfd82 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListPolicyTagsRequest.php @@ -0,0 +1,166 @@ +google.cloud.datacatalog.v1.ListPolicyTagsRequest + */ +class ListPolicyTagsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the taxonomy to list the policy tags of. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return. Must be a value between 1 and 1000 + * inclusively. + * If not set, defaults to 50. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The pagination token of the next results page. If not set, returns the + * first page. + * The token is returned in the response to a previous list request. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. Resource name of the taxonomy to list the policy tags of. Please see + * {@see PolicyTagManagerClient::taxonomyName()} for help formatting this field. + * + * @return \Google\Cloud\DataCatalog\V1\ListPolicyTagsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Resource name of the taxonomy to list the policy tags of. + * @type int $page_size + * The maximum number of items to return. Must be a value between 1 and 1000 + * inclusively. + * If not set, defaults to 50. + * @type string $page_token + * The pagination token of the next results page. If not set, returns the + * first page. + * The token is returned in the response to a previous list request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Policytagmanager::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the taxonomy to list the policy tags of. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Resource name of the taxonomy to list the policy tags of. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of items to return. Must be a value between 1 and 1000 + * inclusively. + * If not set, defaults to 50. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items to return. Must be a value between 1 and 1000 + * inclusively. + * If not set, defaults to 50. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The pagination token of the next results page. If not set, returns the + * first page. + * The token is returned in the response to a previous list request. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The pagination token of the next results page. If not set, returns the + * first page. + * The token is returned in the response to a previous list request. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListPolicyTagsResponse.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListPolicyTagsResponse.php new file mode 100644 index 000000000000..71ccac60ef68 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListPolicyTagsResponse.php @@ -0,0 +1,106 @@ +google.cloud.datacatalog.v1.ListPolicyTagsResponse + */ +class ListPolicyTagsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The policy tags that belong to the taxonomy. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.PolicyTag policy_tags = 1; + */ + private $policy_tags; + /** + * Pagination token of the next results page. Empty if there are no + * more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\DataCatalog\V1\PolicyTag>|\Google\Protobuf\Internal\RepeatedField $policy_tags + * The policy tags that belong to the taxonomy. + * @type string $next_page_token + * Pagination token of the next results page. Empty if there are no + * more results in the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Policytagmanager::initOnce(); + parent::__construct($data); + } + + /** + * The policy tags that belong to the taxonomy. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.PolicyTag policy_tags = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPolicyTags() + { + return $this->policy_tags; + } + + /** + * The policy tags that belong to the taxonomy. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.PolicyTag policy_tags = 1; + * @param array<\Google\Cloud\DataCatalog\V1\PolicyTag>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPolicyTags($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DataCatalog\V1\PolicyTag::class); + $this->policy_tags = $arr; + + return $this; + } + + /** + * Pagination token of the next results page. Empty if there are no + * more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Pagination token of the next results page. Empty if there are no + * more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListTagsRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListTagsRequest.php new file mode 100644 index 000000000000..764a3df3a9a6 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListTagsRequest.php @@ -0,0 +1,170 @@ +google.cloud.datacatalog.v1.ListTagsRequest + */ +class ListTagsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the Data Catalog resource to list the tags of. + * The resource can be an [Entry][google.cloud.datacatalog.v1.Entry] + * or an [EntryGroup][google.cloud.datacatalog.v1.EntryGroup] + * (without `/entries/{entries}` at the end). + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of tags to return. Default is 10. Maximum limit is 1000. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * Pagination token that specifies the next page to return. If empty, the + * first page is returned. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The name of the Data Catalog resource to list the tags of. + * + * The resource can be an [Entry][google.cloud.datacatalog.v1.Entry] + * or an [EntryGroup][google.cloud.datacatalog.v1.EntryGroup] + * (without `/entries/{entries}` at the end). Please see + * {@see DataCatalogClient::entryName()} for help formatting this field. + * + * @return \Google\Cloud\DataCatalog\V1\ListTagsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the Data Catalog resource to list the tags of. + * The resource can be an [Entry][google.cloud.datacatalog.v1.Entry] + * or an [EntryGroup][google.cloud.datacatalog.v1.EntryGroup] + * (without `/entries/{entries}` at the end). + * @type int $page_size + * The maximum number of tags to return. Default is 10. Maximum limit is 1000. + * @type string $page_token + * Pagination token that specifies the next page to return. If empty, the + * first page is returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the Data Catalog resource to list the tags of. + * The resource can be an [Entry][google.cloud.datacatalog.v1.Entry] + * or an [EntryGroup][google.cloud.datacatalog.v1.EntryGroup] + * (without `/entries/{entries}` at the end). + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The name of the Data Catalog resource to list the tags of. + * The resource can be an [Entry][google.cloud.datacatalog.v1.Entry] + * or an [EntryGroup][google.cloud.datacatalog.v1.EntryGroup] + * (without `/entries/{entries}` at the end). + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of tags to return. Default is 10. Maximum limit is 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of tags to return. Default is 10. Maximum limit is 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Pagination token that specifies the next page to return. If empty, the + * first page is returned. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Pagination token that specifies the next page to return. If empty, the + * first page is returned. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListTagsResponse.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListTagsResponse.php new file mode 100644 index 000000000000..5e61e71914c4 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListTagsResponse.php @@ -0,0 +1,106 @@ +google.cloud.datacatalog.v1.ListTagsResponse + */ +class ListTagsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * [Tag][google.cloud.datacatalog.v1.Tag] details. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Tag tags = 1; + */ + private $tags; + /** + * Pagination token of the next results page. Empty if there are + * no more items in results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\DataCatalog\V1\Tag>|\Google\Protobuf\Internal\RepeatedField $tags + * [Tag][google.cloud.datacatalog.v1.Tag] details. + * @type string $next_page_token + * Pagination token of the next results page. Empty if there are + * no more items in results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * [Tag][google.cloud.datacatalog.v1.Tag] details. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Tag tags = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTags() + { + return $this->tags; + } + + /** + * [Tag][google.cloud.datacatalog.v1.Tag] details. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Tag tags = 1; + * @param array<\Google\Cloud\DataCatalog\V1\Tag>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTags($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DataCatalog\V1\Tag::class); + $this->tags = $arr; + + return $this; + } + + /** + * Pagination token of the next results page. Empty if there are + * no more items in results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Pagination token of the next results page. Empty if there are + * no more items in results. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListTaxonomiesRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListTaxonomiesRequest.php new file mode 100644 index 000000000000..bc7f181f1a7b --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListTaxonomiesRequest.php @@ -0,0 +1,200 @@ +google.cloud.datacatalog.v1.ListTaxonomiesRequest + */ +class ListTaxonomiesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the project to list the taxonomies of. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return. Must be a value between 1 and 1000 + * inclusively. If not set, defaults to 50. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The pagination token of the next results page. If not set, + * the first page is returned. + * The token is returned in the response to a previous list request. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Supported field for filter is 'service' and value is 'dataplex'. + * Eg: service=dataplex. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + + /** + * @param string $parent Required. Resource name of the project to list the taxonomies of. Please see + * {@see PolicyTagManagerClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\DataCatalog\V1\ListTaxonomiesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Resource name of the project to list the taxonomies of. + * @type int $page_size + * The maximum number of items to return. Must be a value between 1 and 1000 + * inclusively. If not set, defaults to 50. + * @type string $page_token + * The pagination token of the next results page. If not set, + * the first page is returned. + * The token is returned in the response to a previous list request. + * @type string $filter + * Supported field for filter is 'service' and value is 'dataplex'. + * Eg: service=dataplex. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Policytagmanager::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the project to list the taxonomies of. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Resource name of the project to list the taxonomies of. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of items to return. Must be a value between 1 and 1000 + * inclusively. If not set, defaults to 50. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items to return. Must be a value between 1 and 1000 + * inclusively. If not set, defaults to 50. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The pagination token of the next results page. If not set, + * the first page is returned. + * The token is returned in the response to a previous list request. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The pagination token of the next results page. If not set, + * the first page is returned. + * The token is returned in the response to a previous list request. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Supported field for filter is 'service' and value is 'dataplex'. + * Eg: service=dataplex. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Supported field for filter is 'service' and value is 'dataplex'. + * Eg: service=dataplex. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListTaxonomiesResponse.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListTaxonomiesResponse.php new file mode 100644 index 000000000000..43049d7f29b0 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListTaxonomiesResponse.php @@ -0,0 +1,106 @@ +google.cloud.datacatalog.v1.ListTaxonomiesResponse + */ +class ListTaxonomiesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Taxonomies that the project contains. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + private $taxonomies; + /** + * Pagination token of the next results page. Empty if there are no + * more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\DataCatalog\V1\Taxonomy>|\Google\Protobuf\Internal\RepeatedField $taxonomies + * Taxonomies that the project contains. + * @type string $next_page_token + * Pagination token of the next results page. Empty if there are no + * more results in the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Policytagmanager::initOnce(); + parent::__construct($data); + } + + /** + * Taxonomies that the project contains. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTaxonomies() + { + return $this->taxonomies; + } + + /** + * Taxonomies that the project contains. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + * @param array<\Google\Cloud\DataCatalog\V1\Taxonomy>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTaxonomies($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DataCatalog\V1\Taxonomy::class); + $this->taxonomies = $arr; + + return $this; + } + + /** + * Pagination token of the next results page. Empty if there are no + * more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Pagination token of the next results page. Empty if there are no + * more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/LookerSystemSpec.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/LookerSystemSpec.php new file mode 100644 index 000000000000..924a3e643eae --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/LookerSystemSpec.php @@ -0,0 +1,243 @@ +google.cloud.datacatalog.v1.LookerSystemSpec + */ +class LookerSystemSpec extends \Google\Protobuf\Internal\Message +{ + /** + * ID of the parent Looker Instance. Empty if it does not exist. + * Example value: `someinstance.looker.com` + * + * Generated from protobuf field string parent_instance_id = 1; + */ + protected $parent_instance_id = ''; + /** + * Name of the parent Looker Instance. Empty if it does not exist. + * + * Generated from protobuf field string parent_instance_display_name = 2; + */ + protected $parent_instance_display_name = ''; + /** + * ID of the parent Model. Empty if it does not exist. + * + * Generated from protobuf field string parent_model_id = 3; + */ + protected $parent_model_id = ''; + /** + * Name of the parent Model. Empty if it does not exist. + * + * Generated from protobuf field string parent_model_display_name = 4; + */ + protected $parent_model_display_name = ''; + /** + * ID of the parent View. Empty if it does not exist. + * + * Generated from protobuf field string parent_view_id = 5; + */ + protected $parent_view_id = ''; + /** + * Name of the parent View. Empty if it does not exist. + * + * Generated from protobuf field string parent_view_display_name = 6; + */ + protected $parent_view_display_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent_instance_id + * ID of the parent Looker Instance. Empty if it does not exist. + * Example value: `someinstance.looker.com` + * @type string $parent_instance_display_name + * Name of the parent Looker Instance. Empty if it does not exist. + * @type string $parent_model_id + * ID of the parent Model. Empty if it does not exist. + * @type string $parent_model_display_name + * Name of the parent Model. Empty if it does not exist. + * @type string $parent_view_id + * ID of the parent View. Empty if it does not exist. + * @type string $parent_view_display_name + * Name of the parent View. Empty if it does not exist. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * ID of the parent Looker Instance. Empty if it does not exist. + * Example value: `someinstance.looker.com` + * + * Generated from protobuf field string parent_instance_id = 1; + * @return string + */ + public function getParentInstanceId() + { + return $this->parent_instance_id; + } + + /** + * ID of the parent Looker Instance. Empty if it does not exist. + * Example value: `someinstance.looker.com` + * + * Generated from protobuf field string parent_instance_id = 1; + * @param string $var + * @return $this + */ + public function setParentInstanceId($var) + { + GPBUtil::checkString($var, True); + $this->parent_instance_id = $var; + + return $this; + } + + /** + * Name of the parent Looker Instance. Empty if it does not exist. + * + * Generated from protobuf field string parent_instance_display_name = 2; + * @return string + */ + public function getParentInstanceDisplayName() + { + return $this->parent_instance_display_name; + } + + /** + * Name of the parent Looker Instance. Empty if it does not exist. + * + * Generated from protobuf field string parent_instance_display_name = 2; + * @param string $var + * @return $this + */ + public function setParentInstanceDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->parent_instance_display_name = $var; + + return $this; + } + + /** + * ID of the parent Model. Empty if it does not exist. + * + * Generated from protobuf field string parent_model_id = 3; + * @return string + */ + public function getParentModelId() + { + return $this->parent_model_id; + } + + /** + * ID of the parent Model. Empty if it does not exist. + * + * Generated from protobuf field string parent_model_id = 3; + * @param string $var + * @return $this + */ + public function setParentModelId($var) + { + GPBUtil::checkString($var, True); + $this->parent_model_id = $var; + + return $this; + } + + /** + * Name of the parent Model. Empty if it does not exist. + * + * Generated from protobuf field string parent_model_display_name = 4; + * @return string + */ + public function getParentModelDisplayName() + { + return $this->parent_model_display_name; + } + + /** + * Name of the parent Model. Empty if it does not exist. + * + * Generated from protobuf field string parent_model_display_name = 4; + * @param string $var + * @return $this + */ + public function setParentModelDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->parent_model_display_name = $var; + + return $this; + } + + /** + * ID of the parent View. Empty if it does not exist. + * + * Generated from protobuf field string parent_view_id = 5; + * @return string + */ + public function getParentViewId() + { + return $this->parent_view_id; + } + + /** + * ID of the parent View. Empty if it does not exist. + * + * Generated from protobuf field string parent_view_id = 5; + * @param string $var + * @return $this + */ + public function setParentViewId($var) + { + GPBUtil::checkString($var, True); + $this->parent_view_id = $var; + + return $this; + } + + /** + * Name of the parent View. Empty if it does not exist. + * + * Generated from protobuf field string parent_view_display_name = 6; + * @return string + */ + public function getParentViewDisplayName() + { + return $this->parent_view_display_name; + } + + /** + * Name of the parent View. Empty if it does not exist. + * + * Generated from protobuf field string parent_view_display_name = 6; + * @param string $var + * @return $this + */ + public function setParentViewDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->parent_view_display_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/LookupEntryRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/LookupEntryRequest.php new file mode 100644 index 000000000000..45caf368d1f6 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/LookupEntryRequest.php @@ -0,0 +1,295 @@ +google.cloud.datacatalog.v1.LookupEntryRequest + */ +class LookupEntryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Project where the lookup should be performed. Required to lookup + * entry that is not a part of `DPMS` or `DATAPLEX` `integrated_system` + * using its `fully_qualified_name`. Ignored in other cases. + * + * Generated from protobuf field string project = 6; + */ + protected $project = ''; + /** + * Location where the lookup should be performed. Required to lookup + * entry that is not a part of `DPMS` or `DATAPLEX` `integrated_system` + * using its `fully_qualified_name`. Ignored in other cases. + * + * Generated from protobuf field string location = 7; + */ + protected $location = ''; + protected $target_name; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $linked_resource + * The full name of the Google Cloud Platform resource the Data Catalog + * entry represents. For more information, see [Full Resource Name] + * (https://cloud.google.com/apis/design/resource_names#full_resource_name). + * Full names are case-sensitive. For example: + * * `//bigquery.googleapis.com/projects/{PROJECT_ID}/datasets/{DATASET_ID}/tables/{TABLE_ID}` + * * `//pubsub.googleapis.com/projects/{PROJECT_ID}/topics/{TOPIC_ID}` + * @type string $sql_resource + * The SQL name of the entry. SQL names are case-sensitive. + * Examples: + * * `pubsub.topic.{PROJECT_ID}.{TOPIC_ID}` + * * `pubsub.topic.{PROJECT_ID}.`\``{TOPIC.ID.SEPARATED.WITH.DOTS}`\` + * * `bigquery.table.{PROJECT_ID}.{DATASET_ID}.{TABLE_ID}` + * * `bigquery.dataset.{PROJECT_ID}.{DATASET_ID}` + * * `datacatalog.entry.{PROJECT_ID}.{LOCATION_ID}.{ENTRY_GROUP_ID}.{ENTRY_ID}` + * Identifiers (`*_ID`) should comply with the + * [Lexical structure in Standard SQL] + * (https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical). + * @type string $fully_qualified_name + * [Fully Qualified Name + * (FQN)](https://cloud.google.com//data-catalog/docs/fully-qualified-names) + * of the resource. + * FQNs take two forms: + * * For non-regionalized resources: + * `{SYSTEM}:{PROJECT}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}` + * * For regionalized resources: + * `{SYSTEM}:{PROJECT}.{LOCATION_ID}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}` + * Example for a DPMS table: + * `dataproc_metastore:{PROJECT_ID}.{LOCATION_ID}.{INSTANCE_ID}.{DATABASE_ID}.{TABLE_ID}` + * @type string $project + * Project where the lookup should be performed. Required to lookup + * entry that is not a part of `DPMS` or `DATAPLEX` `integrated_system` + * using its `fully_qualified_name`. Ignored in other cases. + * @type string $location + * Location where the lookup should be performed. Required to lookup + * entry that is not a part of `DPMS` or `DATAPLEX` `integrated_system` + * using its `fully_qualified_name`. Ignored in other cases. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * The full name of the Google Cloud Platform resource the Data Catalog + * entry represents. For more information, see [Full Resource Name] + * (https://cloud.google.com/apis/design/resource_names#full_resource_name). + * Full names are case-sensitive. For example: + * * `//bigquery.googleapis.com/projects/{PROJECT_ID}/datasets/{DATASET_ID}/tables/{TABLE_ID}` + * * `//pubsub.googleapis.com/projects/{PROJECT_ID}/topics/{TOPIC_ID}` + * + * Generated from protobuf field string linked_resource = 1; + * @return string + */ + public function getLinkedResource() + { + return $this->readOneof(1); + } + + public function hasLinkedResource() + { + return $this->hasOneof(1); + } + + /** + * The full name of the Google Cloud Platform resource the Data Catalog + * entry represents. For more information, see [Full Resource Name] + * (https://cloud.google.com/apis/design/resource_names#full_resource_name). + * Full names are case-sensitive. For example: + * * `//bigquery.googleapis.com/projects/{PROJECT_ID}/datasets/{DATASET_ID}/tables/{TABLE_ID}` + * * `//pubsub.googleapis.com/projects/{PROJECT_ID}/topics/{TOPIC_ID}` + * + * Generated from protobuf field string linked_resource = 1; + * @param string $var + * @return $this + */ + public function setLinkedResource($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * The SQL name of the entry. SQL names are case-sensitive. + * Examples: + * * `pubsub.topic.{PROJECT_ID}.{TOPIC_ID}` + * * `pubsub.topic.{PROJECT_ID}.`\``{TOPIC.ID.SEPARATED.WITH.DOTS}`\` + * * `bigquery.table.{PROJECT_ID}.{DATASET_ID}.{TABLE_ID}` + * * `bigquery.dataset.{PROJECT_ID}.{DATASET_ID}` + * * `datacatalog.entry.{PROJECT_ID}.{LOCATION_ID}.{ENTRY_GROUP_ID}.{ENTRY_ID}` + * Identifiers (`*_ID`) should comply with the + * [Lexical structure in Standard SQL] + * (https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical). + * + * Generated from protobuf field string sql_resource = 3; + * @return string + */ + public function getSqlResource() + { + return $this->readOneof(3); + } + + public function hasSqlResource() + { + return $this->hasOneof(3); + } + + /** + * The SQL name of the entry. SQL names are case-sensitive. + * Examples: + * * `pubsub.topic.{PROJECT_ID}.{TOPIC_ID}` + * * `pubsub.topic.{PROJECT_ID}.`\``{TOPIC.ID.SEPARATED.WITH.DOTS}`\` + * * `bigquery.table.{PROJECT_ID}.{DATASET_ID}.{TABLE_ID}` + * * `bigquery.dataset.{PROJECT_ID}.{DATASET_ID}` + * * `datacatalog.entry.{PROJECT_ID}.{LOCATION_ID}.{ENTRY_GROUP_ID}.{ENTRY_ID}` + * Identifiers (`*_ID`) should comply with the + * [Lexical structure in Standard SQL] + * (https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical). + * + * Generated from protobuf field string sql_resource = 3; + * @param string $var + * @return $this + */ + public function setSqlResource($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * [Fully Qualified Name + * (FQN)](https://cloud.google.com//data-catalog/docs/fully-qualified-names) + * of the resource. + * FQNs take two forms: + * * For non-regionalized resources: + * `{SYSTEM}:{PROJECT}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}` + * * For regionalized resources: + * `{SYSTEM}:{PROJECT}.{LOCATION_ID}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}` + * Example for a DPMS table: + * `dataproc_metastore:{PROJECT_ID}.{LOCATION_ID}.{INSTANCE_ID}.{DATABASE_ID}.{TABLE_ID}` + * + * Generated from protobuf field string fully_qualified_name = 5; + * @return string + */ + public function getFullyQualifiedName() + { + return $this->readOneof(5); + } + + public function hasFullyQualifiedName() + { + return $this->hasOneof(5); + } + + /** + * [Fully Qualified Name + * (FQN)](https://cloud.google.com//data-catalog/docs/fully-qualified-names) + * of the resource. + * FQNs take two forms: + * * For non-regionalized resources: + * `{SYSTEM}:{PROJECT}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}` + * * For regionalized resources: + * `{SYSTEM}:{PROJECT}.{LOCATION_ID}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}` + * Example for a DPMS table: + * `dataproc_metastore:{PROJECT_ID}.{LOCATION_ID}.{INSTANCE_ID}.{DATABASE_ID}.{TABLE_ID}` + * + * Generated from protobuf field string fully_qualified_name = 5; + * @param string $var + * @return $this + */ + public function setFullyQualifiedName($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Project where the lookup should be performed. Required to lookup + * entry that is not a part of `DPMS` or `DATAPLEX` `integrated_system` + * using its `fully_qualified_name`. Ignored in other cases. + * + * Generated from protobuf field string project = 6; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project where the lookup should be performed. Required to lookup + * entry that is not a part of `DPMS` or `DATAPLEX` `integrated_system` + * using its `fully_qualified_name`. Ignored in other cases. + * + * Generated from protobuf field string project = 6; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Location where the lookup should be performed. Required to lookup + * entry that is not a part of `DPMS` or `DATAPLEX` `integrated_system` + * using its `fully_qualified_name`. Ignored in other cases. + * + * Generated from protobuf field string location = 7; + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * Location where the lookup should be performed. Required to lookup + * entry that is not a part of `DPMS` or `DATAPLEX` `integrated_system` + * using its `fully_qualified_name`. Ignored in other cases. + * + * Generated from protobuf field string location = 7; + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + + /** + * @return string + */ + public function getTargetName() + { + return $this->whichOneof("target_name"); + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ManagingSystem.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ManagingSystem.php new file mode 100644 index 000000000000..cb3d83bc4ae1 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ManagingSystem.php @@ -0,0 +1,62 @@ +google.cloud.datacatalog.v1.ManagingSystem + */ +class ManagingSystem +{ + /** + * Default value + * + * Generated from protobuf enum MANAGING_SYSTEM_UNSPECIFIED = 0; + */ + const MANAGING_SYSTEM_UNSPECIFIED = 0; + /** + * Dataplex. + * + * Generated from protobuf enum MANAGING_SYSTEM_DATAPLEX = 1; + */ + const MANAGING_SYSTEM_DATAPLEX = 1; + /** + * Other + * + * Generated from protobuf enum MANAGING_SYSTEM_OTHER = 2; + */ + const MANAGING_SYSTEM_OTHER = 2; + + private static $valueToName = [ + self::MANAGING_SYSTEM_UNSPECIFIED => 'MANAGING_SYSTEM_UNSPECIFIED', + self::MANAGING_SYSTEM_DATAPLEX => 'MANAGING_SYSTEM_DATAPLEX', + self::MANAGING_SYSTEM_OTHER => 'MANAGING_SYSTEM_OTHER', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ModifyEntryContactsRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ModifyEntryContactsRequest.php new file mode 100644 index 000000000000..214f3fb6b0e9 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ModifyEntryContactsRequest.php @@ -0,0 +1,112 @@ +google.cloud.datacatalog.v1.ModifyEntryContactsRequest + */ +class ModifyEntryContactsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The full resource name of the entry. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The new value for the Contacts. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.Contacts contacts = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $contacts = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The full resource name of the entry. + * @type \Google\Cloud\DataCatalog\V1\Contacts $contacts + * Required. The new value for the Contacts. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * Required. The full resource name of the entry. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The full resource name of the entry. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The new value for the Contacts. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.Contacts contacts = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\DataCatalog\V1\Contacts|null + */ + public function getContacts() + { + return $this->contacts; + } + + public function hasContacts() + { + return isset($this->contacts); + } + + public function clearContacts() + { + unset($this->contacts); + } + + /** + * Required. The new value for the Contacts. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.Contacts contacts = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\DataCatalog\V1\Contacts $var + * @return $this + */ + public function setContacts($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\Contacts::class); + $this->contacts = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ModifyEntryOverviewRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ModifyEntryOverviewRequest.php new file mode 100644 index 000000000000..31f931ef546f --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ModifyEntryOverviewRequest.php @@ -0,0 +1,112 @@ +google.cloud.datacatalog.v1.ModifyEntryOverviewRequest + */ +class ModifyEntryOverviewRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The full resource name of the entry. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The new value for the Entry Overview. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.EntryOverview entry_overview = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $entry_overview = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The full resource name of the entry. + * @type \Google\Cloud\DataCatalog\V1\EntryOverview $entry_overview + * Required. The new value for the Entry Overview. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * Required. The full resource name of the entry. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The full resource name of the entry. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The new value for the Entry Overview. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.EntryOverview entry_overview = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\DataCatalog\V1\EntryOverview|null + */ + public function getEntryOverview() + { + return $this->entry_overview; + } + + public function hasEntryOverview() + { + return isset($this->entry_overview); + } + + public function clearEntryOverview() + { + unset($this->entry_overview); + } + + /** + * Required. The new value for the Entry Overview. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.EntryOverview entry_overview = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\DataCatalog\V1\EntryOverview $var + * @return $this + */ + public function setEntryOverview($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\EntryOverview::class); + $this->entry_overview = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PersonalDetails.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PersonalDetails.php new file mode 100644 index 000000000000..15b11371fec6 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PersonalDetails.php @@ -0,0 +1,111 @@ +google.cloud.datacatalog.v1.PersonalDetails + */ +class PersonalDetails extends \Google\Protobuf\Internal\Message +{ + /** + * True if the entry is starred by the user; false otherwise. + * + * Generated from protobuf field bool starred = 1; + */ + protected $starred = false; + /** + * Set if the entry is starred; unset otherwise. + * + * Generated from protobuf field .google.protobuf.Timestamp star_time = 2; + */ + protected $star_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $starred + * True if the entry is starred by the user; false otherwise. + * @type \Google\Protobuf\Timestamp $star_time + * Set if the entry is starred; unset otherwise. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * True if the entry is starred by the user; false otherwise. + * + * Generated from protobuf field bool starred = 1; + * @return bool + */ + public function getStarred() + { + return $this->starred; + } + + /** + * True if the entry is starred by the user; false otherwise. + * + * Generated from protobuf field bool starred = 1; + * @param bool $var + * @return $this + */ + public function setStarred($var) + { + GPBUtil::checkBool($var); + $this->starred = $var; + + return $this; + } + + /** + * Set if the entry is starred; unset otherwise. + * + * Generated from protobuf field .google.protobuf.Timestamp star_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStarTime() + { + return $this->star_time; + } + + public function hasStarTime() + { + return isset($this->star_time); + } + + public function clearStarTime() + { + unset($this->star_time); + } + + /** + * Set if the entry is starred; unset otherwise. + * + * Generated from protobuf field .google.protobuf.Timestamp star_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStarTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->star_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PhysicalSchema.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PhysicalSchema.php new file mode 100644 index 000000000000..cfe389201252 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PhysicalSchema.php @@ -0,0 +1,241 @@ +google.cloud.datacatalog.v1.PhysicalSchema + */ +class PhysicalSchema extends \Google\Protobuf\Internal\Message +{ + protected $schema; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DataCatalog\V1\PhysicalSchema\AvroSchema $avro + * Schema in Avro JSON format. + * @type \Google\Cloud\DataCatalog\V1\PhysicalSchema\ThriftSchema $thrift + * Schema in Thrift format. + * @type \Google\Cloud\DataCatalog\V1\PhysicalSchema\ProtobufSchema $protobuf + * Schema in protocol buffer format. + * @type \Google\Cloud\DataCatalog\V1\PhysicalSchema\ParquetSchema $parquet + * Marks a Parquet-encoded data source. + * @type \Google\Cloud\DataCatalog\V1\PhysicalSchema\OrcSchema $orc + * Marks an ORC-encoded data source. + * @type \Google\Cloud\DataCatalog\V1\PhysicalSchema\CsvSchema $csv + * Marks a CSV-encoded data source. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\PhysicalSchema::initOnce(); + parent::__construct($data); + } + + /** + * Schema in Avro JSON format. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.PhysicalSchema.AvroSchema avro = 1; + * @return \Google\Cloud\DataCatalog\V1\PhysicalSchema\AvroSchema|null + */ + public function getAvro() + { + return $this->readOneof(1); + } + + public function hasAvro() + { + return $this->hasOneof(1); + } + + /** + * Schema in Avro JSON format. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.PhysicalSchema.AvroSchema avro = 1; + * @param \Google\Cloud\DataCatalog\V1\PhysicalSchema\AvroSchema $var + * @return $this + */ + public function setAvro($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\PhysicalSchema\AvroSchema::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Schema in Thrift format. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.PhysicalSchema.ThriftSchema thrift = 2; + * @return \Google\Cloud\DataCatalog\V1\PhysicalSchema\ThriftSchema|null + */ + public function getThrift() + { + return $this->readOneof(2); + } + + public function hasThrift() + { + return $this->hasOneof(2); + } + + /** + * Schema in Thrift format. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.PhysicalSchema.ThriftSchema thrift = 2; + * @param \Google\Cloud\DataCatalog\V1\PhysicalSchema\ThriftSchema $var + * @return $this + */ + public function setThrift($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\PhysicalSchema\ThriftSchema::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Schema in protocol buffer format. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.PhysicalSchema.ProtobufSchema protobuf = 3; + * @return \Google\Cloud\DataCatalog\V1\PhysicalSchema\ProtobufSchema|null + */ + public function getProtobuf() + { + return $this->readOneof(3); + } + + public function hasProtobuf() + { + return $this->hasOneof(3); + } + + /** + * Schema in protocol buffer format. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.PhysicalSchema.ProtobufSchema protobuf = 3; + * @param \Google\Cloud\DataCatalog\V1\PhysicalSchema\ProtobufSchema $var + * @return $this + */ + public function setProtobuf($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\PhysicalSchema\ProtobufSchema::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Marks a Parquet-encoded data source. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.PhysicalSchema.ParquetSchema parquet = 4; + * @return \Google\Cloud\DataCatalog\V1\PhysicalSchema\ParquetSchema|null + */ + public function getParquet() + { + return $this->readOneof(4); + } + + public function hasParquet() + { + return $this->hasOneof(4); + } + + /** + * Marks a Parquet-encoded data source. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.PhysicalSchema.ParquetSchema parquet = 4; + * @param \Google\Cloud\DataCatalog\V1\PhysicalSchema\ParquetSchema $var + * @return $this + */ + public function setParquet($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\PhysicalSchema\ParquetSchema::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Marks an ORC-encoded data source. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.PhysicalSchema.OrcSchema orc = 5; + * @return \Google\Cloud\DataCatalog\V1\PhysicalSchema\OrcSchema|null + */ + public function getOrc() + { + return $this->readOneof(5); + } + + public function hasOrc() + { + return $this->hasOneof(5); + } + + /** + * Marks an ORC-encoded data source. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.PhysicalSchema.OrcSchema orc = 5; + * @param \Google\Cloud\DataCatalog\V1\PhysicalSchema\OrcSchema $var + * @return $this + */ + public function setOrc($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\PhysicalSchema\OrcSchema::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Marks a CSV-encoded data source. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.PhysicalSchema.CsvSchema csv = 6; + * @return \Google\Cloud\DataCatalog\V1\PhysicalSchema\CsvSchema|null + */ + public function getCsv() + { + return $this->readOneof(6); + } + + public function hasCsv() + { + return $this->hasOneof(6); + } + + /** + * Marks a CSV-encoded data source. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.PhysicalSchema.CsvSchema csv = 6; + * @param \Google\Cloud\DataCatalog\V1\PhysicalSchema\CsvSchema $var + * @return $this + */ + public function setCsv($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\PhysicalSchema\CsvSchema::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * @return string + */ + public function getSchema() + { + return $this->whichOneof("schema"); + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PhysicalSchema/AvroSchema.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PhysicalSchema/AvroSchema.php new file mode 100644 index 000000000000..7ff45e2f48dd --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PhysicalSchema/AvroSchema.php @@ -0,0 +1,70 @@ +google.cloud.datacatalog.v1.PhysicalSchema.AvroSchema + */ +class AvroSchema extends \Google\Protobuf\Internal\Message +{ + /** + * JSON source of the Avro schema. + * + * Generated from protobuf field string text = 1; + */ + protected $text = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $text + * JSON source of the Avro schema. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\PhysicalSchema::initOnce(); + parent::__construct($data); + } + + /** + * JSON source of the Avro schema. + * + * Generated from protobuf field string text = 1; + * @return string + */ + public function getText() + { + return $this->text; + } + + /** + * JSON source of the Avro schema. + * + * Generated from protobuf field string text = 1; + * @param string $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkString($var, True); + $this->text = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AvroSchema::class, \Google\Cloud\DataCatalog\V1\PhysicalSchema_AvroSchema::class); + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PhysicalSchema/CsvSchema.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PhysicalSchema/CsvSchema.php new file mode 100644 index 000000000000..6df505123b75 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PhysicalSchema/CsvSchema.php @@ -0,0 +1,36 @@ +google.cloud.datacatalog.v1.PhysicalSchema.CsvSchema + */ +class CsvSchema extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\PhysicalSchema::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CsvSchema::class, \Google\Cloud\DataCatalog\V1\PhysicalSchema_CsvSchema::class); + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PhysicalSchema/OrcSchema.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PhysicalSchema/OrcSchema.php new file mode 100644 index 000000000000..3537fd33c759 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PhysicalSchema/OrcSchema.php @@ -0,0 +1,36 @@ +google.cloud.datacatalog.v1.PhysicalSchema.OrcSchema + */ +class OrcSchema extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\PhysicalSchema::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(OrcSchema::class, \Google\Cloud\DataCatalog\V1\PhysicalSchema_OrcSchema::class); + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PhysicalSchema/ParquetSchema.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PhysicalSchema/ParquetSchema.php new file mode 100644 index 000000000000..3a2aa3425642 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PhysicalSchema/ParquetSchema.php @@ -0,0 +1,36 @@ +google.cloud.datacatalog.v1.PhysicalSchema.ParquetSchema + */ +class ParquetSchema extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\PhysicalSchema::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ParquetSchema::class, \Google\Cloud\DataCatalog\V1\PhysicalSchema_ParquetSchema::class); + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PhysicalSchema/ProtobufSchema.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PhysicalSchema/ProtobufSchema.php new file mode 100644 index 000000000000..a4f253051183 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PhysicalSchema/ProtobufSchema.php @@ -0,0 +1,70 @@ +google.cloud.datacatalog.v1.PhysicalSchema.ProtobufSchema + */ +class ProtobufSchema extends \Google\Protobuf\Internal\Message +{ + /** + * Protocol buffer source of the schema. + * + * Generated from protobuf field string text = 1; + */ + protected $text = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $text + * Protocol buffer source of the schema. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\PhysicalSchema::initOnce(); + parent::__construct($data); + } + + /** + * Protocol buffer source of the schema. + * + * Generated from protobuf field string text = 1; + * @return string + */ + public function getText() + { + return $this->text; + } + + /** + * Protocol buffer source of the schema. + * + * Generated from protobuf field string text = 1; + * @param string $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkString($var, True); + $this->text = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ProtobufSchema::class, \Google\Cloud\DataCatalog\V1\PhysicalSchema_ProtobufSchema::class); + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PhysicalSchema/ThriftSchema.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PhysicalSchema/ThriftSchema.php new file mode 100644 index 000000000000..58bbfae5de28 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PhysicalSchema/ThriftSchema.php @@ -0,0 +1,70 @@ +google.cloud.datacatalog.v1.PhysicalSchema.ThriftSchema + */ +class ThriftSchema extends \Google\Protobuf\Internal\Message +{ + /** + * Thrift IDL source of the schema. + * + * Generated from protobuf field string text = 1; + */ + protected $text = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $text + * Thrift IDL source of the schema. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\PhysicalSchema::initOnce(); + parent::__construct($data); + } + + /** + * Thrift IDL source of the schema. + * + * Generated from protobuf field string text = 1; + * @return string + */ + public function getText() + { + return $this->text; + } + + /** + * Thrift IDL source of the schema. + * + * Generated from protobuf field string text = 1; + * @param string $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkString($var, True); + $this->text = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ThriftSchema::class, \Google\Cloud\DataCatalog\V1\PhysicalSchema_ThriftSchema::class); + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PolicyTag.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PolicyTag.php new file mode 100644 index 000000000000..ba1c3c14999b --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PolicyTag.php @@ -0,0 +1,255 @@ +google.cloud.datacatalog.v1.PolicyTag + */ +class PolicyTag extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Resource name of this policy tag in the URL format. + * The policy tag manager generates unique taxonomy IDs and policy tag IDs. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Required. User-defined name of this policy tag. + * The name can't start or end with spaces and must be unique within the + * parent taxonomy, contain only Unicode letters, numbers, underscores, dashes + * and spaces, and be at most 200 bytes long when encoded in UTF-8. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * Description of this policy tag. If not set, defaults to empty. + * The description must contain only Unicode characters, + * tabs, newlines, carriage returns and page breaks, and be at most 2000 bytes + * long when encoded in UTF-8. + * + * Generated from protobuf field string description = 3; + */ + protected $description = ''; + /** + * Resource name of this policy tag's parent policy tag. If empty, this is a + * top level tag. If not set, defaults to an empty string. + * For example, for the "LatLong" policy tag in the example above, this field + * contains the resource name of the "Geolocation" policy tag, and, for + * "Geolocation", this field is empty. + * + * Generated from protobuf field string parent_policy_tag = 4; + */ + protected $parent_policy_tag = ''; + /** + * Output only. Resource names of child policy tags of this policy tag. + * + * Generated from protobuf field repeated string child_policy_tags = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $child_policy_tags; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. Resource name of this policy tag in the URL format. + * The policy tag manager generates unique taxonomy IDs and policy tag IDs. + * @type string $display_name + * Required. User-defined name of this policy tag. + * The name can't start or end with spaces and must be unique within the + * parent taxonomy, contain only Unicode letters, numbers, underscores, dashes + * and spaces, and be at most 200 bytes long when encoded in UTF-8. + * @type string $description + * Description of this policy tag. If not set, defaults to empty. + * The description must contain only Unicode characters, + * tabs, newlines, carriage returns and page breaks, and be at most 2000 bytes + * long when encoded in UTF-8. + * @type string $parent_policy_tag + * Resource name of this policy tag's parent policy tag. If empty, this is a + * top level tag. If not set, defaults to an empty string. + * For example, for the "LatLong" policy tag in the example above, this field + * contains the resource name of the "Geolocation" policy tag, and, for + * "Geolocation", this field is empty. + * @type array|\Google\Protobuf\Internal\RepeatedField $child_policy_tags + * Output only. Resource names of child policy tags of this policy tag. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Policytagmanager::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Resource name of this policy tag in the URL format. + * The policy tag manager generates unique taxonomy IDs and policy tag IDs. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Resource name of this policy tag in the URL format. + * The policy tag manager generates unique taxonomy IDs and policy tag IDs. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. User-defined name of this policy tag. + * The name can't start or end with spaces and must be unique within the + * parent taxonomy, contain only Unicode letters, numbers, underscores, dashes + * and spaces, and be at most 200 bytes long when encoded in UTF-8. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. User-defined name of this policy tag. + * The name can't start or end with spaces and must be unique within the + * parent taxonomy, contain only Unicode letters, numbers, underscores, dashes + * and spaces, and be at most 200 bytes long when encoded in UTF-8. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Description of this policy tag. If not set, defaults to empty. + * The description must contain only Unicode characters, + * tabs, newlines, carriage returns and page breaks, and be at most 2000 bytes + * long when encoded in UTF-8. + * + * Generated from protobuf field string description = 3; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Description of this policy tag. If not set, defaults to empty. + * The description must contain only Unicode characters, + * tabs, newlines, carriage returns and page breaks, and be at most 2000 bytes + * long when encoded in UTF-8. + * + * Generated from protobuf field string description = 3; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Resource name of this policy tag's parent policy tag. If empty, this is a + * top level tag. If not set, defaults to an empty string. + * For example, for the "LatLong" policy tag in the example above, this field + * contains the resource name of the "Geolocation" policy tag, and, for + * "Geolocation", this field is empty. + * + * Generated from protobuf field string parent_policy_tag = 4; + * @return string + */ + public function getParentPolicyTag() + { + return $this->parent_policy_tag; + } + + /** + * Resource name of this policy tag's parent policy tag. If empty, this is a + * top level tag. If not set, defaults to an empty string. + * For example, for the "LatLong" policy tag in the example above, this field + * contains the resource name of the "Geolocation" policy tag, and, for + * "Geolocation", this field is empty. + * + * Generated from protobuf field string parent_policy_tag = 4; + * @param string $var + * @return $this + */ + public function setParentPolicyTag($var) + { + GPBUtil::checkString($var, True); + $this->parent_policy_tag = $var; + + return $this; + } + + /** + * Output only. Resource names of child policy tags of this policy tag. + * + * Generated from protobuf field repeated string child_policy_tags = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getChildPolicyTags() + { + return $this->child_policy_tags; + } + + /** + * Output only. Resource names of child policy tags of this policy tag. + * + * Generated from protobuf field repeated string child_policy_tags = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setChildPolicyTags($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->child_policy_tags = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ReconcileTagsMetadata.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ReconcileTagsMetadata.php new file mode 100644 index 000000000000..2a72e0e8e924 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ReconcileTagsMetadata.php @@ -0,0 +1,107 @@ +google.cloud.datacatalog.v1.ReconcileTagsMetadata + */ +class ReconcileTagsMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * State of the reconciliation operation. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.ReconcileTagsMetadata.ReconciliationState state = 1; + */ + protected $state = 0; + /** + * Maps the name of each tagged column (or empty string for a + * sole entry) to tagging operation [status][google.rpc.Status]. + * + * Generated from protobuf field map errors = 2; + */ + private $errors; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $state + * State of the reconciliation operation. + * @type array|\Google\Protobuf\Internal\MapField $errors + * Maps the name of each tagged column (or empty string for a + * sole entry) to tagging operation [status][google.rpc.Status]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * State of the reconciliation operation. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.ReconcileTagsMetadata.ReconciliationState state = 1; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * State of the reconciliation operation. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.ReconcileTagsMetadata.ReconciliationState state = 1; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DataCatalog\V1\ReconcileTagsMetadata\ReconciliationState::class); + $this->state = $var; + + return $this; + } + + /** + * Maps the name of each tagged column (or empty string for a + * sole entry) to tagging operation [status][google.rpc.Status]. + * + * Generated from protobuf field map errors = 2; + * @return \Google\Protobuf\Internal\MapField + */ + public function getErrors() + { + return $this->errors; + } + + /** + * Maps the name of each tagged column (or empty string for a + * sole entry) to tagging operation [status][google.rpc.Status]. + * + * Generated from protobuf field map errors = 2; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setErrors($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Status::class); + $this->errors = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ReconcileTagsMetadata/ReconciliationState.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ReconcileTagsMetadata/ReconciliationState.php new file mode 100644 index 000000000000..2f40d719bcfd --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ReconcileTagsMetadata/ReconciliationState.php @@ -0,0 +1,71 @@ +google.cloud.datacatalog.v1.ReconcileTagsMetadata.ReconciliationState + */ +class ReconciliationState +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum RECONCILIATION_STATE_UNSPECIFIED = 0; + */ + const RECONCILIATION_STATE_UNSPECIFIED = 0; + /** + * The reconciliation has been queued and awaits for execution. + * + * Generated from protobuf enum RECONCILIATION_QUEUED = 1; + */ + const RECONCILIATION_QUEUED = 1; + /** + * The reconciliation is in progress. + * + * Generated from protobuf enum RECONCILIATION_IN_PROGRESS = 2; + */ + const RECONCILIATION_IN_PROGRESS = 2; + /** + * The reconciliation has been finished. + * + * Generated from protobuf enum RECONCILIATION_DONE = 3; + */ + const RECONCILIATION_DONE = 3; + + private static $valueToName = [ + self::RECONCILIATION_STATE_UNSPECIFIED => 'RECONCILIATION_STATE_UNSPECIFIED', + self::RECONCILIATION_QUEUED => 'RECONCILIATION_QUEUED', + self::RECONCILIATION_IN_PROGRESS => 'RECONCILIATION_IN_PROGRESS', + self::RECONCILIATION_DONE => 'RECONCILIATION_DONE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ReconciliationState::class, \Google\Cloud\DataCatalog\V1\ReconcileTagsMetadata_ReconciliationState::class); + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ReconcileTagsRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ReconcileTagsRequest.php new file mode 100644 index 000000000000..fbc95fd3d4eb --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ReconcileTagsRequest.php @@ -0,0 +1,190 @@ +google.cloud.datacatalog.v1.ReconcileTagsRequest + */ +class ReconcileTagsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of [Entry][google.cloud.datacatalog.v1.Entry] to be tagged. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The name of the tag template, which is used for reconciliation. + * + * Generated from protobuf field string tag_template = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $tag_template = ''; + /** + * If set to `true`, deletes entry tags related to a tag template + * not listed in the tags source from an entry. If set to `false`, + * unlisted tags are retained. + * + * Generated from protobuf field bool force_delete_missing = 3; + */ + protected $force_delete_missing = false; + /** + * A list of tags to apply to an entry. A tag can specify a + * tag template, which must be the template specified in the + * `ReconcileTagsRequest`. + * The sole entry and each of its columns must be mentioned at most once. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Tag tags = 4; + */ + private $tags; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Name of [Entry][google.cloud.datacatalog.v1.Entry] to be tagged. + * @type string $tag_template + * Required. The name of the tag template, which is used for reconciliation. + * @type bool $force_delete_missing + * If set to `true`, deletes entry tags related to a tag template + * not listed in the tags source from an entry. If set to `false`, + * unlisted tags are retained. + * @type array<\Google\Cloud\DataCatalog\V1\Tag>|\Google\Protobuf\Internal\RepeatedField $tags + * A list of tags to apply to an entry. A tag can specify a + * tag template, which must be the template specified in the + * `ReconcileTagsRequest`. + * The sole entry and each of its columns must be mentioned at most once. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of [Entry][google.cloud.datacatalog.v1.Entry] to be tagged. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Name of [Entry][google.cloud.datacatalog.v1.Entry] to be tagged. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The name of the tag template, which is used for reconciliation. + * + * Generated from protobuf field string tag_template = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getTagTemplate() + { + return $this->tag_template; + } + + /** + * Required. The name of the tag template, which is used for reconciliation. + * + * Generated from protobuf field string tag_template = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setTagTemplate($var) + { + GPBUtil::checkString($var, True); + $this->tag_template = $var; + + return $this; + } + + /** + * If set to `true`, deletes entry tags related to a tag template + * not listed in the tags source from an entry. If set to `false`, + * unlisted tags are retained. + * + * Generated from protobuf field bool force_delete_missing = 3; + * @return bool + */ + public function getForceDeleteMissing() + { + return $this->force_delete_missing; + } + + /** + * If set to `true`, deletes entry tags related to a tag template + * not listed in the tags source from an entry. If set to `false`, + * unlisted tags are retained. + * + * Generated from protobuf field bool force_delete_missing = 3; + * @param bool $var + * @return $this + */ + public function setForceDeleteMissing($var) + { + GPBUtil::checkBool($var); + $this->force_delete_missing = $var; + + return $this; + } + + /** + * A list of tags to apply to an entry. A tag can specify a + * tag template, which must be the template specified in the + * `ReconcileTagsRequest`. + * The sole entry and each of its columns must be mentioned at most once. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Tag tags = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTags() + { + return $this->tags; + } + + /** + * A list of tags to apply to an entry. A tag can specify a + * tag template, which must be the template specified in the + * `ReconcileTagsRequest`. + * The sole entry and each of its columns must be mentioned at most once. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Tag tags = 4; + * @param array<\Google\Cloud\DataCatalog\V1\Tag>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTags($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DataCatalog\V1\Tag::class); + $this->tags = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ReconcileTagsResponse.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ReconcileTagsResponse.php new file mode 100644 index 000000000000..7847c76e8692 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ReconcileTagsResponse.php @@ -0,0 +1,137 @@ +google.cloud.datacatalog.v1.ReconcileTagsResponse + */ +class ReconcileTagsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Number of tags created in the request. + * + * Generated from protobuf field int64 created_tags_count = 1; + */ + protected $created_tags_count = 0; + /** + * Number of tags updated in the request. + * + * Generated from protobuf field int64 updated_tags_count = 2; + */ + protected $updated_tags_count = 0; + /** + * Number of tags deleted in the request. + * + * Generated from protobuf field int64 deleted_tags_count = 3; + */ + protected $deleted_tags_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $created_tags_count + * Number of tags created in the request. + * @type int|string $updated_tags_count + * Number of tags updated in the request. + * @type int|string $deleted_tags_count + * Number of tags deleted in the request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * Number of tags created in the request. + * + * Generated from protobuf field int64 created_tags_count = 1; + * @return int|string + */ + public function getCreatedTagsCount() + { + return $this->created_tags_count; + } + + /** + * Number of tags created in the request. + * + * Generated from protobuf field int64 created_tags_count = 1; + * @param int|string $var + * @return $this + */ + public function setCreatedTagsCount($var) + { + GPBUtil::checkInt64($var); + $this->created_tags_count = $var; + + return $this; + } + + /** + * Number of tags updated in the request. + * + * Generated from protobuf field int64 updated_tags_count = 2; + * @return int|string + */ + public function getUpdatedTagsCount() + { + return $this->updated_tags_count; + } + + /** + * Number of tags updated in the request. + * + * Generated from protobuf field int64 updated_tags_count = 2; + * @param int|string $var + * @return $this + */ + public function setUpdatedTagsCount($var) + { + GPBUtil::checkInt64($var); + $this->updated_tags_count = $var; + + return $this; + } + + /** + * Number of tags deleted in the request. + * + * Generated from protobuf field int64 deleted_tags_count = 3; + * @return int|string + */ + public function getDeletedTagsCount() + { + return $this->deleted_tags_count; + } + + /** + * Number of tags deleted in the request. + * + * Generated from protobuf field int64 deleted_tags_count = 3; + * @param int|string $var + * @return $this + */ + public function setDeletedTagsCount($var) + { + GPBUtil::checkInt64($var); + $this->deleted_tags_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/RenameTagTemplateFieldEnumValueRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/RenameTagTemplateFieldEnumValueRequest.php new file mode 100644 index 000000000000..2356d1f0e0a7 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/RenameTagTemplateFieldEnumValueRequest.php @@ -0,0 +1,123 @@ +google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest + */ +class RenameTagTemplateFieldEnumValueRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the enum field value. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The new display name of the enum value. For example, + * `my_new_enum_value`. + * + * Generated from protobuf field string new_enum_value_display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $new_enum_value_display_name = ''; + + /** + * @param string $name Required. The name of the enum field value. Please see + * {@see DataCatalogClient::tagTemplateFieldEnumValueName()} for help formatting this field. + * @param string $newEnumValueDisplayName Required. The new display name of the enum value. For example, + * `my_new_enum_value`. + * + * @return \Google\Cloud\DataCatalog\V1\RenameTagTemplateFieldEnumValueRequest + * + * @experimental + */ + public static function build(string $name, string $newEnumValueDisplayName): self + { + return (new self()) + ->setName($name) + ->setNewEnumValueDisplayName($newEnumValueDisplayName); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the enum field value. + * @type string $new_enum_value_display_name + * Required. The new display name of the enum value. For example, + * `my_new_enum_value`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the enum field value. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the enum field value. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The new display name of the enum value. For example, + * `my_new_enum_value`. + * + * Generated from protobuf field string new_enum_value_display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getNewEnumValueDisplayName() + { + return $this->new_enum_value_display_name; + } + + /** + * Required. The new display name of the enum value. For example, + * `my_new_enum_value`. + * + * Generated from protobuf field string new_enum_value_display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setNewEnumValueDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->new_enum_value_display_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/RenameTagTemplateFieldRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/RenameTagTemplateFieldRequest.php new file mode 100644 index 000000000000..385fb3e2b59c --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/RenameTagTemplateFieldRequest.php @@ -0,0 +1,123 @@ +google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest + */ +class RenameTagTemplateFieldRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the tag template field. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The new ID of this tag template field. For example, + * `my_new_field`. + * + * Generated from protobuf field string new_tag_template_field_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $new_tag_template_field_id = ''; + + /** + * @param string $name Required. The name of the tag template field. Please see + * {@see DataCatalogClient::tagTemplateFieldName()} for help formatting this field. + * @param string $newTagTemplateFieldId Required. The new ID of this tag template field. For example, + * `my_new_field`. + * + * @return \Google\Cloud\DataCatalog\V1\RenameTagTemplateFieldRequest + * + * @experimental + */ + public static function build(string $name, string $newTagTemplateFieldId): self + { + return (new self()) + ->setName($name) + ->setNewTagTemplateFieldId($newTagTemplateFieldId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the tag template field. + * @type string $new_tag_template_field_id + * Required. The new ID of this tag template field. For example, + * `my_new_field`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the tag template field. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the tag template field. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The new ID of this tag template field. For example, + * `my_new_field`. + * + * Generated from protobuf field string new_tag_template_field_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getNewTagTemplateFieldId() + { + return $this->new_tag_template_field_id; + } + + /** + * Required. The new ID of this tag template field. For example, + * `my_new_field`. + * + * Generated from protobuf field string new_tag_template_field_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setNewTagTemplateFieldId($var) + { + GPBUtil::checkString($var, True); + $this->new_tag_template_field_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ReplaceTaxonomyRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ReplaceTaxonomyRequest.php new file mode 100644 index 000000000000..67350fac7799 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ReplaceTaxonomyRequest.php @@ -0,0 +1,112 @@ +google.cloud.datacatalog.v1.ReplaceTaxonomyRequest + */ +class ReplaceTaxonomyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the taxonomy to update. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. Taxonomy to update along with its child policy tags. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.SerializedTaxonomy serialized_taxonomy = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $serialized_taxonomy = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Resource name of the taxonomy to update. + * @type \Google\Cloud\DataCatalog\V1\SerializedTaxonomy $serialized_taxonomy + * Required. Taxonomy to update along with its child policy tags. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Policytagmanagerserialization::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the taxonomy to update. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Resource name of the taxonomy to update. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. Taxonomy to update along with its child policy tags. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.SerializedTaxonomy serialized_taxonomy = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\DataCatalog\V1\SerializedTaxonomy|null + */ + public function getSerializedTaxonomy() + { + return $this->serialized_taxonomy; + } + + public function hasSerializedTaxonomy() + { + return isset($this->serialized_taxonomy); + } + + public function clearSerializedTaxonomy() + { + unset($this->serialized_taxonomy); + } + + /** + * Required. Taxonomy to update along with its child policy tags. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.SerializedTaxonomy serialized_taxonomy = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\DataCatalog\V1\SerializedTaxonomy $var + * @return $this + */ + public function setSerializedTaxonomy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\SerializedTaxonomy::class); + $this->serialized_taxonomy = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/RoutineSpec.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/RoutineSpec.php new file mode 100644 index 000000000000..8c71b088c8ba --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/RoutineSpec.php @@ -0,0 +1,262 @@ +google.cloud.datacatalog.v1.RoutineSpec + */ +class RoutineSpec extends \Google\Protobuf\Internal\Message +{ + /** + * The type of the routine. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.RoutineSpec.RoutineType routine_type = 1; + */ + protected $routine_type = 0; + /** + * The language the routine is written in. The exact value depends on the + * source system. For BigQuery routines, possible values are: + * * `SQL` + * * `JAVASCRIPT` + * + * Generated from protobuf field string language = 2; + */ + protected $language = ''; + /** + * Arguments of the routine. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.RoutineSpec.Argument routine_arguments = 3; + */ + private $routine_arguments; + /** + * Return type of the argument. The exact value depends on the source system + * and the language. + * + * Generated from protobuf field string return_type = 4; + */ + protected $return_type = ''; + /** + * The body of the routine. + * + * Generated from protobuf field string definition_body = 5; + */ + protected $definition_body = ''; + protected $system_spec; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $routine_type + * The type of the routine. + * @type string $language + * The language the routine is written in. The exact value depends on the + * source system. For BigQuery routines, possible values are: + * * `SQL` + * * `JAVASCRIPT` + * @type array<\Google\Cloud\DataCatalog\V1\RoutineSpec\Argument>|\Google\Protobuf\Internal\RepeatedField $routine_arguments + * Arguments of the routine. + * @type string $return_type + * Return type of the argument. The exact value depends on the source system + * and the language. + * @type string $definition_body + * The body of the routine. + * @type \Google\Cloud\DataCatalog\V1\BigQueryRoutineSpec $bigquery_routine_spec + * Fields specific for BigQuery routines. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * The type of the routine. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.RoutineSpec.RoutineType routine_type = 1; + * @return int + */ + public function getRoutineType() + { + return $this->routine_type; + } + + /** + * The type of the routine. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.RoutineSpec.RoutineType routine_type = 1; + * @param int $var + * @return $this + */ + public function setRoutineType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DataCatalog\V1\RoutineSpec\RoutineType::class); + $this->routine_type = $var; + + return $this; + } + + /** + * The language the routine is written in. The exact value depends on the + * source system. For BigQuery routines, possible values are: + * * `SQL` + * * `JAVASCRIPT` + * + * Generated from protobuf field string language = 2; + * @return string + */ + public function getLanguage() + { + return $this->language; + } + + /** + * The language the routine is written in. The exact value depends on the + * source system. For BigQuery routines, possible values are: + * * `SQL` + * * `JAVASCRIPT` + * + * Generated from protobuf field string language = 2; + * @param string $var + * @return $this + */ + public function setLanguage($var) + { + GPBUtil::checkString($var, True); + $this->language = $var; + + return $this; + } + + /** + * Arguments of the routine. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.RoutineSpec.Argument routine_arguments = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRoutineArguments() + { + return $this->routine_arguments; + } + + /** + * Arguments of the routine. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.RoutineSpec.Argument routine_arguments = 3; + * @param array<\Google\Cloud\DataCatalog\V1\RoutineSpec\Argument>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRoutineArguments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DataCatalog\V1\RoutineSpec\Argument::class); + $this->routine_arguments = $arr; + + return $this; + } + + /** + * Return type of the argument. The exact value depends on the source system + * and the language. + * + * Generated from protobuf field string return_type = 4; + * @return string + */ + public function getReturnType() + { + return $this->return_type; + } + + /** + * Return type of the argument. The exact value depends on the source system + * and the language. + * + * Generated from protobuf field string return_type = 4; + * @param string $var + * @return $this + */ + public function setReturnType($var) + { + GPBUtil::checkString($var, True); + $this->return_type = $var; + + return $this; + } + + /** + * The body of the routine. + * + * Generated from protobuf field string definition_body = 5; + * @return string + */ + public function getDefinitionBody() + { + return $this->definition_body; + } + + /** + * The body of the routine. + * + * Generated from protobuf field string definition_body = 5; + * @param string $var + * @return $this + */ + public function setDefinitionBody($var) + { + GPBUtil::checkString($var, True); + $this->definition_body = $var; + + return $this; + } + + /** + * Fields specific for BigQuery routines. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.BigQueryRoutineSpec bigquery_routine_spec = 6; + * @return \Google\Cloud\DataCatalog\V1\BigQueryRoutineSpec|null + */ + public function getBigqueryRoutineSpec() + { + return $this->readOneof(6); + } + + public function hasBigqueryRoutineSpec() + { + return $this->hasOneof(6); + } + + /** + * Fields specific for BigQuery routines. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.BigQueryRoutineSpec bigquery_routine_spec = 6; + * @param \Google\Cloud\DataCatalog\V1\BigQueryRoutineSpec $var + * @return $this + */ + public function setBigqueryRoutineSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\BigQueryRoutineSpec::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * @return string + */ + public function getSystemSpec() + { + return $this->whichOneof("system_spec"); + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/RoutineSpec/Argument.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/RoutineSpec/Argument.php new file mode 100644 index 000000000000..8abcca2b8441 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/RoutineSpec/Argument.php @@ -0,0 +1,146 @@ +google.cloud.datacatalog.v1.RoutineSpec.Argument + */ +class Argument extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the argument. A return argument of a function might not have + * a name. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Specifies whether the argument is input or output. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.RoutineSpec.Argument.Mode mode = 2; + */ + protected $mode = 0; + /** + * Type of the argument. The exact value depends on the source system and + * the language. + * + * Generated from protobuf field string type = 3; + */ + protected $type = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the argument. A return argument of a function might not have + * a name. + * @type int $mode + * Specifies whether the argument is input or output. + * @type string $type + * Type of the argument. The exact value depends on the source system and + * the language. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * The name of the argument. A return argument of a function might not have + * a name. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the argument. A return argument of a function might not have + * a name. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Specifies whether the argument is input or output. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.RoutineSpec.Argument.Mode mode = 2; + * @return int + */ + public function getMode() + { + return $this->mode; + } + + /** + * Specifies whether the argument is input or output. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.RoutineSpec.Argument.Mode mode = 2; + * @param int $var + * @return $this + */ + public function setMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DataCatalog\V1\RoutineSpec\Argument\Mode::class); + $this->mode = $var; + + return $this; + } + + /** + * Type of the argument. The exact value depends on the source system and + * the language. + * + * Generated from protobuf field string type = 3; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * Type of the argument. The exact value depends on the source system and + * the language. + * + * Generated from protobuf field string type = 3; + * @param string $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkString($var, True); + $this->type = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Argument::class, \Google\Cloud\DataCatalog\V1\RoutineSpec_Argument::class); + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/RoutineSpec/Argument/Mode.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/RoutineSpec/Argument/Mode.php new file mode 100644 index 000000000000..894ff07fc297 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/RoutineSpec/Argument/Mode.php @@ -0,0 +1,71 @@ +google.cloud.datacatalog.v1.RoutineSpec.Argument.Mode + */ +class Mode +{ + /** + * Unspecified mode. + * + * Generated from protobuf enum MODE_UNSPECIFIED = 0; + */ + const MODE_UNSPECIFIED = 0; + /** + * The argument is input-only. + * + * Generated from protobuf enum IN = 1; + */ + const IN = 1; + /** + * The argument is output-only. + * + * Generated from protobuf enum OUT = 2; + */ + const OUT = 2; + /** + * The argument is both an input and an output. + * + * Generated from protobuf enum INOUT = 3; + */ + const INOUT = 3; + + private static $valueToName = [ + self::MODE_UNSPECIFIED => 'MODE_UNSPECIFIED', + self::IN => 'IN', + self::OUT => 'OUT', + self::INOUT => 'INOUT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Mode::class, \Google\Cloud\DataCatalog\V1\RoutineSpec_Argument_Mode::class); + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/RoutineSpec/RoutineType.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/RoutineSpec/RoutineType.php new file mode 100644 index 000000000000..8778af7e281d --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/RoutineSpec/RoutineType.php @@ -0,0 +1,64 @@ +google.cloud.datacatalog.v1.RoutineSpec.RoutineType + */ +class RoutineType +{ + /** + * Unspecified type. + * + * Generated from protobuf enum ROUTINE_TYPE_UNSPECIFIED = 0; + */ + const ROUTINE_TYPE_UNSPECIFIED = 0; + /** + * Non-builtin permanent scalar function. + * + * Generated from protobuf enum SCALAR_FUNCTION = 1; + */ + const SCALAR_FUNCTION = 1; + /** + * Stored procedure. + * + * Generated from protobuf enum PROCEDURE = 2; + */ + const PROCEDURE = 2; + + private static $valueToName = [ + self::ROUTINE_TYPE_UNSPECIFIED => 'ROUTINE_TYPE_UNSPECIFIED', + self::SCALAR_FUNCTION => 'SCALAR_FUNCTION', + self::PROCEDURE => 'PROCEDURE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RoutineType::class, \Google\Cloud\DataCatalog\V1\RoutineSpec_RoutineType::class); + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Schema.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Schema.php new file mode 100644 index 000000000000..6596e4bdfdf4 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Schema.php @@ -0,0 +1,75 @@ +google.cloud.datacatalog.v1.Schema + */ +class Schema extends \Google\Protobuf\Internal\Message +{ + /** + * The unified GoogleSQL-like schema of columns. + * The overall maximum number of columns and nested columns is 10,000. + * The maximum nested depth is 15 levels. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2; + */ + private $columns; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\DataCatalog\V1\ColumnSchema>|\Google\Protobuf\Internal\RepeatedField $columns + * The unified GoogleSQL-like schema of columns. + * The overall maximum number of columns and nested columns is 10,000. + * The maximum nested depth is 15 levels. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Schema::initOnce(); + parent::__construct($data); + } + + /** + * The unified GoogleSQL-like schema of columns. + * The overall maximum number of columns and nested columns is 10,000. + * The maximum nested depth is 15 levels. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getColumns() + { + return $this->columns; + } + + /** + * The unified GoogleSQL-like schema of columns. + * The overall maximum number of columns and nested columns is 10,000. + * The maximum nested depth is 15 levels. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2; + * @param array<\Google\Cloud\DataCatalog\V1\ColumnSchema>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setColumns($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DataCatalog\V1\ColumnSchema::class); + $this->columns = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SearchCatalogRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SearchCatalogRequest.php new file mode 100644 index 000000000000..9e519a7c2943 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SearchCatalogRequest.php @@ -0,0 +1,368 @@ +google.cloud.datacatalog.v1.SearchCatalogRequest + */ +class SearchCatalogRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The scope of this search request. + * The `scope` is invalid if `include_org_ids`, `include_project_ids` are + * empty AND `include_gcp_public_datasets` is set to `false`. In this case, + * the request returns an error. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.SearchCatalogRequest.Scope scope = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $scope = null; + /** + * Optional. The query string with a minimum of 3 characters and specific + * syntax. For more information, see [Data Catalog search + * syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference). + * An empty query string returns all data assets (in the specified scope) + * that you have access to. + * A query string can be a simple `xyz` or qualified by predicates: + * * `name:x` + * * `column:y` + * * `description:z` + * + * Generated from protobuf field string query = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $query = ''; + /** + * Upper bound on the number of results you can get in a single response. + * Can't be negative or 0, defaults to 10 in this case. + * The maximum number is 1000. If exceeded, throws an "invalid argument" + * exception. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * Optional. Pagination token that, if specified, returns the next page of + * search results. If empty, returns the first page. + * This token is returned in the + * [SearchCatalogResponse.next_page_token][google.cloud.datacatalog.v1.SearchCatalogResponse.next_page_token] + * field of the response to a previous + * [SearchCatalogRequest][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog] + * call. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Specifies the order of results. + * Currently supported case-sensitive values are: + * * `relevance` that can only be descending + * * `last_modified_timestamp [asc|desc]` with descending (`desc`) as default + * * `default` that can only be descending + * Search queries don't guarantee full recall. Results that match your query + * might not be returned, even in subsequent result pages. Additionally, + * returned (and not returned) results can vary if you repeat search queries. + * If you are experiencing recall issues and you don't have to fetch the + * results in any specific order, consider setting this parameter to + * `default`. + * If this parameter is omitted, it defaults to the descending `relevance`. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param \Google\Cloud\DataCatalog\V1\SearchCatalogRequest\Scope $scope Required. The scope of this search request. + * + * The `scope` is invalid if `include_org_ids`, `include_project_ids` are + * empty AND `include_gcp_public_datasets` is set to `false`. In this case, + * the request returns an error. + * @param string $query Optional. The query string with a minimum of 3 characters and specific + * syntax. For more information, see [Data Catalog search + * syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference). + * + * An empty query string returns all data assets (in the specified scope) + * that you have access to. + * + * A query string can be a simple `xyz` or qualified by predicates: + * + * * `name:x` + * * `column:y` + * * `description:z` + * + * @return \Google\Cloud\DataCatalog\V1\SearchCatalogRequest + * + * @experimental + */ + public static function build(\Google\Cloud\DataCatalog\V1\SearchCatalogRequest\Scope $scope, string $query): self + { + return (new self()) + ->setScope($scope) + ->setQuery($query); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DataCatalog\V1\SearchCatalogRequest\Scope $scope + * Required. The scope of this search request. + * The `scope` is invalid if `include_org_ids`, `include_project_ids` are + * empty AND `include_gcp_public_datasets` is set to `false`. In this case, + * the request returns an error. + * @type string $query + * Optional. The query string with a minimum of 3 characters and specific + * syntax. For more information, see [Data Catalog search + * syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference). + * An empty query string returns all data assets (in the specified scope) + * that you have access to. + * A query string can be a simple `xyz` or qualified by predicates: + * * `name:x` + * * `column:y` + * * `description:z` + * @type int $page_size + * Upper bound on the number of results you can get in a single response. + * Can't be negative or 0, defaults to 10 in this case. + * The maximum number is 1000. If exceeded, throws an "invalid argument" + * exception. + * @type string $page_token + * Optional. Pagination token that, if specified, returns the next page of + * search results. If empty, returns the first page. + * This token is returned in the + * [SearchCatalogResponse.next_page_token][google.cloud.datacatalog.v1.SearchCatalogResponse.next_page_token] + * field of the response to a previous + * [SearchCatalogRequest][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog] + * call. + * @type string $order_by + * Specifies the order of results. + * Currently supported case-sensitive values are: + * * `relevance` that can only be descending + * * `last_modified_timestamp [asc|desc]` with descending (`desc`) as default + * * `default` that can only be descending + * Search queries don't guarantee full recall. Results that match your query + * might not be returned, even in subsequent result pages. Additionally, + * returned (and not returned) results can vary if you repeat search queries. + * If you are experiencing recall issues and you don't have to fetch the + * results in any specific order, consider setting this parameter to + * `default`. + * If this parameter is omitted, it defaults to the descending `relevance`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * Required. The scope of this search request. + * The `scope` is invalid if `include_org_ids`, `include_project_ids` are + * empty AND `include_gcp_public_datasets` is set to `false`. In this case, + * the request returns an error. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.SearchCatalogRequest.Scope scope = 6 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\DataCatalog\V1\SearchCatalogRequest\Scope|null + */ + public function getScope() + { + return $this->scope; + } + + public function hasScope() + { + return isset($this->scope); + } + + public function clearScope() + { + unset($this->scope); + } + + /** + * Required. The scope of this search request. + * The `scope` is invalid if `include_org_ids`, `include_project_ids` are + * empty AND `include_gcp_public_datasets` is set to `false`. In this case, + * the request returns an error. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.SearchCatalogRequest.Scope scope = 6 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\DataCatalog\V1\SearchCatalogRequest\Scope $var + * @return $this + */ + public function setScope($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\SearchCatalogRequest\Scope::class); + $this->scope = $var; + + return $this; + } + + /** + * Optional. The query string with a minimum of 3 characters and specific + * syntax. For more information, see [Data Catalog search + * syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference). + * An empty query string returns all data assets (in the specified scope) + * that you have access to. + * A query string can be a simple `xyz` or qualified by predicates: + * * `name:x` + * * `column:y` + * * `description:z` + * + * Generated from protobuf field string query = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getQuery() + { + return $this->query; + } + + /** + * Optional. The query string with a minimum of 3 characters and specific + * syntax. For more information, see [Data Catalog search + * syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference). + * An empty query string returns all data assets (in the specified scope) + * that you have access to. + * A query string can be a simple `xyz` or qualified by predicates: + * * `name:x` + * * `column:y` + * * `description:z` + * + * Generated from protobuf field string query = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setQuery($var) + { + GPBUtil::checkString($var, True); + $this->query = $var; + + return $this; + } + + /** + * Upper bound on the number of results you can get in a single response. + * Can't be negative or 0, defaults to 10 in this case. + * The maximum number is 1000. If exceeded, throws an "invalid argument" + * exception. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Upper bound on the number of results you can get in a single response. + * Can't be negative or 0, defaults to 10 in this case. + * The maximum number is 1000. If exceeded, throws an "invalid argument" + * exception. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. Pagination token that, if specified, returns the next page of + * search results. If empty, returns the first page. + * This token is returned in the + * [SearchCatalogResponse.next_page_token][google.cloud.datacatalog.v1.SearchCatalogResponse.next_page_token] + * field of the response to a previous + * [SearchCatalogRequest][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog] + * call. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. Pagination token that, if specified, returns the next page of + * search results. If empty, returns the first page. + * This token is returned in the + * [SearchCatalogResponse.next_page_token][google.cloud.datacatalog.v1.SearchCatalogResponse.next_page_token] + * field of the response to a previous + * [SearchCatalogRequest][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog] + * call. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Specifies the order of results. + * Currently supported case-sensitive values are: + * * `relevance` that can only be descending + * * `last_modified_timestamp [asc|desc]` with descending (`desc`) as default + * * `default` that can only be descending + * Search queries don't guarantee full recall. Results that match your query + * might not be returned, even in subsequent result pages. Additionally, + * returned (and not returned) results can vary if you repeat search queries. + * If you are experiencing recall issues and you don't have to fetch the + * results in any specific order, consider setting this parameter to + * `default`. + * If this parameter is omitted, it defaults to the descending `relevance`. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Specifies the order of results. + * Currently supported case-sensitive values are: + * * `relevance` that can only be descending + * * `last_modified_timestamp [asc|desc]` with descending (`desc`) as default + * * `default` that can only be descending + * Search queries don't guarantee full recall. Results that match your query + * might not be returned, even in subsequent result pages. Additionally, + * returned (and not returned) results can vary if you repeat search queries. + * If you are experiencing recall issues and you don't have to fetch the + * results in any specific order, consider setting this parameter to + * `default`. + * If this parameter is omitted, it defaults to the descending `relevance`. + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SearchCatalogRequest/Scope.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SearchCatalogRequest/Scope.php new file mode 100644 index 000000000000..a35f47cccbff --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SearchCatalogRequest/Scope.php @@ -0,0 +1,313 @@ +google.cloud.datacatalog.v1.SearchCatalogRequest.Scope + */ +class Scope extends \Google\Protobuf\Internal\Message +{ + /** + * The list of organization IDs to search within. + * To find your organization ID, follow the steps from + * [Creating and managing organizations] + * (/resource-manager/docs/creating-managing-organization). + * + * Generated from protobuf field repeated string include_org_ids = 2; + */ + private $include_org_ids; + /** + * The list of project IDs to search within. + * For more information on the distinction between project names, IDs, and + * numbers, see [Projects](/docs/overview/#projects). + * + * Generated from protobuf field repeated string include_project_ids = 3; + */ + private $include_project_ids; + /** + * If `true`, include Google Cloud public datasets in + * search results. By default, they are excluded. + * See [Google Cloud Public Datasets](/public-datasets) for more + * information. + * + * Generated from protobuf field bool include_gcp_public_datasets = 7; + */ + protected $include_gcp_public_datasets = false; + /** + * Optional. The list of locations to search within. If empty, all locations + * are searched. + * Returns an error if any location in the list isn't one of the [Supported + * regions](https://cloud.google.com/data-catalog/docs/concepts/regions#supported_regions). + * If a location is unreachable, its name is returned in the + * `SearchCatalogResponse.unreachable` field. To get additional information + * on the error, repeat the search request and set the location name as the + * value of this parameter. + * + * Generated from protobuf field repeated string restricted_locations = 16 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $restricted_locations; + /** + * Optional. If `true`, search only among starred entries. + * By default, all results are returned, starred or not. + * + * Generated from protobuf field bool starred_only = 18 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $starred_only = false; + /** + * Optional. This field is deprecated. The search mechanism for public and + * private tag templates is the same. + * + * Generated from protobuf field bool include_public_tag_templates = 19 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @deprecated + */ + protected $include_public_tag_templates = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $include_org_ids + * The list of organization IDs to search within. + * To find your organization ID, follow the steps from + * [Creating and managing organizations] + * (/resource-manager/docs/creating-managing-organization). + * @type array|\Google\Protobuf\Internal\RepeatedField $include_project_ids + * The list of project IDs to search within. + * For more information on the distinction between project names, IDs, and + * numbers, see [Projects](/docs/overview/#projects). + * @type bool $include_gcp_public_datasets + * If `true`, include Google Cloud public datasets in + * search results. By default, they are excluded. + * See [Google Cloud Public Datasets](/public-datasets) for more + * information. + * @type array|\Google\Protobuf\Internal\RepeatedField $restricted_locations + * Optional. The list of locations to search within. If empty, all locations + * are searched. + * Returns an error if any location in the list isn't one of the [Supported + * regions](https://cloud.google.com/data-catalog/docs/concepts/regions#supported_regions). + * If a location is unreachable, its name is returned in the + * `SearchCatalogResponse.unreachable` field. To get additional information + * on the error, repeat the search request and set the location name as the + * value of this parameter. + * @type bool $starred_only + * Optional. If `true`, search only among starred entries. + * By default, all results are returned, starred or not. + * @type bool $include_public_tag_templates + * Optional. This field is deprecated. The search mechanism for public and + * private tag templates is the same. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * The list of organization IDs to search within. + * To find your organization ID, follow the steps from + * [Creating and managing organizations] + * (/resource-manager/docs/creating-managing-organization). + * + * Generated from protobuf field repeated string include_org_ids = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIncludeOrgIds() + { + return $this->include_org_ids; + } + + /** + * The list of organization IDs to search within. + * To find your organization ID, follow the steps from + * [Creating and managing organizations] + * (/resource-manager/docs/creating-managing-organization). + * + * Generated from protobuf field repeated string include_org_ids = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIncludeOrgIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->include_org_ids = $arr; + + return $this; + } + + /** + * The list of project IDs to search within. + * For more information on the distinction between project names, IDs, and + * numbers, see [Projects](/docs/overview/#projects). + * + * Generated from protobuf field repeated string include_project_ids = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIncludeProjectIds() + { + return $this->include_project_ids; + } + + /** + * The list of project IDs to search within. + * For more information on the distinction between project names, IDs, and + * numbers, see [Projects](/docs/overview/#projects). + * + * Generated from protobuf field repeated string include_project_ids = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIncludeProjectIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->include_project_ids = $arr; + + return $this; + } + + /** + * If `true`, include Google Cloud public datasets in + * search results. By default, they are excluded. + * See [Google Cloud Public Datasets](/public-datasets) for more + * information. + * + * Generated from protobuf field bool include_gcp_public_datasets = 7; + * @return bool + */ + public function getIncludeGcpPublicDatasets() + { + return $this->include_gcp_public_datasets; + } + + /** + * If `true`, include Google Cloud public datasets in + * search results. By default, they are excluded. + * See [Google Cloud Public Datasets](/public-datasets) for more + * information. + * + * Generated from protobuf field bool include_gcp_public_datasets = 7; + * @param bool $var + * @return $this + */ + public function setIncludeGcpPublicDatasets($var) + { + GPBUtil::checkBool($var); + $this->include_gcp_public_datasets = $var; + + return $this; + } + + /** + * Optional. The list of locations to search within. If empty, all locations + * are searched. + * Returns an error if any location in the list isn't one of the [Supported + * regions](https://cloud.google.com/data-catalog/docs/concepts/regions#supported_regions). + * If a location is unreachable, its name is returned in the + * `SearchCatalogResponse.unreachable` field. To get additional information + * on the error, repeat the search request and set the location name as the + * value of this parameter. + * + * Generated from protobuf field repeated string restricted_locations = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRestrictedLocations() + { + return $this->restricted_locations; + } + + /** + * Optional. The list of locations to search within. If empty, all locations + * are searched. + * Returns an error if any location in the list isn't one of the [Supported + * regions](https://cloud.google.com/data-catalog/docs/concepts/regions#supported_regions). + * If a location is unreachable, its name is returned in the + * `SearchCatalogResponse.unreachable` field. To get additional information + * on the error, repeat the search request and set the location name as the + * value of this parameter. + * + * Generated from protobuf field repeated string restricted_locations = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRestrictedLocations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->restricted_locations = $arr; + + return $this; + } + + /** + * Optional. If `true`, search only among starred entries. + * By default, all results are returned, starred or not. + * + * Generated from protobuf field bool starred_only = 18 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getStarredOnly() + { + return $this->starred_only; + } + + /** + * Optional. If `true`, search only among starred entries. + * By default, all results are returned, starred or not. + * + * Generated from protobuf field bool starred_only = 18 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setStarredOnly($var) + { + GPBUtil::checkBool($var); + $this->starred_only = $var; + + return $this; + } + + /** + * Optional. This field is deprecated. The search mechanism for public and + * private tag templates is the same. + * + * Generated from protobuf field bool include_public_tag_templates = 19 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @return bool + * @deprecated + */ + public function getIncludePublicTagTemplates() + { + @trigger_error('include_public_tag_templates is deprecated.', E_USER_DEPRECATED); + return $this->include_public_tag_templates; + } + + /** + * Optional. This field is deprecated. The search mechanism for public and + * private tag templates is the same. + * + * Generated from protobuf field bool include_public_tag_templates = 19 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + * @deprecated + */ + public function setIncludePublicTagTemplates($var) + { + @trigger_error('include_public_tag_templates is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkBool($var); + $this->include_public_tag_templates = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Scope::class, \Google\Cloud\DataCatalog\V1\SearchCatalogRequest_Scope::class); + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SearchCatalogResponse.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SearchCatalogResponse.php new file mode 100644 index 000000000000..bb2e4e0c3c8a --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SearchCatalogResponse.php @@ -0,0 +1,190 @@ +google.cloud.datacatalog.v1.SearchCatalogResponse + */ +class SearchCatalogResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Search results. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.SearchCatalogResult results = 1; + */ + private $results; + /** + * The approximate total number of entries matched by the query. + * + * Generated from protobuf field int32 total_size = 2; + */ + protected $total_size = 0; + /** + * Pagination token that can be used in subsequent calls to retrieve the next + * page of results. + * + * Generated from protobuf field string next_page_token = 3; + */ + protected $next_page_token = ''; + /** + * Unreachable locations. Search results don't include data from those + * locations. + * To get additional information on an error, repeat the search request and + * restrict it to specific locations by setting the + * `SearchCatalogRequest.scope.restricted_locations` parameter. + * + * Generated from protobuf field repeated string unreachable = 6; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\DataCatalog\V1\SearchCatalogResult>|\Google\Protobuf\Internal\RepeatedField $results + * Search results. + * @type int $total_size + * The approximate total number of entries matched by the query. + * @type string $next_page_token + * Pagination token that can be used in subsequent calls to retrieve the next + * page of results. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Unreachable locations. Search results don't include data from those + * locations. + * To get additional information on an error, repeat the search request and + * restrict it to specific locations by setting the + * `SearchCatalogRequest.scope.restricted_locations` parameter. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * Search results. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.SearchCatalogResult results = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResults() + { + return $this->results; + } + + /** + * Search results. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.SearchCatalogResult results = 1; + * @param array<\Google\Cloud\DataCatalog\V1\SearchCatalogResult>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DataCatalog\V1\SearchCatalogResult::class); + $this->results = $arr; + + return $this; + } + + /** + * The approximate total number of entries matched by the query. + * + * Generated from protobuf field int32 total_size = 2; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * The approximate total number of entries matched by the query. + * + * Generated from protobuf field int32 total_size = 2; + * @param int $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt32($var); + $this->total_size = $var; + + return $this; + } + + /** + * Pagination token that can be used in subsequent calls to retrieve the next + * page of results. + * + * Generated from protobuf field string next_page_token = 3; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Pagination token that can be used in subsequent calls to retrieve the next + * page of results. + * + * Generated from protobuf field string next_page_token = 3; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Unreachable locations. Search results don't include data from those + * locations. + * To get additional information on an error, repeat the search request and + * restrict it to specific locations by setting the + * `SearchCatalogRequest.scope.restricted_locations` parameter. + * + * Generated from protobuf field repeated string unreachable = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Unreachable locations. Search results don't include data from those + * locations. + * To get additional information on an error, repeat the search request and + * restrict it to specific locations by setting the + * `SearchCatalogRequest.scope.restricted_locations` parameter. + * + * Generated from protobuf field repeated string unreachable = 6; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SearchCatalogResult.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SearchCatalogResult.php new file mode 100644 index 000000000000..3e4c505fd6a7 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SearchCatalogResult.php @@ -0,0 +1,474 @@ +google.cloud.datacatalog.v1.SearchCatalogResult + */ +class SearchCatalogResult extends \Google\Protobuf\Internal\Message +{ + /** + * Type of the search result. + * You can use this field to determine which get method to call to fetch the + * full resource. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.SearchResultType search_result_type = 1; + */ + protected $search_result_type = 0; + /** + * Sub-type of the search result. + * A dot-delimited full type of the resource. The same type you + * specify in the `type` search predicate. + * Examples: `entry.table`, `entry.dataStream`, `tagTemplate`. + * + * Generated from protobuf field string search_result_subtype = 2; + */ + protected $search_result_subtype = ''; + /** + * The relative name of the resource in URL format. + * Examples: + * * `projects/{PROJECT_ID}/locations/{LOCATION_ID}/entryGroups/{ENTRY_GROUP_ID}/entries/{ENTRY_ID}` + * * `projects/{PROJECT_ID}/tagTemplates/{TAG_TEMPLATE_ID}` + * + * Generated from protobuf field string relative_resource_name = 3; + */ + protected $relative_resource_name = ''; + /** + * The full name of the Google Cloud resource the entry belongs to. + * For more information, see [Full Resource Name] + * (/apis/design/resource_names#full_resource_name). + * Example: + * `//bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID` + * + * Generated from protobuf field string linked_resource = 4; + */ + protected $linked_resource = ''; + /** + * The last modification timestamp of the entry in the source system. + * + * Generated from protobuf field .google.protobuf.Timestamp modify_time = 7; + */ + protected $modify_time = null; + /** + * Fully qualified name (FQN) of the resource. + * FQNs take two forms: + * * For non-regionalized resources: + * `{SYSTEM}:{PROJECT}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}` + * * For regionalized resources: + * `{SYSTEM}:{PROJECT}.{LOCATION_ID}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}` + * Example for a DPMS table: + * `dataproc_metastore:PROJECT_ID.LOCATION_ID.INSTANCE_ID.DATABASE_ID.TABLE_ID` + * + * Generated from protobuf field string fully_qualified_name = 10; + */ + protected $fully_qualified_name = ''; + /** + * The display name of the result. + * + * Generated from protobuf field string display_name = 12; + */ + protected $display_name = ''; + /** + * Entry description that can consist of several sentences or paragraphs that + * describe entry contents. + * + * Generated from protobuf field string description = 13; + */ + protected $description = ''; + protected $system; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $search_result_type + * Type of the search result. + * You can use this field to determine which get method to call to fetch the + * full resource. + * @type string $search_result_subtype + * Sub-type of the search result. + * A dot-delimited full type of the resource. The same type you + * specify in the `type` search predicate. + * Examples: `entry.table`, `entry.dataStream`, `tagTemplate`. + * @type string $relative_resource_name + * The relative name of the resource in URL format. + * Examples: + * * `projects/{PROJECT_ID}/locations/{LOCATION_ID}/entryGroups/{ENTRY_GROUP_ID}/entries/{ENTRY_ID}` + * * `projects/{PROJECT_ID}/tagTemplates/{TAG_TEMPLATE_ID}` + * @type string $linked_resource + * The full name of the Google Cloud resource the entry belongs to. + * For more information, see [Full Resource Name] + * (/apis/design/resource_names#full_resource_name). + * Example: + * `//bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID` + * @type \Google\Protobuf\Timestamp $modify_time + * The last modification timestamp of the entry in the source system. + * @type int $integrated_system + * Output only. The source system that Data Catalog automatically integrates + * with, such as BigQuery, Cloud Pub/Sub, or Dataproc Metastore. + * @type string $user_specified_system + * Custom source system that you can manually integrate Data Catalog with. + * @type string $fully_qualified_name + * Fully qualified name (FQN) of the resource. + * FQNs take two forms: + * * For non-regionalized resources: + * `{SYSTEM}:{PROJECT}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}` + * * For regionalized resources: + * `{SYSTEM}:{PROJECT}.{LOCATION_ID}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}` + * Example for a DPMS table: + * `dataproc_metastore:PROJECT_ID.LOCATION_ID.INSTANCE_ID.DATABASE_ID.TABLE_ID` + * @type string $display_name + * The display name of the result. + * @type string $description + * Entry description that can consist of several sentences or paragraphs that + * describe entry contents. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Search::initOnce(); + parent::__construct($data); + } + + /** + * Type of the search result. + * You can use this field to determine which get method to call to fetch the + * full resource. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.SearchResultType search_result_type = 1; + * @return int + */ + public function getSearchResultType() + { + return $this->search_result_type; + } + + /** + * Type of the search result. + * You can use this field to determine which get method to call to fetch the + * full resource. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.SearchResultType search_result_type = 1; + * @param int $var + * @return $this + */ + public function setSearchResultType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DataCatalog\V1\SearchResultType::class); + $this->search_result_type = $var; + + return $this; + } + + /** + * Sub-type of the search result. + * A dot-delimited full type of the resource. The same type you + * specify in the `type` search predicate. + * Examples: `entry.table`, `entry.dataStream`, `tagTemplate`. + * + * Generated from protobuf field string search_result_subtype = 2; + * @return string + */ + public function getSearchResultSubtype() + { + return $this->search_result_subtype; + } + + /** + * Sub-type of the search result. + * A dot-delimited full type of the resource. The same type you + * specify in the `type` search predicate. + * Examples: `entry.table`, `entry.dataStream`, `tagTemplate`. + * + * Generated from protobuf field string search_result_subtype = 2; + * @param string $var + * @return $this + */ + public function setSearchResultSubtype($var) + { + GPBUtil::checkString($var, True); + $this->search_result_subtype = $var; + + return $this; + } + + /** + * The relative name of the resource in URL format. + * Examples: + * * `projects/{PROJECT_ID}/locations/{LOCATION_ID}/entryGroups/{ENTRY_GROUP_ID}/entries/{ENTRY_ID}` + * * `projects/{PROJECT_ID}/tagTemplates/{TAG_TEMPLATE_ID}` + * + * Generated from protobuf field string relative_resource_name = 3; + * @return string + */ + public function getRelativeResourceName() + { + return $this->relative_resource_name; + } + + /** + * The relative name of the resource in URL format. + * Examples: + * * `projects/{PROJECT_ID}/locations/{LOCATION_ID}/entryGroups/{ENTRY_GROUP_ID}/entries/{ENTRY_ID}` + * * `projects/{PROJECT_ID}/tagTemplates/{TAG_TEMPLATE_ID}` + * + * Generated from protobuf field string relative_resource_name = 3; + * @param string $var + * @return $this + */ + public function setRelativeResourceName($var) + { + GPBUtil::checkString($var, True); + $this->relative_resource_name = $var; + + return $this; + } + + /** + * The full name of the Google Cloud resource the entry belongs to. + * For more information, see [Full Resource Name] + * (/apis/design/resource_names#full_resource_name). + * Example: + * `//bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID` + * + * Generated from protobuf field string linked_resource = 4; + * @return string + */ + public function getLinkedResource() + { + return $this->linked_resource; + } + + /** + * The full name of the Google Cloud resource the entry belongs to. + * For more information, see [Full Resource Name] + * (/apis/design/resource_names#full_resource_name). + * Example: + * `//bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID` + * + * Generated from protobuf field string linked_resource = 4; + * @param string $var + * @return $this + */ + public function setLinkedResource($var) + { + GPBUtil::checkString($var, True); + $this->linked_resource = $var; + + return $this; + } + + /** + * The last modification timestamp of the entry in the source system. + * + * Generated from protobuf field .google.protobuf.Timestamp modify_time = 7; + * @return \Google\Protobuf\Timestamp|null + */ + public function getModifyTime() + { + return $this->modify_time; + } + + public function hasModifyTime() + { + return isset($this->modify_time); + } + + public function clearModifyTime() + { + unset($this->modify_time); + } + + /** + * The last modification timestamp of the entry in the source system. + * + * Generated from protobuf field .google.protobuf.Timestamp modify_time = 7; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setModifyTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->modify_time = $var; + + return $this; + } + + /** + * Output only. The source system that Data Catalog automatically integrates + * with, such as BigQuery, Cloud Pub/Sub, or Dataproc Metastore. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.IntegratedSystem integrated_system = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getIntegratedSystem() + { + return $this->readOneof(8); + } + + public function hasIntegratedSystem() + { + return $this->hasOneof(8); + } + + /** + * Output only. The source system that Data Catalog automatically integrates + * with, such as BigQuery, Cloud Pub/Sub, or Dataproc Metastore. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.IntegratedSystem integrated_system = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setIntegratedSystem($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DataCatalog\V1\IntegratedSystem::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * Custom source system that you can manually integrate Data Catalog with. + * + * Generated from protobuf field string user_specified_system = 9; + * @return string + */ + public function getUserSpecifiedSystem() + { + return $this->readOneof(9); + } + + public function hasUserSpecifiedSystem() + { + return $this->hasOneof(9); + } + + /** + * Custom source system that you can manually integrate Data Catalog with. + * + * Generated from protobuf field string user_specified_system = 9; + * @param string $var + * @return $this + */ + public function setUserSpecifiedSystem($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * Fully qualified name (FQN) of the resource. + * FQNs take two forms: + * * For non-regionalized resources: + * `{SYSTEM}:{PROJECT}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}` + * * For regionalized resources: + * `{SYSTEM}:{PROJECT}.{LOCATION_ID}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}` + * Example for a DPMS table: + * `dataproc_metastore:PROJECT_ID.LOCATION_ID.INSTANCE_ID.DATABASE_ID.TABLE_ID` + * + * Generated from protobuf field string fully_qualified_name = 10; + * @return string + */ + public function getFullyQualifiedName() + { + return $this->fully_qualified_name; + } + + /** + * Fully qualified name (FQN) of the resource. + * FQNs take two forms: + * * For non-regionalized resources: + * `{SYSTEM}:{PROJECT}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}` + * * For regionalized resources: + * `{SYSTEM}:{PROJECT}.{LOCATION_ID}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}` + * Example for a DPMS table: + * `dataproc_metastore:PROJECT_ID.LOCATION_ID.INSTANCE_ID.DATABASE_ID.TABLE_ID` + * + * Generated from protobuf field string fully_qualified_name = 10; + * @param string $var + * @return $this + */ + public function setFullyQualifiedName($var) + { + GPBUtil::checkString($var, True); + $this->fully_qualified_name = $var; + + return $this; + } + + /** + * The display name of the result. + * + * Generated from protobuf field string display_name = 12; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The display name of the result. + * + * Generated from protobuf field string display_name = 12; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Entry description that can consist of several sentences or paragraphs that + * describe entry contents. + * + * Generated from protobuf field string description = 13; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Entry description that can consist of several sentences or paragraphs that + * describe entry contents. + * + * Generated from protobuf field string description = 13; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * @return string + */ + public function getSystem() + { + return $this->whichOneof("system"); + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SearchResultType.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SearchResultType.php new file mode 100644 index 000000000000..e388bd8d63d1 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SearchResultType.php @@ -0,0 +1,68 @@ +google.cloud.datacatalog.v1.SearchResultType + */ +class SearchResultType +{ + /** + * Default unknown type. + * + * Generated from protobuf enum SEARCH_RESULT_TYPE_UNSPECIFIED = 0; + */ + const SEARCH_RESULT_TYPE_UNSPECIFIED = 0; + /** + * An [Entry][google.cloud.datacatalog.v1.Entry]. + * + * Generated from protobuf enum ENTRY = 1; + */ + const ENTRY = 1; + /** + * A [TagTemplate][google.cloud.datacatalog.v1.TagTemplate]. + * + * Generated from protobuf enum TAG_TEMPLATE = 2; + */ + const TAG_TEMPLATE = 2; + /** + * An [EntryGroup][google.cloud.datacatalog.v1.EntryGroup]. + * + * Generated from protobuf enum ENTRY_GROUP = 3; + */ + const ENTRY_GROUP = 3; + + private static $valueToName = [ + self::SEARCH_RESULT_TYPE_UNSPECIFIED => 'SEARCH_RESULT_TYPE_UNSPECIFIED', + self::ENTRY => 'ENTRY', + self::TAG_TEMPLATE => 'TAG_TEMPLATE', + self::ENTRY_GROUP => 'ENTRY_GROUP', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SerializedPolicyTag.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SerializedPolicyTag.php new file mode 100644 index 000000000000..aeeefe02d21f --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SerializedPolicyTag.php @@ -0,0 +1,186 @@ +google.cloud.datacatalog.v1.SerializedPolicyTag + */ +class SerializedPolicyTag extends \Google\Protobuf\Internal\Message +{ + /** + * Resource name of the policy tag. + * This field is ignored when calling `ImportTaxonomies`. + * + * Generated from protobuf field string policy_tag = 1; + */ + protected $policy_tag = ''; + /** + * Required. Display name of the policy tag. At most 200 bytes when encoded + * in UTF-8. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * Description of the serialized policy tag. At most + * 2000 bytes when encoded in UTF-8. If not set, defaults to an + * empty description. + * + * Generated from protobuf field string description = 3; + */ + protected $description = ''; + /** + * Children of the policy tag, if any. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.SerializedPolicyTag child_policy_tags = 4; + */ + private $child_policy_tags; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $policy_tag + * Resource name of the policy tag. + * This field is ignored when calling `ImportTaxonomies`. + * @type string $display_name + * Required. Display name of the policy tag. At most 200 bytes when encoded + * in UTF-8. + * @type string $description + * Description of the serialized policy tag. At most + * 2000 bytes when encoded in UTF-8. If not set, defaults to an + * empty description. + * @type array<\Google\Cloud\DataCatalog\V1\SerializedPolicyTag>|\Google\Protobuf\Internal\RepeatedField $child_policy_tags + * Children of the policy tag, if any. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Policytagmanagerserialization::initOnce(); + parent::__construct($data); + } + + /** + * Resource name of the policy tag. + * This field is ignored when calling `ImportTaxonomies`. + * + * Generated from protobuf field string policy_tag = 1; + * @return string + */ + public function getPolicyTag() + { + return $this->policy_tag; + } + + /** + * Resource name of the policy tag. + * This field is ignored when calling `ImportTaxonomies`. + * + * Generated from protobuf field string policy_tag = 1; + * @param string $var + * @return $this + */ + public function setPolicyTag($var) + { + GPBUtil::checkString($var, True); + $this->policy_tag = $var; + + return $this; + } + + /** + * Required. Display name of the policy tag. At most 200 bytes when encoded + * in UTF-8. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. Display name of the policy tag. At most 200 bytes when encoded + * in UTF-8. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Description of the serialized policy tag. At most + * 2000 bytes when encoded in UTF-8. If not set, defaults to an + * empty description. + * + * Generated from protobuf field string description = 3; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Description of the serialized policy tag. At most + * 2000 bytes when encoded in UTF-8. If not set, defaults to an + * empty description. + * + * Generated from protobuf field string description = 3; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Children of the policy tag, if any. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.SerializedPolicyTag child_policy_tags = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getChildPolicyTags() + { + return $this->child_policy_tags; + } + + /** + * Children of the policy tag, if any. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.SerializedPolicyTag child_policy_tags = 4; + * @param array<\Google\Cloud\DataCatalog\V1\SerializedPolicyTag>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setChildPolicyTags($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DataCatalog\V1\SerializedPolicyTag::class); + $this->child_policy_tags = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SerializedTaxonomy.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SerializedTaxonomy.php new file mode 100644 index 000000000000..f8186a5ec8bb --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SerializedTaxonomy.php @@ -0,0 +1,179 @@ +google.cloud.datacatalog.v1.SerializedTaxonomy + */ +class SerializedTaxonomy extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Display name of the taxonomy. At most 200 bytes when encoded in + * UTF-8. + * + * Generated from protobuf field string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * Description of the serialized taxonomy. At most 2000 bytes when + * encoded in UTF-8. If not set, defaults to an empty description. + * + * Generated from protobuf field string description = 2; + */ + protected $description = ''; + /** + * Top level policy tags associated with the taxonomy, if any. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.SerializedPolicyTag policy_tags = 3; + */ + private $policy_tags; + /** + * A list of policy types that are activated per taxonomy. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 4; + */ + private $activated_policy_types; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $display_name + * Required. Display name of the taxonomy. At most 200 bytes when encoded in + * UTF-8. + * @type string $description + * Description of the serialized taxonomy. At most 2000 bytes when + * encoded in UTF-8. If not set, defaults to an empty description. + * @type array<\Google\Cloud\DataCatalog\V1\SerializedPolicyTag>|\Google\Protobuf\Internal\RepeatedField $policy_tags + * Top level policy tags associated with the taxonomy, if any. + * @type array|\Google\Protobuf\Internal\RepeatedField $activated_policy_types + * A list of policy types that are activated per taxonomy. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Policytagmanagerserialization::initOnce(); + parent::__construct($data); + } + + /** + * Required. Display name of the taxonomy. At most 200 bytes when encoded in + * UTF-8. + * + * Generated from protobuf field string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. Display name of the taxonomy. At most 200 bytes when encoded in + * UTF-8. + * + * Generated from protobuf field string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Description of the serialized taxonomy. At most 2000 bytes when + * encoded in UTF-8. If not set, defaults to an empty description. + * + * Generated from protobuf field string description = 2; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Description of the serialized taxonomy. At most 2000 bytes when + * encoded in UTF-8. If not set, defaults to an empty description. + * + * Generated from protobuf field string description = 2; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Top level policy tags associated with the taxonomy, if any. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.SerializedPolicyTag policy_tags = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPolicyTags() + { + return $this->policy_tags; + } + + /** + * Top level policy tags associated with the taxonomy, if any. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.SerializedPolicyTag policy_tags = 3; + * @param array<\Google\Cloud\DataCatalog\V1\SerializedPolicyTag>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPolicyTags($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DataCatalog\V1\SerializedPolicyTag::class); + $this->policy_tags = $arr; + + return $this; + } + + /** + * A list of policy types that are activated per taxonomy. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getActivatedPolicyTypes() + { + return $this->activated_policy_types; + } + + /** + * A list of policy types that are activated per taxonomy. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 4; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setActivatedPolicyTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\DataCatalog\V1\Taxonomy\PolicyType::class); + $this->activated_policy_types = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ServiceSpec.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ServiceSpec.php new file mode 100644 index 000000000000..8fbbf96c1866 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ServiceSpec.php @@ -0,0 +1,79 @@ +google.cloud.datacatalog.v1.ServiceSpec + */ +class ServiceSpec extends \Google\Protobuf\Internal\Message +{ + protected $system_spec; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DataCatalog\V1\CloudBigtableInstanceSpec $cloud_bigtable_instance_spec + * Specification that applies to Instance entries of `CLOUD_BIGTABLE` + * system. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * Specification that applies to Instance entries of `CLOUD_BIGTABLE` + * system. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.CloudBigtableInstanceSpec cloud_bigtable_instance_spec = 1; + * @return \Google\Cloud\DataCatalog\V1\CloudBigtableInstanceSpec|null + */ + public function getCloudBigtableInstanceSpec() + { + return $this->readOneof(1); + } + + public function hasCloudBigtableInstanceSpec() + { + return $this->hasOneof(1); + } + + /** + * Specification that applies to Instance entries of `CLOUD_BIGTABLE` + * system. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.CloudBigtableInstanceSpec cloud_bigtable_instance_spec = 1; + * @param \Google\Cloud\DataCatalog\V1\CloudBigtableInstanceSpec $var + * @return $this + */ + public function setCloudBigtableInstanceSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\CloudBigtableInstanceSpec::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getSystemSpec() + { + return $this->whichOneof("system_spec"); + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SqlDatabaseSystemSpec.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SqlDatabaseSystemSpec.php new file mode 100644 index 000000000000..86661c30183d --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SqlDatabaseSystemSpec.php @@ -0,0 +1,197 @@ +google.cloud.datacatalog.v1.SqlDatabaseSystemSpec + */ +class SqlDatabaseSystemSpec extends \Google\Protobuf\Internal\Message +{ + /** + * SQL Database Engine. + * enum SqlEngine { + * UNDEFINED = 0; + * MY_SQL = 1; + * POSTGRE_SQL = 2; + * SQL_SERVER = 3; + * } + * Engine of the enclosing database instance. + * + * Generated from protobuf field string sql_engine = 1; + */ + protected $sql_engine = ''; + /** + * Version of the database engine. + * + * Generated from protobuf field string database_version = 2; + */ + protected $database_version = ''; + /** + * Host of the SQL database + * enum InstanceHost { + * UNDEFINED = 0; + * SELF_HOSTED = 1; + * CLOUD_SQL = 2; + * AMAZON_RDS = 3; + * AZURE_SQL = 4; + * } + * Host of the enclousing database instance. + * + * Generated from protobuf field string instance_host = 3; + */ + protected $instance_host = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $sql_engine + * SQL Database Engine. + * enum SqlEngine { + * UNDEFINED = 0; + * MY_SQL = 1; + * POSTGRE_SQL = 2; + * SQL_SERVER = 3; + * } + * Engine of the enclosing database instance. + * @type string $database_version + * Version of the database engine. + * @type string $instance_host + * Host of the SQL database + * enum InstanceHost { + * UNDEFINED = 0; + * SELF_HOSTED = 1; + * CLOUD_SQL = 2; + * AMAZON_RDS = 3; + * AZURE_SQL = 4; + * } + * Host of the enclousing database instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * SQL Database Engine. + * enum SqlEngine { + * UNDEFINED = 0; + * MY_SQL = 1; + * POSTGRE_SQL = 2; + * SQL_SERVER = 3; + * } + * Engine of the enclosing database instance. + * + * Generated from protobuf field string sql_engine = 1; + * @return string + */ + public function getSqlEngine() + { + return $this->sql_engine; + } + + /** + * SQL Database Engine. + * enum SqlEngine { + * UNDEFINED = 0; + * MY_SQL = 1; + * POSTGRE_SQL = 2; + * SQL_SERVER = 3; + * } + * Engine of the enclosing database instance. + * + * Generated from protobuf field string sql_engine = 1; + * @param string $var + * @return $this + */ + public function setSqlEngine($var) + { + GPBUtil::checkString($var, True); + $this->sql_engine = $var; + + return $this; + } + + /** + * Version of the database engine. + * + * Generated from protobuf field string database_version = 2; + * @return string + */ + public function getDatabaseVersion() + { + return $this->database_version; + } + + /** + * Version of the database engine. + * + * Generated from protobuf field string database_version = 2; + * @param string $var + * @return $this + */ + public function setDatabaseVersion($var) + { + GPBUtil::checkString($var, True); + $this->database_version = $var; + + return $this; + } + + /** + * Host of the SQL database + * enum InstanceHost { + * UNDEFINED = 0; + * SELF_HOSTED = 1; + * CLOUD_SQL = 2; + * AMAZON_RDS = 3; + * AZURE_SQL = 4; + * } + * Host of the enclousing database instance. + * + * Generated from protobuf field string instance_host = 3; + * @return string + */ + public function getInstanceHost() + { + return $this->instance_host; + } + + /** + * Host of the SQL database + * enum InstanceHost { + * UNDEFINED = 0; + * SELF_HOSTED = 1; + * CLOUD_SQL = 2; + * AMAZON_RDS = 3; + * AZURE_SQL = 4; + * } + * Host of the enclousing database instance. + * + * Generated from protobuf field string instance_host = 3; + * @param string $var + * @return $this + */ + public function setInstanceHost($var) + { + GPBUtil::checkString($var, True); + $this->instance_host = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/StarEntryRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/StarEntryRequest.php new file mode 100644 index 000000000000..53f0422fc6a5 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/StarEntryRequest.php @@ -0,0 +1,82 @@ +google.cloud.datacatalog.v1.StarEntryRequest + */ +class StarEntryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the entry to mark as starred. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the entry to mark as starred. Please see + * {@see DataCatalogClient::entryName()} for help formatting this field. + * + * @return \Google\Cloud\DataCatalog\V1\StarEntryRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the entry to mark as starred. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the entry to mark as starred. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the entry to mark as starred. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/StarEntryResponse.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/StarEntryResponse.php new file mode 100644 index 000000000000..b54212bdfbf4 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/StarEntryResponse.php @@ -0,0 +1,35 @@ +google.cloud.datacatalog.v1.StarEntryResponse + */ +class StarEntryResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/StorageProperties.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/StorageProperties.php new file mode 100644 index 000000000000..f750dbc3b49a --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/StorageProperties.php @@ -0,0 +1,169 @@ +google.cloud.datacatalog.v1.StorageProperties + */ +class StorageProperties extends \Google\Protobuf\Internal\Message +{ + /** + * Patterns to identify a set of files for this fileset. + * Examples of a valid `file_pattern`: + * * `gs://bucket_name/dir/*`: matches all files in the `bucket_name/dir` + * directory + * * `gs://bucket_name/dir/**`: matches all files in the `bucket_name/dir` + * and all subdirectories recursively + * * `gs://bucket_name/file*`: matches files prefixed by `file` in + * `bucket_name` + * * `gs://bucket_name/??.txt`: matches files with two characters followed by + * `.txt` in `bucket_name` + * * `gs://bucket_name/[aeiou].txt`: matches files that contain a single + * vowel character followed by `.txt` in + * `bucket_name` + * * `gs://bucket_name/[a-m].txt`: matches files that contain `a`, `b`, ... + * or `m` followed by `.txt` in `bucket_name` + * * `gs://bucket_name/a/*/b`: matches all files in `bucket_name` that match + * the `a/*/b` pattern, such as `a/c/b`, `a/d/b` + * * `gs://another_bucket/a.txt`: matches `gs://another_bucket/a.txt` + * + * Generated from protobuf field repeated string file_pattern = 1; + */ + private $file_pattern; + /** + * File type in MIME format, for example, `text/plain`. + * + * Generated from protobuf field string file_type = 2; + */ + protected $file_type = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $file_pattern + * Patterns to identify a set of files for this fileset. + * Examples of a valid `file_pattern`: + * * `gs://bucket_name/dir/*`: matches all files in the `bucket_name/dir` + * directory + * * `gs://bucket_name/dir/**`: matches all files in the `bucket_name/dir` + * and all subdirectories recursively + * * `gs://bucket_name/file*`: matches files prefixed by `file` in + * `bucket_name` + * * `gs://bucket_name/??.txt`: matches files with two characters followed by + * `.txt` in `bucket_name` + * * `gs://bucket_name/[aeiou].txt`: matches files that contain a single + * vowel character followed by `.txt` in + * `bucket_name` + * * `gs://bucket_name/[a-m].txt`: matches files that contain `a`, `b`, ... + * or `m` followed by `.txt` in `bucket_name` + * * `gs://bucket_name/a/*/b`: matches all files in `bucket_name` that match + * the `a/*/b` pattern, such as `a/c/b`, `a/d/b` + * * `gs://another_bucket/a.txt`: matches `gs://another_bucket/a.txt` + * @type string $file_type + * File type in MIME format, for example, `text/plain`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\DataSource::initOnce(); + parent::__construct($data); + } + + /** + * Patterns to identify a set of files for this fileset. + * Examples of a valid `file_pattern`: + * * `gs://bucket_name/dir/*`: matches all files in the `bucket_name/dir` + * directory + * * `gs://bucket_name/dir/**`: matches all files in the `bucket_name/dir` + * and all subdirectories recursively + * * `gs://bucket_name/file*`: matches files prefixed by `file` in + * `bucket_name` + * * `gs://bucket_name/??.txt`: matches files with two characters followed by + * `.txt` in `bucket_name` + * * `gs://bucket_name/[aeiou].txt`: matches files that contain a single + * vowel character followed by `.txt` in + * `bucket_name` + * * `gs://bucket_name/[a-m].txt`: matches files that contain `a`, `b`, ... + * or `m` followed by `.txt` in `bucket_name` + * * `gs://bucket_name/a/*/b`: matches all files in `bucket_name` that match + * the `a/*/b` pattern, such as `a/c/b`, `a/d/b` + * * `gs://another_bucket/a.txt`: matches `gs://another_bucket/a.txt` + * + * Generated from protobuf field repeated string file_pattern = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFilePattern() + { + return $this->file_pattern; + } + + /** + * Patterns to identify a set of files for this fileset. + * Examples of a valid `file_pattern`: + * * `gs://bucket_name/dir/*`: matches all files in the `bucket_name/dir` + * directory + * * `gs://bucket_name/dir/**`: matches all files in the `bucket_name/dir` + * and all subdirectories recursively + * * `gs://bucket_name/file*`: matches files prefixed by `file` in + * `bucket_name` + * * `gs://bucket_name/??.txt`: matches files with two characters followed by + * `.txt` in `bucket_name` + * * `gs://bucket_name/[aeiou].txt`: matches files that contain a single + * vowel character followed by `.txt` in + * `bucket_name` + * * `gs://bucket_name/[a-m].txt`: matches files that contain `a`, `b`, ... + * or `m` followed by `.txt` in `bucket_name` + * * `gs://bucket_name/a/*/b`: matches all files in `bucket_name` that match + * the `a/*/b` pattern, such as `a/c/b`, `a/d/b` + * * `gs://another_bucket/a.txt`: matches `gs://another_bucket/a.txt` + * + * Generated from protobuf field repeated string file_pattern = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFilePattern($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->file_pattern = $arr; + + return $this; + } + + /** + * File type in MIME format, for example, `text/plain`. + * + * Generated from protobuf field string file_type = 2; + * @return string + */ + public function getFileType() + { + return $this->file_type; + } + + /** + * File type in MIME format, for example, `text/plain`. + * + * Generated from protobuf field string file_type = 2; + * @param string $var + * @return $this + */ + public function setFileType($var) + { + GPBUtil::checkString($var, True); + $this->file_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SystemTimestamps.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SystemTimestamps.php new file mode 100644 index 000000000000..bdc1c3c65b38 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SystemTimestamps.php @@ -0,0 +1,189 @@ +google.cloud.datacatalog.v1.SystemTimestamps + */ +class SystemTimestamps extends \Google\Protobuf\Internal\Message +{ + /** + * Creation timestamp of the resource within the given system. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + */ + protected $create_time = null; + /** + * Timestamp of the last modification of the resource or its metadata within + * a given system. + * Note: Depending on the source system, not every modification updates this + * timestamp. + * For example, BigQuery timestamps every metadata modification but not data + * or permission changes. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; + */ + protected $update_time = null; + /** + * Output only. Expiration timestamp of the resource within the given system. + * Currently only applicable to BigQuery resources. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $expire_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * Creation timestamp of the resource within the given system. + * @type \Google\Protobuf\Timestamp $update_time + * Timestamp of the last modification of the resource or its metadata within + * a given system. + * Note: Depending on the source system, not every modification updates this + * timestamp. + * For example, BigQuery timestamps every metadata modification but not data + * or permission changes. + * @type \Google\Protobuf\Timestamp $expire_time + * Output only. Expiration timestamp of the resource within the given system. + * Currently only applicable to BigQuery resources. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Timestamps::initOnce(); + parent::__construct($data); + } + + /** + * Creation timestamp of the resource within the given system. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Creation timestamp of the resource within the given system. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Timestamp of the last modification of the resource or its metadata within + * a given system. + * Note: Depending on the source system, not every modification updates this + * timestamp. + * For example, BigQuery timestamps every metadata modification but not data + * or permission changes. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Timestamp of the last modification of the resource or its metadata within + * a given system. + * Note: Depending on the source system, not every modification updates this + * timestamp. + * For example, BigQuery timestamps every metadata modification but not data + * or permission changes. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. Expiration timestamp of the resource within the given system. + * Currently only applicable to BigQuery resources. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getExpireTime() + { + return $this->expire_time; + } + + public function hasExpireTime() + { + return isset($this->expire_time); + } + + public function clearExpireTime() + { + unset($this->expire_time); + } + + /** + * Output only. Expiration timestamp of the resource within the given system. + * Currently only applicable to BigQuery resources. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setExpireTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->expire_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/TableSourceType.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/TableSourceType.php new file mode 100644 index 000000000000..071a61c144cd --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/TableSourceType.php @@ -0,0 +1,68 @@ +google.cloud.datacatalog.v1.TableSourceType + */ +class TableSourceType +{ + /** + * Default unknown type. + * + * Generated from protobuf enum TABLE_SOURCE_TYPE_UNSPECIFIED = 0; + */ + const TABLE_SOURCE_TYPE_UNSPECIFIED = 0; + /** + * Table view. + * + * Generated from protobuf enum BIGQUERY_VIEW = 2; + */ + const BIGQUERY_VIEW = 2; + /** + * BigQuery native table. + * + * Generated from protobuf enum BIGQUERY_TABLE = 5; + */ + const BIGQUERY_TABLE = 5; + /** + * BigQuery materialized view. + * + * Generated from protobuf enum BIGQUERY_MATERIALIZED_VIEW = 7; + */ + const BIGQUERY_MATERIALIZED_VIEW = 7; + + private static $valueToName = [ + self::TABLE_SOURCE_TYPE_UNSPECIFIED => 'TABLE_SOURCE_TYPE_UNSPECIFIED', + self::BIGQUERY_VIEW => 'BIGQUERY_VIEW', + self::BIGQUERY_TABLE => 'BIGQUERY_TABLE', + self::BIGQUERY_MATERIALIZED_VIEW => 'BIGQUERY_MATERIALIZED_VIEW', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/TableSpec.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/TableSpec.php new file mode 100644 index 000000000000..79f7f99856fc --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/TableSpec.php @@ -0,0 +1,83 @@ +google.cloud.datacatalog.v1.TableSpec + */ +class TableSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. If the table is date-sharded, that is, it matches the + * `[prefix]YYYYMMDD` name pattern, this field is the Data Catalog resource + * name of the date-sharded grouped entry. For example: + * `projects/{PROJECT_ID}/locations/{LOCATION}/entrygroups/{ENTRY_GROUP_ID}/entries/{ENTRY_ID}`. + * Otherwise, `grouped_entry` is empty. + * + * Generated from protobuf field string grouped_entry = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $grouped_entry = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $grouped_entry + * Output only. If the table is date-sharded, that is, it matches the + * `[prefix]YYYYMMDD` name pattern, this field is the Data Catalog resource + * name of the date-sharded grouped entry. For example: + * `projects/{PROJECT_ID}/locations/{LOCATION}/entrygroups/{ENTRY_GROUP_ID}/entries/{ENTRY_ID}`. + * Otherwise, `grouped_entry` is empty. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\TableSpec::initOnce(); + parent::__construct($data); + } + + /** + * Output only. If the table is date-sharded, that is, it matches the + * `[prefix]YYYYMMDD` name pattern, this field is the Data Catalog resource + * name of the date-sharded grouped entry. For example: + * `projects/{PROJECT_ID}/locations/{LOCATION}/entrygroups/{ENTRY_GROUP_ID}/entries/{ENTRY_ID}`. + * Otherwise, `grouped_entry` is empty. + * + * Generated from protobuf field string grouped_entry = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getGroupedEntry() + { + return $this->grouped_entry; + } + + /** + * Output only. If the table is date-sharded, that is, it matches the + * `[prefix]YYYYMMDD` name pattern, this field is the Data Catalog resource + * name of the date-sharded grouped entry. For example: + * `projects/{PROJECT_ID}/locations/{LOCATION}/entrygroups/{ENTRY_GROUP_ID}/entries/{ENTRY_ID}`. + * Otherwise, `grouped_entry` is empty. + * + * Generated from protobuf field string grouped_entry = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setGroupedEntry($var) + { + GPBUtil::checkString($var, True); + $this->grouped_entry = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Tag.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Tag.php new file mode 100644 index 000000000000..54e7f6197639 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Tag.php @@ -0,0 +1,256 @@ +google.cloud.datacatalog.v1.Tag + */ +class Tag extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the tag in URL format where tag ID is a + * system-generated identifier. + * Note: The tag itself might not be stored in the location specified in its + * name. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Required. The resource name of the tag template this tag uses. Example: + * `projects/{PROJECT_ID}/locations/{LOCATION}/tagTemplates/{TAG_TEMPLATE_ID}` + * This field cannot be modified after creation. + * + * Generated from protobuf field string template = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $template = ''; + /** + * Output only. The display name of the tag template. + * + * Generated from protobuf field string template_display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $template_display_name = ''; + /** + * Required. Maps the ID of a tag field to its value and additional + * information about that field. + * Tag template defines valid field IDs. A tag + * must have at least 1 field and at most 500 fields. + * + * Generated from protobuf field map fields = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + private $fields; + protected $scope; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the tag in URL format where tag ID is a + * system-generated identifier. + * Note: The tag itself might not be stored in the location specified in its + * name. + * @type string $template + * Required. The resource name of the tag template this tag uses. Example: + * `projects/{PROJECT_ID}/locations/{LOCATION}/tagTemplates/{TAG_TEMPLATE_ID}` + * This field cannot be modified after creation. + * @type string $template_display_name + * Output only. The display name of the tag template. + * @type string $column + * Resources like entry can have schemas associated with them. This scope + * allows you to attach tags to an individual column based on that schema. + * To attach a tag to a nested column, separate column names with a dot + * (`.`). Example: `column.nested_column`. + * @type array|\Google\Protobuf\Internal\MapField $fields + * Required. Maps the ID of a tag field to its value and additional + * information about that field. + * Tag template defines valid field IDs. A tag + * must have at least 1 field and at most 500 fields. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Tags::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the tag in URL format where tag ID is a + * system-generated identifier. + * Note: The tag itself might not be stored in the location specified in its + * name. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the tag in URL format where tag ID is a + * system-generated identifier. + * Note: The tag itself might not be stored in the location specified in its + * name. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The resource name of the tag template this tag uses. Example: + * `projects/{PROJECT_ID}/locations/{LOCATION}/tagTemplates/{TAG_TEMPLATE_ID}` + * This field cannot be modified after creation. + * + * Generated from protobuf field string template = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTemplate() + { + return $this->template; + } + + /** + * Required. The resource name of the tag template this tag uses. Example: + * `projects/{PROJECT_ID}/locations/{LOCATION}/tagTemplates/{TAG_TEMPLATE_ID}` + * This field cannot be modified after creation. + * + * Generated from protobuf field string template = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTemplate($var) + { + GPBUtil::checkString($var, True); + $this->template = $var; + + return $this; + } + + /** + * Output only. The display name of the tag template. + * + * Generated from protobuf field string template_display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getTemplateDisplayName() + { + return $this->template_display_name; + } + + /** + * Output only. The display name of the tag template. + * + * Generated from protobuf field string template_display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setTemplateDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->template_display_name = $var; + + return $this; + } + + /** + * Resources like entry can have schemas associated with them. This scope + * allows you to attach tags to an individual column based on that schema. + * To attach a tag to a nested column, separate column names with a dot + * (`.`). Example: `column.nested_column`. + * + * Generated from protobuf field string column = 4; + * @return string + */ + public function getColumn() + { + return $this->readOneof(4); + } + + public function hasColumn() + { + return $this->hasOneof(4); + } + + /** + * Resources like entry can have schemas associated with them. This scope + * allows you to attach tags to an individual column based on that schema. + * To attach a tag to a nested column, separate column names with a dot + * (`.`). Example: `column.nested_column`. + * + * Generated from protobuf field string column = 4; + * @param string $var + * @return $this + */ + public function setColumn($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Required. Maps the ID of a tag field to its value and additional + * information about that field. + * Tag template defines valid field IDs. A tag + * must have at least 1 field and at most 500 fields. + * + * Generated from protobuf field map fields = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getFields() + { + return $this->fields; + } + + /** + * Required. Maps the ID of a tag field to its value and additional + * information about that field. + * Tag template defines valid field IDs. A tag + * must have at least 1 field and at most 500 fields. + * + * Generated from protobuf field map fields = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setFields($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DataCatalog\V1\TagField::class); + $this->fields = $arr; + + return $this; + } + + /** + * @return string + */ + public function getScope() + { + return $this->whichOneof("scope"); + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/TagField.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/TagField.php new file mode 100644 index 000000000000..560ede287e87 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/TagField.php @@ -0,0 +1,344 @@ +google.cloud.datacatalog.v1.TagField + */ +class TagField extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The display name of this field. + * + * Generated from protobuf field string display_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $display_name = ''; + /** + * Output only. The order of this field with respect to other fields in this + * tag. Can be set by + * [Tag][google.cloud.datacatalog.v1.TagTemplateField.order]. + * For example, a higher value can indicate a more important field. + * The value can be negative. Multiple fields can have the same order, and + * field orders within a tag don't have to be sequential. + * + * Generated from protobuf field int32 order = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $order = 0; + protected $kind; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $display_name + * Output only. The display name of this field. + * @type float $double_value + * The value of a tag field with a double type. + * @type string $string_value + * The value of a tag field with a string type. + * The maximum length is 2000 UTF-8 characters. + * @type bool $bool_value + * The value of a tag field with a boolean type. + * @type \Google\Protobuf\Timestamp $timestamp_value + * The value of a tag field with a timestamp type. + * @type \Google\Cloud\DataCatalog\V1\TagField\EnumValue $enum_value + * The value of a tag field with an enum type. + * This value must be one of the allowed values listed in this enum. + * @type string $richtext_value + * The value of a tag field with a rich text type. + * The maximum length is 10 MiB as this value holds HTML descriptions + * including encoded images. The maximum length of the text without images + * is 100 KiB. + * @type int $order + * Output only. The order of this field with respect to other fields in this + * tag. Can be set by + * [Tag][google.cloud.datacatalog.v1.TagTemplateField.order]. + * For example, a higher value can indicate a more important field. + * The value can be negative. Multiple fields can have the same order, and + * field orders within a tag don't have to be sequential. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Tags::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The display name of this field. + * + * Generated from protobuf field string display_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Output only. The display name of this field. + * + * Generated from protobuf field string display_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * The value of a tag field with a double type. + * + * Generated from protobuf field double double_value = 2; + * @return float + */ + public function getDoubleValue() + { + return $this->readOneof(2); + } + + public function hasDoubleValue() + { + return $this->hasOneof(2); + } + + /** + * The value of a tag field with a double type. + * + * Generated from protobuf field double double_value = 2; + * @param float $var + * @return $this + */ + public function setDoubleValue($var) + { + GPBUtil::checkDouble($var); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * The value of a tag field with a string type. + * The maximum length is 2000 UTF-8 characters. + * + * Generated from protobuf field string string_value = 3; + * @return string + */ + public function getStringValue() + { + return $this->readOneof(3); + } + + public function hasStringValue() + { + return $this->hasOneof(3); + } + + /** + * The value of a tag field with a string type. + * The maximum length is 2000 UTF-8 characters. + * + * Generated from protobuf field string string_value = 3; + * @param string $var + * @return $this + */ + public function setStringValue($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * The value of a tag field with a boolean type. + * + * Generated from protobuf field bool bool_value = 4; + * @return bool + */ + public function getBoolValue() + { + return $this->readOneof(4); + } + + public function hasBoolValue() + { + return $this->hasOneof(4); + } + + /** + * The value of a tag field with a boolean type. + * + * Generated from protobuf field bool bool_value = 4; + * @param bool $var + * @return $this + */ + public function setBoolValue($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * The value of a tag field with a timestamp type. + * + * Generated from protobuf field .google.protobuf.Timestamp timestamp_value = 5; + * @return \Google\Protobuf\Timestamp|null + */ + public function getTimestampValue() + { + return $this->readOneof(5); + } + + public function hasTimestampValue() + { + return $this->hasOneof(5); + } + + /** + * The value of a tag field with a timestamp type. + * + * Generated from protobuf field .google.protobuf.Timestamp timestamp_value = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setTimestampValue($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * The value of a tag field with an enum type. + * This value must be one of the allowed values listed in this enum. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.TagField.EnumValue enum_value = 6; + * @return \Google\Cloud\DataCatalog\V1\TagField\EnumValue|null + */ + public function getEnumValue() + { + return $this->readOneof(6); + } + + public function hasEnumValue() + { + return $this->hasOneof(6); + } + + /** + * The value of a tag field with an enum type. + * This value must be one of the allowed values listed in this enum. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.TagField.EnumValue enum_value = 6; + * @param \Google\Cloud\DataCatalog\V1\TagField\EnumValue $var + * @return $this + */ + public function setEnumValue($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\TagField\EnumValue::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * The value of a tag field with a rich text type. + * The maximum length is 10 MiB as this value holds HTML descriptions + * including encoded images. The maximum length of the text without images + * is 100 KiB. + * + * Generated from protobuf field string richtext_value = 8; + * @return string + */ + public function getRichtextValue() + { + return $this->readOneof(8); + } + + public function hasRichtextValue() + { + return $this->hasOneof(8); + } + + /** + * The value of a tag field with a rich text type. + * The maximum length is 10 MiB as this value holds HTML descriptions + * including encoded images. The maximum length of the text without images + * is 100 KiB. + * + * Generated from protobuf field string richtext_value = 8; + * @param string $var + * @return $this + */ + public function setRichtextValue($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * Output only. The order of this field with respect to other fields in this + * tag. Can be set by + * [Tag][google.cloud.datacatalog.v1.TagTemplateField.order]. + * For example, a higher value can indicate a more important field. + * The value can be negative. Multiple fields can have the same order, and + * field orders within a tag don't have to be sequential. + * + * Generated from protobuf field int32 order = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getOrder() + { + return $this->order; + } + + /** + * Output only. The order of this field with respect to other fields in this + * tag. Can be set by + * [Tag][google.cloud.datacatalog.v1.TagTemplateField.order]. + * For example, a higher value can indicate a more important field. + * The value can be negative. Multiple fields can have the same order, and + * field orders within a tag don't have to be sequential. + * + * Generated from protobuf field int32 order = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setOrder($var) + { + GPBUtil::checkInt32($var); + $this->order = $var; + + return $this; + } + + /** + * @return string + */ + public function getKind() + { + return $this->whichOneof("kind"); + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/TagField/EnumValue.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/TagField/EnumValue.php new file mode 100644 index 000000000000..e2a3a5f748aa --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/TagField/EnumValue.php @@ -0,0 +1,70 @@ +google.cloud.datacatalog.v1.TagField.EnumValue + */ +class EnumValue extends \Google\Protobuf\Internal\Message +{ + /** + * The display name of the enum value. + * + * Generated from protobuf field string display_name = 1; + */ + protected $display_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $display_name + * The display name of the enum value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Tags::initOnce(); + parent::__construct($data); + } + + /** + * The display name of the enum value. + * + * Generated from protobuf field string display_name = 1; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The display name of the enum value. + * + * Generated from protobuf field string display_name = 1; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(EnumValue::class, \Google\Cloud\DataCatalog\V1\TagField_EnumValue::class); + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/TagTemplate.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/TagTemplate.php new file mode 100644 index 000000000000..af1412783557 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/TagTemplate.php @@ -0,0 +1,244 @@ +google.cloud.datacatalog.v1.TagTemplate + */ +class TagTemplate extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the tag template in URL format. + * Note: The tag template itself and its child resources might not be + * stored in the location specified in its name. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Display name for this template. Defaults to an empty string. + * The name must contain only Unicode letters, numbers (0-9), underscores (_), + * dashes (-), spaces ( ), and can't start or end with spaces. + * The maximum length is 200 characters. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * Indicates whether tags created with this template are public. Public tags + * do not require tag template access to appear in + * [ListTags][google.cloud.datacatalog.v1.ListTags] API response. + * Additionally, you can search for a public tag by value with a + * simple search query in addition to using a ``tag:`` predicate. + * + * Generated from protobuf field bool is_publicly_readable = 5; + */ + protected $is_publicly_readable = false; + /** + * Required. Map of tag template field IDs to the settings for the field. + * This map is an exhaustive list of the allowed fields. The map must contain + * at least one field and at most 500 fields. + * The keys to this map are tag template field IDs. The IDs have the + * following limitations: + * * Can contain uppercase and lowercase letters, numbers (0-9) and + * underscores (_). + * * Must be at least 1 character and at most 64 characters long. + * * Must start with a letter or underscore. + * + * Generated from protobuf field map fields = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + private $fields; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the tag template in URL format. + * Note: The tag template itself and its child resources might not be + * stored in the location specified in its name. + * @type string $display_name + * Display name for this template. Defaults to an empty string. + * The name must contain only Unicode letters, numbers (0-9), underscores (_), + * dashes (-), spaces ( ), and can't start or end with spaces. + * The maximum length is 200 characters. + * @type bool $is_publicly_readable + * Indicates whether tags created with this template are public. Public tags + * do not require tag template access to appear in + * [ListTags][google.cloud.datacatalog.v1.ListTags] API response. + * Additionally, you can search for a public tag by value with a + * simple search query in addition to using a ``tag:`` predicate. + * @type array|\Google\Protobuf\Internal\MapField $fields + * Required. Map of tag template field IDs to the settings for the field. + * This map is an exhaustive list of the allowed fields. The map must contain + * at least one field and at most 500 fields. + * The keys to this map are tag template field IDs. The IDs have the + * following limitations: + * * Can contain uppercase and lowercase letters, numbers (0-9) and + * underscores (_). + * * Must be at least 1 character and at most 64 characters long. + * * Must start with a letter or underscore. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Tags::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the tag template in URL format. + * Note: The tag template itself and its child resources might not be + * stored in the location specified in its name. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the tag template in URL format. + * Note: The tag template itself and its child resources might not be + * stored in the location specified in its name. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Display name for this template. Defaults to an empty string. + * The name must contain only Unicode letters, numbers (0-9), underscores (_), + * dashes (-), spaces ( ), and can't start or end with spaces. + * The maximum length is 200 characters. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Display name for this template. Defaults to an empty string. + * The name must contain only Unicode letters, numbers (0-9), underscores (_), + * dashes (-), spaces ( ), and can't start or end with spaces. + * The maximum length is 200 characters. + * + * Generated from protobuf field string display_name = 2; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Indicates whether tags created with this template are public. Public tags + * do not require tag template access to appear in + * [ListTags][google.cloud.datacatalog.v1.ListTags] API response. + * Additionally, you can search for a public tag by value with a + * simple search query in addition to using a ``tag:`` predicate. + * + * Generated from protobuf field bool is_publicly_readable = 5; + * @return bool + */ + public function getIsPubliclyReadable() + { + return $this->is_publicly_readable; + } + + /** + * Indicates whether tags created with this template are public. Public tags + * do not require tag template access to appear in + * [ListTags][google.cloud.datacatalog.v1.ListTags] API response. + * Additionally, you can search for a public tag by value with a + * simple search query in addition to using a ``tag:`` predicate. + * + * Generated from protobuf field bool is_publicly_readable = 5; + * @param bool $var + * @return $this + */ + public function setIsPubliclyReadable($var) + { + GPBUtil::checkBool($var); + $this->is_publicly_readable = $var; + + return $this; + } + + /** + * Required. Map of tag template field IDs to the settings for the field. + * This map is an exhaustive list of the allowed fields. The map must contain + * at least one field and at most 500 fields. + * The keys to this map are tag template field IDs. The IDs have the + * following limitations: + * * Can contain uppercase and lowercase letters, numbers (0-9) and + * underscores (_). + * * Must be at least 1 character and at most 64 characters long. + * * Must start with a letter or underscore. + * + * Generated from protobuf field map fields = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getFields() + { + return $this->fields; + } + + /** + * Required. Map of tag template field IDs to the settings for the field. + * This map is an exhaustive list of the allowed fields. The map must contain + * at least one field and at most 500 fields. + * The keys to this map are tag template field IDs. The IDs have the + * following limitations: + * * Can contain uppercase and lowercase letters, numbers (0-9) and + * underscores (_). + * * Must be at least 1 character and at most 64 characters long. + * * Must start with a letter or underscore. + * + * Generated from protobuf field map fields = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setFields($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DataCatalog\V1\TagTemplateField::class); + $this->fields = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/TagTemplateField.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/TagTemplateField.php new file mode 100644 index 000000000000..679ab457c1d9 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/TagTemplateField.php @@ -0,0 +1,303 @@ +google.cloud.datacatalog.v1.TagTemplateField + */ +class TagTemplateField extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of the tag template field in URL format. + * Example: + * `projects/{PROJECT_ID}/locations/{LOCATION}/tagTemplates/{TAG_TEMPLATE}/fields/{FIELD}` + * Note: The tag template field itself might not be stored in the location + * specified in its name. + * The name must contain only letters (a-z, A-Z), numbers (0-9), + * or underscores (_), and must start with a letter or underscore. + * The maximum length is 64 characters. + * + * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * The display name for this field. Defaults to an empty string. + * The name must contain only Unicode letters, numbers (0-9), underscores (_), + * dashes (-), spaces ( ), and can't start or end with spaces. + * The maximum length is 200 characters. + * + * Generated from protobuf field string display_name = 1; + */ + protected $display_name = ''; + /** + * Required. The type of value this tag field can contain. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.FieldType type = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $type = null; + /** + * If true, this field is required. Defaults to false. + * + * Generated from protobuf field bool is_required = 3; + */ + protected $is_required = false; + /** + * The description for this field. Defaults to an empty string. + * + * Generated from protobuf field string description = 4; + */ + protected $description = ''; + /** + * The order of this field with respect to other fields in this tag + * template. + * For example, a higher value can indicate a more important field. + * The value can be negative. Multiple fields can have the same order and + * field orders within a tag don't have to be sequential. + * + * Generated from protobuf field int32 order = 5; + */ + protected $order = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name of the tag template field in URL format. + * Example: + * `projects/{PROJECT_ID}/locations/{LOCATION}/tagTemplates/{TAG_TEMPLATE}/fields/{FIELD}` + * Note: The tag template field itself might not be stored in the location + * specified in its name. + * The name must contain only letters (a-z, A-Z), numbers (0-9), + * or underscores (_), and must start with a letter or underscore. + * The maximum length is 64 characters. + * @type string $display_name + * The display name for this field. Defaults to an empty string. + * The name must contain only Unicode letters, numbers (0-9), underscores (_), + * dashes (-), spaces ( ), and can't start or end with spaces. + * The maximum length is 200 characters. + * @type \Google\Cloud\DataCatalog\V1\FieldType $type + * Required. The type of value this tag field can contain. + * @type bool $is_required + * If true, this field is required. Defaults to false. + * @type string $description + * The description for this field. Defaults to an empty string. + * @type int $order + * The order of this field with respect to other fields in this tag + * template. + * For example, a higher value can indicate a more important field. + * The value can be negative. Multiple fields can have the same order and + * field orders within a tag don't have to be sequential. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Tags::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name of the tag template field in URL format. + * Example: + * `projects/{PROJECT_ID}/locations/{LOCATION}/tagTemplates/{TAG_TEMPLATE}/fields/{FIELD}` + * Note: The tag template field itself might not be stored in the location + * specified in its name. + * The name must contain only letters (a-z, A-Z), numbers (0-9), + * or underscores (_), and must start with a letter or underscore. + * The maximum length is 64 characters. + * + * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The resource name of the tag template field in URL format. + * Example: + * `projects/{PROJECT_ID}/locations/{LOCATION}/tagTemplates/{TAG_TEMPLATE}/fields/{FIELD}` + * Note: The tag template field itself might not be stored in the location + * specified in its name. + * The name must contain only letters (a-z, A-Z), numbers (0-9), + * or underscores (_), and must start with a letter or underscore. + * The maximum length is 64 characters. + * + * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The display name for this field. Defaults to an empty string. + * The name must contain only Unicode letters, numbers (0-9), underscores (_), + * dashes (-), spaces ( ), and can't start or end with spaces. + * The maximum length is 200 characters. + * + * Generated from protobuf field string display_name = 1; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The display name for this field. Defaults to an empty string. + * The name must contain only Unicode letters, numbers (0-9), underscores (_), + * dashes (-), spaces ( ), and can't start or end with spaces. + * The maximum length is 200 characters. + * + * Generated from protobuf field string display_name = 1; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Required. The type of value this tag field can contain. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.FieldType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\DataCatalog\V1\FieldType|null + */ + public function getType() + { + return $this->type; + } + + public function hasType() + { + return isset($this->type); + } + + public function clearType() + { + unset($this->type); + } + + /** + * Required. The type of value this tag field can contain. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.FieldType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\DataCatalog\V1\FieldType $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\FieldType::class); + $this->type = $var; + + return $this; + } + + /** + * If true, this field is required. Defaults to false. + * + * Generated from protobuf field bool is_required = 3; + * @return bool + */ + public function getIsRequired() + { + return $this->is_required; + } + + /** + * If true, this field is required. Defaults to false. + * + * Generated from protobuf field bool is_required = 3; + * @param bool $var + * @return $this + */ + public function setIsRequired($var) + { + GPBUtil::checkBool($var); + $this->is_required = $var; + + return $this; + } + + /** + * The description for this field. Defaults to an empty string. + * + * Generated from protobuf field string description = 4; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * The description for this field. Defaults to an empty string. + * + * Generated from protobuf field string description = 4; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * The order of this field with respect to other fields in this tag + * template. + * For example, a higher value can indicate a more important field. + * The value can be negative. Multiple fields can have the same order and + * field orders within a tag don't have to be sequential. + * + * Generated from protobuf field int32 order = 5; + * @return int + */ + public function getOrder() + { + return $this->order; + } + + /** + * The order of this field with respect to other fields in this tag + * template. + * For example, a higher value can indicate a more important field. + * The value can be negative. Multiple fields can have the same order and + * field orders within a tag don't have to be sequential. + * + * Generated from protobuf field int32 order = 5; + * @param int $var + * @return $this + */ + public function setOrder($var) + { + GPBUtil::checkInt32($var); + $this->order = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/TaggedEntry.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/TaggedEntry.php new file mode 100644 index 000000000000..4145479ad46e --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/TaggedEntry.php @@ -0,0 +1,152 @@ +google.cloud.datacatalog.v1.TaggedEntry + */ +class TaggedEntry extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Tags that should be ingested into the Data Catalog. + * Caller should populate template name, column and fields. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Tag present_tags = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $present_tags; + /** + * Optional. Tags that should be deleted from the Data Catalog. + * Caller should populate template name and column only. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Tag absent_tags = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $absent_tags; + protected $entry; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DataCatalog\V1\Entry $v1_entry + * Non-encrypted Data Catalog v1 Entry. + * @type array<\Google\Cloud\DataCatalog\V1\Tag>|\Google\Protobuf\Internal\RepeatedField $present_tags + * Optional. Tags that should be ingested into the Data Catalog. + * Caller should populate template name, column and fields. + * @type array<\Google\Cloud\DataCatalog\V1\Tag>|\Google\Protobuf\Internal\RepeatedField $absent_tags + * Optional. Tags that should be deleted from the Data Catalog. + * Caller should populate template name and column only. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\DumpContent::initOnce(); + parent::__construct($data); + } + + /** + * Non-encrypted Data Catalog v1 Entry. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.Entry v1_entry = 1; + * @return \Google\Cloud\DataCatalog\V1\Entry|null + */ + public function getV1Entry() + { + return $this->readOneof(1); + } + + public function hasV1Entry() + { + return $this->hasOneof(1); + } + + /** + * Non-encrypted Data Catalog v1 Entry. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.Entry v1_entry = 1; + * @param \Google\Cloud\DataCatalog\V1\Entry $var + * @return $this + */ + public function setV1Entry($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\Entry::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Optional. Tags that should be ingested into the Data Catalog. + * Caller should populate template name, column and fields. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Tag present_tags = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPresentTags() + { + return $this->present_tags; + } + + /** + * Optional. Tags that should be ingested into the Data Catalog. + * Caller should populate template name, column and fields. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Tag present_tags = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\DataCatalog\V1\Tag>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPresentTags($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DataCatalog\V1\Tag::class); + $this->present_tags = $arr; + + return $this; + } + + /** + * Optional. Tags that should be deleted from the Data Catalog. + * Caller should populate template name and column only. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Tag absent_tags = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAbsentTags() + { + return $this->absent_tags; + } + + /** + * Optional. Tags that should be deleted from the Data Catalog. + * Caller should populate template name and column only. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Tag absent_tags = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\DataCatalog\V1\Tag>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAbsentTags($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DataCatalog\V1\Tag::class); + $this->absent_tags = $arr; + + return $this; + } + + /** + * @return string + */ + public function getEntry() + { + return $this->whichOneof("entry"); + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Taxonomy.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Taxonomy.php new file mode 100644 index 000000000000..681ffc410af8 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Taxonomy.php @@ -0,0 +1,354 @@ +google.cloud.datacatalog.v1.Taxonomy + */ +class Taxonomy extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Resource name of this taxonomy in URL format. + * Note: Policy tag manager generates unique taxonomy IDs. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Required. User-defined name of this taxonomy. + * The name can't start or end with spaces, must contain only Unicode letters, + * numbers, underscores, dashes, and spaces, and be at most 200 bytes long + * when encoded in UTF-8. + * The taxonomy display name must be unique within an organization. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * Optional. Description of this taxonomy. If not set, defaults to empty. + * The description must contain only Unicode characters, tabs, newlines, + * carriage returns, and page breaks, and be at most 2000 bytes long when + * encoded in UTF-8. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Output only. Number of policy tags in this taxonomy. + * + * Generated from protobuf field int32 policy_tag_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $policy_tag_count = 0; + /** + * Output only. Creation and modification timestamps of this taxonomy. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.SystemTimestamps taxonomy_timestamps = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $taxonomy_timestamps = null; + /** + * Optional. A list of policy types that are activated for this taxonomy. If + * not set, defaults to an empty list. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $activated_policy_types; + /** + * Output only. Identity of the service which owns the Taxonomy. This field is + * only populated when the taxonomy is created by a Google Cloud service. + * Currently only 'DATAPLEX' is supported. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.Taxonomy.Service service = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $service = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. Resource name of this taxonomy in URL format. + * Note: Policy tag manager generates unique taxonomy IDs. + * @type string $display_name + * Required. User-defined name of this taxonomy. + * The name can't start or end with spaces, must contain only Unicode letters, + * numbers, underscores, dashes, and spaces, and be at most 200 bytes long + * when encoded in UTF-8. + * The taxonomy display name must be unique within an organization. + * @type string $description + * Optional. Description of this taxonomy. If not set, defaults to empty. + * The description must contain only Unicode characters, tabs, newlines, + * carriage returns, and page breaks, and be at most 2000 bytes long when + * encoded in UTF-8. + * @type int $policy_tag_count + * Output only. Number of policy tags in this taxonomy. + * @type \Google\Cloud\DataCatalog\V1\SystemTimestamps $taxonomy_timestamps + * Output only. Creation and modification timestamps of this taxonomy. + * @type array|\Google\Protobuf\Internal\RepeatedField $activated_policy_types + * Optional. A list of policy types that are activated for this taxonomy. If + * not set, defaults to an empty list. + * @type \Google\Cloud\DataCatalog\V1\Taxonomy\Service $service + * Output only. Identity of the service which owns the Taxonomy. This field is + * only populated when the taxonomy is created by a Google Cloud service. + * Currently only 'DATAPLEX' is supported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Policytagmanager::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Resource name of this taxonomy in URL format. + * Note: Policy tag manager generates unique taxonomy IDs. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Resource name of this taxonomy in URL format. + * Note: Policy tag manager generates unique taxonomy IDs. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. User-defined name of this taxonomy. + * The name can't start or end with spaces, must contain only Unicode letters, + * numbers, underscores, dashes, and spaces, and be at most 200 bytes long + * when encoded in UTF-8. + * The taxonomy display name must be unique within an organization. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. User-defined name of this taxonomy. + * The name can't start or end with spaces, must contain only Unicode letters, + * numbers, underscores, dashes, and spaces, and be at most 200 bytes long + * when encoded in UTF-8. + * The taxonomy display name must be unique within an organization. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Optional. Description of this taxonomy. If not set, defaults to empty. + * The description must contain only Unicode characters, tabs, newlines, + * carriage returns, and page breaks, and be at most 2000 bytes long when + * encoded in UTF-8. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. Description of this taxonomy. If not set, defaults to empty. + * The description must contain only Unicode characters, tabs, newlines, + * carriage returns, and page breaks, and be at most 2000 bytes long when + * encoded in UTF-8. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. Number of policy tags in this taxonomy. + * + * Generated from protobuf field int32 policy_tag_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getPolicyTagCount() + { + return $this->policy_tag_count; + } + + /** + * Output only. Number of policy tags in this taxonomy. + * + * Generated from protobuf field int32 policy_tag_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setPolicyTagCount($var) + { + GPBUtil::checkInt32($var); + $this->policy_tag_count = $var; + + return $this; + } + + /** + * Output only. Creation and modification timestamps of this taxonomy. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.SystemTimestamps taxonomy_timestamps = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\DataCatalog\V1\SystemTimestamps|null + */ + public function getTaxonomyTimestamps() + { + return $this->taxonomy_timestamps; + } + + public function hasTaxonomyTimestamps() + { + return isset($this->taxonomy_timestamps); + } + + public function clearTaxonomyTimestamps() + { + unset($this->taxonomy_timestamps); + } + + /** + * Output only. Creation and modification timestamps of this taxonomy. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.SystemTimestamps taxonomy_timestamps = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\DataCatalog\V1\SystemTimestamps $var + * @return $this + */ + public function setTaxonomyTimestamps($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\SystemTimestamps::class); + $this->taxonomy_timestamps = $var; + + return $this; + } + + /** + * Optional. A list of policy types that are activated for this taxonomy. If + * not set, defaults to an empty list. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getActivatedPolicyTypes() + { + return $this->activated_policy_types; + } + + /** + * Optional. A list of policy types that are activated for this taxonomy. If + * not set, defaults to an empty list. + * + * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setActivatedPolicyTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\DataCatalog\V1\Taxonomy\PolicyType::class); + $this->activated_policy_types = $arr; + + return $this; + } + + /** + * Output only. Identity of the service which owns the Taxonomy. This field is + * only populated when the taxonomy is created by a Google Cloud service. + * Currently only 'DATAPLEX' is supported. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.Taxonomy.Service service = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\DataCatalog\V1\Taxonomy\Service|null + */ + public function getService() + { + return $this->service; + } + + public function hasService() + { + return isset($this->service); + } + + public function clearService() + { + unset($this->service); + } + + /** + * Output only. Identity of the service which owns the Taxonomy. This field is + * only populated when the taxonomy is created by a Google Cloud service. + * Currently only 'DATAPLEX' is supported. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.Taxonomy.Service service = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\DataCatalog\V1\Taxonomy\Service $var + * @return $this + */ + public function setService($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\Taxonomy\Service::class); + $this->service = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Taxonomy/PolicyType.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Taxonomy/PolicyType.php new file mode 100644 index 000000000000..45ad29d6aeac --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Taxonomy/PolicyType.php @@ -0,0 +1,58 @@ +google.cloud.datacatalog.v1.Taxonomy.PolicyType + */ +class PolicyType +{ + /** + * Unspecified policy type. + * + * Generated from protobuf enum POLICY_TYPE_UNSPECIFIED = 0; + */ + const POLICY_TYPE_UNSPECIFIED = 0; + /** + * Fine-grained access control policy that enables access control on + * tagged sub-resources. + * + * Generated from protobuf enum FINE_GRAINED_ACCESS_CONTROL = 1; + */ + const FINE_GRAINED_ACCESS_CONTROL = 1; + + private static $valueToName = [ + self::POLICY_TYPE_UNSPECIFIED => 'POLICY_TYPE_UNSPECIFIED', + self::FINE_GRAINED_ACCESS_CONTROL => 'FINE_GRAINED_ACCESS_CONTROL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PolicyType::class, \Google\Cloud\DataCatalog\V1\Taxonomy_PolicyType::class); + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Taxonomy/Service.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Taxonomy/Service.php new file mode 100644 index 000000000000..e7f275427ed8 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Taxonomy/Service.php @@ -0,0 +1,104 @@ +google.cloud.datacatalog.v1.Taxonomy.Service + */ +class Service extends \Google\Protobuf\Internal\Message +{ + /** + * The Google Cloud service name. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.ManagingSystem name = 1; + */ + protected $name = 0; + /** + * The service agent for the service. + * + * Generated from protobuf field string identity = 2; + */ + protected $identity = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $name + * The Google Cloud service name. + * @type string $identity + * The service agent for the service. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Policytagmanager::initOnce(); + parent::__construct($data); + } + + /** + * The Google Cloud service name. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.ManagingSystem name = 1; + * @return int + */ + public function getName() + { + return $this->name; + } + + /** + * The Google Cloud service name. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.ManagingSystem name = 1; + * @param int $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DataCatalog\V1\ManagingSystem::class); + $this->name = $var; + + return $this; + } + + /** + * The service agent for the service. + * + * Generated from protobuf field string identity = 2; + * @return string + */ + public function getIdentity() + { + return $this->identity; + } + + /** + * The service agent for the service. + * + * Generated from protobuf field string identity = 2; + * @param string $var + * @return $this + */ + public function setIdentity($var) + { + GPBUtil::checkString($var, True); + $this->identity = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Service::class, \Google\Cloud\DataCatalog\V1\Taxonomy_Service::class); + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UnstarEntryRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UnstarEntryRequest.php new file mode 100644 index 000000000000..df58071e2146 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UnstarEntryRequest.php @@ -0,0 +1,82 @@ +google.cloud.datacatalog.v1.UnstarEntryRequest + */ +class UnstarEntryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the entry to mark as **not** starred. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the entry to mark as **not** starred. Please see + * {@see DataCatalogClient::entryName()} for help formatting this field. + * + * @return \Google\Cloud\DataCatalog\V1\UnstarEntryRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the entry to mark as **not** starred. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the entry to mark as **not** starred. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the entry to mark as **not** starred. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UnstarEntryResponse.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UnstarEntryResponse.php new file mode 100644 index 000000000000..e3dd7087e4f6 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UnstarEntryResponse.php @@ -0,0 +1,35 @@ +google.cloud.datacatalog.v1.UnstarEntryResponse + */ +class UnstarEntryResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UpdateEntryGroupRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UpdateEntryGroupRequest.php new file mode 100644 index 000000000000..153557fc00c0 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UpdateEntryGroupRequest.php @@ -0,0 +1,166 @@ +google.cloud.datacatalog.v1.UpdateEntryGroupRequest + */ +class UpdateEntryGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Updates for the entry group. The `name` field must be set. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.EntryGroup entry_group = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $entry_group = null; + /** + * Names of fields whose values to overwrite on an entry group. + * If this parameter is absent or empty, all modifiable fields + * are overwritten. If such fields are non-required and omitted in the + * request body, their values are emptied. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\DataCatalog\V1\EntryGroup $entryGroup Required. Updates for the entry group. The `name` field must be set. + * + * @return \Google\Cloud\DataCatalog\V1\UpdateEntryGroupRequest + * + * @experimental + */ + public static function build(\Google\Cloud\DataCatalog\V1\EntryGroup $entryGroup): self + { + return (new self()) + ->setEntryGroup($entryGroup); + } + + /** + * @param \Google\Cloud\DataCatalog\V1\EntryGroup $entryGroup Required. Updates for the entry group. The `name` field must be set. + * @param \Google\Protobuf\FieldMask $updateMask Names of fields whose values to overwrite on an entry group. + * + * If this parameter is absent or empty, all modifiable fields + * are overwritten. If such fields are non-required and omitted in the + * request body, their values are emptied. + * + * @return \Google\Cloud\DataCatalog\V1\UpdateEntryGroupRequest + * + * @experimental + */ + public static function buildFromEntryGroupUpdateMask(\Google\Cloud\DataCatalog\V1\EntryGroup $entryGroup, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setEntryGroup($entryGroup) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DataCatalog\V1\EntryGroup $entry_group + * Required. Updates for the entry group. The `name` field must be set. + * @type \Google\Protobuf\FieldMask $update_mask + * Names of fields whose values to overwrite on an entry group. + * If this parameter is absent or empty, all modifiable fields + * are overwritten. If such fields are non-required and omitted in the + * request body, their values are emptied. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * Required. Updates for the entry group. The `name` field must be set. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.EntryGroup entry_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\DataCatalog\V1\EntryGroup|null + */ + public function getEntryGroup() + { + return $this->entry_group; + } + + public function hasEntryGroup() + { + return isset($this->entry_group); + } + + public function clearEntryGroup() + { + unset($this->entry_group); + } + + /** + * Required. Updates for the entry group. The `name` field must be set. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.EntryGroup entry_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\DataCatalog\V1\EntryGroup $var + * @return $this + */ + public function setEntryGroup($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\EntryGroup::class); + $this->entry_group = $var; + + return $this; + } + + /** + * Names of fields whose values to overwrite on an entry group. + * If this parameter is absent or empty, all modifiable fields + * are overwritten. If such fields are non-required and omitted in the + * request body, their values are emptied. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Names of fields whose values to overwrite on an entry group. + * If this parameter is absent or empty, all modifiable fields + * are overwritten. If such fields are non-required and omitted in the + * request body, their values are emptied. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UpdateEntryRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UpdateEntryRequest.php new file mode 100644 index 000000000000..c70ab4025380 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UpdateEntryRequest.php @@ -0,0 +1,258 @@ +google.cloud.datacatalog.v1.UpdateEntryRequest + */ +class UpdateEntryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Updates for the entry. The `name` field must be set. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.Entry entry = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $entry = null; + /** + * Names of fields whose values to overwrite on an entry. + * If this parameter is absent or empty, all modifiable fields + * are overwritten. If such fields are non-required and omitted in the + * request body, their values are emptied. + * You can modify only the fields listed below. + * For entries with type `DATA_STREAM`: + * * `schema` + * For entries with type `FILESET`: + * * `schema` + * * `display_name` + * * `description` + * * `gcs_fileset_spec` + * * `gcs_fileset_spec.file_patterns` + * For entries with `user_specified_type`: + * * `schema` + * * `display_name` + * * `description` + * * `user_specified_type` + * * `user_specified_system` + * * `linked_resource` + * * `source_system_timestamps` + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\DataCatalog\V1\Entry $entry Required. Updates for the entry. The `name` field must be set. + * + * @return \Google\Cloud\DataCatalog\V1\UpdateEntryRequest + * + * @experimental + */ + public static function build(\Google\Cloud\DataCatalog\V1\Entry $entry): self + { + return (new self()) + ->setEntry($entry); + } + + /** + * @param \Google\Cloud\DataCatalog\V1\Entry $entry Required. Updates for the entry. The `name` field must be set. + * @param \Google\Protobuf\FieldMask $updateMask Names of fields whose values to overwrite on an entry. + * + * If this parameter is absent or empty, all modifiable fields + * are overwritten. If such fields are non-required and omitted in the + * request body, their values are emptied. + * + * You can modify only the fields listed below. + * + * For entries with type `DATA_STREAM`: + * + * * `schema` + * + * For entries with type `FILESET`: + * + * * `schema` + * * `display_name` + * * `description` + * * `gcs_fileset_spec` + * * `gcs_fileset_spec.file_patterns` + * + * For entries with `user_specified_type`: + * + * * `schema` + * * `display_name` + * * `description` + * * `user_specified_type` + * * `user_specified_system` + * * `linked_resource` + * * `source_system_timestamps` + * + * @return \Google\Cloud\DataCatalog\V1\UpdateEntryRequest + * + * @experimental + */ + public static function buildFromEntryUpdateMask(\Google\Cloud\DataCatalog\V1\Entry $entry, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setEntry($entry) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DataCatalog\V1\Entry $entry + * Required. Updates for the entry. The `name` field must be set. + * @type \Google\Protobuf\FieldMask $update_mask + * Names of fields whose values to overwrite on an entry. + * If this parameter is absent or empty, all modifiable fields + * are overwritten. If such fields are non-required and omitted in the + * request body, their values are emptied. + * You can modify only the fields listed below. + * For entries with type `DATA_STREAM`: + * * `schema` + * For entries with type `FILESET`: + * * `schema` + * * `display_name` + * * `description` + * * `gcs_fileset_spec` + * * `gcs_fileset_spec.file_patterns` + * For entries with `user_specified_type`: + * * `schema` + * * `display_name` + * * `description` + * * `user_specified_type` + * * `user_specified_system` + * * `linked_resource` + * * `source_system_timestamps` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * Required. Updates for the entry. The `name` field must be set. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.Entry entry = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\DataCatalog\V1\Entry|null + */ + public function getEntry() + { + return $this->entry; + } + + public function hasEntry() + { + return isset($this->entry); + } + + public function clearEntry() + { + unset($this->entry); + } + + /** + * Required. Updates for the entry. The `name` field must be set. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.Entry entry = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\DataCatalog\V1\Entry $var + * @return $this + */ + public function setEntry($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\Entry::class); + $this->entry = $var; + + return $this; + } + + /** + * Names of fields whose values to overwrite on an entry. + * If this parameter is absent or empty, all modifiable fields + * are overwritten. If such fields are non-required and omitted in the + * request body, their values are emptied. + * You can modify only the fields listed below. + * For entries with type `DATA_STREAM`: + * * `schema` + * For entries with type `FILESET`: + * * `schema` + * * `display_name` + * * `description` + * * `gcs_fileset_spec` + * * `gcs_fileset_spec.file_patterns` + * For entries with `user_specified_type`: + * * `schema` + * * `display_name` + * * `description` + * * `user_specified_type` + * * `user_specified_system` + * * `linked_resource` + * * `source_system_timestamps` + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Names of fields whose values to overwrite on an entry. + * If this parameter is absent or empty, all modifiable fields + * are overwritten. If such fields are non-required and omitted in the + * request body, their values are emptied. + * You can modify only the fields listed below. + * For entries with type `DATA_STREAM`: + * * `schema` + * For entries with type `FILESET`: + * * `schema` + * * `display_name` + * * `description` + * * `gcs_fileset_spec` + * * `gcs_fileset_spec.file_patterns` + * For entries with `user_specified_type`: + * * `schema` + * * `display_name` + * * `description` + * * `user_specified_type` + * * `user_specified_system` + * * `linked_resource` + * * `source_system_timestamps` + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UpdatePolicyTagRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UpdatePolicyTagRequest.php new file mode 100644 index 000000000000..a51c4f876e53 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UpdatePolicyTagRequest.php @@ -0,0 +1,156 @@ +google.cloud.datacatalog.v1.UpdatePolicyTagRequest + */ +class UpdatePolicyTagRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The policy tag to update. You can update only its description, display + * name, and parent policy tag fields. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.PolicyTag policy_tag = 1; + */ + protected $policy_tag = null; + /** + * Specifies the fields to update. + * You can update only display name, description, and parent policy tag. + * If not set, defaults to all updatable fields. + * For more information, see [FieldMask] + * (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask). + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\DataCatalog\V1\PolicyTag $policyTag The policy tag to update. You can update only its description, display + * name, and parent policy tag fields. + * + * @return \Google\Cloud\DataCatalog\V1\UpdatePolicyTagRequest + * + * @experimental + */ + public static function build(\Google\Cloud\DataCatalog\V1\PolicyTag $policyTag): self + { + return (new self()) + ->setPolicyTag($policyTag); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DataCatalog\V1\PolicyTag $policy_tag + * The policy tag to update. You can update only its description, display + * name, and parent policy tag fields. + * @type \Google\Protobuf\FieldMask $update_mask + * Specifies the fields to update. + * You can update only display name, description, and parent policy tag. + * If not set, defaults to all updatable fields. + * For more information, see [FieldMask] + * (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Policytagmanager::initOnce(); + parent::__construct($data); + } + + /** + * The policy tag to update. You can update only its description, display + * name, and parent policy tag fields. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.PolicyTag policy_tag = 1; + * @return \Google\Cloud\DataCatalog\V1\PolicyTag|null + */ + public function getPolicyTag() + { + return $this->policy_tag; + } + + public function hasPolicyTag() + { + return isset($this->policy_tag); + } + + public function clearPolicyTag() + { + unset($this->policy_tag); + } + + /** + * The policy tag to update. You can update only its description, display + * name, and parent policy tag fields. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.PolicyTag policy_tag = 1; + * @param \Google\Cloud\DataCatalog\V1\PolicyTag $var + * @return $this + */ + public function setPolicyTag($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\PolicyTag::class); + $this->policy_tag = $var; + + return $this; + } + + /** + * Specifies the fields to update. + * You can update only display name, description, and parent policy tag. + * If not set, defaults to all updatable fields. + * For more information, see [FieldMask] + * (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask). + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Specifies the fields to update. + * You can update only display name, description, and parent policy tag. + * If not set, defaults to all updatable fields. + * For more information, see [FieldMask] + * (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask). + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UpdateTagRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UpdateTagRequest.php new file mode 100644 index 000000000000..3be100dbab9f --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UpdateTagRequest.php @@ -0,0 +1,171 @@ +google.cloud.datacatalog.v1.UpdateTagRequest + */ +class UpdateTagRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The updated tag. The "name" field must be set. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.Tag tag = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $tag = null; + /** + * Names of fields whose values to overwrite on a tag. Currently, a tag has + * the only modifiable field with the name `fields`. + * In general, if this parameter is absent or empty, all modifiable fields + * are overwritten. If such fields are non-required and omitted in the + * request body, their values are emptied. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\DataCatalog\V1\Tag $tag Required. The updated tag. The "name" field must be set. + * + * @return \Google\Cloud\DataCatalog\V1\UpdateTagRequest + * + * @experimental + */ + public static function build(\Google\Cloud\DataCatalog\V1\Tag $tag): self + { + return (new self()) + ->setTag($tag); + } + + /** + * @param \Google\Cloud\DataCatalog\V1\Tag $tag Required. The updated tag. The "name" field must be set. + * @param \Google\Protobuf\FieldMask $updateMask Names of fields whose values to overwrite on a tag. Currently, a tag has + * the only modifiable field with the name `fields`. + * + * In general, if this parameter is absent or empty, all modifiable fields + * are overwritten. If such fields are non-required and omitted in the + * request body, their values are emptied. + * + * @return \Google\Cloud\DataCatalog\V1\UpdateTagRequest + * + * @experimental + */ + public static function buildFromTagUpdateMask(\Google\Cloud\DataCatalog\V1\Tag $tag, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setTag($tag) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DataCatalog\V1\Tag $tag + * Required. The updated tag. The "name" field must be set. + * @type \Google\Protobuf\FieldMask $update_mask + * Names of fields whose values to overwrite on a tag. Currently, a tag has + * the only modifiable field with the name `fields`. + * In general, if this parameter is absent or empty, all modifiable fields + * are overwritten. If such fields are non-required and omitted in the + * request body, their values are emptied. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * Required. The updated tag. The "name" field must be set. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.Tag tag = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\DataCatalog\V1\Tag|null + */ + public function getTag() + { + return $this->tag; + } + + public function hasTag() + { + return isset($this->tag); + } + + public function clearTag() + { + unset($this->tag); + } + + /** + * Required. The updated tag. The "name" field must be set. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.Tag tag = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\DataCatalog\V1\Tag $var + * @return $this + */ + public function setTag($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\Tag::class); + $this->tag = $var; + + return $this; + } + + /** + * Names of fields whose values to overwrite on a tag. Currently, a tag has + * the only modifiable field with the name `fields`. + * In general, if this parameter is absent or empty, all modifiable fields + * are overwritten. If such fields are non-required and omitted in the + * request body, their values are emptied. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Names of fields whose values to overwrite on a tag. Currently, a tag has + * the only modifiable field with the name `fields`. + * In general, if this parameter is absent or empty, all modifiable fields + * are overwritten. If such fields are non-required and omitted in the + * request body, their values are emptied. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UpdateTagTemplateFieldRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UpdateTagTemplateFieldRequest.php new file mode 100644 index 000000000000..2886ab41f940 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UpdateTagTemplateFieldRequest.php @@ -0,0 +1,253 @@ +google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest + */ +class UpdateTagTemplateFieldRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the tag template field. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The template to update. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.TagTemplateField tag_template_field = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $tag_template_field = null; + /** + * Optional. Names of fields whose values to overwrite on an individual field + * of a tag template. The following fields are modifiable: + * * `display_name` + * * `type.enum_type` + * * `is_required` + * If this parameter is absent or empty, all modifiable fields + * are overwritten. If such fields are non-required and omitted in the request + * body, their values are emptied with one exception: when updating an enum + * type, the provided values are merged with the existing values. Therefore, + * enum values can only be added, existing enum values cannot be deleted or + * renamed. + * Additionally, updating a template field from optional to required is + * *not* allowed. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + + /** + * @param string $name Required. The name of the tag template field. Please see + * {@see DataCatalogClient::tagTemplateFieldName()} for help formatting this field. + * @param \Google\Cloud\DataCatalog\V1\TagTemplateField $tagTemplateField Required. The template to update. + * + * @return \Google\Cloud\DataCatalog\V1\UpdateTagTemplateFieldRequest + * + * @experimental + */ + public static function build(string $name, \Google\Cloud\DataCatalog\V1\TagTemplateField $tagTemplateField): self + { + return (new self()) + ->setName($name) + ->setTagTemplateField($tagTemplateField); + } + + /** + * @param string $name Required. The name of the tag template field. Please see + * {@see DataCatalogClient::tagTemplateFieldName()} for help formatting this field. + * @param \Google\Cloud\DataCatalog\V1\TagTemplateField $tagTemplateField Required. The template to update. + * @param \Google\Protobuf\FieldMask $updateMask Optional. Names of fields whose values to overwrite on an individual field + * of a tag template. The following fields are modifiable: + * + * * `display_name` + * * `type.enum_type` + * * `is_required` + * + * If this parameter is absent or empty, all modifiable fields + * are overwritten. If such fields are non-required and omitted in the request + * body, their values are emptied with one exception: when updating an enum + * type, the provided values are merged with the existing values. Therefore, + * enum values can only be added, existing enum values cannot be deleted or + * renamed. + * + * Additionally, updating a template field from optional to required is + * *not* allowed. + * + * @return \Google\Cloud\DataCatalog\V1\UpdateTagTemplateFieldRequest + * + * @experimental + */ + public static function buildFromNameTagTemplateFieldUpdateMask(string $name, \Google\Cloud\DataCatalog\V1\TagTemplateField $tagTemplateField, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setName($name) + ->setTagTemplateField($tagTemplateField) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the tag template field. + * @type \Google\Cloud\DataCatalog\V1\TagTemplateField $tag_template_field + * Required. The template to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. Names of fields whose values to overwrite on an individual field + * of a tag template. The following fields are modifiable: + * * `display_name` + * * `type.enum_type` + * * `is_required` + * If this parameter is absent or empty, all modifiable fields + * are overwritten. If such fields are non-required and omitted in the request + * body, their values are emptied with one exception: when updating an enum + * type, the provided values are merged with the existing values. Therefore, + * enum values can only be added, existing enum values cannot be deleted or + * renamed. + * Additionally, updating a template field from optional to required is + * *not* allowed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the tag template field. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the tag template field. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The template to update. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.TagTemplateField tag_template_field = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\DataCatalog\V1\TagTemplateField|null + */ + public function getTagTemplateField() + { + return $this->tag_template_field; + } + + public function hasTagTemplateField() + { + return isset($this->tag_template_field); + } + + public function clearTagTemplateField() + { + unset($this->tag_template_field); + } + + /** + * Required. The template to update. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.TagTemplateField tag_template_field = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\DataCatalog\V1\TagTemplateField $var + * @return $this + */ + public function setTagTemplateField($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\TagTemplateField::class); + $this->tag_template_field = $var; + + return $this; + } + + /** + * Optional. Names of fields whose values to overwrite on an individual field + * of a tag template. The following fields are modifiable: + * * `display_name` + * * `type.enum_type` + * * `is_required` + * If this parameter is absent or empty, all modifiable fields + * are overwritten. If such fields are non-required and omitted in the request + * body, their values are emptied with one exception: when updating an enum + * type, the provided values are merged with the existing values. Therefore, + * enum values can only be added, existing enum values cannot be deleted or + * renamed. + * Additionally, updating a template field from optional to required is + * *not* allowed. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Optional. Names of fields whose values to overwrite on an individual field + * of a tag template. The following fields are modifiable: + * * `display_name` + * * `type.enum_type` + * * `is_required` + * If this parameter is absent or empty, all modifiable fields + * are overwritten. If such fields are non-required and omitted in the request + * body, their values are emptied with one exception: when updating an enum + * type, the provided values are merged with the existing values. Therefore, + * enum values can only be added, existing enum values cannot be deleted or + * renamed. + * Additionally, updating a template field from optional to required is + * *not* allowed. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UpdateTagTemplateRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UpdateTagTemplateRequest.php new file mode 100644 index 000000000000..8fe3da4bcd3b --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UpdateTagTemplateRequest.php @@ -0,0 +1,182 @@ +google.cloud.datacatalog.v1.UpdateTagTemplateRequest + */ +class UpdateTagTemplateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The template to update. The `name` field must be set. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.TagTemplate tag_template = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $tag_template = null; + /** + * Names of fields whose values to overwrite on a tag template. Currently, + * only `display_name` and `is_publicly_readable` can be overwritten. + * If this parameter is absent or empty, all modifiable fields + * are overwritten. If such fields are non-required and omitted in the + * request body, their values are emptied. + * Note: Updating the `is_publicly_readable` field may require up to 12 + * hours to take effect in search results. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\DataCatalog\V1\TagTemplate $tagTemplate Required. The template to update. The `name` field must be set. + * + * @return \Google\Cloud\DataCatalog\V1\UpdateTagTemplateRequest + * + * @experimental + */ + public static function build(\Google\Cloud\DataCatalog\V1\TagTemplate $tagTemplate): self + { + return (new self()) + ->setTagTemplate($tagTemplate); + } + + /** + * @param \Google\Cloud\DataCatalog\V1\TagTemplate $tagTemplate Required. The template to update. The `name` field must be set. + * @param \Google\Protobuf\FieldMask $updateMask Names of fields whose values to overwrite on a tag template. Currently, + * only `display_name` and `is_publicly_readable` can be overwritten. + * + * If this parameter is absent or empty, all modifiable fields + * are overwritten. If such fields are non-required and omitted in the + * request body, their values are emptied. + * + * Note: Updating the `is_publicly_readable` field may require up to 12 + * hours to take effect in search results. + * + * @return \Google\Cloud\DataCatalog\V1\UpdateTagTemplateRequest + * + * @experimental + */ + public static function buildFromTagTemplateUpdateMask(\Google\Cloud\DataCatalog\V1\TagTemplate $tagTemplate, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setTagTemplate($tagTemplate) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DataCatalog\V1\TagTemplate $tag_template + * Required. The template to update. The `name` field must be set. + * @type \Google\Protobuf\FieldMask $update_mask + * Names of fields whose values to overwrite on a tag template. Currently, + * only `display_name` and `is_publicly_readable` can be overwritten. + * If this parameter is absent or empty, all modifiable fields + * are overwritten. If such fields are non-required and omitted in the + * request body, their values are emptied. + * Note: Updating the `is_publicly_readable` field may require up to 12 + * hours to take effect in search results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); + parent::__construct($data); + } + + /** + * Required. The template to update. The `name` field must be set. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.TagTemplate tag_template = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\DataCatalog\V1\TagTemplate|null + */ + public function getTagTemplate() + { + return $this->tag_template; + } + + public function hasTagTemplate() + { + return isset($this->tag_template); + } + + public function clearTagTemplate() + { + unset($this->tag_template); + } + + /** + * Required. The template to update. The `name` field must be set. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.TagTemplate tag_template = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\DataCatalog\V1\TagTemplate $var + * @return $this + */ + public function setTagTemplate($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\TagTemplate::class); + $this->tag_template = $var; + + return $this; + } + + /** + * Names of fields whose values to overwrite on a tag template. Currently, + * only `display_name` and `is_publicly_readable` can be overwritten. + * If this parameter is absent or empty, all modifiable fields + * are overwritten. If such fields are non-required and omitted in the + * request body, their values are emptied. + * Note: Updating the `is_publicly_readable` field may require up to 12 + * hours to take effect in search results. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Names of fields whose values to overwrite on a tag template. Currently, + * only `display_name` and `is_publicly_readable` can be overwritten. + * If this parameter is absent or empty, all modifiable fields + * are overwritten. If such fields are non-required and omitted in the + * request body, their values are emptied. + * Note: Updating the `is_publicly_readable` field may require up to 12 + * hours to take effect in search results. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UpdateTaxonomyRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UpdateTaxonomyRequest.php new file mode 100644 index 000000000000..ce0a2830e873 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UpdateTaxonomyRequest.php @@ -0,0 +1,152 @@ +google.cloud.datacatalog.v1.UpdateTaxonomyRequest + */ +class UpdateTaxonomyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The taxonomy to update. You can update only its description, display name, + * and activated policy types. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.Taxonomy taxonomy = 1; + */ + protected $taxonomy = null; + /** + * Specifies fields to update. If not set, defaults to all fields you can + * update. + * For more information, see [FieldMask] + * (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask). + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\DataCatalog\V1\Taxonomy $taxonomy The taxonomy to update. You can update only its description, display name, + * and activated policy types. + * + * @return \Google\Cloud\DataCatalog\V1\UpdateTaxonomyRequest + * + * @experimental + */ + public static function build(\Google\Cloud\DataCatalog\V1\Taxonomy $taxonomy): self + { + return (new self()) + ->setTaxonomy($taxonomy); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DataCatalog\V1\Taxonomy $taxonomy + * The taxonomy to update. You can update only its description, display name, + * and activated policy types. + * @type \Google\Protobuf\FieldMask $update_mask + * Specifies fields to update. If not set, defaults to all fields you can + * update. + * For more information, see [FieldMask] + * (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Policytagmanager::initOnce(); + parent::__construct($data); + } + + /** + * The taxonomy to update. You can update only its description, display name, + * and activated policy types. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.Taxonomy taxonomy = 1; + * @return \Google\Cloud\DataCatalog\V1\Taxonomy|null + */ + public function getTaxonomy() + { + return $this->taxonomy; + } + + public function hasTaxonomy() + { + return isset($this->taxonomy); + } + + public function clearTaxonomy() + { + unset($this->taxonomy); + } + + /** + * The taxonomy to update. You can update only its description, display name, + * and activated policy types. + * + * Generated from protobuf field .google.cloud.datacatalog.v1.Taxonomy taxonomy = 1; + * @param \Google\Cloud\DataCatalog\V1\Taxonomy $var + * @return $this + */ + public function setTaxonomy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\Taxonomy::class); + $this->taxonomy = $var; + + return $this; + } + + /** + * Specifies fields to update. If not set, defaults to all fields you can + * update. + * For more information, see [FieldMask] + * (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask). + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Specifies fields to update. If not set, defaults to all fields you can + * update. + * For more information, see [FieldMask] + * (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask). + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UsageSignal.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UsageSignal.php new file mode 100644 index 000000000000..55f5ad1161dd --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UsageSignal.php @@ -0,0 +1,203 @@ +google.cloud.datacatalog.v1.UsageSignal + */ +class UsageSignal extends \Google\Protobuf\Internal\Message +{ + /** + * The end timestamp of the duration of usage statistics. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 1; + */ + protected $update_time = null; + /** + * Output only. BigQuery usage statistics over each of the predefined time + * ranges. + * Supported time ranges are `{"24H", "7D", "30D"}`. + * + * Generated from protobuf field map usage_within_time_range = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $usage_within_time_range; + /** + * Common usage statistics over each of the predefined time ranges. + * Supported time ranges are `{"24H", "7D", "30D", "Lifetime"}`. + * + * Generated from protobuf field map common_usage_within_time_range = 3; + */ + private $common_usage_within_time_range; + /** + * Favorite count in the source system. + * + * Generated from protobuf field optional int64 favorite_count = 4; + */ + protected $favorite_count = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $update_time + * The end timestamp of the duration of usage statistics. + * @type array|\Google\Protobuf\Internal\MapField $usage_within_time_range + * Output only. BigQuery usage statistics over each of the predefined time + * ranges. + * Supported time ranges are `{"24H", "7D", "30D"}`. + * @type array|\Google\Protobuf\Internal\MapField $common_usage_within_time_range + * Common usage statistics over each of the predefined time ranges. + * Supported time ranges are `{"24H", "7D", "30D", "Lifetime"}`. + * @type int|string $favorite_count + * Favorite count in the source system. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Usage::initOnce(); + parent::__construct($data); + } + + /** + * The end timestamp of the duration of usage statistics. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * The end timestamp of the duration of usage statistics. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. BigQuery usage statistics over each of the predefined time + * ranges. + * Supported time ranges are `{"24H", "7D", "30D"}`. + * + * Generated from protobuf field map usage_within_time_range = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getUsageWithinTimeRange() + { + return $this->usage_within_time_range; + } + + /** + * Output only. BigQuery usage statistics over each of the predefined time + * ranges. + * Supported time ranges are `{"24H", "7D", "30D"}`. + * + * Generated from protobuf field map usage_within_time_range = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setUsageWithinTimeRange($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DataCatalog\V1\UsageStats::class); + $this->usage_within_time_range = $arr; + + return $this; + } + + /** + * Common usage statistics over each of the predefined time ranges. + * Supported time ranges are `{"24H", "7D", "30D", "Lifetime"}`. + * + * Generated from protobuf field map common_usage_within_time_range = 3; + * @return \Google\Protobuf\Internal\MapField + */ + public function getCommonUsageWithinTimeRange() + { + return $this->common_usage_within_time_range; + } + + /** + * Common usage statistics over each of the predefined time ranges. + * Supported time ranges are `{"24H", "7D", "30D", "Lifetime"}`. + * + * Generated from protobuf field map common_usage_within_time_range = 3; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setCommonUsageWithinTimeRange($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DataCatalog\V1\CommonUsageStats::class); + $this->common_usage_within_time_range = $arr; + + return $this; + } + + /** + * Favorite count in the source system. + * + * Generated from protobuf field optional int64 favorite_count = 4; + * @return int|string + */ + public function getFavoriteCount() + { + return isset($this->favorite_count) ? $this->favorite_count : 0; + } + + public function hasFavoriteCount() + { + return isset($this->favorite_count); + } + + public function clearFavoriteCount() + { + unset($this->favorite_count); + } + + /** + * Favorite count in the source system. + * + * Generated from protobuf field optional int64 favorite_count = 4; + * @param int|string $var + * @return $this + */ + public function setFavoriteCount($var) + { + GPBUtil::checkInt64($var); + $this->favorite_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UsageStats.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UsageStats.php new file mode 100644 index 000000000000..c98875850054 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UsageStats.php @@ -0,0 +1,176 @@ +google.cloud.datacatalog.v1.UsageStats + */ +class UsageStats extends \Google\Protobuf\Internal\Message +{ + /** + * The number of successful uses of the underlying entry. + * + * Generated from protobuf field float total_completions = 1; + */ + protected $total_completions = 0.0; + /** + * The number of failed attempts to use the underlying entry. + * + * Generated from protobuf field float total_failures = 2; + */ + protected $total_failures = 0.0; + /** + * The number of cancelled attempts to use the underlying entry. + * + * Generated from protobuf field float total_cancellations = 3; + */ + protected $total_cancellations = 0.0; + /** + * Total time spent only on successful uses, in milliseconds. + * + * Generated from protobuf field float total_execution_time_for_completions_millis = 4; + */ + protected $total_execution_time_for_completions_millis = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $total_completions + * The number of successful uses of the underlying entry. + * @type float $total_failures + * The number of failed attempts to use the underlying entry. + * @type float $total_cancellations + * The number of cancelled attempts to use the underlying entry. + * @type float $total_execution_time_for_completions_millis + * Total time spent only on successful uses, in milliseconds. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\Usage::initOnce(); + parent::__construct($data); + } + + /** + * The number of successful uses of the underlying entry. + * + * Generated from protobuf field float total_completions = 1; + * @return float + */ + public function getTotalCompletions() + { + return $this->total_completions; + } + + /** + * The number of successful uses of the underlying entry. + * + * Generated from protobuf field float total_completions = 1; + * @param float $var + * @return $this + */ + public function setTotalCompletions($var) + { + GPBUtil::checkFloat($var); + $this->total_completions = $var; + + return $this; + } + + /** + * The number of failed attempts to use the underlying entry. + * + * Generated from protobuf field float total_failures = 2; + * @return float + */ + public function getTotalFailures() + { + return $this->total_failures; + } + + /** + * The number of failed attempts to use the underlying entry. + * + * Generated from protobuf field float total_failures = 2; + * @param float $var + * @return $this + */ + public function setTotalFailures($var) + { + GPBUtil::checkFloat($var); + $this->total_failures = $var; + + return $this; + } + + /** + * The number of cancelled attempts to use the underlying entry. + * + * Generated from protobuf field float total_cancellations = 3; + * @return float + */ + public function getTotalCancellations() + { + return $this->total_cancellations; + } + + /** + * The number of cancelled attempts to use the underlying entry. + * + * Generated from protobuf field float total_cancellations = 3; + * @param float $var + * @return $this + */ + public function setTotalCancellations($var) + { + GPBUtil::checkFloat($var); + $this->total_cancellations = $var; + + return $this; + } + + /** + * Total time spent only on successful uses, in milliseconds. + * + * Generated from protobuf field float total_execution_time_for_completions_millis = 4; + * @return float + */ + public function getTotalExecutionTimeForCompletionsMillis() + { + return $this->total_execution_time_for_completions_millis; + } + + /** + * Total time spent only on successful uses, in milliseconds. + * + * Generated from protobuf field float total_execution_time_for_completions_millis = 4; + * @param float $var + * @return $this + */ + public function setTotalExecutionTimeForCompletionsMillis($var) + { + GPBUtil::checkFloat($var); + $this->total_execution_time_for_completions_millis = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ViewSpec.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ViewSpec.php new file mode 100644 index 000000000000..644575cef61f --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ViewSpec.php @@ -0,0 +1,67 @@ +google.cloud.datacatalog.v1.ViewSpec + */ +class ViewSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The query that defines the table view. + * + * Generated from protobuf field string view_query = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $view_query = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $view_query + * Output only. The query that defines the table view. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datacatalog\V1\TableSpec::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The query that defines the table view. + * + * Generated from protobuf field string view_query = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getViewQuery() + { + return $this->view_query; + } + + /** + * Output only. The query that defines the table view. + * + * Generated from protobuf field string view_query = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setViewQuery($var) + { + GPBUtil::checkString($var, True); + $this->view_query = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/create_entry.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/create_entry.php new file mode 100644 index 000000000000..9695f495325e --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/create_entry.php @@ -0,0 +1,88 @@ +createEntry($formattedParent, $entryId, $entry); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = DataCatalogClient::entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); + $entryId = '[ENTRY_ID]'; + + create_entry_sample($formattedParent, $entryId); +} +// [END datacatalog_v1_generated_DataCatalog_CreateEntry_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/create_entry_group.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/create_entry_group.php new file mode 100644 index 000000000000..59a912c5d33e --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/create_entry_group.php @@ -0,0 +1,102 @@ +createEntryGroup($formattedParent, $entryGroupId); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = DataCatalogClient::locationName('[PROJECT]', '[LOCATION]'); + $entryGroupId = '[ENTRY_GROUP_ID]'; + + create_entry_group_sample($formattedParent, $entryGroupId); +} +// [END datacatalog_v1_generated_DataCatalog_CreateEntryGroup_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/create_tag.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/create_tag.php new file mode 100644 index 000000000000..e0d7686f5bf8 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/create_tag.php @@ -0,0 +1,100 @@ +setTemplate($tagTemplate) + ->setFields($tagFields); + + // Call the API and handle any network failures. + try { + /** @var Tag $response */ + $response = $dataCatalogClient->createTag($formattedParent, $tag); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = DataCatalogClient::entryName( + '[PROJECT]', + '[LOCATION]', + '[ENTRY_GROUP]', + '[ENTRY]' + ); + $tagTemplate = '[TEMPLATE]'; + + create_tag_sample($formattedParent, $tagTemplate); +} +// [END datacatalog_v1_generated_DataCatalog_CreateTag_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/create_tag_template.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/create_tag_template.php new file mode 100644 index 000000000000..3460e8651733 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/create_tag_template.php @@ -0,0 +1,83 @@ +setFields($tagTemplateFields); + + // Call the API and handle any network failures. + try { + /** @var TagTemplate $response */ + $response = $dataCatalogClient->createTagTemplate($formattedParent, $tagTemplateId, $tagTemplate); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = DataCatalogClient::locationName('[PROJECT]', '[LOCATION]'); + $tagTemplateId = '[TAG_TEMPLATE_ID]'; + + create_tag_template_sample($formattedParent, $tagTemplateId); +} +// [END datacatalog_v1_generated_DataCatalog_CreateTagTemplate_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/create_tag_template_field.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/create_tag_template_field.php new file mode 100644 index 000000000000..caae5df9d504 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/create_tag_template_field.php @@ -0,0 +1,92 @@ +setType($tagTemplateFieldType); + + // Call the API and handle any network failures. + try { + /** @var TagTemplateField $response */ + $response = $dataCatalogClient->createTagTemplateField( + $formattedParent, + $tagTemplateFieldId, + $tagTemplateField + ); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = DataCatalogClient::tagTemplateName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); + $tagTemplateFieldId = '[TAG_TEMPLATE_FIELD_ID]'; + + create_tag_template_field_sample($formattedParent, $tagTemplateFieldId); +} +// [END datacatalog_v1_generated_DataCatalog_CreateTagTemplateField_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/delete_entry.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/delete_entry.php new file mode 100644 index 000000000000..2be4ef57eca0 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/delete_entry.php @@ -0,0 +1,78 @@ +deleteEntry($formattedName); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DataCatalogClient::entryName( + '[PROJECT]', + '[LOCATION]', + '[ENTRY_GROUP]', + '[ENTRY]' + ); + + delete_entry_sample($formattedName); +} +// [END datacatalog_v1_generated_DataCatalog_DeleteEntry_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/delete_entry_group.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/delete_entry_group.php new file mode 100644 index 000000000000..112609c5c1a8 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/delete_entry_group.php @@ -0,0 +1,69 @@ +deleteEntryGroup($formattedName); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DataCatalogClient::entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); + + delete_entry_group_sample($formattedName); +} +// [END datacatalog_v1_generated_DataCatalog_DeleteEntryGroup_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/delete_tag.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/delete_tag.php new file mode 100644 index 000000000000..3a40f9298d1c --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/delete_tag.php @@ -0,0 +1,69 @@ +deleteTag($formattedName); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DataCatalogClient::entryName( + '[PROJECT]', + '[LOCATION]', + '[ENTRY_GROUP]', + '[ENTRY]' + ); + + delete_tag_sample($formattedName); +} +// [END datacatalog_v1_generated_DataCatalog_DeleteTag_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/delete_tag_template.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/delete_tag_template.php new file mode 100644 index 000000000000..eca7b827157c --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/delete_tag_template.php @@ -0,0 +1,72 @@ +deleteTagTemplate($formattedName, $force); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DataCatalogClient::tagTemplateName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); + $force = false; + + delete_tag_template_sample($formattedName, $force); +} +// [END datacatalog_v1_generated_DataCatalog_DeleteTagTemplate_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/delete_tag_template_field.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/delete_tag_template_field.php new file mode 100644 index 000000000000..d2bd25e428ab --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/delete_tag_template_field.php @@ -0,0 +1,78 @@ +deleteTagTemplateField($formattedName, $force); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DataCatalogClient::tagTemplateFieldName( + '[PROJECT]', + '[LOCATION]', + '[TAG_TEMPLATE]', + '[FIELD]' + ); + $force = false; + + delete_tag_template_field_sample($formattedName, $force); +} +// [END datacatalog_v1_generated_DataCatalog_DeleteTagTemplateField_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/get_entry.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/get_entry.php new file mode 100644 index 000000000000..2fb6eb852c11 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/get_entry.php @@ -0,0 +1,71 @@ +getEntry($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DataCatalogClient::entryName( + '[PROJECT]', + '[LOCATION]', + '[ENTRY_GROUP]', + '[ENTRY]' + ); + + get_entry_sample($formattedName); +} +// [END datacatalog_v1_generated_DataCatalog_GetEntry_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/get_entry_group.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/get_entry_group.php new file mode 100644 index 000000000000..78b8604dec01 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/get_entry_group.php @@ -0,0 +1,66 @@ +getEntryGroup($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DataCatalogClient::entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); + + get_entry_group_sample($formattedName); +} +// [END datacatalog_v1_generated_DataCatalog_GetEntryGroup_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/get_iam_policy.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/get_iam_policy.php new file mode 100644 index 000000000000..060035aedbd9 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/get_iam_policy.php @@ -0,0 +1,86 @@ +getIamPolicy($resource); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + get_iam_policy_sample($resource); +} +// [END datacatalog_v1_generated_DataCatalog_GetIamPolicy_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/get_tag_template.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/get_tag_template.php new file mode 100644 index 000000000000..ed766c8720ea --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/get_tag_template.php @@ -0,0 +1,66 @@ +getTagTemplate($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DataCatalogClient::tagTemplateName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); + + get_tag_template_sample($formattedName); +} +// [END datacatalog_v1_generated_DataCatalog_GetTagTemplate_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/import_entries.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/import_entries.php new file mode 100644 index 000000000000..94a000392f4e --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/import_entries.php @@ -0,0 +1,95 @@ +importEntries($formattedParent); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ImportEntriesResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = DataCatalogClient::entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); + + import_entries_sample($formattedParent); +} +// [END datacatalog_v1_generated_DataCatalog_ImportEntries_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/list_entries.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/list_entries.php new file mode 100644 index 000000000000..8c358d13d4a2 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/list_entries.php @@ -0,0 +1,77 @@ +listEntries($formattedParent); + + /** @var Entry $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = DataCatalogClient::entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); + + list_entries_sample($formattedParent); +} +// [END datacatalog_v1_generated_DataCatalog_ListEntries_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/list_entry_groups.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/list_entry_groups.php new file mode 100644 index 000000000000..ade5eda60c52 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/list_entry_groups.php @@ -0,0 +1,73 @@ +listEntryGroups($formattedParent); + + /** @var EntryGroup $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = DataCatalogClient::locationName('[PROJECT]', '[LOCATION]'); + + list_entry_groups_sample($formattedParent); +} +// [END datacatalog_v1_generated_DataCatalog_ListEntryGroups_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/list_tags.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/list_tags.php new file mode 100644 index 000000000000..ccf773edf1a5 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/list_tags.php @@ -0,0 +1,82 @@ +listTags($formattedParent); + + /** @var Tag $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = DataCatalogClient::entryName( + '[PROJECT]', + '[LOCATION]', + '[ENTRY_GROUP]', + '[ENTRY]' + ); + + list_tags_sample($formattedParent); +} +// [END datacatalog_v1_generated_DataCatalog_ListTags_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/lookup_entry.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/lookup_entry.php new file mode 100644 index 000000000000..a546498d5c0d --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/lookup_entry.php @@ -0,0 +1,55 @@ +lookupEntry(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END datacatalog_v1_generated_DataCatalog_LookupEntry_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/modify_entry_contacts.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/modify_entry_contacts.php new file mode 100644 index 000000000000..580e479630d0 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/modify_entry_contacts.php @@ -0,0 +1,78 @@ +modifyEntryContacts($formattedName, $contacts); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DataCatalogClient::entryName( + '[PROJECT]', + '[LOCATION]', + '[ENTRY_GROUP]', + '[ENTRY]' + ); + + modify_entry_contacts_sample($formattedName); +} +// [END datacatalog_v1_generated_DataCatalog_ModifyEntryContacts_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/modify_entry_overview.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/modify_entry_overview.php new file mode 100644 index 000000000000..6f7a84bd4372 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/modify_entry_overview.php @@ -0,0 +1,78 @@ +modifyEntryOverview($formattedName, $entryOverview); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DataCatalogClient::entryName( + '[PROJECT]', + '[LOCATION]', + '[ENTRY_GROUP]', + '[ENTRY]' + ); + + modify_entry_overview_sample($formattedName); +} +// [END datacatalog_v1_generated_DataCatalog_ModifyEntryOverview_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/reconcile_tags.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/reconcile_tags.php new file mode 100644 index 000000000000..0900df2c689d --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/reconcile_tags.php @@ -0,0 +1,102 @@ +reconcileTags($formattedParent, $formattedTagTemplate); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ReconcileTagsResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = DataCatalogClient::entryName( + '[PROJECT]', + '[LOCATION]', + '[ENTRY_GROUP]', + '[ENTRY]' + ); + $formattedTagTemplate = DataCatalogClient::tagTemplateName( + '[PROJECT]', + '[LOCATION]', + '[TAG_TEMPLATE]' + ); + + reconcile_tags_sample($formattedParent, $formattedTagTemplate); +} +// [END datacatalog_v1_generated_DataCatalog_ReconcileTags_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/rename_tag_template_field.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/rename_tag_template_field.php new file mode 100644 index 000000000000..79b9b5b2962a --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/rename_tag_template_field.php @@ -0,0 +1,80 @@ +renameTagTemplateField($formattedName, $newTagTemplateFieldId); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DataCatalogClient::tagTemplateFieldName( + '[PROJECT]', + '[LOCATION]', + '[TAG_TEMPLATE]', + '[FIELD]' + ); + $newTagTemplateFieldId = '[NEW_TAG_TEMPLATE_FIELD_ID]'; + + rename_tag_template_field_sample($formattedName, $newTagTemplateFieldId); +} +// [END datacatalog_v1_generated_DataCatalog_RenameTagTemplateField_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/rename_tag_template_field_enum_value.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/rename_tag_template_field_enum_value.php new file mode 100644 index 000000000000..714e1a74ff73 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/rename_tag_template_field_enum_value.php @@ -0,0 +1,82 @@ +renameTagTemplateFieldEnumValue( + $formattedName, + $newEnumValueDisplayName + ); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DataCatalogClient::tagTemplateFieldEnumValueName( + '[PROJECT]', + '[LOCATION]', + '[TAG_TEMPLATE]', + '[TAG_TEMPLATE_FIELD_ID]', + '[ENUM_VALUE_DISPLAY_NAME]' + ); + $newEnumValueDisplayName = '[NEW_ENUM_VALUE_DISPLAY_NAME]'; + + rename_tag_template_field_enum_value_sample($formattedName, $newEnumValueDisplayName); +} +// [END datacatalog_v1_generated_DataCatalog_RenameTagTemplateFieldEnumValue_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/search_catalog.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/search_catalog.php new file mode 100644 index 000000000000..dbd30970e2a3 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/search_catalog.php @@ -0,0 +1,99 @@ +searchCatalog($scope, $query); + + /** @var SearchCatalogResult $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $query = '[QUERY]'; + + search_catalog_sample($query); +} +// [END datacatalog_v1_generated_DataCatalog_SearchCatalog_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/set_iam_policy.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/set_iam_policy.php new file mode 100644 index 000000000000..6d634c4abab8 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/set_iam_policy.php @@ -0,0 +1,85 @@ +setIamPolicy($resource, $policy); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + set_iam_policy_sample($resource); +} +// [END datacatalog_v1_generated_DataCatalog_SetIamPolicy_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/star_entry.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/star_entry.php new file mode 100644 index 000000000000..cde2dfdf98f7 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/star_entry.php @@ -0,0 +1,72 @@ +starEntry($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DataCatalogClient::entryName( + '[PROJECT]', + '[LOCATION]', + '[ENTRY_GROUP]', + '[ENTRY]' + ); + + star_entry_sample($formattedName); +} +// [END datacatalog_v1_generated_DataCatalog_StarEntry_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/test_iam_permissions.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/test_iam_permissions.php new file mode 100644 index 000000000000..b4ddbe2bcddc --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/test_iam_permissions.php @@ -0,0 +1,87 @@ +testIamPermissions($resource, $permissions); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + $permissionsElement = '[PERMISSIONS]'; + + test_iam_permissions_sample($resource, $permissionsElement); +} +// [END datacatalog_v1_generated_DataCatalog_TestIamPermissions_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/unstar_entry.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/unstar_entry.php new file mode 100644 index 000000000000..6d56fee6bf99 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/unstar_entry.php @@ -0,0 +1,72 @@ +unstarEntry($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DataCatalogClient::entryName( + '[PROJECT]', + '[LOCATION]', + '[ENTRY_GROUP]', + '[ENTRY]' + ); + + unstar_entry_sample($formattedName); +} +// [END datacatalog_v1_generated_DataCatalog_UnstarEntry_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/update_entry.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/update_entry.php new file mode 100644 index 000000000000..294a32f6ad75 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/update_entry.php @@ -0,0 +1,61 @@ +updateEntry($entry); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END datacatalog_v1_generated_DataCatalog_UpdateEntry_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/update_entry_group.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/update_entry_group.php new file mode 100644 index 000000000000..0b1c47b16911 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/update_entry_group.php @@ -0,0 +1,61 @@ +updateEntryGroup($entryGroup); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END datacatalog_v1_generated_DataCatalog_UpdateEntryGroup_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/update_tag.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/update_tag.php new file mode 100644 index 000000000000..034230c40220 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/update_tag.php @@ -0,0 +1,75 @@ +setTemplate($tagTemplate) + ->setFields($tagFields); + + // Call the API and handle any network failures. + try { + /** @var Tag $response */ + $response = $dataCatalogClient->updateTag($tag); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $tagTemplate = '[TEMPLATE]'; + + update_tag_sample($tagTemplate); +} +// [END datacatalog_v1_generated_DataCatalog_UpdateTag_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/update_tag_template.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/update_tag_template.php new file mode 100644 index 000000000000..a10591068f93 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/update_tag_template.php @@ -0,0 +1,66 @@ +setFields($tagTemplateFields); + + // Call the API and handle any network failures. + try { + /** @var TagTemplate $response */ + $response = $dataCatalogClient->updateTagTemplate($tagTemplate); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END datacatalog_v1_generated_DataCatalog_UpdateTagTemplate_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/update_tag_template_field.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/update_tag_template_field.php new file mode 100644 index 000000000000..99bb55622559 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/update_tag_template_field.php @@ -0,0 +1,84 @@ +setType($tagTemplateFieldType); + + // Call the API and handle any network failures. + try { + /** @var TagTemplateField $response */ + $response = $dataCatalogClient->updateTagTemplateField($formattedName, $tagTemplateField); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DataCatalogClient::tagTemplateFieldName( + '[PROJECT]', + '[LOCATION]', + '[TAG_TEMPLATE]', + '[FIELD]' + ); + + update_tag_template_field_sample($formattedName); +} +// [END datacatalog_v1_generated_DataCatalog_UpdateTagTemplateField_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/create_policy_tag.php b/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/create_policy_tag.php new file mode 100644 index 000000000000..526b33b0f7e5 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/create_policy_tag.php @@ -0,0 +1,66 @@ +createPolicyTag($formattedParent); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = PolicyTagManagerClient::taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); + + create_policy_tag_sample($formattedParent); +} +// [END datacatalog_v1_generated_PolicyTagManager_CreatePolicyTag_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/create_taxonomy.php b/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/create_taxonomy.php new file mode 100644 index 000000000000..076db6ba9b63 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/create_taxonomy.php @@ -0,0 +1,68 @@ +createTaxonomy($formattedParent); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = PolicyTagManagerClient::locationName('[PROJECT]', '[LOCATION]'); + + create_taxonomy_sample($formattedParent); +} +// [END datacatalog_v1_generated_PolicyTagManager_CreateTaxonomy_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/delete_policy_tag.php b/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/delete_policy_tag.php new file mode 100644 index 000000000000..03235d25e593 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/delete_policy_tag.php @@ -0,0 +1,76 @@ +deletePolicyTag($formattedName); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = PolicyTagManagerClient::policyTagName( + '[PROJECT]', + '[LOCATION]', + '[TAXONOMY]', + '[POLICY_TAG]' + ); + + delete_policy_tag_sample($formattedName); +} +// [END datacatalog_v1_generated_PolicyTagManager_DeletePolicyTag_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/delete_taxonomy.php b/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/delete_taxonomy.php new file mode 100644 index 000000000000..f89844fa179b --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/delete_taxonomy.php @@ -0,0 +1,68 @@ +deleteTaxonomy($formattedName); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = PolicyTagManagerClient::taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); + + delete_taxonomy_sample($formattedName); +} +// [END datacatalog_v1_generated_PolicyTagManager_DeleteTaxonomy_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/get_iam_policy.php b/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/get_iam_policy.php new file mode 100644 index 000000000000..8b7fa0e75ded --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/get_iam_policy.php @@ -0,0 +1,66 @@ +getIamPolicy($resource); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + get_iam_policy_sample($resource); +} +// [END datacatalog_v1_generated_PolicyTagManager_GetIamPolicy_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/get_policy_tag.php b/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/get_policy_tag.php new file mode 100644 index 000000000000..8674cac4dd1e --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/get_policy_tag.php @@ -0,0 +1,71 @@ +getPolicyTag($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = PolicyTagManagerClient::policyTagName( + '[PROJECT]', + '[LOCATION]', + '[TAXONOMY]', + '[POLICY_TAG]' + ); + + get_policy_tag_sample($formattedName); +} +// [END datacatalog_v1_generated_PolicyTagManager_GetPolicyTag_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/get_taxonomy.php b/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/get_taxonomy.php new file mode 100644 index 000000000000..1b35aaeb8373 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/get_taxonomy.php @@ -0,0 +1,66 @@ +getTaxonomy($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = PolicyTagManagerClient::taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); + + get_taxonomy_sample($formattedName); +} +// [END datacatalog_v1_generated_PolicyTagManager_GetTaxonomy_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/list_policy_tags.php b/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/list_policy_tags.php new file mode 100644 index 000000000000..05e83b592c6e --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/list_policy_tags.php @@ -0,0 +1,71 @@ +listPolicyTags($formattedParent); + + /** @var PolicyTag $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = PolicyTagManagerClient::taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); + + list_policy_tags_sample($formattedParent); +} +// [END datacatalog_v1_generated_PolicyTagManager_ListPolicyTags_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/list_taxonomies.php b/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/list_taxonomies.php new file mode 100644 index 000000000000..31b81e47831b --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/list_taxonomies.php @@ -0,0 +1,72 @@ +listTaxonomies($formattedParent); + + /** @var Taxonomy $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = PolicyTagManagerClient::locationName('[PROJECT]', '[LOCATION]'); + + list_taxonomies_sample($formattedParent); +} +// [END datacatalog_v1_generated_PolicyTagManager_ListTaxonomies_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/set_iam_policy.php b/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/set_iam_policy.php new file mode 100644 index 000000000000..7e733c6784fc --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/set_iam_policy.php @@ -0,0 +1,69 @@ +setIamPolicy($resource, $policy); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + set_iam_policy_sample($resource); +} +// [END datacatalog_v1_generated_PolicyTagManager_SetIamPolicy_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/test_iam_permissions.php b/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/test_iam_permissions.php new file mode 100644 index 000000000000..984a6a592ea4 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/test_iam_permissions.php @@ -0,0 +1,75 @@ +testIamPermissions($resource, $permissions); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + $permissionsElement = '[PERMISSIONS]'; + + test_iam_permissions_sample($resource, $permissionsElement); +} +// [END datacatalog_v1_generated_PolicyTagManager_TestIamPermissions_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/update_policy_tag.php b/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/update_policy_tag.php new file mode 100644 index 000000000000..24a5d6a75d87 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/update_policy_tag.php @@ -0,0 +1,54 @@ +updatePolicyTag(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END datacatalog_v1_generated_PolicyTagManager_UpdatePolicyTag_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/update_taxonomy.php b/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/update_taxonomy.php new file mode 100644 index 000000000000..943874d7fa25 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/update_taxonomy.php @@ -0,0 +1,54 @@ +updateTaxonomy(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END datacatalog_v1_generated_PolicyTagManager_UpdateTaxonomy_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerSerializationClient/export_taxonomies.php b/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerSerializationClient/export_taxonomies.php new file mode 100644 index 000000000000..32660a18abe0 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerSerializationClient/export_taxonomies.php @@ -0,0 +1,87 @@ +exportTaxonomies( + $formattedParent, + $formattedTaxonomies + ); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = PolicyTagManagerSerializationClient::locationName('[PROJECT]', '[LOCATION]'); + $formattedTaxonomiesElement = PolicyTagManagerSerializationClient::taxonomyName( + '[PROJECT]', + '[LOCATION]', + '[TAXONOMY]' + ); + + export_taxonomies_sample($formattedParent, $formattedTaxonomiesElement); +} +// [END datacatalog_v1_generated_PolicyTagManagerSerialization_ExportTaxonomies_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerSerializationClient/import_taxonomies.php b/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerSerializationClient/import_taxonomies.php new file mode 100644 index 000000000000..e99730726d0c --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerSerializationClient/import_taxonomies.php @@ -0,0 +1,74 @@ +importTaxonomies($formattedParent); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = PolicyTagManagerSerializationClient::locationName('[PROJECT]', '[LOCATION]'); + + import_taxonomies_sample($formattedParent); +} +// [END datacatalog_v1_generated_PolicyTagManagerSerialization_ImportTaxonomies_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerSerializationClient/replace_taxonomy.php b/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerSerializationClient/replace_taxonomy.php new file mode 100644 index 000000000000..224490c6bea2 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerSerializationClient/replace_taxonomy.php @@ -0,0 +1,95 @@ +setDisplayName($serializedTaxonomyDisplayName); + + // Call the API and handle any network failures. + try { + /** @var Taxonomy $response */ + $response = $policyTagManagerSerializationClient->replaceTaxonomy( + $formattedName, + $serializedTaxonomy + ); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = PolicyTagManagerSerializationClient::taxonomyName( + '[PROJECT]', + '[LOCATION]', + '[TAXONOMY]' + ); + $serializedTaxonomyDisplayName = '[DISPLAY_NAME]'; + + replace_taxonomy_sample($formattedName, $serializedTaxonomyDisplayName); +} +// [END datacatalog_v1_generated_PolicyTagManagerSerialization_ReplaceTaxonomy_sync] diff --git a/owl-bot-staging/DataCatalog/v1/src/V1/Client/BaseClient/DataCatalogBaseClient.php b/owl-bot-staging/DataCatalog/v1/src/V1/Client/BaseClient/DataCatalogBaseClient.php new file mode 100644 index 000000000000..164ca86e5467 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/src/V1/Client/BaseClient/DataCatalogBaseClient.php @@ -0,0 +1,1486 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../../resources/data_catalog_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../../resources/data_catalog_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../../resources/data_catalog_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../../resources/data_catalog_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Formats a string containing the fully-qualified path to represent a entry + * resource. + * + * @param string $project + * @param string $location + * @param string $entryGroup + * @param string $entry + * + * @return string The formatted entry resource. + */ + public static function entryName(string $project, string $location, string $entryGroup, string $entry): string + { + return self::getPathTemplate('entry')->render([ + 'project' => $project, + 'location' => $location, + 'entry_group' => $entryGroup, + 'entry' => $entry, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a entry_group + * resource. + * + * @param string $project + * @param string $location + * @param string $entryGroup + * + * @return string The formatted entry_group resource. + */ + public static function entryGroupName(string $project, string $location, string $entryGroup): string + { + return self::getPathTemplate('entryGroup')->render([ + 'project' => $project, + 'location' => $location, + 'entry_group' => $entryGroup, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a tag + * resource. + * + * @param string $project + * @param string $location + * @param string $entryGroup + * @param string $entry + * @param string $tag + * + * @return string The formatted tag resource. + */ + public static function tagName(string $project, string $location, string $entryGroup, string $entry, string $tag): string + { + return self::getPathTemplate('tag')->render([ + 'project' => $project, + 'location' => $location, + 'entry_group' => $entryGroup, + 'entry' => $entry, + 'tag' => $tag, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a tag_template + * resource. + * + * @param string $project + * @param string $location + * @param string $tagTemplate + * + * @return string The formatted tag_template resource. + */ + public static function tagTemplateName(string $project, string $location, string $tagTemplate): string + { + return self::getPathTemplate('tagTemplate')->render([ + 'project' => $project, + 'location' => $location, + 'tag_template' => $tagTemplate, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * tag_template_field resource. + * + * @param string $project + * @param string $location + * @param string $tagTemplate + * @param string $field + * + * @return string The formatted tag_template_field resource. + */ + public static function tagTemplateFieldName(string $project, string $location, string $tagTemplate, string $field): string + { + return self::getPathTemplate('tagTemplateField')->render([ + 'project' => $project, + 'location' => $location, + 'tag_template' => $tagTemplate, + 'field' => $field, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * tag_template_field_enum_value resource. + * + * @param string $project + * @param string $location + * @param string $tagTemplate + * @param string $tagTemplateFieldId + * @param string $enumValueDisplayName + * + * @return string The formatted tag_template_field_enum_value resource. + */ + public static function tagTemplateFieldEnumValueName(string $project, string $location, string $tagTemplate, string $tagTemplateFieldId, string $enumValueDisplayName): string + { + return self::getPathTemplate('tagTemplateFieldEnumValue')->render([ + 'project' => $project, + 'location' => $location, + 'tag_template' => $tagTemplate, + 'tag_template_field_id' => $tagTemplateFieldId, + 'enum_value_display_name' => $enumValueDisplayName, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - entry: projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry} + * - entryGroup: projects/{project}/locations/{location}/entryGroups/{entry_group} + * - location: projects/{project}/locations/{location} + * - tag: projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}/tags/{tag} + * - tagTemplate: projects/{project}/locations/{location}/tagTemplates/{tag_template} + * - tagTemplateField: projects/{project}/locations/{location}/tagTemplates/{tag_template}/fields/{field} + * - tagTemplateFieldEnumValue: projects/{project}/locations/{location}/tagTemplates/{tag_template}/fields/{tag_template_field_id}/enumValues/{enum_value_display_name} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'datacatalog.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates an entry. + * + * You can create entries only with 'FILESET', 'CLUSTER', 'DATA_STREAM', + * or custom types. Data Catalog automatically creates entries with other + * types during metadata ingestion from integrated systems. + * + * You must enable the Data Catalog API in the project identified by + * the `parent` parameter. For more information, see [Data Catalog resource + * project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). + * + * An entry group can have a maximum of 100,000 entries. + * + * The async variant is {@see self::createEntryAsync()} . + * + * @param CreateEntryRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Entry + * + * @throws ApiException Thrown if the API call fails. + */ + public function createEntry(CreateEntryRequest $request, array $callOptions = []): Entry + { + return $this->startApiCall('CreateEntry', $request, $callOptions)->wait(); + } + + /** + * Creates an entry group. + * + * An entry group contains logically related entries together with [Cloud + * Identity and Access Management](/data-catalog/docs/concepts/iam) policies. + * These policies specify users who can create, edit, and view entries + * within entry groups. + * + * Data Catalog automatically creates entry groups with names that start with + * the `@` symbol for the following resources: + * + * * BigQuery entries (`@bigquery`) + * * Pub/Sub topics (`@pubsub`) + * * Dataproc Metastore services (`@dataproc_metastore_{SERVICE_NAME_HASH}`) + * + * You can create your own entry groups for Cloud Storage fileset entries + * and custom entries together with the corresponding IAM policies. + * User-created entry groups can't contain the `@` symbol, it is reserved + * for automatically created groups. + * + * Entry groups, like entries, can be searched. + * + * A maximum of 10,000 entry groups may be created per organization across all + * locations. + * + * You must enable the Data Catalog API in the project identified by + * the `parent` parameter. For more information, see [Data Catalog resource + * project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). + * + * The async variant is {@see self::createEntryGroupAsync()} . + * + * @param CreateEntryGroupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return EntryGroup + * + * @throws ApiException Thrown if the API call fails. + */ + public function createEntryGroup(CreateEntryGroupRequest $request, array $callOptions = []): EntryGroup + { + return $this->startApiCall('CreateEntryGroup', $request, $callOptions)->wait(); + } + + /** + * Creates a tag and assigns it to: + * + * * An [Entry][google.cloud.datacatalog.v1.Entry] if the method name is + * `projects.locations.entryGroups.entries.tags.create`. + * * Or [EntryGroup][google.cloud.datacatalog.v1.EntryGroup]if the method + * name is `projects.locations.entryGroups.tags.create`. + * + * Note: The project identified by the `parent` parameter for the [tag] + * (https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.entryGroups.entries.tags/create#path-parameters) + * and the [tag template] + * (https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.tagTemplates/create#path-parameters) + * used to create the tag must be in the same organization. + * + * The async variant is {@see self::createTagAsync()} . + * + * @param CreateTagRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Tag + * + * @throws ApiException Thrown if the API call fails. + */ + public function createTag(CreateTagRequest $request, array $callOptions = []): Tag + { + return $this->startApiCall('CreateTag', $request, $callOptions)->wait(); + } + + /** + * Creates a tag template. + * + * You must enable the Data Catalog API in the project identified by the + * `parent` parameter. + * For more information, see [Data Catalog resource project] + * (https://cloud.google.com/data-catalog/docs/concepts/resource-project). + * + * The async variant is {@see self::createTagTemplateAsync()} . + * + * @param CreateTagTemplateRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TagTemplate + * + * @throws ApiException Thrown if the API call fails. + */ + public function createTagTemplate(CreateTagTemplateRequest $request, array $callOptions = []): TagTemplate + { + return $this->startApiCall('CreateTagTemplate', $request, $callOptions)->wait(); + } + + /** + * Creates a field in a tag template. + * + * You must enable the Data Catalog API in the project identified by + * the `parent` parameter. For more information, see [Data Catalog resource + * project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). + * + * The async variant is {@see self::createTagTemplateFieldAsync()} . + * + * @param CreateTagTemplateFieldRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TagTemplateField + * + * @throws ApiException Thrown if the API call fails. + */ + public function createTagTemplateField(CreateTagTemplateFieldRequest $request, array $callOptions = []): TagTemplateField + { + return $this->startApiCall('CreateTagTemplateField', $request, $callOptions)->wait(); + } + + /** + * Deletes an existing entry. + * + * You can delete only the entries created by the + * [CreateEntry][google.cloud.datacatalog.v1.DataCatalog.CreateEntry] + * method. + * + * You must enable the Data Catalog API in the project identified by + * the `name` parameter. For more information, see [Data Catalog + * resource + * project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). + * + * The async variant is {@see self::deleteEntryAsync()} . + * + * @param DeleteEntryRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteEntry(DeleteEntryRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteEntry', $request, $callOptions)->wait(); + } + + /** + * Deletes an entry group. + * + * You must enable the Data Catalog API in the project + * identified by the `name` parameter. For more information, see [Data Catalog + * resource + * project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). + * + * The async variant is {@see self::deleteEntryGroupAsync()} . + * + * @param DeleteEntryGroupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteEntryGroup(DeleteEntryGroupRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteEntryGroup', $request, $callOptions)->wait(); + } + + /** + * Deletes a tag. + * + * The async variant is {@see self::deleteTagAsync()} . + * + * @param DeleteTagRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteTag(DeleteTagRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteTag', $request, $callOptions)->wait(); + } + + /** + * Deletes a tag template and all tags that use it. + * + * You must enable the Data Catalog API in the project identified by + * the `name` parameter. For more information, see [Data Catalog resource + * project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). + * + * The async variant is {@see self::deleteTagTemplateAsync()} . + * + * @param DeleteTagTemplateRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteTagTemplate(DeleteTagTemplateRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteTagTemplate', $request, $callOptions)->wait(); + } + + /** + * Deletes a field in a tag template and all uses of this field from the tags + * based on this template. + * + * You must enable the Data Catalog API in the project identified by + * the `name` parameter. For more information, see [Data Catalog resource + * project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). + * + * The async variant is {@see self::deleteTagTemplateFieldAsync()} . + * + * @param DeleteTagTemplateFieldRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteTagTemplateField(DeleteTagTemplateFieldRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteTagTemplateField', $request, $callOptions)->wait(); + } + + /** + * Gets an entry. + * + * The async variant is {@see self::getEntryAsync()} . + * + * @param GetEntryRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Entry + * + * @throws ApiException Thrown if the API call fails. + */ + public function getEntry(GetEntryRequest $request, array $callOptions = []): Entry + { + return $this->startApiCall('GetEntry', $request, $callOptions)->wait(); + } + + /** + * Gets an entry group. + * + * The async variant is {@see self::getEntryGroupAsync()} . + * + * @param GetEntryGroupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return EntryGroup + * + * @throws ApiException Thrown if the API call fails. + */ + public function getEntryGroup(GetEntryGroupRequest $request, array $callOptions = []): EntryGroup + { + return $this->startApiCall('GetEntryGroup', $request, $callOptions)->wait(); + } + + /** + * Gets the access control policy for a resource. + * + * May return: + * + * * A`NOT_FOUND` error if the resource doesn't exist or you don't have the + * permission to view it. + * * An empty policy if the resource exists but doesn't have a set policy. + * + * Supported resources are: + * + * - Tag templates + * - Entry groups + * + * Note: This method doesn't get policies from Google Cloud Platform + * resources ingested into Data Catalog. + * + * To call this method, you must have the following Google IAM permissions: + * + * - `datacatalog.tagTemplates.getIamPolicy` to get policies on tag + * templates. + * - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups. + * + * The async variant is {@see self::getIamPolicyAsync()} . + * + * @param GetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Gets a tag template. + * + * The async variant is {@see self::getTagTemplateAsync()} . + * + * @param GetTagTemplateRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TagTemplate + * + * @throws ApiException Thrown if the API call fails. + */ + public function getTagTemplate(GetTagTemplateRequest $request, array $callOptions = []): TagTemplate + { + return $this->startApiCall('GetTagTemplate', $request, $callOptions)->wait(); + } + + /** + * Imports entries from a source, such as data previously dumped into a + * Cloud Storage bucket, into Data Catalog. Import of entries + * is a sync operation that reconciles the state of the third-party system + * with the Data Catalog. + * + * `ImportEntries` accepts source data snapshots of a third-party system. + * Snapshot should be delivered as a .wire or base65-encoded .txt file + * containing a sequence of Protocol Buffer messages of + * [DumpItem][google.cloud.datacatalog.v1.DumpItem] type. + * + * `ImportEntries` returns a [long-running operation] + * [google.longrunning.Operation] resource that can be queried with + * [Operations.GetOperation][google.longrunning.Operations.GetOperation] + * to return + * [ImportEntriesMetadata][google.cloud.datacatalog.v1.ImportEntriesMetadata] + * and an + * [ImportEntriesResponse][google.cloud.datacatalog.v1.ImportEntriesResponse] + * message. + * + * The async variant is {@see self::importEntriesAsync()} . + * + * @param ImportEntriesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function importEntries(ImportEntriesRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ImportEntries', $request, $callOptions)->wait(); + } + + /** + * Lists entries. + * + * Note: Currently, this method can list only custom entries. + * To get a list of both custom and automatically created entries, use + * [SearchCatalog][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog]. + * + * The async variant is {@see self::listEntriesAsync()} . + * + * @param ListEntriesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listEntries(ListEntriesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListEntries', $request, $callOptions); + } + + /** + * Lists entry groups. + * + * The async variant is {@see self::listEntryGroupsAsync()} . + * + * @param ListEntryGroupsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listEntryGroups(ListEntryGroupsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListEntryGroups', $request, $callOptions); + } + + /** + * Lists tags assigned to an [Entry][google.cloud.datacatalog.v1.Entry]. + * The [columns][google.cloud.datacatalog.v1.Tag.column] in the response are + * lowercased. + * + * The async variant is {@see self::listTagsAsync()} . + * + * @param ListTagsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listTags(ListTagsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListTags', $request, $callOptions); + } + + /** + * Gets an entry by its target resource name. + * + * The resource name comes from the source Google Cloud Platform service. + * + * The async variant is {@see self::lookupEntryAsync()} . + * + * @param LookupEntryRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Entry + * + * @throws ApiException Thrown if the API call fails. + */ + public function lookupEntry(LookupEntryRequest $request, array $callOptions = []): Entry + { + return $this->startApiCall('LookupEntry', $request, $callOptions)->wait(); + } + + /** + * Modifies contacts, part of the business context of an + * [Entry][google.cloud.datacatalog.v1.Entry]. + * + * To call this method, you must have the `datacatalog.entries.updateContacts` + * IAM permission on the corresponding project. + * + * The async variant is {@see self::modifyEntryContactsAsync()} . + * + * @param ModifyEntryContactsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Contacts + * + * @throws ApiException Thrown if the API call fails. + */ + public function modifyEntryContacts(ModifyEntryContactsRequest $request, array $callOptions = []): Contacts + { + return $this->startApiCall('ModifyEntryContacts', $request, $callOptions)->wait(); + } + + /** + * Modifies entry overview, part of the business context of an + * [Entry][google.cloud.datacatalog.v1.Entry]. + * + * To call this method, you must have the `datacatalog.entries.updateOverview` + * IAM permission on the corresponding project. + * + * The async variant is {@see self::modifyEntryOverviewAsync()} . + * + * @param ModifyEntryOverviewRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return EntryOverview + * + * @throws ApiException Thrown if the API call fails. + */ + public function modifyEntryOverview(ModifyEntryOverviewRequest $request, array $callOptions = []): EntryOverview + { + return $this->startApiCall('ModifyEntryOverview', $request, $callOptions)->wait(); + } + + /** + * `ReconcileTags` creates or updates a list of tags on the entry. + * If the + * [ReconcileTagsRequest.force_delete_missing][google.cloud.datacatalog.v1.ReconcileTagsRequest.force_delete_missing] + * parameter is set, the operation deletes tags not included in the input tag + * list. + * + * `ReconcileTags` returns a [long-running operation] + * [google.longrunning.Operation] resource that can be queried with + * [Operations.GetOperation][google.longrunning.Operations.GetOperation] + * to return [ReconcileTagsMetadata] + * [google.cloud.datacatalog.v1.ReconcileTagsMetadata] and + * a [ReconcileTagsResponse] + * [google.cloud.datacatalog.v1.ReconcileTagsResponse] message. + * + * The async variant is {@see self::reconcileTagsAsync()} . + * + * @param ReconcileTagsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function reconcileTags(ReconcileTagsRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ReconcileTags', $request, $callOptions)->wait(); + } + + /** + * Renames a field in a tag template. + * + * You must enable the Data Catalog API in the project identified by the + * `name` parameter. For more information, see [Data Catalog resource project] + * (https://cloud.google.com/data-catalog/docs/concepts/resource-project). + * + * The async variant is {@see self::renameTagTemplateFieldAsync()} . + * + * @param RenameTagTemplateFieldRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TagTemplateField + * + * @throws ApiException Thrown if the API call fails. + */ + public function renameTagTemplateField(RenameTagTemplateFieldRequest $request, array $callOptions = []): TagTemplateField + { + return $this->startApiCall('RenameTagTemplateField', $request, $callOptions)->wait(); + } + + /** + * Renames an enum value in a tag template. + * + * Within a single enum field, enum values must be unique. + * + * The async variant is {@see self::renameTagTemplateFieldEnumValueAsync()} . + * + * @param RenameTagTemplateFieldEnumValueRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TagTemplateField + * + * @throws ApiException Thrown if the API call fails. + */ + public function renameTagTemplateFieldEnumValue(RenameTagTemplateFieldEnumValueRequest $request, array $callOptions = []): TagTemplateField + { + return $this->startApiCall('RenameTagTemplateFieldEnumValue', $request, $callOptions)->wait(); + } + + /** + * Searches Data Catalog for multiple resources like entries and tags that + * match a query. + * + * This is a [Custom Method] + * (https://cloud.google.com/apis/design/custom_methods) that doesn't return + * all information on a resource, only its ID and high level fields. To get + * more information, you can subsequently call specific get methods. + * + * Note: Data Catalog search queries don't guarantee full recall. Results + * that match your query might not be returned, even in subsequent + * result pages. Additionally, returned (and not returned) results can vary + * if you repeat search queries. + * + * For more information, see [Data Catalog search syntax] + * (https://cloud.google.com/data-catalog/docs/how-to/search-reference). + * + * The async variant is {@see self::searchCatalogAsync()} . + * + * @param SearchCatalogRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function searchCatalog(SearchCatalogRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('SearchCatalog', $request, $callOptions); + } + + /** + * Sets an access control policy for a resource. Replaces any existing + * policy. + * + * Supported resources are: + * + * - Tag templates + * - Entry groups + * + * Note: This method sets policies only within Data Catalog and can't be + * used to manage policies in BigQuery, Pub/Sub, Dataproc Metastore, and any + * external Google Cloud Platform resources synced with the Data Catalog. + * + * To call this method, you must have the following Google IAM permissions: + * + * - `datacatalog.tagTemplates.setIamPolicy` to set policies on tag + * templates. + * - `datacatalog.entryGroups.setIamPolicy` to set policies on entry groups. + * + * The async variant is {@see self::setIamPolicyAsync()} . + * + * @param SetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Marks an [Entry][google.cloud.datacatalog.v1.Entry] as starred by + * the current user. Starring information is private to each user. + * + * The async variant is {@see self::starEntryAsync()} . + * + * @param StarEntryRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return StarEntryResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function starEntry(StarEntryRequest $request, array $callOptions = []): StarEntryResponse + { + return $this->startApiCall('StarEntry', $request, $callOptions)->wait(); + } + + /** + * Gets your permissions on a resource. + * + * Returns an empty set of permissions if the resource doesn't exist. + * + * Supported resources are: + * + * - Tag templates + * - Entry groups + * + * Note: This method gets policies only within Data Catalog and can't be + * used to get policies from BigQuery, Pub/Sub, Dataproc Metastore, and any + * external Google Cloud Platform resources ingested into Data Catalog. + * + * No Google IAM permissions are required to call this method. + * + * The async variant is {@see self::testIamPermissionsAsync()} . + * + * @param TestIamPermissionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TestIamPermissionsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse + { + return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); + } + + /** + * Marks an [Entry][google.cloud.datacatalog.v1.Entry] as NOT starred by + * the current user. Starring information is private to each user. + * + * The async variant is {@see self::unstarEntryAsync()} . + * + * @param UnstarEntryRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return UnstarEntryResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function unstarEntry(UnstarEntryRequest $request, array $callOptions = []): UnstarEntryResponse + { + return $this->startApiCall('UnstarEntry', $request, $callOptions)->wait(); + } + + /** + * Updates an existing entry. + * + * You must enable the Data Catalog API in the project identified by + * the `entry.name` parameter. For more information, see [Data Catalog + * resource + * project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). + * + * The async variant is {@see self::updateEntryAsync()} . + * + * @param UpdateEntryRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Entry + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateEntry(UpdateEntryRequest $request, array $callOptions = []): Entry + { + return $this->startApiCall('UpdateEntry', $request, $callOptions)->wait(); + } + + /** + * Updates an entry group. + * + * You must enable the Data Catalog API in the project identified by + * the `entry_group.name` parameter. For more information, see [Data Catalog + * resource + * project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). + * + * The async variant is {@see self::updateEntryGroupAsync()} . + * + * @param UpdateEntryGroupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return EntryGroup + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateEntryGroup(UpdateEntryGroupRequest $request, array $callOptions = []): EntryGroup + { + return $this->startApiCall('UpdateEntryGroup', $request, $callOptions)->wait(); + } + + /** + * Updates an existing tag. + * + * The async variant is {@see self::updateTagAsync()} . + * + * @param UpdateTagRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Tag + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateTag(UpdateTagRequest $request, array $callOptions = []): Tag + { + return $this->startApiCall('UpdateTag', $request, $callOptions)->wait(); + } + + /** + * Updates a tag template. + * + * You can't update template fields with this method. These fields are + * separate resources with their own create, update, and delete methods. + * + * You must enable the Data Catalog API in the project identified by + * the `tag_template.name` parameter. For more information, see [Data Catalog + * resource + * project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). + * + * The async variant is {@see self::updateTagTemplateAsync()} . + * + * @param UpdateTagTemplateRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TagTemplate + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateTagTemplate(UpdateTagTemplateRequest $request, array $callOptions = []): TagTemplate + { + return $this->startApiCall('UpdateTagTemplate', $request, $callOptions)->wait(); + } + + /** + * Updates a field in a tag template. + * + * You can't update the field type with this method. + * + * You must enable the Data Catalog API in the project + * identified by the `name` parameter. For more information, see [Data Catalog + * resource + * project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). + * + * The async variant is {@see self::updateTagTemplateFieldAsync()} . + * + * @param UpdateTagTemplateFieldRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TagTemplateField + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateTagTemplateField(UpdateTagTemplateFieldRequest $request, array $callOptions = []): TagTemplateField + { + return $this->startApiCall('UpdateTagTemplateField', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/DataCatalog/v1/src/V1/Client/BaseClient/PolicyTagManagerBaseClient.php b/owl-bot-staging/DataCatalog/v1/src/V1/Client/BaseClient/PolicyTagManagerBaseClient.php new file mode 100644 index 000000000000..6d3d6f53bdd9 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/src/V1/Client/BaseClient/PolicyTagManagerBaseClient.php @@ -0,0 +1,608 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../../resources/policy_tag_manager_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../../resources/policy_tag_manager_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../../resources/policy_tag_manager_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../../resources/policy_tag_manager_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a policy_tag + * resource. + * + * @param string $project + * @param string $location + * @param string $taxonomy + * @param string $policyTag + * + * @return string The formatted policy_tag resource. + */ + public static function policyTagName(string $project, string $location, string $taxonomy, string $policyTag): string + { + return self::getPathTemplate('policyTag')->render([ + 'project' => $project, + 'location' => $location, + 'taxonomy' => $taxonomy, + 'policy_tag' => $policyTag, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a taxonomy + * resource. + * + * @param string $project + * @param string $location + * @param string $taxonomy + * + * @return string The formatted taxonomy resource. + */ + public static function taxonomyName(string $project, string $location, string $taxonomy): string + { + return self::getPathTemplate('taxonomy')->render([ + 'project' => $project, + 'location' => $location, + 'taxonomy' => $taxonomy, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - location: projects/{project}/locations/{location} + * - policyTag: projects/{project}/locations/{location}/taxonomies/{taxonomy}/policyTags/{policy_tag} + * - taxonomy: projects/{project}/locations/{location}/taxonomies/{taxonomy} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'datacatalog.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a policy tag in a taxonomy. + * + * The async variant is {@see self::createPolicyTagAsync()} . + * + * @param CreatePolicyTagRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PolicyTag + * + * @throws ApiException Thrown if the API call fails. + */ + public function createPolicyTag(CreatePolicyTagRequest $request, array $callOptions = []): PolicyTag + { + return $this->startApiCall('CreatePolicyTag', $request, $callOptions)->wait(); + } + + /** + * Creates a taxonomy in a specified project. + * + * The taxonomy is initially empty, that is, it doesn't contain policy tags. + * + * The async variant is {@see self::createTaxonomyAsync()} . + * + * @param CreateTaxonomyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Taxonomy + * + * @throws ApiException Thrown if the API call fails. + */ + public function createTaxonomy(CreateTaxonomyRequest $request, array $callOptions = []): Taxonomy + { + return $this->startApiCall('CreateTaxonomy', $request, $callOptions)->wait(); + } + + /** + * Deletes a policy tag together with the following: + * + * * All of its descendant policy tags, if any + * * Policies associated with the policy tag and its descendants + * * References from BigQuery table schema of the policy tag and its + * descendants + * + * The async variant is {@see self::deletePolicyTagAsync()} . + * + * @param DeletePolicyTagRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deletePolicyTag(DeletePolicyTagRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeletePolicyTag', $request, $callOptions)->wait(); + } + + /** + * Deletes a taxonomy, including all policy tags in this + * taxonomy, their associated policies, and the policy tags references from + * BigQuery columns. + * + * The async variant is {@see self::deleteTaxonomyAsync()} . + * + * @param DeleteTaxonomyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteTaxonomy(DeleteTaxonomyRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteTaxonomy', $request, $callOptions)->wait(); + } + + /** + * Gets the IAM policy for a policy tag or a taxonomy. + * + * The async variant is {@see self::getIamPolicyAsync()} . + * + * @param GetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Gets a policy tag. + * + * The async variant is {@see self::getPolicyTagAsync()} . + * + * @param GetPolicyTagRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PolicyTag + * + * @throws ApiException Thrown if the API call fails. + */ + public function getPolicyTag(GetPolicyTagRequest $request, array $callOptions = []): PolicyTag + { + return $this->startApiCall('GetPolicyTag', $request, $callOptions)->wait(); + } + + /** + * Gets a taxonomy. + * + * The async variant is {@see self::getTaxonomyAsync()} . + * + * @param GetTaxonomyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Taxonomy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getTaxonomy(GetTaxonomyRequest $request, array $callOptions = []): Taxonomy + { + return $this->startApiCall('GetTaxonomy', $request, $callOptions)->wait(); + } + + /** + * Lists all policy tags in a taxonomy. + * + * The async variant is {@see self::listPolicyTagsAsync()} . + * + * @param ListPolicyTagsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listPolicyTags(ListPolicyTagsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListPolicyTags', $request, $callOptions); + } + + /** + * Lists all taxonomies in a project in a particular location that you + * have a permission to view. + * + * The async variant is {@see self::listTaxonomiesAsync()} . + * + * @param ListTaxonomiesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listTaxonomies(ListTaxonomiesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListTaxonomies', $request, $callOptions); + } + + /** + * Sets the IAM policy for a policy tag or a taxonomy. + * + * The async variant is {@see self::setIamPolicyAsync()} . + * + * @param SetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Returns your permissions on a specified policy tag or + * taxonomy. + * + * The async variant is {@see self::testIamPermissionsAsync()} . + * + * @param TestIamPermissionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TestIamPermissionsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse + { + return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); + } + + /** + * Updates a policy tag, including its display + * name, description, and parent policy tag. + * + * The async variant is {@see self::updatePolicyTagAsync()} . + * + * @param UpdatePolicyTagRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PolicyTag + * + * @throws ApiException Thrown if the API call fails. + */ + public function updatePolicyTag(UpdatePolicyTagRequest $request, array $callOptions = []): PolicyTag + { + return $this->startApiCall('UpdatePolicyTag', $request, $callOptions)->wait(); + } + + /** + * Updates a taxonomy, including its display name, + * description, and activated policy types. + * + * The async variant is {@see self::updateTaxonomyAsync()} . + * + * @param UpdateTaxonomyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Taxonomy + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateTaxonomy(UpdateTaxonomyRequest $request, array $callOptions = []): Taxonomy + { + return $this->startApiCall('UpdateTaxonomy', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/DataCatalog/v1/src/V1/Client/BaseClient/PolicyTagManagerSerializationBaseClient.php b/owl-bot-staging/DataCatalog/v1/src/V1/Client/BaseClient/PolicyTagManagerSerializationBaseClient.php new file mode 100644 index 000000000000..4b73e10d1806 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/src/V1/Client/BaseClient/PolicyTagManagerSerializationBaseClient.php @@ -0,0 +1,337 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../../resources/policy_tag_manager_serialization_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../../resources/policy_tag_manager_serialization_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../../resources/policy_tag_manager_serialization_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../../resources/policy_tag_manager_serialization_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a taxonomy + * resource. + * + * @param string $project + * @param string $location + * @param string $taxonomy + * + * @return string The formatted taxonomy resource. + */ + public static function taxonomyName(string $project, string $location, string $taxonomy): string + { + return self::getPathTemplate('taxonomy')->render([ + 'project' => $project, + 'location' => $location, + 'taxonomy' => $taxonomy, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - location: projects/{project}/locations/{location} + * - taxonomy: projects/{project}/locations/{location}/taxonomies/{taxonomy} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'datacatalog.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Exports taxonomies in the requested type and returns them, + * including their policy tags. The requested taxonomies must belong to the + * same project. + * + * This method generates `SerializedTaxonomy` protocol buffers with nested + * policy tags that can be used as input for `ImportTaxonomies` calls. + * + * The async variant is {@see self::exportTaxonomiesAsync()} . + * + * @param ExportTaxonomiesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ExportTaxonomiesResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function exportTaxonomies(ExportTaxonomiesRequest $request, array $callOptions = []): ExportTaxonomiesResponse + { + return $this->startApiCall('ExportTaxonomies', $request, $callOptions)->wait(); + } + + /** + * Creates new taxonomies (including their policy tags) in a given project + * by importing from inlined or cross-regional sources. + * + * For a cross-regional source, new taxonomies are created by copying + * from a source in another region. + * + * For an inlined source, taxonomies and policy tags are created in bulk using + * nested protocol buffer structures. + * + * The async variant is {@see self::importTaxonomiesAsync()} . + * + * @param ImportTaxonomiesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ImportTaxonomiesResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function importTaxonomies(ImportTaxonomiesRequest $request, array $callOptions = []): ImportTaxonomiesResponse + { + return $this->startApiCall('ImportTaxonomies', $request, $callOptions)->wait(); + } + + /** + * Replaces (updates) a taxonomy and all its policy tags. + * + * The taxonomy and its entire hierarchy of policy tags must be + * represented literally by `SerializedTaxonomy` and the nested + * `SerializedPolicyTag` messages. + * + * This operation automatically does the following: + * + * - Deletes the existing policy tags that are missing from the + * `SerializedPolicyTag`. + * - Creates policy tags that don't have resource names. They are considered + * new. + * - Updates policy tags with valid resources names accordingly. + * + * The async variant is {@see self::replaceTaxonomyAsync()} . + * + * @param ReplaceTaxonomyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Taxonomy + * + * @throws ApiException Thrown if the API call fails. + */ + public function replaceTaxonomy(ReplaceTaxonomyRequest $request, array $callOptions = []): Taxonomy + { + return $this->startApiCall('ReplaceTaxonomy', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/DataCatalog/v1/src/V1/Client/DataCatalogClient.php b/owl-bot-staging/DataCatalog/v1/src/V1/Client/DataCatalogClient.php new file mode 100644 index 000000000000..04907de0eb1e --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/src/V1/Client/DataCatalogClient.php @@ -0,0 +1,40 @@ +entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); + * $entryId = 'entry_id'; + * $entry = new Entry(); + * $response = $dataCatalogClient->createEntry($formattedParent, $entryId, $entry); + * } finally { + * $dataCatalogClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To + * assist with these names, this class includes a format method for each type of + * name, and additionally a parseName method to extract the individual identifiers + * contained within formatted names that are returned by the API. + * + * This service has a new (beta) implementation. See {@see + * \Google\Cloud\DataCatalog\V1\Client\DataCatalogClient} to use the new surface. + */ +class DataCatalogGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.datacatalog.v1.DataCatalog'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'datacatalog.googleapis.com'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static $entryNameTemplate; + + private static $entryGroupNameTemplate; + + private static $locationNameTemplate; + + private static $tagNameTemplate; + + private static $tagTemplateNameTemplate; + + private static $tagTemplateFieldNameTemplate; + + private static $tagTemplateFieldEnumValueNameTemplate; + + private static $pathTemplateMap; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/data_catalog_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/data_catalog_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/data_catalog_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/data_catalog_rest_client_config.php', + ], + ], + ]; + } + + private static function getEntryNameTemplate() + { + if (self::$entryNameTemplate == null) { + self::$entryNameTemplate = new PathTemplate('projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}'); + } + + return self::$entryNameTemplate; + } + + private static function getEntryGroupNameTemplate() + { + if (self::$entryGroupNameTemplate == null) { + self::$entryGroupNameTemplate = new PathTemplate('projects/{project}/locations/{location}/entryGroups/{entry_group}'); + } + + return self::$entryGroupNameTemplate; + } + + private static function getLocationNameTemplate() + { + if (self::$locationNameTemplate == null) { + self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); + } + + return self::$locationNameTemplate; + } + + private static function getTagNameTemplate() + { + if (self::$tagNameTemplate == null) { + self::$tagNameTemplate = new PathTemplate('projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}/tags/{tag}'); + } + + return self::$tagNameTemplate; + } + + private static function getTagTemplateNameTemplate() + { + if (self::$tagTemplateNameTemplate == null) { + self::$tagTemplateNameTemplate = new PathTemplate('projects/{project}/locations/{location}/tagTemplates/{tag_template}'); + } + + return self::$tagTemplateNameTemplate; + } + + private static function getTagTemplateFieldNameTemplate() + { + if (self::$tagTemplateFieldNameTemplate == null) { + self::$tagTemplateFieldNameTemplate = new PathTemplate('projects/{project}/locations/{location}/tagTemplates/{tag_template}/fields/{field}'); + } + + return self::$tagTemplateFieldNameTemplate; + } + + private static function getTagTemplateFieldEnumValueNameTemplate() + { + if (self::$tagTemplateFieldEnumValueNameTemplate == null) { + self::$tagTemplateFieldEnumValueNameTemplate = new PathTemplate('projects/{project}/locations/{location}/tagTemplates/{tag_template}/fields/{tag_template_field_id}/enumValues/{enum_value_display_name}'); + } + + return self::$tagTemplateFieldEnumValueNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'entry' => self::getEntryNameTemplate(), + 'entryGroup' => self::getEntryGroupNameTemplate(), + 'location' => self::getLocationNameTemplate(), + 'tag' => self::getTagNameTemplate(), + 'tagTemplate' => self::getTagTemplateNameTemplate(), + 'tagTemplateField' => self::getTagTemplateFieldNameTemplate(), + 'tagTemplateFieldEnumValue' => self::getTagTemplateFieldEnumValueNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a entry + * resource. + * + * @param string $project + * @param string $location + * @param string $entryGroup + * @param string $entry + * + * @return string The formatted entry resource. + */ + public static function entryName($project, $location, $entryGroup, $entry) + { + return self::getEntryNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'entry_group' => $entryGroup, + 'entry' => $entry, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a entry_group + * resource. + * + * @param string $project + * @param string $location + * @param string $entryGroup + * + * @return string The formatted entry_group resource. + */ + public static function entryGroupName($project, $location, $entryGroup) + { + return self::getEntryGroupNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'entry_group' => $entryGroup, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName($project, $location) + { + return self::getLocationNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a tag + * resource. + * + * @param string $project + * @param string $location + * @param string $entryGroup + * @param string $entry + * @param string $tag + * + * @return string The formatted tag resource. + */ + public static function tagName($project, $location, $entryGroup, $entry, $tag) + { + return self::getTagNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'entry_group' => $entryGroup, + 'entry' => $entry, + 'tag' => $tag, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a tag_template + * resource. + * + * @param string $project + * @param string $location + * @param string $tagTemplate + * + * @return string The formatted tag_template resource. + */ + public static function tagTemplateName($project, $location, $tagTemplate) + { + return self::getTagTemplateNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'tag_template' => $tagTemplate, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * tag_template_field resource. + * + * @param string $project + * @param string $location + * @param string $tagTemplate + * @param string $field + * + * @return string The formatted tag_template_field resource. + */ + public static function tagTemplateFieldName($project, $location, $tagTemplate, $field) + { + return self::getTagTemplateFieldNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'tag_template' => $tagTemplate, + 'field' => $field, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * tag_template_field_enum_value resource. + * + * @param string $project + * @param string $location + * @param string $tagTemplate + * @param string $tagTemplateFieldId + * @param string $enumValueDisplayName + * + * @return string The formatted tag_template_field_enum_value resource. + */ + public static function tagTemplateFieldEnumValueName($project, $location, $tagTemplate, $tagTemplateFieldId, $enumValueDisplayName) + { + return self::getTagTemplateFieldEnumValueNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'tag_template' => $tagTemplate, + 'tag_template_field_id' => $tagTemplateFieldId, + 'enum_value_display_name' => $enumValueDisplayName, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - entry: projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry} + * - entryGroup: projects/{project}/locations/{location}/entryGroups/{entry_group} + * - location: projects/{project}/locations/{location} + * - tag: projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}/tags/{tag} + * - tagTemplate: projects/{project}/locations/{location}/tagTemplates/{tag_template} + * - tagTemplateField: projects/{project}/locations/{location}/tagTemplates/{tag_template}/fields/{field} + * - tagTemplateFieldEnumValue: projects/{project}/locations/{location}/tagTemplates/{tag_template}/fields/{tag_template_field_id}/enumValues/{enum_value_display_name} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'datacatalog.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** + * Creates an entry. + * + * You can create entries only with 'FILESET', 'CLUSTER', 'DATA_STREAM', + * or custom types. Data Catalog automatically creates entries with other + * types during metadata ingestion from integrated systems. + * + * You must enable the Data Catalog API in the project identified by + * the `parent` parameter. For more information, see [Data Catalog resource + * project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). + * + * An entry group can have a maximum of 100,000 entries. + * + * Sample code: + * ``` + * $dataCatalogClient = new DataCatalogClient(); + * try { + * $formattedParent = $dataCatalogClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); + * $entryId = 'entry_id'; + * $entry = new Entry(); + * $response = $dataCatalogClient->createEntry($formattedParent, $entryId, $entry); + * } finally { + * $dataCatalogClient->close(); + * } + * ``` + * + * @param string $parent Required. The name of the entry group this entry belongs to. + * + * Note: The entry itself and its child resources might not be stored in + * the location specified in its name. + * @param string $entryId Required. The ID of the entry to create. + * + * The ID must contain only letters (a-z, A-Z), numbers (0-9), + * and underscores (_). + * The maximum size is 64 bytes when encoded in UTF-8. + * @param Entry $entry Required. The entry to create. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\DataCatalog\V1\Entry + * + * @throws ApiException if the remote call fails + */ + public function createEntry($parent, $entryId, $entry, array $optionalArgs = []) + { + $request = new CreateEntryRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setEntryId($entryId); + $request->setEntry($entry); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateEntry', Entry::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates an entry group. + * + * An entry group contains logically related entries together with [Cloud + * Identity and Access Management](/data-catalog/docs/concepts/iam) policies. + * These policies specify users who can create, edit, and view entries + * within entry groups. + * + * Data Catalog automatically creates entry groups with names that start with + * the `@` symbol for the following resources: + * + * * BigQuery entries (`@bigquery`) + * * Pub/Sub topics (`@pubsub`) + * * Dataproc Metastore services (`@dataproc_metastore_{SERVICE_NAME_HASH}`) + * + * You can create your own entry groups for Cloud Storage fileset entries + * and custom entries together with the corresponding IAM policies. + * User-created entry groups can't contain the `@` symbol, it is reserved + * for automatically created groups. + * + * Entry groups, like entries, can be searched. + * + * A maximum of 10,000 entry groups may be created per organization across all + * locations. + * + * You must enable the Data Catalog API in the project identified by + * the `parent` parameter. For more information, see [Data Catalog resource + * project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). + * + * Sample code: + * ``` + * $dataCatalogClient = new DataCatalogClient(); + * try { + * $formattedParent = $dataCatalogClient->locationName('[PROJECT]', '[LOCATION]'); + * $entryGroupId = 'entry_group_id'; + * $response = $dataCatalogClient->createEntryGroup($formattedParent, $entryGroupId); + * } finally { + * $dataCatalogClient->close(); + * } + * ``` + * + * @param string $parent Required. The names of the project and location that the new entry group + * belongs to. + * + * Note: The entry group itself and its child resources might not be + * stored in the location specified in its name. + * @param string $entryGroupId Required. The ID of the entry group to create. + * + * The ID must contain only letters (a-z, A-Z), numbers (0-9), + * underscores (_), and must start with a letter or underscore. + * The maximum size is 64 bytes when encoded in UTF-8. + * @param array $optionalArgs { + * Optional. + * + * @type EntryGroup $entryGroup + * The entry group to create. Defaults to empty. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\DataCatalog\V1\EntryGroup + * + * @throws ApiException if the remote call fails + */ + public function createEntryGroup($parent, $entryGroupId, array $optionalArgs = []) + { + $request = new CreateEntryGroupRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setEntryGroupId($entryGroupId); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['entryGroup'])) { + $request->setEntryGroup($optionalArgs['entryGroup']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateEntryGroup', EntryGroup::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates a tag and assigns it to: + * + * * An [Entry][google.cloud.datacatalog.v1.Entry] if the method name is + * `projects.locations.entryGroups.entries.tags.create`. + * * Or [EntryGroup][google.cloud.datacatalog.v1.EntryGroup]if the method + * name is `projects.locations.entryGroups.tags.create`. + * + * Note: The project identified by the `parent` parameter for the [tag] + * (https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.entryGroups.entries.tags/create#path-parameters) + * and the [tag template] + * (https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.tagTemplates/create#path-parameters) + * used to create the tag must be in the same organization. + * + * Sample code: + * ``` + * $dataCatalogClient = new DataCatalogClient(); + * try { + * $formattedParent = $dataCatalogClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); + * $tag = new Tag(); + * $response = $dataCatalogClient->createTag($formattedParent, $tag); + * } finally { + * $dataCatalogClient->close(); + * } + * ``` + * + * @param string $parent Required. The name of the resource to attach this tag to. + * + * Tags can be attached to entries or entry groups. An entry can have up to + * 1000 attached tags. + * + * Note: The tag and its child resources might not be stored in + * the location specified in its name. + * @param Tag $tag Required. The tag to create. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\DataCatalog\V1\Tag + * + * @throws ApiException if the remote call fails + */ + public function createTag($parent, $tag, array $optionalArgs = []) + { + $request = new CreateTagRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setTag($tag); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateTag', Tag::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates a tag template. + * + * You must enable the Data Catalog API in the project identified by the + * `parent` parameter. + * For more information, see [Data Catalog resource project] + * (https://cloud.google.com/data-catalog/docs/concepts/resource-project). + * + * Sample code: + * ``` + * $dataCatalogClient = new DataCatalogClient(); + * try { + * $formattedParent = $dataCatalogClient->locationName('[PROJECT]', '[LOCATION]'); + * $tagTemplateId = 'tag_template_id'; + * $tagTemplate = new TagTemplate(); + * $response = $dataCatalogClient->createTagTemplate($formattedParent, $tagTemplateId, $tagTemplate); + * } finally { + * $dataCatalogClient->close(); + * } + * ``` + * + * @param string $parent Required. The name of the project and the template location + * [region](https://cloud.google.com/data-catalog/docs/concepts/regions). + * @param string $tagTemplateId Required. The ID of the tag template to create. + * + * The ID must contain only lowercase letters (a-z), numbers (0-9), + * or underscores (_), and must start with a letter or underscore. + * The maximum size is 64 bytes when encoded in UTF-8. + * @param TagTemplate $tagTemplate Required. The tag template to create. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\DataCatalog\V1\TagTemplate + * + * @throws ApiException if the remote call fails + */ + public function createTagTemplate($parent, $tagTemplateId, $tagTemplate, array $optionalArgs = []) + { + $request = new CreateTagTemplateRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setTagTemplateId($tagTemplateId); + $request->setTagTemplate($tagTemplate); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateTagTemplate', TagTemplate::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates a field in a tag template. + * + * You must enable the Data Catalog API in the project identified by + * the `parent` parameter. For more information, see [Data Catalog resource + * project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). + * + * Sample code: + * ``` + * $dataCatalogClient = new DataCatalogClient(); + * try { + * $formattedParent = $dataCatalogClient->tagTemplateName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); + * $tagTemplateFieldId = 'tag_template_field_id'; + * $tagTemplateField = new TagTemplateField(); + * $response = $dataCatalogClient->createTagTemplateField($formattedParent, $tagTemplateFieldId, $tagTemplateField); + * } finally { + * $dataCatalogClient->close(); + * } + * ``` + * + * @param string $parent Required. The name of the project and the template location + * [region](https://cloud.google.com/data-catalog/docs/concepts/regions). + * @param string $tagTemplateFieldId Required. The ID of the tag template field to create. + * + * Note: Adding a required field to an existing template is *not* allowed. + * + * Field IDs can contain letters (both uppercase and lowercase), numbers + * (0-9), underscores (_) and dashes (-). Field IDs must be at least 1 + * character long and at most 128 characters long. Field IDs must also be + * unique within their template. + * @param TagTemplateField $tagTemplateField Required. The tag template field to create. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\DataCatalog\V1\TagTemplateField + * + * @throws ApiException if the remote call fails + */ + public function createTagTemplateField($parent, $tagTemplateFieldId, $tagTemplateField, array $optionalArgs = []) + { + $request = new CreateTagTemplateFieldRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setTagTemplateFieldId($tagTemplateFieldId); + $request->setTagTemplateField($tagTemplateField); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateTagTemplateField', TagTemplateField::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes an existing entry. + * + * You can delete only the entries created by the + * [CreateEntry][google.cloud.datacatalog.v1.DataCatalog.CreateEntry] + * method. + * + * You must enable the Data Catalog API in the project identified by + * the `name` parameter. For more information, see [Data Catalog + * resource + * project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). + * + * Sample code: + * ``` + * $dataCatalogClient = new DataCatalogClient(); + * try { + * $formattedName = $dataCatalogClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); + * $dataCatalogClient->deleteEntry($formattedName); + * } finally { + * $dataCatalogClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the entry to delete. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException if the remote call fails + */ + public function deleteEntry($name, array $optionalArgs = []) + { + $request = new DeleteEntryRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('DeleteEntry', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes an entry group. + * + * You must enable the Data Catalog API in the project + * identified by the `name` parameter. For more information, see [Data Catalog + * resource + * project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). + * + * Sample code: + * ``` + * $dataCatalogClient = new DataCatalogClient(); + * try { + * $formattedName = $dataCatalogClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); + * $dataCatalogClient->deleteEntryGroup($formattedName); + * } finally { + * $dataCatalogClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the entry group to delete. + * @param array $optionalArgs { + * Optional. + * + * @type bool $force + * Optional. If true, deletes all entries in the entry group. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException if the remote call fails + */ + public function deleteEntryGroup($name, array $optionalArgs = []) + { + $request = new DeleteEntryGroupRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['force'])) { + $request->setForce($optionalArgs['force']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('DeleteEntryGroup', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes a tag. + * + * Sample code: + * ``` + * $dataCatalogClient = new DataCatalogClient(); + * try { + * $formattedName = $dataCatalogClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); + * $dataCatalogClient->deleteTag($formattedName); + * } finally { + * $dataCatalogClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the tag to delete. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException if the remote call fails + */ + public function deleteTag($name, array $optionalArgs = []) + { + $request = new DeleteTagRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('DeleteTag', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes a tag template and all tags that use it. + * + * You must enable the Data Catalog API in the project identified by + * the `name` parameter. For more information, see [Data Catalog resource + * project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). + * + * Sample code: + * ``` + * $dataCatalogClient = new DataCatalogClient(); + * try { + * $formattedName = $dataCatalogClient->tagTemplateName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); + * $force = false; + * $dataCatalogClient->deleteTagTemplate($formattedName, $force); + * } finally { + * $dataCatalogClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the tag template to delete. + * @param bool $force Required. If true, deletes all tags that use this template. + * + * Currently, `true` is the only supported value. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException if the remote call fails + */ + public function deleteTagTemplate($name, $force, array $optionalArgs = []) + { + $request = new DeleteTagTemplateRequest(); + $requestParamHeaders = []; + $request->setName($name); + $request->setForce($force); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('DeleteTagTemplate', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes a field in a tag template and all uses of this field from the tags + * based on this template. + * + * You must enable the Data Catalog API in the project identified by + * the `name` parameter. For more information, see [Data Catalog resource + * project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). + * + * Sample code: + * ``` + * $dataCatalogClient = new DataCatalogClient(); + * try { + * $formattedName = $dataCatalogClient->tagTemplateFieldName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]', '[FIELD]'); + * $force = false; + * $dataCatalogClient->deleteTagTemplateField($formattedName, $force); + * } finally { + * $dataCatalogClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the tag template field to delete. + * @param bool $force Required. If true, deletes this field from any tags that use it. + * + * Currently, `true` is the only supported value. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException if the remote call fails + */ + public function deleteTagTemplateField($name, $force, array $optionalArgs = []) + { + $request = new DeleteTagTemplateFieldRequest(); + $requestParamHeaders = []; + $request->setName($name); + $request->setForce($force); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('DeleteTagTemplateField', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets an entry. + * + * Sample code: + * ``` + * $dataCatalogClient = new DataCatalogClient(); + * try { + * $formattedName = $dataCatalogClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); + * $response = $dataCatalogClient->getEntry($formattedName); + * } finally { + * $dataCatalogClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the entry to get. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\DataCatalog\V1\Entry + * + * @throws ApiException if the remote call fails + */ + public function getEntry($name, array $optionalArgs = []) + { + $request = new GetEntryRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetEntry', Entry::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets an entry group. + * + * Sample code: + * ``` + * $dataCatalogClient = new DataCatalogClient(); + * try { + * $formattedName = $dataCatalogClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); + * $response = $dataCatalogClient->getEntryGroup($formattedName); + * } finally { + * $dataCatalogClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the entry group to get. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $readMask + * The fields to return. If empty or omitted, all fields are returned. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\DataCatalog\V1\EntryGroup + * + * @throws ApiException if the remote call fails + */ + public function getEntryGroup($name, array $optionalArgs = []) + { + $request = new GetEntryGroupRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['readMask'])) { + $request->setReadMask($optionalArgs['readMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetEntryGroup', EntryGroup::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets the access control policy for a resource. + * + * May return: + * + * * A`NOT_FOUND` error if the resource doesn't exist or you don't have the + * permission to view it. + * * An empty policy if the resource exists but doesn't have a set policy. + * + * Supported resources are: + * + * - Tag templates + * - Entry groups + * + * Note: This method doesn't get policies from Google Cloud Platform + * resources ingested into Data Catalog. + * + * To call this method, you must have the following Google IAM permissions: + * + * - `datacatalog.tagTemplates.getIamPolicy` to get policies on tag + * templates. + * - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups. + * + * Sample code: + * ``` + * $dataCatalogClient = new DataCatalogClient(); + * try { + * $resource = 'resource'; + * $response = $dataCatalogClient->getIamPolicy($resource); + * } finally { + * $dataCatalogClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param array $optionalArgs { + * Optional. + * + * @type GetPolicyOptions $options + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Iam\V1\Policy + * + * @throws ApiException if the remote call fails + */ + public function getIamPolicy($resource, array $optionalArgs = []) + { + $request = new GetIamPolicyRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $requestParamHeaders['resource'] = $resource; + if (isset($optionalArgs['options'])) { + $request->setOptions($optionalArgs['options']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets a tag template. + * + * Sample code: + * ``` + * $dataCatalogClient = new DataCatalogClient(); + * try { + * $formattedName = $dataCatalogClient->tagTemplateName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); + * $response = $dataCatalogClient->getTagTemplate($formattedName); + * } finally { + * $dataCatalogClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the tag template to get. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\DataCatalog\V1\TagTemplate + * + * @throws ApiException if the remote call fails + */ + public function getTagTemplate($name, array $optionalArgs = []) + { + $request = new GetTagTemplateRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetTagTemplate', TagTemplate::class, $optionalArgs, $request)->wait(); + } + + /** + * Imports entries from a source, such as data previously dumped into a + * Cloud Storage bucket, into Data Catalog. Import of entries + * is a sync operation that reconciles the state of the third-party system + * with the Data Catalog. + * + * `ImportEntries` accepts source data snapshots of a third-party system. + * Snapshot should be delivered as a .wire or base65-encoded .txt file + * containing a sequence of Protocol Buffer messages of + * [DumpItem][google.cloud.datacatalog.v1.DumpItem] type. + * + * `ImportEntries` returns a [long-running operation] + * [google.longrunning.Operation] resource that can be queried with + * [Operations.GetOperation][google.longrunning.Operations.GetOperation] + * to return + * [ImportEntriesMetadata][google.cloud.datacatalog.v1.ImportEntriesMetadata] + * and an + * [ImportEntriesResponse][google.cloud.datacatalog.v1.ImportEntriesResponse] + * message. + * + * Sample code: + * ``` + * $dataCatalogClient = new DataCatalogClient(); + * try { + * $formattedParent = $dataCatalogClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); + * $operationResponse = $dataCatalogClient->importEntries($formattedParent); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $dataCatalogClient->importEntries($formattedParent); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $dataCatalogClient->resumeOperation($operationName, 'importEntries'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $dataCatalogClient->close(); + * } + * ``` + * + * @param string $parent Required. Target entry group for ingested entries. + * @param array $optionalArgs { + * Optional. + * + * @type string $gcsBucketPath + * Path to a Cloud Storage bucket that contains a dump ready for ingestion. + * @type string $jobId + * Optional. (Optional) Dataplex task job id, if specified will be used as + * part of ImportEntries LRO ID + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function importEntries($parent, array $optionalArgs = []) + { + $request = new ImportEntriesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['gcsBucketPath'])) { + $request->setGcsBucketPath($optionalArgs['gcsBucketPath']); + } + + if (isset($optionalArgs['jobId'])) { + $request->setJobId($optionalArgs['jobId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('ImportEntries', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Lists entries. + * + * Note: Currently, this method can list only custom entries. + * To get a list of both custom and automatically created entries, use + * [SearchCatalog][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog]. + * + * Sample code: + * ``` + * $dataCatalogClient = new DataCatalogClient(); + * try { + * $formattedParent = $dataCatalogClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); + * // Iterate over pages of elements + * $pagedResponse = $dataCatalogClient->listEntries($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $dataCatalogClient->listEntries($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $dataCatalogClient->close(); + * } + * ``` + * + * @param string $parent Required. The name of the entry group that contains the entries to list. + * + * Can be provided in URL format. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type FieldMask $readMask + * The fields to return for each entry. If empty or omitted, all + * fields are returned. + * + * For example, to return a list of entries with only the `name` field, + * set `read_mask` to only one path with the `name` value. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listEntries($parent, array $optionalArgs = []) + { + $request = new ListEntriesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['readMask'])) { + $request->setReadMask($optionalArgs['readMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListEntries', $optionalArgs, ListEntriesResponse::class, $request); + } + + /** + * Lists entry groups. + * + * Sample code: + * ``` + * $dataCatalogClient = new DataCatalogClient(); + * try { + * $formattedParent = $dataCatalogClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $dataCatalogClient->listEntryGroups($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $dataCatalogClient->listEntryGroups($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $dataCatalogClient->close(); + * } + * ``` + * + * @param string $parent Required. The name of the location that contains the entry groups to list. + * + * Can be provided as a URL. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listEntryGroups($parent, array $optionalArgs = []) + { + $request = new ListEntryGroupsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListEntryGroups', $optionalArgs, ListEntryGroupsResponse::class, $request); + } + + /** + * Lists tags assigned to an [Entry][google.cloud.datacatalog.v1.Entry]. + * The [columns][google.cloud.datacatalog.v1.Tag.column] in the response are + * lowercased. + * + * Sample code: + * ``` + * $dataCatalogClient = new DataCatalogClient(); + * try { + * $formattedParent = $dataCatalogClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); + * // Iterate over pages of elements + * $pagedResponse = $dataCatalogClient->listTags($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $dataCatalogClient->listTags($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $dataCatalogClient->close(); + * } + * ``` + * + * @param string $parent Required. The name of the Data Catalog resource to list the tags of. + * + * The resource can be an [Entry][google.cloud.datacatalog.v1.Entry] + * or an [EntryGroup][google.cloud.datacatalog.v1.EntryGroup] + * (without `/entries/{entries}` at the end). + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listTags($parent, array $optionalArgs = []) + { + $request = new ListTagsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListTags', $optionalArgs, ListTagsResponse::class, $request); + } + + /** + * Gets an entry by its target resource name. + * + * The resource name comes from the source Google Cloud Platform service. + * + * Sample code: + * ``` + * $dataCatalogClient = new DataCatalogClient(); + * try { + * $response = $dataCatalogClient->lookupEntry(); + * } finally { + * $dataCatalogClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $linkedResource + * The full name of the Google Cloud Platform resource the Data Catalog + * entry represents. For more information, see [Full Resource Name] + * (https://cloud.google.com/apis/design/resource_names#full_resource_name). + * + * Full names are case-sensitive. For example: + * + * * `//bigquery.googleapis.com/projects/{PROJECT_ID}/datasets/{DATASET_ID}/tables/{TABLE_ID}` + * * `//pubsub.googleapis.com/projects/{PROJECT_ID}/topics/{TOPIC_ID}` + * @type string $sqlResource + * The SQL name of the entry. SQL names are case-sensitive. + * + * Examples: + * + * * `pubsub.topic.{PROJECT_ID}.{TOPIC_ID}` + * * `pubsub.topic.{PROJECT_ID}.`\``{TOPIC.ID.SEPARATED.WITH.DOTS}`\` + * * `bigquery.table.{PROJECT_ID}.{DATASET_ID}.{TABLE_ID}` + * * `bigquery.dataset.{PROJECT_ID}.{DATASET_ID}` + * * `datacatalog.entry.{PROJECT_ID}.{LOCATION_ID}.{ENTRY_GROUP_ID}.{ENTRY_ID}` + * + * Identifiers (`*_ID`) should comply with the + * [Lexical structure in Standard SQL] + * (https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical). + * @type string $fullyQualifiedName + * [Fully Qualified Name + * (FQN)](https://cloud.google.com//data-catalog/docs/fully-qualified-names) + * of the resource. + * + * FQNs take two forms: + * + * * For non-regionalized resources: + * + * `{SYSTEM}:{PROJECT}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}` + * + * * For regionalized resources: + * + * `{SYSTEM}:{PROJECT}.{LOCATION_ID}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}` + * + * Example for a DPMS table: + * + * `dataproc_metastore:{PROJECT_ID}.{LOCATION_ID}.{INSTANCE_ID}.{DATABASE_ID}.{TABLE_ID}` + * @type string $project + * Project where the lookup should be performed. Required to lookup + * entry that is not a part of `DPMS` or `DATAPLEX` `integrated_system` + * using its `fully_qualified_name`. Ignored in other cases. + * @type string $location + * Location where the lookup should be performed. Required to lookup + * entry that is not a part of `DPMS` or `DATAPLEX` `integrated_system` + * using its `fully_qualified_name`. Ignored in other cases. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\DataCatalog\V1\Entry + * + * @throws ApiException if the remote call fails + */ + public function lookupEntry(array $optionalArgs = []) + { + $request = new LookupEntryRequest(); + if (isset($optionalArgs['linkedResource'])) { + $request->setLinkedResource($optionalArgs['linkedResource']); + } + + if (isset($optionalArgs['sqlResource'])) { + $request->setSqlResource($optionalArgs['sqlResource']); + } + + if (isset($optionalArgs['fullyQualifiedName'])) { + $request->setFullyQualifiedName($optionalArgs['fullyQualifiedName']); + } + + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + } + + if (isset($optionalArgs['location'])) { + $request->setLocation($optionalArgs['location']); + } + + return $this->startCall('LookupEntry', Entry::class, $optionalArgs, $request)->wait(); + } + + /** + * Modifies contacts, part of the business context of an + * [Entry][google.cloud.datacatalog.v1.Entry]. + * + * To call this method, you must have the `datacatalog.entries.updateContacts` + * IAM permission on the corresponding project. + * + * Sample code: + * ``` + * $dataCatalogClient = new DataCatalogClient(); + * try { + * $formattedName = $dataCatalogClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); + * $contacts = new Contacts(); + * $response = $dataCatalogClient->modifyEntryContacts($formattedName, $contacts); + * } finally { + * $dataCatalogClient->close(); + * } + * ``` + * + * @param string $name Required. The full resource name of the entry. + * @param Contacts $contacts Required. The new value for the Contacts. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\DataCatalog\V1\Contacts + * + * @throws ApiException if the remote call fails + */ + public function modifyEntryContacts($name, $contacts, array $optionalArgs = []) + { + $request = new ModifyEntryContactsRequest(); + $requestParamHeaders = []; + $request->setName($name); + $request->setContacts($contacts); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('ModifyEntryContacts', Contacts::class, $optionalArgs, $request)->wait(); + } + + /** + * Modifies entry overview, part of the business context of an + * [Entry][google.cloud.datacatalog.v1.Entry]. + * + * To call this method, you must have the `datacatalog.entries.updateOverview` + * IAM permission on the corresponding project. + * + * Sample code: + * ``` + * $dataCatalogClient = new DataCatalogClient(); + * try { + * $formattedName = $dataCatalogClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); + * $entryOverview = new EntryOverview(); + * $response = $dataCatalogClient->modifyEntryOverview($formattedName, $entryOverview); + * } finally { + * $dataCatalogClient->close(); + * } + * ``` + * + * @param string $name Required. The full resource name of the entry. + * @param EntryOverview $entryOverview Required. The new value for the Entry Overview. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\DataCatalog\V1\EntryOverview + * + * @throws ApiException if the remote call fails + */ + public function modifyEntryOverview($name, $entryOverview, array $optionalArgs = []) + { + $request = new ModifyEntryOverviewRequest(); + $requestParamHeaders = []; + $request->setName($name); + $request->setEntryOverview($entryOverview); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('ModifyEntryOverview', EntryOverview::class, $optionalArgs, $request)->wait(); + } + + /** + * `ReconcileTags` creates or updates a list of tags on the entry. + * If the + * [ReconcileTagsRequest.force_delete_missing][google.cloud.datacatalog.v1.ReconcileTagsRequest.force_delete_missing] + * parameter is set, the operation deletes tags not included in the input tag + * list. + * + * `ReconcileTags` returns a [long-running operation] + * [google.longrunning.Operation] resource that can be queried with + * [Operations.GetOperation][google.longrunning.Operations.GetOperation] + * to return [ReconcileTagsMetadata] + * [google.cloud.datacatalog.v1.ReconcileTagsMetadata] and + * a [ReconcileTagsResponse] + * [google.cloud.datacatalog.v1.ReconcileTagsResponse] message. + * + * Sample code: + * ``` + * $dataCatalogClient = new DataCatalogClient(); + * try { + * $formattedParent = $dataCatalogClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); + * $formattedTagTemplate = $dataCatalogClient->tagTemplateName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); + * $operationResponse = $dataCatalogClient->reconcileTags($formattedParent, $formattedTagTemplate); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $dataCatalogClient->reconcileTags($formattedParent, $formattedTagTemplate); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $dataCatalogClient->resumeOperation($operationName, 'reconcileTags'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $dataCatalogClient->close(); + * } + * ``` + * + * @param string $parent Required. Name of [Entry][google.cloud.datacatalog.v1.Entry] to be tagged. + * @param string $tagTemplate Required. The name of the tag template, which is used for reconciliation. + * @param array $optionalArgs { + * Optional. + * + * @type bool $forceDeleteMissing + * If set to `true`, deletes entry tags related to a tag template + * not listed in the tags source from an entry. If set to `false`, + * unlisted tags are retained. + * @type Tag[] $tags + * A list of tags to apply to an entry. A tag can specify a + * tag template, which must be the template specified in the + * `ReconcileTagsRequest`. + * The sole entry and each of its columns must be mentioned at most once. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function reconcileTags($parent, $tagTemplate, array $optionalArgs = []) + { + $request = new ReconcileTagsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setTagTemplate($tagTemplate); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['forceDeleteMissing'])) { + $request->setForceDeleteMissing($optionalArgs['forceDeleteMissing']); + } + + if (isset($optionalArgs['tags'])) { + $request->setTags($optionalArgs['tags']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('ReconcileTags', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Renames a field in a tag template. + * + * You must enable the Data Catalog API in the project identified by the + * `name` parameter. For more information, see [Data Catalog resource project] + * (https://cloud.google.com/data-catalog/docs/concepts/resource-project). + * + * Sample code: + * ``` + * $dataCatalogClient = new DataCatalogClient(); + * try { + * $formattedName = $dataCatalogClient->tagTemplateFieldName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]', '[FIELD]'); + * $newTagTemplateFieldId = 'new_tag_template_field_id'; + * $response = $dataCatalogClient->renameTagTemplateField($formattedName, $newTagTemplateFieldId); + * } finally { + * $dataCatalogClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the tag template field. + * @param string $newTagTemplateFieldId Required. The new ID of this tag template field. For example, + * `my_new_field`. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\DataCatalog\V1\TagTemplateField + * + * @throws ApiException if the remote call fails + */ + public function renameTagTemplateField($name, $newTagTemplateFieldId, array $optionalArgs = []) + { + $request = new RenameTagTemplateFieldRequest(); + $requestParamHeaders = []; + $request->setName($name); + $request->setNewTagTemplateFieldId($newTagTemplateFieldId); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('RenameTagTemplateField', TagTemplateField::class, $optionalArgs, $request)->wait(); + } + + /** + * Renames an enum value in a tag template. + * + * Within a single enum field, enum values must be unique. + * + * Sample code: + * ``` + * $dataCatalogClient = new DataCatalogClient(); + * try { + * $formattedName = $dataCatalogClient->tagTemplateFieldEnumValueName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]', '[TAG_TEMPLATE_FIELD_ID]', '[ENUM_VALUE_DISPLAY_NAME]'); + * $newEnumValueDisplayName = 'new_enum_value_display_name'; + * $response = $dataCatalogClient->renameTagTemplateFieldEnumValue($formattedName, $newEnumValueDisplayName); + * } finally { + * $dataCatalogClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the enum field value. + * @param string $newEnumValueDisplayName Required. The new display name of the enum value. For example, + * `my_new_enum_value`. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\DataCatalog\V1\TagTemplateField + * + * @throws ApiException if the remote call fails + */ + public function renameTagTemplateFieldEnumValue($name, $newEnumValueDisplayName, array $optionalArgs = []) + { + $request = new RenameTagTemplateFieldEnumValueRequest(); + $requestParamHeaders = []; + $request->setName($name); + $request->setNewEnumValueDisplayName($newEnumValueDisplayName); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('RenameTagTemplateFieldEnumValue', TagTemplateField::class, $optionalArgs, $request)->wait(); + } + + /** + * Searches Data Catalog for multiple resources like entries and tags that + * match a query. + * + * This is a [Custom Method] + * (https://cloud.google.com/apis/design/custom_methods) that doesn't return + * all information on a resource, only its ID and high level fields. To get + * more information, you can subsequently call specific get methods. + * + * Note: Data Catalog search queries don't guarantee full recall. Results + * that match your query might not be returned, even in subsequent + * result pages. Additionally, returned (and not returned) results can vary + * if you repeat search queries. + * + * For more information, see [Data Catalog search syntax] + * (https://cloud.google.com/data-catalog/docs/how-to/search-reference). + * + * Sample code: + * ``` + * $dataCatalogClient = new DataCatalogClient(); + * try { + * $scope = new Scope(); + * $query = 'query'; + * // Iterate over pages of elements + * $pagedResponse = $dataCatalogClient->searchCatalog($scope, $query); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $dataCatalogClient->searchCatalog($scope, $query); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $dataCatalogClient->close(); + * } + * ``` + * + * @param Scope $scope Required. The scope of this search request. + * + * The `scope` is invalid if `include_org_ids`, `include_project_ids` are + * empty AND `include_gcp_public_datasets` is set to `false`. In this case, + * the request returns an error. + * @param string $query Optional. The query string with a minimum of 3 characters and specific + * syntax. For more information, see [Data Catalog search + * syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference). + * + * An empty query string returns all data assets (in the specified scope) + * that you have access to. + * + * A query string can be a simple `xyz` or qualified by predicates: + * + * * `name:x` + * * `column:y` + * * `description:z` + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type string $orderBy + * Specifies the order of results. + * + * Currently supported case-sensitive values are: + * + * * `relevance` that can only be descending + * * `last_modified_timestamp [asc|desc]` with descending (`desc`) as default + * * `default` that can only be descending + * + * Search queries don't guarantee full recall. Results that match your query + * might not be returned, even in subsequent result pages. Additionally, + * returned (and not returned) results can vary if you repeat search queries. + * If you are experiencing recall issues and you don't have to fetch the + * results in any specific order, consider setting this parameter to + * `default`. + * + * If this parameter is omitted, it defaults to the descending `relevance`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function searchCatalog($scope, $query, array $optionalArgs = []) + { + $request = new SearchCatalogRequest(); + $request->setScope($scope); + $request->setQuery($query); + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + return $this->getPagedListResponse('SearchCatalog', $optionalArgs, SearchCatalogResponse::class, $request); + } + + /** + * Sets an access control policy for a resource. Replaces any existing + * policy. + * + * Supported resources are: + * + * - Tag templates + * - Entry groups + * + * Note: This method sets policies only within Data Catalog and can't be + * used to manage policies in BigQuery, Pub/Sub, Dataproc Metastore, and any + * external Google Cloud Platform resources synced with the Data Catalog. + * + * To call this method, you must have the following Google IAM permissions: + * + * - `datacatalog.tagTemplates.setIamPolicy` to set policies on tag + * templates. + * - `datacatalog.entryGroups.setIamPolicy` to set policies on entry groups. + * + * Sample code: + * ``` + * $dataCatalogClient = new DataCatalogClient(); + * try { + * $resource = 'resource'; + * $policy = new Policy(); + * $response = $dataCatalogClient->setIamPolicy($resource, $policy); + * } finally { + * $dataCatalogClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy is being specified. + * See the operation documentation for the appropriate value for this field. + * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of + * the policy is limited to a few 10s of KB. An empty policy is a + * valid policy but certain Cloud Platform services (such as Projects) + * might reject them. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + * the fields in the mask will be modified. If no mask is provided, the + * following default mask is used: + * + * `paths: "bindings, etag"` + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Iam\V1\Policy + * + * @throws ApiException if the remote call fails + */ + public function setIamPolicy($resource, $policy, array $optionalArgs = []) + { + $request = new SetIamPolicyRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $request->setPolicy($policy); + $requestParamHeaders['resource'] = $resource; + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('SetIamPolicy', Policy::class, $optionalArgs, $request)->wait(); + } + + /** + * Marks an [Entry][google.cloud.datacatalog.v1.Entry] as starred by + * the current user. Starring information is private to each user. + * + * Sample code: + * ``` + * $dataCatalogClient = new DataCatalogClient(); + * try { + * $formattedName = $dataCatalogClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); + * $response = $dataCatalogClient->starEntry($formattedName); + * } finally { + * $dataCatalogClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the entry to mark as starred. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\DataCatalog\V1\StarEntryResponse + * + * @throws ApiException if the remote call fails + */ + public function starEntry($name, array $optionalArgs = []) + { + $request = new StarEntryRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('StarEntry', StarEntryResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets your permissions on a resource. + * + * Returns an empty set of permissions if the resource doesn't exist. + * + * Supported resources are: + * + * - Tag templates + * - Entry groups + * + * Note: This method gets policies only within Data Catalog and can't be + * used to get policies from BigQuery, Pub/Sub, Dataproc Metastore, and any + * external Google Cloud Platform resources ingested into Data Catalog. + * + * No Google IAM permissions are required to call this method. + * + * Sample code: + * ``` + * $dataCatalogClient = new DataCatalogClient(); + * try { + * $resource = 'resource'; + * $permissions = []; + * $response = $dataCatalogClient->testIamPermissions($resource, $permissions); + * } finally { + * $dataCatalogClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Iam\V1\TestIamPermissionsResponse + * + * @throws ApiException if the remote call fails + */ + public function testIamPermissions($resource, $permissions, array $optionalArgs = []) + { + $request = new TestIamPermissionsRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $request->setPermissions($permissions); + $requestParamHeaders['resource'] = $resource; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Marks an [Entry][google.cloud.datacatalog.v1.Entry] as NOT starred by + * the current user. Starring information is private to each user. + * + * Sample code: + * ``` + * $dataCatalogClient = new DataCatalogClient(); + * try { + * $formattedName = $dataCatalogClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); + * $response = $dataCatalogClient->unstarEntry($formattedName); + * } finally { + * $dataCatalogClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the entry to mark as **not** starred. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\DataCatalog\V1\UnstarEntryResponse + * + * @throws ApiException if the remote call fails + */ + public function unstarEntry($name, array $optionalArgs = []) + { + $request = new UnstarEntryRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UnstarEntry', UnstarEntryResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Updates an existing entry. + * + * You must enable the Data Catalog API in the project identified by + * the `entry.name` parameter. For more information, see [Data Catalog + * resource + * project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). + * + * Sample code: + * ``` + * $dataCatalogClient = new DataCatalogClient(); + * try { + * $entry = new Entry(); + * $response = $dataCatalogClient->updateEntry($entry); + * } finally { + * $dataCatalogClient->close(); + * } + * ``` + * + * @param Entry $entry Required. Updates for the entry. The `name` field must be set. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * Names of fields whose values to overwrite on an entry. + * + * If this parameter is absent or empty, all modifiable fields + * are overwritten. If such fields are non-required and omitted in the + * request body, their values are emptied. + * + * You can modify only the fields listed below. + * + * For entries with type `DATA_STREAM`: + * + * * `schema` + * + * For entries with type `FILESET`: + * + * * `schema` + * * `display_name` + * * `description` + * * `gcs_fileset_spec` + * * `gcs_fileset_spec.file_patterns` + * + * For entries with `user_specified_type`: + * + * * `schema` + * * `display_name` + * * `description` + * * `user_specified_type` + * * `user_specified_system` + * * `linked_resource` + * * `source_system_timestamps` + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\DataCatalog\V1\Entry + * + * @throws ApiException if the remote call fails + */ + public function updateEntry($entry, array $optionalArgs = []) + { + $request = new UpdateEntryRequest(); + $requestParamHeaders = []; + $request->setEntry($entry); + $requestParamHeaders['entry.name'] = $entry->getName(); + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateEntry', Entry::class, $optionalArgs, $request)->wait(); + } + + /** + * Updates an entry group. + * + * You must enable the Data Catalog API in the project identified by + * the `entry_group.name` parameter. For more information, see [Data Catalog + * resource + * project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). + * + * Sample code: + * ``` + * $dataCatalogClient = new DataCatalogClient(); + * try { + * $entryGroup = new EntryGroup(); + * $response = $dataCatalogClient->updateEntryGroup($entryGroup); + * } finally { + * $dataCatalogClient->close(); + * } + * ``` + * + * @param EntryGroup $entryGroup Required. Updates for the entry group. The `name` field must be set. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * Names of fields whose values to overwrite on an entry group. + * + * If this parameter is absent or empty, all modifiable fields + * are overwritten. If such fields are non-required and omitted in the + * request body, their values are emptied. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\DataCatalog\V1\EntryGroup + * + * @throws ApiException if the remote call fails + */ + public function updateEntryGroup($entryGroup, array $optionalArgs = []) + { + $request = new UpdateEntryGroupRequest(); + $requestParamHeaders = []; + $request->setEntryGroup($entryGroup); + $requestParamHeaders['entry_group.name'] = $entryGroup->getName(); + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateEntryGroup', EntryGroup::class, $optionalArgs, $request)->wait(); + } + + /** + * Updates an existing tag. + * + * Sample code: + * ``` + * $dataCatalogClient = new DataCatalogClient(); + * try { + * $tag = new Tag(); + * $response = $dataCatalogClient->updateTag($tag); + * } finally { + * $dataCatalogClient->close(); + * } + * ``` + * + * @param Tag $tag Required. The updated tag. The "name" field must be set. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * Names of fields whose values to overwrite on a tag. Currently, a tag has + * the only modifiable field with the name `fields`. + * + * In general, if this parameter is absent or empty, all modifiable fields + * are overwritten. If such fields are non-required and omitted in the + * request body, their values are emptied. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\DataCatalog\V1\Tag + * + * @throws ApiException if the remote call fails + */ + public function updateTag($tag, array $optionalArgs = []) + { + $request = new UpdateTagRequest(); + $requestParamHeaders = []; + $request->setTag($tag); + $requestParamHeaders['tag.name'] = $tag->getName(); + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateTag', Tag::class, $optionalArgs, $request)->wait(); + } + + /** + * Updates a tag template. + * + * You can't update template fields with this method. These fields are + * separate resources with their own create, update, and delete methods. + * + * You must enable the Data Catalog API in the project identified by + * the `tag_template.name` parameter. For more information, see [Data Catalog + * resource + * project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). + * + * Sample code: + * ``` + * $dataCatalogClient = new DataCatalogClient(); + * try { + * $tagTemplate = new TagTemplate(); + * $response = $dataCatalogClient->updateTagTemplate($tagTemplate); + * } finally { + * $dataCatalogClient->close(); + * } + * ``` + * + * @param TagTemplate $tagTemplate Required. The template to update. The `name` field must be set. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * Names of fields whose values to overwrite on a tag template. Currently, + * only `display_name` and `is_publicly_readable` can be overwritten. + * + * If this parameter is absent or empty, all modifiable fields + * are overwritten. If such fields are non-required and omitted in the + * request body, their values are emptied. + * + * Note: Updating the `is_publicly_readable` field may require up to 12 + * hours to take effect in search results. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\DataCatalog\V1\TagTemplate + * + * @throws ApiException if the remote call fails + */ + public function updateTagTemplate($tagTemplate, array $optionalArgs = []) + { + $request = new UpdateTagTemplateRequest(); + $requestParamHeaders = []; + $request->setTagTemplate($tagTemplate); + $requestParamHeaders['tag_template.name'] = $tagTemplate->getName(); + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateTagTemplate', TagTemplate::class, $optionalArgs, $request)->wait(); + } + + /** + * Updates a field in a tag template. + * + * You can't update the field type with this method. + * + * You must enable the Data Catalog API in the project + * identified by the `name` parameter. For more information, see [Data Catalog + * resource + * project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). + * + * Sample code: + * ``` + * $dataCatalogClient = new DataCatalogClient(); + * try { + * $formattedName = $dataCatalogClient->tagTemplateFieldName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]', '[FIELD]'); + * $tagTemplateField = new TagTemplateField(); + * $response = $dataCatalogClient->updateTagTemplateField($formattedName, $tagTemplateField); + * } finally { + * $dataCatalogClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the tag template field. + * @param TagTemplateField $tagTemplateField Required. The template to update. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * Optional. Names of fields whose values to overwrite on an individual field + * of a tag template. The following fields are modifiable: + * + * * `display_name` + * * `type.enum_type` + * * `is_required` + * + * If this parameter is absent or empty, all modifiable fields + * are overwritten. If such fields are non-required and omitted in the request + * body, their values are emptied with one exception: when updating an enum + * type, the provided values are merged with the existing values. Therefore, + * enum values can only be added, existing enum values cannot be deleted or + * renamed. + * + * Additionally, updating a template field from optional to required is + * *not* allowed. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\DataCatalog\V1\TagTemplateField + * + * @throws ApiException if the remote call fails + */ + public function updateTagTemplateField($name, $tagTemplateField, array $optionalArgs = []) + { + $request = new UpdateTagTemplateFieldRequest(); + $requestParamHeaders = []; + $request->setName($name); + $request->setTagTemplateField($tagTemplateField); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateTagTemplateField', TagTemplateField::class, $optionalArgs, $request)->wait(); + } +} diff --git a/owl-bot-staging/DataCatalog/v1/src/V1/Gapic/PolicyTagManagerGapicClient.php b/owl-bot-staging/DataCatalog/v1/src/V1/Gapic/PolicyTagManagerGapicClient.php new file mode 100644 index 000000000000..d76c7e3d43ca --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/src/V1/Gapic/PolicyTagManagerGapicClient.php @@ -0,0 +1,992 @@ +taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); + * $response = $policyTagManagerClient->createPolicyTag($formattedParent); + * } finally { + * $policyTagManagerClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To + * assist with these names, this class includes a format method for each type of + * name, and additionally a parseName method to extract the individual identifiers + * contained within formatted names that are returned by the API. + * + * This service has a new (beta) implementation. See {@see + * \Google\Cloud\DataCatalog\V1\Client\PolicyTagManagerClient} to use the new + * surface. + */ +class PolicyTagManagerGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.datacatalog.v1.PolicyTagManager'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'datacatalog.googleapis.com'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static $locationNameTemplate; + + private static $policyTagNameTemplate; + + private static $taxonomyNameTemplate; + + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/policy_tag_manager_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/policy_tag_manager_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/policy_tag_manager_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/policy_tag_manager_rest_client_config.php', + ], + ], + ]; + } + + private static function getLocationNameTemplate() + { + if (self::$locationNameTemplate == null) { + self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); + } + + return self::$locationNameTemplate; + } + + private static function getPolicyTagNameTemplate() + { + if (self::$policyTagNameTemplate == null) { + self::$policyTagNameTemplate = new PathTemplate('projects/{project}/locations/{location}/taxonomies/{taxonomy}/policyTags/{policy_tag}'); + } + + return self::$policyTagNameTemplate; + } + + private static function getTaxonomyNameTemplate() + { + if (self::$taxonomyNameTemplate == null) { + self::$taxonomyNameTemplate = new PathTemplate('projects/{project}/locations/{location}/taxonomies/{taxonomy}'); + } + + return self::$taxonomyNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'location' => self::getLocationNameTemplate(), + 'policyTag' => self::getPolicyTagNameTemplate(), + 'taxonomy' => self::getTaxonomyNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName($project, $location) + { + return self::getLocationNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a policy_tag + * resource. + * + * @param string $project + * @param string $location + * @param string $taxonomy + * @param string $policyTag + * + * @return string The formatted policy_tag resource. + */ + public static function policyTagName($project, $location, $taxonomy, $policyTag) + { + return self::getPolicyTagNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'taxonomy' => $taxonomy, + 'policy_tag' => $policyTag, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a taxonomy + * resource. + * + * @param string $project + * @param string $location + * @param string $taxonomy + * + * @return string The formatted taxonomy resource. + */ + public static function taxonomyName($project, $location, $taxonomy) + { + return self::getTaxonomyNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'taxonomy' => $taxonomy, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - location: projects/{project}/locations/{location} + * - policyTag: projects/{project}/locations/{location}/taxonomies/{taxonomy}/policyTags/{policy_tag} + * - taxonomy: projects/{project}/locations/{location}/taxonomies/{taxonomy} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'datacatalog.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** + * Creates a policy tag in a taxonomy. + * + * Sample code: + * ``` + * $policyTagManagerClient = new PolicyTagManagerClient(); + * try { + * $formattedParent = $policyTagManagerClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); + * $response = $policyTagManagerClient->createPolicyTag($formattedParent); + * } finally { + * $policyTagManagerClient->close(); + * } + * ``` + * + * @param string $parent Required. Resource name of the taxonomy that the policy tag will belong to. + * @param array $optionalArgs { + * Optional. + * + * @type PolicyTag $policyTag + * The policy tag to create. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\DataCatalog\V1\PolicyTag + * + * @throws ApiException if the remote call fails + */ + public function createPolicyTag($parent, array $optionalArgs = []) + { + $request = new CreatePolicyTagRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['policyTag'])) { + $request->setPolicyTag($optionalArgs['policyTag']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreatePolicyTag', PolicyTag::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates a taxonomy in a specified project. + * + * The taxonomy is initially empty, that is, it doesn't contain policy tags. + * + * Sample code: + * ``` + * $policyTagManagerClient = new PolicyTagManagerClient(); + * try { + * $formattedParent = $policyTagManagerClient->locationName('[PROJECT]', '[LOCATION]'); + * $response = $policyTagManagerClient->createTaxonomy($formattedParent); + * } finally { + * $policyTagManagerClient->close(); + * } + * ``` + * + * @param string $parent Required. Resource name of the project that the taxonomy will belong to. + * @param array $optionalArgs { + * Optional. + * + * @type Taxonomy $taxonomy + * The taxonomy to create. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\DataCatalog\V1\Taxonomy + * + * @throws ApiException if the remote call fails + */ + public function createTaxonomy($parent, array $optionalArgs = []) + { + $request = new CreateTaxonomyRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['taxonomy'])) { + $request->setTaxonomy($optionalArgs['taxonomy']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateTaxonomy', Taxonomy::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes a policy tag together with the following: + * + * * All of its descendant policy tags, if any + * * Policies associated with the policy tag and its descendants + * * References from BigQuery table schema of the policy tag and its + * descendants + * + * Sample code: + * ``` + * $policyTagManagerClient = new PolicyTagManagerClient(); + * try { + * $formattedName = $policyTagManagerClient->policyTagName('[PROJECT]', '[LOCATION]', '[TAXONOMY]', '[POLICY_TAG]'); + * $policyTagManagerClient->deletePolicyTag($formattedName); + * } finally { + * $policyTagManagerClient->close(); + * } + * ``` + * + * @param string $name Required. Resource name of the policy tag to delete. + * + * Note: All of its descendant policy tags are also deleted. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException if the remote call fails + */ + public function deletePolicyTag($name, array $optionalArgs = []) + { + $request = new DeletePolicyTagRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('DeletePolicyTag', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes a taxonomy, including all policy tags in this + * taxonomy, their associated policies, and the policy tags references from + * BigQuery columns. + * + * Sample code: + * ``` + * $policyTagManagerClient = new PolicyTagManagerClient(); + * try { + * $formattedName = $policyTagManagerClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); + * $policyTagManagerClient->deleteTaxonomy($formattedName); + * } finally { + * $policyTagManagerClient->close(); + * } + * ``` + * + * @param string $name Required. Resource name of the taxonomy to delete. + * + * Note: All policy tags in this taxonomy are also deleted. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException if the remote call fails + */ + public function deleteTaxonomy($name, array $optionalArgs = []) + { + $request = new DeleteTaxonomyRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('DeleteTaxonomy', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets the IAM policy for a policy tag or a taxonomy. + * + * Sample code: + * ``` + * $policyTagManagerClient = new PolicyTagManagerClient(); + * try { + * $resource = 'resource'; + * $response = $policyTagManagerClient->getIamPolicy($resource); + * } finally { + * $policyTagManagerClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param array $optionalArgs { + * Optional. + * + * @type GetPolicyOptions $options + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Iam\V1\Policy + * + * @throws ApiException if the remote call fails + */ + public function getIamPolicy($resource, array $optionalArgs = []) + { + $request = new GetIamPolicyRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $requestParamHeaders['resource'] = $resource; + if (isset($optionalArgs['options'])) { + $request->setOptions($optionalArgs['options']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets a policy tag. + * + * Sample code: + * ``` + * $policyTagManagerClient = new PolicyTagManagerClient(); + * try { + * $formattedName = $policyTagManagerClient->policyTagName('[PROJECT]', '[LOCATION]', '[TAXONOMY]', '[POLICY_TAG]'); + * $response = $policyTagManagerClient->getPolicyTag($formattedName); + * } finally { + * $policyTagManagerClient->close(); + * } + * ``` + * + * @param string $name Required. Resource name of the policy tag. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\DataCatalog\V1\PolicyTag + * + * @throws ApiException if the remote call fails + */ + public function getPolicyTag($name, array $optionalArgs = []) + { + $request = new GetPolicyTagRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetPolicyTag', PolicyTag::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets a taxonomy. + * + * Sample code: + * ``` + * $policyTagManagerClient = new PolicyTagManagerClient(); + * try { + * $formattedName = $policyTagManagerClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); + * $response = $policyTagManagerClient->getTaxonomy($formattedName); + * } finally { + * $policyTagManagerClient->close(); + * } + * ``` + * + * @param string $name Required. Resource name of the taxonomy to get. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\DataCatalog\V1\Taxonomy + * + * @throws ApiException if the remote call fails + */ + public function getTaxonomy($name, array $optionalArgs = []) + { + $request = new GetTaxonomyRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetTaxonomy', Taxonomy::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists all policy tags in a taxonomy. + * + * Sample code: + * ``` + * $policyTagManagerClient = new PolicyTagManagerClient(); + * try { + * $formattedParent = $policyTagManagerClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); + * // Iterate over pages of elements + * $pagedResponse = $policyTagManagerClient->listPolicyTags($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $policyTagManagerClient->listPolicyTags($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $policyTagManagerClient->close(); + * } + * ``` + * + * @param string $parent Required. Resource name of the taxonomy to list the policy tags of. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listPolicyTags($parent, array $optionalArgs = []) + { + $request = new ListPolicyTagsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListPolicyTags', $optionalArgs, ListPolicyTagsResponse::class, $request); + } + + /** + * Lists all taxonomies in a project in a particular location that you + * have a permission to view. + * + * Sample code: + * ``` + * $policyTagManagerClient = new PolicyTagManagerClient(); + * try { + * $formattedParent = $policyTagManagerClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $policyTagManagerClient->listTaxonomies($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $policyTagManagerClient->listTaxonomies($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $policyTagManagerClient->close(); + * } + * ``` + * + * @param string $parent Required. Resource name of the project to list the taxonomies of. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type string $filter + * Supported field for filter is 'service' and value is 'dataplex'. + * Eg: service=dataplex. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listTaxonomies($parent, array $optionalArgs = []) + { + $request = new ListTaxonomiesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListTaxonomies', $optionalArgs, ListTaxonomiesResponse::class, $request); + } + + /** + * Sets the IAM policy for a policy tag or a taxonomy. + * + * Sample code: + * ``` + * $policyTagManagerClient = new PolicyTagManagerClient(); + * try { + * $resource = 'resource'; + * $policy = new Policy(); + * $response = $policyTagManagerClient->setIamPolicy($resource, $policy); + * } finally { + * $policyTagManagerClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy is being specified. + * See the operation documentation for the appropriate value for this field. + * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of + * the policy is limited to a few 10s of KB. An empty policy is a + * valid policy but certain Cloud Platform services (such as Projects) + * might reject them. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + * the fields in the mask will be modified. If no mask is provided, the + * following default mask is used: + * + * `paths: "bindings, etag"` + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Iam\V1\Policy + * + * @throws ApiException if the remote call fails + */ + public function setIamPolicy($resource, $policy, array $optionalArgs = []) + { + $request = new SetIamPolicyRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $request->setPolicy($policy); + $requestParamHeaders['resource'] = $resource; + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('SetIamPolicy', Policy::class, $optionalArgs, $request)->wait(); + } + + /** + * Returns your permissions on a specified policy tag or + * taxonomy. + * + * Sample code: + * ``` + * $policyTagManagerClient = new PolicyTagManagerClient(); + * try { + * $resource = 'resource'; + * $permissions = []; + * $response = $policyTagManagerClient->testIamPermissions($resource, $permissions); + * } finally { + * $policyTagManagerClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Iam\V1\TestIamPermissionsResponse + * + * @throws ApiException if the remote call fails + */ + public function testIamPermissions($resource, $permissions, array $optionalArgs = []) + { + $request = new TestIamPermissionsRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $request->setPermissions($permissions); + $requestParamHeaders['resource'] = $resource; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Updates a policy tag, including its display + * name, description, and parent policy tag. + * + * Sample code: + * ``` + * $policyTagManagerClient = new PolicyTagManagerClient(); + * try { + * $response = $policyTagManagerClient->updatePolicyTag(); + * } finally { + * $policyTagManagerClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type PolicyTag $policyTag + * The policy tag to update. You can update only its description, display + * name, and parent policy tag fields. + * @type FieldMask $updateMask + * Specifies the fields to update. + * + * You can update only display name, description, and parent policy tag. + * If not set, defaults to all updatable fields. + * For more information, see [FieldMask] + * (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask). + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\DataCatalog\V1\PolicyTag + * + * @throws ApiException if the remote call fails + */ + public function updatePolicyTag(array $optionalArgs = []) + { + $request = new UpdatePolicyTagRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['policyTag'])) { + $request->setPolicyTag($optionalArgs['policyTag']); + } + + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdatePolicyTag', PolicyTag::class, $optionalArgs, $request)->wait(); + } + + /** + * Updates a taxonomy, including its display name, + * description, and activated policy types. + * + * Sample code: + * ``` + * $policyTagManagerClient = new PolicyTagManagerClient(); + * try { + * $response = $policyTagManagerClient->updateTaxonomy(); + * } finally { + * $policyTagManagerClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type Taxonomy $taxonomy + * The taxonomy to update. You can update only its description, display name, + * and activated policy types. + * @type FieldMask $updateMask + * Specifies fields to update. If not set, defaults to all fields you can + * update. + * + * For more information, see [FieldMask] + * (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask). + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\DataCatalog\V1\Taxonomy + * + * @throws ApiException if the remote call fails + */ + public function updateTaxonomy(array $optionalArgs = []) + { + $request = new UpdateTaxonomyRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['taxonomy'])) { + $request->setTaxonomy($optionalArgs['taxonomy']); + } + + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateTaxonomy', Taxonomy::class, $optionalArgs, $request)->wait(); + } +} diff --git a/owl-bot-staging/DataCatalog/v1/src/V1/Gapic/PolicyTagManagerSerializationGapicClient.php b/owl-bot-staging/DataCatalog/v1/src/V1/Gapic/PolicyTagManagerSerializationGapicClient.php new file mode 100644 index 000000000000..a08abdc29714 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/src/V1/Gapic/PolicyTagManagerSerializationGapicClient.php @@ -0,0 +1,460 @@ +locationName('[PROJECT]', '[LOCATION]'); + * $formattedTaxonomies = [ + * $policyTagManagerSerializationClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'), + * ]; + * $response = $policyTagManagerSerializationClient->exportTaxonomies($formattedParent, $formattedTaxonomies); + * } finally { + * $policyTagManagerSerializationClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To + * assist with these names, this class includes a format method for each type of + * name, and additionally a parseName method to extract the individual identifiers + * contained within formatted names that are returned by the API. + * + * This service has a new (beta) implementation. See {@see + * \Google\Cloud\DataCatalog\V1\Client\PolicyTagManagerSerializationClient} to use + * the new surface. + */ +class PolicyTagManagerSerializationGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.datacatalog.v1.PolicyTagManagerSerialization'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'datacatalog.googleapis.com'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static $locationNameTemplate; + + private static $taxonomyNameTemplate; + + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/policy_tag_manager_serialization_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/policy_tag_manager_serialization_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/policy_tag_manager_serialization_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/policy_tag_manager_serialization_rest_client_config.php', + ], + ], + ]; + } + + private static function getLocationNameTemplate() + { + if (self::$locationNameTemplate == null) { + self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); + } + + return self::$locationNameTemplate; + } + + private static function getTaxonomyNameTemplate() + { + if (self::$taxonomyNameTemplate == null) { + self::$taxonomyNameTemplate = new PathTemplate('projects/{project}/locations/{location}/taxonomies/{taxonomy}'); + } + + return self::$taxonomyNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'location' => self::getLocationNameTemplate(), + 'taxonomy' => self::getTaxonomyNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName($project, $location) + { + return self::getLocationNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a taxonomy + * resource. + * + * @param string $project + * @param string $location + * @param string $taxonomy + * + * @return string The formatted taxonomy resource. + */ + public static function taxonomyName($project, $location, $taxonomy) + { + return self::getTaxonomyNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'taxonomy' => $taxonomy, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - location: projects/{project}/locations/{location} + * - taxonomy: projects/{project}/locations/{location}/taxonomies/{taxonomy} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'datacatalog.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** + * Exports taxonomies in the requested type and returns them, + * including their policy tags. The requested taxonomies must belong to the + * same project. + * + * This method generates `SerializedTaxonomy` protocol buffers with nested + * policy tags that can be used as input for `ImportTaxonomies` calls. + * + * Sample code: + * ``` + * $policyTagManagerSerializationClient = new PolicyTagManagerSerializationClient(); + * try { + * $formattedParent = $policyTagManagerSerializationClient->locationName('[PROJECT]', '[LOCATION]'); + * $formattedTaxonomies = [ + * $policyTagManagerSerializationClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'), + * ]; + * $response = $policyTagManagerSerializationClient->exportTaxonomies($formattedParent, $formattedTaxonomies); + * } finally { + * $policyTagManagerSerializationClient->close(); + * } + * ``` + * + * @param string $parent Required. Resource name of the project that the exported taxonomies belong + * to. + * @param string[] $taxonomies Required. Resource names of the taxonomies to export. + * @param array $optionalArgs { + * Optional. + * + * @type bool $serializedTaxonomies + * Serialized export taxonomies that contain all the policy + * tags as nested protocol buffers. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\DataCatalog\V1\ExportTaxonomiesResponse + * + * @throws ApiException if the remote call fails + */ + public function exportTaxonomies($parent, $taxonomies, array $optionalArgs = []) + { + $request = new ExportTaxonomiesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setTaxonomies($taxonomies); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['serializedTaxonomies'])) { + $request->setSerializedTaxonomies($optionalArgs['serializedTaxonomies']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('ExportTaxonomies', ExportTaxonomiesResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates new taxonomies (including their policy tags) in a given project + * by importing from inlined or cross-regional sources. + * + * For a cross-regional source, new taxonomies are created by copying + * from a source in another region. + * + * For an inlined source, taxonomies and policy tags are created in bulk using + * nested protocol buffer structures. + * + * Sample code: + * ``` + * $policyTagManagerSerializationClient = new PolicyTagManagerSerializationClient(); + * try { + * $formattedParent = $policyTagManagerSerializationClient->locationName('[PROJECT]', '[LOCATION]'); + * $response = $policyTagManagerSerializationClient->importTaxonomies($formattedParent); + * } finally { + * $policyTagManagerSerializationClient->close(); + * } + * ``` + * + * @param string $parent Required. Resource name of project that the imported taxonomies will belong + * to. + * @param array $optionalArgs { + * Optional. + * + * @type InlineSource $inlineSource + * Inline source taxonomy to import. + * @type CrossRegionalSource $crossRegionalSource + * Cross-regional source taxonomy to import. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\DataCatalog\V1\ImportTaxonomiesResponse + * + * @throws ApiException if the remote call fails + */ + public function importTaxonomies($parent, array $optionalArgs = []) + { + $request = new ImportTaxonomiesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['inlineSource'])) { + $request->setInlineSource($optionalArgs['inlineSource']); + } + + if (isset($optionalArgs['crossRegionalSource'])) { + $request->setCrossRegionalSource($optionalArgs['crossRegionalSource']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('ImportTaxonomies', ImportTaxonomiesResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Replaces (updates) a taxonomy and all its policy tags. + * + * The taxonomy and its entire hierarchy of policy tags must be + * represented literally by `SerializedTaxonomy` and the nested + * `SerializedPolicyTag` messages. + * + * This operation automatically does the following: + * + * - Deletes the existing policy tags that are missing from the + * `SerializedPolicyTag`. + * - Creates policy tags that don't have resource names. They are considered + * new. + * - Updates policy tags with valid resources names accordingly. + * + * Sample code: + * ``` + * $policyTagManagerSerializationClient = new PolicyTagManagerSerializationClient(); + * try { + * $formattedName = $policyTagManagerSerializationClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); + * $serializedTaxonomy = new SerializedTaxonomy(); + * $response = $policyTagManagerSerializationClient->replaceTaxonomy($formattedName, $serializedTaxonomy); + * } finally { + * $policyTagManagerSerializationClient->close(); + * } + * ``` + * + * @param string $name Required. Resource name of the taxonomy to update. + * @param SerializedTaxonomy $serializedTaxonomy Required. Taxonomy to update along with its child policy tags. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\DataCatalog\V1\Taxonomy + * + * @throws ApiException if the remote call fails + */ + public function replaceTaxonomy($name, $serializedTaxonomy, array $optionalArgs = []) + { + $request = new ReplaceTaxonomyRequest(); + $requestParamHeaders = []; + $request->setName($name); + $request->setSerializedTaxonomy($serializedTaxonomy); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('ReplaceTaxonomy', Taxonomy::class, $optionalArgs, $request)->wait(); + } +} diff --git a/owl-bot-staging/DataCatalog/v1/src/V1/PolicyTagManagerClient.php b/owl-bot-staging/DataCatalog/v1/src/V1/PolicyTagManagerClient.php new file mode 100644 index 000000000000..1aa4c6fe1b31 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/src/V1/PolicyTagManagerClient.php @@ -0,0 +1,34 @@ + [ + 'google.cloud.datacatalog.v1.DataCatalog' => [ + 'ImportEntries' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\DataCatalog\V1\ImportEntriesResponse', + 'metadataReturnType' => '\Google\Cloud\DataCatalog\V1\ImportEntriesMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ReconcileTags' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\DataCatalog\V1\ReconcileTagsResponse', + 'metadataReturnType' => '\Google\Cloud\DataCatalog\V1\ReconcileTagsMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateEntry' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DataCatalog\V1\Entry', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateEntryGroup' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DataCatalog\V1\EntryGroup', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateTag' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DataCatalog\V1\Tag', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateTagTemplate' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DataCatalog\V1\TagTemplate', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateTagTemplateField' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DataCatalog\V1\TagTemplateField', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteEntry' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteEntryGroup' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteTag' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteTagTemplate' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteTagTemplateField' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetEntry' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DataCatalog\V1\Entry', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetEntryGroup' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DataCatalog\V1\EntryGroup', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + ], + 'GetTagTemplate' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DataCatalog\V1\TagTemplate', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListEntries' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getEntries', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\DataCatalog\V1\ListEntriesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListEntryGroups' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getEntryGroups', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\DataCatalog\V1\ListEntryGroupsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListTags' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getTags', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\DataCatalog\V1\ListTagsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'LookupEntry' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DataCatalog\V1\Entry', + ], + 'ModifyEntryContacts' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DataCatalog\V1\Contacts', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ModifyEntryOverview' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DataCatalog\V1\EntryOverview', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'RenameTagTemplateField' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DataCatalog\V1\TagTemplateField', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'RenameTagTemplateFieldEnumValue' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DataCatalog\V1\TagTemplateField', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'SearchCatalog' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getResults', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\DataCatalog\V1\SearchCatalogResponse', + ], + 'SetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + ], + 'StarEntry' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DataCatalog\V1\StarEntryResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + ], + 'UnstarEntry' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DataCatalog\V1\UnstarEntryResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateEntry' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DataCatalog\V1\Entry', + 'headerParams' => [ + [ + 'keyName' => 'entry.name', + 'fieldAccessors' => [ + 'getEntry', + 'getName', + ], + ], + ], + ], + 'UpdateEntryGroup' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DataCatalog\V1\EntryGroup', + 'headerParams' => [ + [ + 'keyName' => 'entry_group.name', + 'fieldAccessors' => [ + 'getEntryGroup', + 'getName', + ], + ], + ], + ], + 'UpdateTag' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DataCatalog\V1\Tag', + 'headerParams' => [ + [ + 'keyName' => 'tag.name', + 'fieldAccessors' => [ + 'getTag', + 'getName', + ], + ], + ], + ], + 'UpdateTagTemplate' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DataCatalog\V1\TagTemplate', + 'headerParams' => [ + [ + 'keyName' => 'tag_template.name', + 'fieldAccessors' => [ + 'getTagTemplate', + 'getName', + ], + ], + ], + ], + 'UpdateTagTemplateField' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DataCatalog\V1\TagTemplateField', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'entry' => 'projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}', + 'entryGroup' => 'projects/{project}/locations/{location}/entryGroups/{entry_group}', + 'location' => 'projects/{project}/locations/{location}', + 'tag' => 'projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}/tags/{tag}', + 'tagTemplate' => 'projects/{project}/locations/{location}/tagTemplates/{tag_template}', + 'tagTemplateField' => 'projects/{project}/locations/{location}/tagTemplates/{tag_template}/fields/{field}', + 'tagTemplateFieldEnumValue' => 'projects/{project}/locations/{location}/tagTemplates/{tag_template}/fields/{tag_template_field_id}/enumValues/{enum_value_display_name}', + ], + ], + ], +]; diff --git a/owl-bot-staging/DataCatalog/v1/src/V1/resources/data_catalog_rest_client_config.php b/owl-bot-staging/DataCatalog/v1/src/V1/resources/data_catalog_rest_client_config.php new file mode 100644 index 000000000000..e88d57fa1ed3 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/src/V1/resources/data_catalog_rest_client_config.php @@ -0,0 +1,515 @@ + [ + 'google.cloud.datacatalog.v1.DataCatalog' => [ + 'CreateEntry' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/entryGroups/*}/entries', + 'body' => 'entry', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'entry_id', + ], + ], + 'CreateEntryGroup' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/entryGroups', + 'body' => 'entry_group', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'entry_group_id', + ], + ], + 'CreateTag' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/entryGroups/*/entries/*}/tags', + 'body' => 'tag', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/entryGroups/*}/tags', + 'body' => 'tag', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateTagTemplate' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/tagTemplates', + 'body' => 'tag_template', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'tag_template_id', + ], + ], + 'CreateTagTemplateField' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/tagTemplates/*}/fields', + 'body' => 'tag_template_field', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'tag_template_field_id', + ], + ], + 'DeleteEntry' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteEntryGroup' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/entryGroups/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteTag' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/entryGroups/*/entries/*/tags/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/entryGroups/*/tags/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteTagTemplate' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tagTemplates/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + 'queryParams' => [ + 'force', + ], + ], + 'DeleteTagTemplateField' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tagTemplates/*/fields/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + 'queryParams' => [ + 'force', + ], + ], + 'GetEntry' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetEntryGroup' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/entryGroups/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/tagTemplates/*}:getIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*}:getIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*/entries/*}:getIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'GetTagTemplate' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tagTemplates/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ImportEntries' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/entryGroups/*}/entries:import', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListEntries' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/entryGroups/*}/entries', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListEntryGroups' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/entryGroups', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListTags' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/entryGroups/*/entries/*}/tags', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/entryGroups/*}/tags', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'LookupEntry' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/entries:lookup', + ], + 'ModifyEntryContacts' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}:modifyEntryContacts', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ModifyEntryOverview' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}:modifyEntryOverview', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ReconcileTags' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/entryGroups/*/entries/*}/tags:reconcile', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'RenameTagTemplateField' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tagTemplates/*/fields/*}:rename', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'RenameTagTemplateFieldEnumValue' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tagTemplates/*/fields/*/enumValues/*}:rename', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'SearchCatalog' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/catalog:search', + 'body' => '*', + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/tagTemplates/*}:setIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*}:setIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'StarEntry' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}:star', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/tagTemplates/*}:testIamPermissions', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*/entries/*}:testIamPermissions', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'UnstarEntry' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}:unstar', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateEntry' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{entry.name=projects/*/locations/*/entryGroups/*/entries/*}', + 'body' => 'entry', + 'placeholders' => [ + 'entry.name' => [ + 'getters' => [ + 'getEntry', + 'getName', + ], + ], + ], + ], + 'UpdateEntryGroup' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{entry_group.name=projects/*/locations/*/entryGroups/*}', + 'body' => 'entry_group', + 'placeholders' => [ + 'entry_group.name' => [ + 'getters' => [ + 'getEntryGroup', + 'getName', + ], + ], + ], + ], + 'UpdateTag' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{tag.name=projects/*/locations/*/entryGroups/*/entries/*/tags/*}', + 'body' => 'tag', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{tag.name=projects/*/locations/*/entryGroups/*/tags/*}', + 'body' => 'tag', + ], + ], + 'placeholders' => [ + 'tag.name' => [ + 'getters' => [ + 'getTag', + 'getName', + ], + ], + ], + ], + 'UpdateTagTemplate' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{tag_template.name=projects/*/locations/*/tagTemplates/*}', + 'body' => 'tag_template', + 'placeholders' => [ + 'tag_template.name' => [ + 'getters' => [ + 'getTagTemplate', + 'getName', + ], + ], + ], + ], + 'UpdateTagTemplateField' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tagTemplates/*/fields/*}', + 'body' => 'tag_template_field', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/DataCatalog/v1/src/V1/resources/policy_tag_manager_client_config.json b/owl-bot-staging/DataCatalog/v1/src/V1/resources/policy_tag_manager_client_config.json new file mode 100644 index 000000000000..748b34c429bd --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/src/V1/resources/policy_tag_manager_client_config.json @@ -0,0 +1,107 @@ +{ + "interfaces": { + "google.cloud.datacatalog.v1.PolicyTagManager": { + "retry_codes": { + "no_retry_codes": [], + "no_retry_1_codes": [], + "no_retry_2_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "no_retry_2_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CreatePolicyTag": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateTaxonomy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeletePolicyTag": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteTaxonomy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetPolicyTag": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetTaxonomy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListPolicyTags": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListTaxonomies": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdatePolicyTag": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateTaxonomy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/DataCatalog/v1/src/V1/resources/policy_tag_manager_descriptor_config.php b/owl-bot-staging/DataCatalog/v1/src/V1/resources/policy_tag_manager_descriptor_config.php new file mode 100644 index 000000000000..9c3137a11bbb --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/src/V1/resources/policy_tag_manager_descriptor_config.php @@ -0,0 +1,187 @@ + [ + 'google.cloud.datacatalog.v1.PolicyTagManager' => [ + 'CreatePolicyTag' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DataCatalog\V1\PolicyTag', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateTaxonomy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DataCatalog\V1\Taxonomy', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeletePolicyTag' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteTaxonomy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + ], + 'GetPolicyTag' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DataCatalog\V1\PolicyTag', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetTaxonomy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DataCatalog\V1\Taxonomy', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListPolicyTags' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getPolicyTags', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\DataCatalog\V1\ListPolicyTagsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListTaxonomies' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getTaxonomies', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\DataCatalog\V1\ListTaxonomiesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + ], + 'UpdatePolicyTag' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DataCatalog\V1\PolicyTag', + 'headerParams' => [ + [ + 'keyName' => 'policy_tag.name', + 'fieldAccessors' => [ + 'getPolicyTag', + 'getName', + ], + ], + ], + ], + 'UpdateTaxonomy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DataCatalog\V1\Taxonomy', + 'headerParams' => [ + [ + 'keyName' => 'taxonomy.name', + 'fieldAccessors' => [ + 'getTaxonomy', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'location' => 'projects/{project}/locations/{location}', + 'policyTag' => 'projects/{project}/locations/{location}/taxonomies/{taxonomy}/policyTags/{policy_tag}', + 'taxonomy' => 'projects/{project}/locations/{location}/taxonomies/{taxonomy}', + ], + ], + ], +]; diff --git a/owl-bot-staging/DataCatalog/v1/src/V1/resources/policy_tag_manager_rest_client_config.php b/owl-bot-staging/DataCatalog/v1/src/V1/resources/policy_tag_manager_rest_client_config.php new file mode 100644 index 000000000000..994ba95e96aa --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/src/V1/resources/policy_tag_manager_rest_client_config.php @@ -0,0 +1,227 @@ + [ + 'google.cloud.datacatalog.v1.PolicyTagManager' => [ + 'CreatePolicyTag' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/taxonomies/*}/policyTags', + 'body' => 'policy_tag', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateTaxonomy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/taxonomies', + 'body' => 'taxonomy', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeletePolicyTag' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/taxonomies/*/policyTags/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteTaxonomy' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/taxonomies/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/taxonomies/*}:getIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/taxonomies/*/policyTags/*}:getIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'GetPolicyTag' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/taxonomies/*/policyTags/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetTaxonomy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/taxonomies/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListPolicyTags' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/taxonomies/*}/policyTags', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListTaxonomies' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/taxonomies', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/taxonomies/*}:setIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/taxonomies/*/policyTags/*}:setIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/taxonomies/*}:testIamPermissions', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/taxonomies/*/policyTags/*}:testIamPermissions', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'UpdatePolicyTag' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{policy_tag.name=projects/*/locations/*/taxonomies/*/policyTags/*}', + 'body' => 'policy_tag', + 'placeholders' => [ + 'policy_tag.name' => [ + 'getters' => [ + 'getPolicyTag', + 'getName', + ], + ], + ], + ], + 'UpdateTaxonomy' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{taxonomy.name=projects/*/locations/*/taxonomies/*}', + 'body' => 'taxonomy', + 'placeholders' => [ + 'taxonomy.name' => [ + 'getters' => [ + 'getTaxonomy', + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/DataCatalog/v1/src/V1/resources/policy_tag_manager_serialization_client_config.json b/owl-bot-staging/DataCatalog/v1/src/V1/resources/policy_tag_manager_serialization_client_config.json new file mode 100644 index 000000000000..0777dd90f04d --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/src/V1/resources/policy_tag_manager_serialization_client_config.json @@ -0,0 +1,47 @@ +{ + "interfaces": { + "google.cloud.datacatalog.v1.PolicyTagManagerSerialization": { + "retry_codes": { + "no_retry_codes": [], + "no_retry_2_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "no_retry_2_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "ExportTaxonomies": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "ImportTaxonomies": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "ReplaceTaxonomy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + } + } + } + } +} diff --git a/owl-bot-staging/DataCatalog/v1/src/V1/resources/policy_tag_manager_serialization_descriptor_config.php b/owl-bot-staging/DataCatalog/v1/src/V1/resources/policy_tag_manager_serialization_descriptor_config.php new file mode 100644 index 000000000000..6ba1c5da19f6 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/src/V1/resources/policy_tag_manager_serialization_descriptor_config.php @@ -0,0 +1,48 @@ + [ + 'google.cloud.datacatalog.v1.PolicyTagManagerSerialization' => [ + 'ExportTaxonomies' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DataCatalog\V1\ExportTaxonomiesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ImportTaxonomies' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DataCatalog\V1\ImportTaxonomiesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ReplaceTaxonomy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DataCatalog\V1\Taxonomy', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'location' => 'projects/{project}/locations/{location}', + 'taxonomy' => 'projects/{project}/locations/{location}/taxonomies/{taxonomy}', + ], + ], + ], +]; diff --git a/owl-bot-staging/DataCatalog/v1/src/V1/resources/policy_tag_manager_serialization_rest_client_config.php b/owl-bot-staging/DataCatalog/v1/src/V1/resources/policy_tag_manager_serialization_rest_client_config.php new file mode 100644 index 000000000000..ec08adc7e22f --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/src/V1/resources/policy_tag_manager_serialization_rest_client_config.php @@ -0,0 +1,89 @@ + [ + 'google.cloud.datacatalog.v1.PolicyTagManagerSerialization' => [ + 'ExportTaxonomies' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/taxonomies:export', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ImportTaxonomies' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/taxonomies:import', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ReplaceTaxonomy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/taxonomies/*}:replace', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/DataCatalog/v1/tests/Unit/V1/Client/DataCatalogClientTest.php b/owl-bot-staging/DataCatalog/v1/tests/Unit/V1/Client/DataCatalogClientTest.php new file mode 100644 index 000000000000..4ca2efaf6725 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/tests/Unit/V1/Client/DataCatalogClientTest.php @@ -0,0 +1,2770 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return DataCatalogClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new DataCatalogClient($options); + } + + /** @test */ + public function createEntryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $linkedResource = 'linkedResource1544625012'; + $fullyQualifiedName = 'fullyQualifiedName338146659'; + $userSpecifiedType = 'userSpecifiedType-940364963'; + $userSpecifiedSystem = 'userSpecifiedSystem-1776119406'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new Entry(); + $expectedResponse->setName($name); + $expectedResponse->setLinkedResource($linkedResource); + $expectedResponse->setFullyQualifiedName($fullyQualifiedName); + $expectedResponse->setUserSpecifiedType($userSpecifiedType); + $expectedResponse->setUserSpecifiedSystem($userSpecifiedSystem); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); + $entryId = 'entryId-2093663224'; + $entry = new Entry(); + $request = (new CreateEntryRequest()) + ->setParent($formattedParent) + ->setEntryId($entryId) + ->setEntry($entry); + $response = $gapicClient->createEntry($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/CreateEntry', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getEntryId(); + $this->assertProtobufEquals($entryId, $actualValue); + $actualValue = $actualRequestObject->getEntry(); + $this->assertProtobufEquals($entry, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createEntryExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); + $entryId = 'entryId-2093663224'; + $entry = new Entry(); + $request = (new CreateEntryRequest()) + ->setParent($formattedParent) + ->setEntryId($entryId) + ->setEntry($entry); + try { + $gapicClient->createEntry($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createEntryGroupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new EntryGroup(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $entryGroupId = 'entryGroupId-43122680'; + $request = (new CreateEntryGroupRequest()) + ->setParent($formattedParent) + ->setEntryGroupId($entryGroupId); + $response = $gapicClient->createEntryGroup($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/CreateEntryGroup', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getEntryGroupId(); + $this->assertProtobufEquals($entryGroupId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createEntryGroupExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $entryGroupId = 'entryGroupId-43122680'; + $request = (new CreateEntryGroupRequest()) + ->setParent($formattedParent) + ->setEntryGroupId($entryGroupId); + try { + $gapicClient->createEntryGroup($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createTagTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $template = 'template-1321546630'; + $templateDisplayName = 'templateDisplayName-532252787'; + $column = 'column-1354837162'; + $expectedResponse = new Tag(); + $expectedResponse->setName($name); + $expectedResponse->setTemplate($template); + $expectedResponse->setTemplateDisplayName($templateDisplayName); + $expectedResponse->setColumn($column); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); + $tag = new Tag(); + $tagTemplate = 'tagTemplate1678947892'; + $tag->setTemplate($tagTemplate); + $fieldsValue = new TagField(); + $tagFields = [ + 'fieldsKey' => $fieldsValue, + ]; + $tag->setFields($tagFields); + $request = (new CreateTagRequest()) + ->setParent($formattedParent) + ->setTag($tag); + $response = $gapicClient->createTag($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/CreateTag', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getTag(); + $this->assertProtobufEquals($tag, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createTagExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); + $tag = new Tag(); + $tagTemplate = 'tagTemplate1678947892'; + $tag->setTemplate($tagTemplate); + $fieldsValue = new TagField(); + $tagFields = [ + 'fieldsKey' => $fieldsValue, + ]; + $tag->setFields($tagFields); + $request = (new CreateTagRequest()) + ->setParent($formattedParent) + ->setTag($tag); + try { + $gapicClient->createTag($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createTagTemplateTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $isPubliclyReadable = true; + $expectedResponse = new TagTemplate(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setIsPubliclyReadable($isPubliclyReadable); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $tagTemplateId = 'tagTemplateId-2020335141'; + $tagTemplate = new TagTemplate(); + $fieldsValue = new TagTemplateField(); + $valueType = new FieldType(); + $fieldsValue->setType($valueType); + $tagTemplateFields = [ + 'fieldsKey' => $fieldsValue, + ]; + $tagTemplate->setFields($tagTemplateFields); + $request = (new CreateTagTemplateRequest()) + ->setParent($formattedParent) + ->setTagTemplateId($tagTemplateId) + ->setTagTemplate($tagTemplate); + $response = $gapicClient->createTagTemplate($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/CreateTagTemplate', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getTagTemplateId(); + $this->assertProtobufEquals($tagTemplateId, $actualValue); + $actualValue = $actualRequestObject->getTagTemplate(); + $this->assertProtobufEquals($tagTemplate, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createTagTemplateExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $tagTemplateId = 'tagTemplateId-2020335141'; + $tagTemplate = new TagTemplate(); + $fieldsValue = new TagTemplateField(); + $valueType = new FieldType(); + $fieldsValue->setType($valueType); + $tagTemplateFields = [ + 'fieldsKey' => $fieldsValue, + ]; + $tagTemplate->setFields($tagTemplateFields); + $request = (new CreateTagTemplateRequest()) + ->setParent($formattedParent) + ->setTagTemplateId($tagTemplateId) + ->setTagTemplate($tagTemplate); + try { + $gapicClient->createTagTemplate($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createTagTemplateFieldTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $isRequired = true; + $description = 'description-1724546052'; + $order = 106006350; + $expectedResponse = new TagTemplateField(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setIsRequired($isRequired); + $expectedResponse->setDescription($description); + $expectedResponse->setOrder($order); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->tagTemplateName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); + $tagTemplateFieldId = 'tagTemplateFieldId-92144832'; + $tagTemplateField = new TagTemplateField(); + $tagTemplateFieldType = new FieldType(); + $tagTemplateField->setType($tagTemplateFieldType); + $request = (new CreateTagTemplateFieldRequest()) + ->setParent($formattedParent) + ->setTagTemplateFieldId($tagTemplateFieldId) + ->setTagTemplateField($tagTemplateField); + $response = $gapicClient->createTagTemplateField($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/CreateTagTemplateField', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getTagTemplateFieldId(); + $this->assertProtobufEquals($tagTemplateFieldId, $actualValue); + $actualValue = $actualRequestObject->getTagTemplateField(); + $this->assertProtobufEquals($tagTemplateField, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createTagTemplateFieldExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->tagTemplateName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); + $tagTemplateFieldId = 'tagTemplateFieldId-92144832'; + $tagTemplateField = new TagTemplateField(); + $tagTemplateFieldType = new FieldType(); + $tagTemplateField->setType($tagTemplateFieldType); + $request = (new CreateTagTemplateFieldRequest()) + ->setParent($formattedParent) + ->setTagTemplateFieldId($tagTemplateFieldId) + ->setTagTemplateField($tagTemplateField); + try { + $gapicClient->createTagTemplateField($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteEntryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); + $request = (new DeleteEntryRequest()) + ->setName($formattedName); + $gapicClient->deleteEntry($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/DeleteEntry', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteEntryExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); + $request = (new DeleteEntryRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteEntry($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteEntryGroupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); + $request = (new DeleteEntryGroupRequest()) + ->setName($formattedName); + $gapicClient->deleteEntryGroup($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/DeleteEntryGroup', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteEntryGroupExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); + $request = (new DeleteEntryGroupRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteEntryGroup($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteTagTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); + $request = (new DeleteTagRequest()) + ->setName($formattedName); + $gapicClient->deleteTag($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/DeleteTag', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteTagExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); + $request = (new DeleteTagRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteTag($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteTagTemplateTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->tagTemplateName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); + $force = false; + $request = (new DeleteTagTemplateRequest()) + ->setName($formattedName) + ->setForce($force); + $gapicClient->deleteTagTemplate($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/DeleteTagTemplate', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getForce(); + $this->assertProtobufEquals($force, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteTagTemplateExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->tagTemplateName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); + $force = false; + $request = (new DeleteTagTemplateRequest()) + ->setName($formattedName) + ->setForce($force); + try { + $gapicClient->deleteTagTemplate($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteTagTemplateFieldTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->tagTemplateFieldName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]', '[FIELD]'); + $force = false; + $request = (new DeleteTagTemplateFieldRequest()) + ->setName($formattedName) + ->setForce($force); + $gapicClient->deleteTagTemplateField($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/DeleteTagTemplateField', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getForce(); + $this->assertProtobufEquals($force, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteTagTemplateFieldExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->tagTemplateFieldName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]', '[FIELD]'); + $force = false; + $request = (new DeleteTagTemplateFieldRequest()) + ->setName($formattedName) + ->setForce($force); + try { + $gapicClient->deleteTagTemplateField($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getEntryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $linkedResource = 'linkedResource1544625012'; + $fullyQualifiedName = 'fullyQualifiedName338146659'; + $userSpecifiedType = 'userSpecifiedType-940364963'; + $userSpecifiedSystem = 'userSpecifiedSystem-1776119406'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new Entry(); + $expectedResponse->setName($name2); + $expectedResponse->setLinkedResource($linkedResource); + $expectedResponse->setFullyQualifiedName($fullyQualifiedName); + $expectedResponse->setUserSpecifiedType($userSpecifiedType); + $expectedResponse->setUserSpecifiedSystem($userSpecifiedSystem); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); + $request = (new GetEntryRequest()) + ->setName($formattedName); + $response = $gapicClient->getEntry($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/GetEntry', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getEntryExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); + $request = (new GetEntryRequest()) + ->setName($formattedName); + try { + $gapicClient->getEntry($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getEntryGroupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new EntryGroup(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); + $request = (new GetEntryGroupRequest()) + ->setName($formattedName); + $response = $gapicClient->getEntryGroup($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/GetEntryGroup', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getEntryGroupExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); + $request = (new GetEntryGroupRequest()) + ->setName($formattedName); + try { + $gapicClient->getEntryGroup($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + $response = $gapicClient->getIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + try { + $gapicClient->getIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTagTemplateTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $isPubliclyReadable = true; + $expectedResponse = new TagTemplate(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setIsPubliclyReadable($isPubliclyReadable); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->tagTemplateName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); + $request = (new GetTagTemplateRequest()) + ->setName($formattedName); + $response = $gapicClient->getTagTemplate($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/GetTagTemplate', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTagTemplateExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->tagTemplateName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); + $request = (new GetTagTemplateRequest()) + ->setName($formattedName); + try { + $gapicClient->getTagTemplate($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function importEntriesTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/importEntriesTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $upsertedEntriesCount = 250168367; + $deletedEntriesCount = 167383302; + $expectedResponse = new ImportEntriesResponse(); + $expectedResponse->setUpsertedEntriesCount($upsertedEntriesCount); + $expectedResponse->setDeletedEntriesCount($deletedEntriesCount); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/importEntriesTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); + $request = (new ImportEntriesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->importEntries($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/ImportEntries', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importEntriesTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function importEntriesExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/importEntriesTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); + $request = (new ImportEntriesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->importEntries($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importEntriesTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function listEntriesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $entriesElement = new Entry(); + $entries = [ + $entriesElement, + ]; + $expectedResponse = new ListEntriesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setEntries($entries); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); + $request = (new ListEntriesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listEntries($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getEntries()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/ListEntries', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listEntriesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); + $request = (new ListEntriesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listEntries($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listEntryGroupsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $entryGroupsElement = new EntryGroup(); + $entryGroups = [ + $entryGroupsElement, + ]; + $expectedResponse = new ListEntryGroupsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setEntryGroups($entryGroups); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListEntryGroupsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listEntryGroups($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getEntryGroups()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/ListEntryGroups', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listEntryGroupsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListEntryGroupsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listEntryGroups($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTagsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $tagsElement = new Tag(); + $tags = [ + $tagsElement, + ]; + $expectedResponse = new ListTagsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTags($tags); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); + $request = (new ListTagsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listTags($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getTags()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/ListTags', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTagsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); + $request = (new ListTagsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listTags($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function lookupEntryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $linkedResource2 = 'linkedResource2-1674044889'; + $fullyQualifiedName = 'fullyQualifiedName338146659'; + $userSpecifiedType = 'userSpecifiedType-940364963'; + $userSpecifiedSystem = 'userSpecifiedSystem-1776119406'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new Entry(); + $expectedResponse->setName($name); + $expectedResponse->setLinkedResource($linkedResource2); + $expectedResponse->setFullyQualifiedName($fullyQualifiedName); + $expectedResponse->setUserSpecifiedType($userSpecifiedType); + $expectedResponse->setUserSpecifiedSystem($userSpecifiedSystem); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + $request = new LookupEntryRequest(); + $response = $gapicClient->lookupEntry($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/LookupEntry', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function lookupEntryExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new LookupEntryRequest(); + try { + $gapicClient->lookupEntry($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function modifyEntryContactsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new Contacts(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); + $contacts = new Contacts(); + $request = (new ModifyEntryContactsRequest()) + ->setName($formattedName) + ->setContacts($contacts); + $response = $gapicClient->modifyEntryContacts($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/ModifyEntryContacts', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getContacts(); + $this->assertProtobufEquals($contacts, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function modifyEntryContactsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); + $contacts = new Contacts(); + $request = (new ModifyEntryContactsRequest()) + ->setName($formattedName) + ->setContacts($contacts); + try { + $gapicClient->modifyEntryContacts($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function modifyEntryOverviewTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $overview = 'overview530115961'; + $expectedResponse = new EntryOverview(); + $expectedResponse->setOverview($overview); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); + $entryOverview = new EntryOverview(); + $request = (new ModifyEntryOverviewRequest()) + ->setName($formattedName) + ->setEntryOverview($entryOverview); + $response = $gapicClient->modifyEntryOverview($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/ModifyEntryOverview', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getEntryOverview(); + $this->assertProtobufEquals($entryOverview, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function modifyEntryOverviewExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); + $entryOverview = new EntryOverview(); + $request = (new ModifyEntryOverviewRequest()) + ->setName($formattedName) + ->setEntryOverview($entryOverview); + try { + $gapicClient->modifyEntryOverview($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function reconcileTagsTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/reconcileTagsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $createdTagsCount = 986601696; + $updatedTagsCount = 344847213; + $deletedTagsCount = 59637071; + $expectedResponse = new ReconcileTagsResponse(); + $expectedResponse->setCreatedTagsCount($createdTagsCount); + $expectedResponse->setUpdatedTagsCount($updatedTagsCount); + $expectedResponse->setDeletedTagsCount($deletedTagsCount); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/reconcileTagsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); + $formattedTagTemplate = $gapicClient->tagTemplateName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); + $request = (new ReconcileTagsRequest()) + ->setParent($formattedParent) + ->setTagTemplate($formattedTagTemplate); + $response = $gapicClient->reconcileTags($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/ReconcileTags', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getTagTemplate(); + $this->assertProtobufEquals($formattedTagTemplate, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/reconcileTagsTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function reconcileTagsExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/reconcileTagsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); + $formattedTagTemplate = $gapicClient->tagTemplateName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); + $request = (new ReconcileTagsRequest()) + ->setParent($formattedParent) + ->setTagTemplate($formattedTagTemplate); + $response = $gapicClient->reconcileTags($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/reconcileTagsTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function renameTagTemplateFieldTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $isRequired = true; + $description = 'description-1724546052'; + $order = 106006350; + $expectedResponse = new TagTemplateField(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setIsRequired($isRequired); + $expectedResponse->setDescription($description); + $expectedResponse->setOrder($order); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->tagTemplateFieldName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]', '[FIELD]'); + $newTagTemplateFieldId = 'newTagTemplateFieldId-1668354591'; + $request = (new RenameTagTemplateFieldRequest()) + ->setName($formattedName) + ->setNewTagTemplateFieldId($newTagTemplateFieldId); + $response = $gapicClient->renameTagTemplateField($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/RenameTagTemplateField', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getNewTagTemplateFieldId(); + $this->assertProtobufEquals($newTagTemplateFieldId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function renameTagTemplateFieldExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->tagTemplateFieldName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]', '[FIELD]'); + $newTagTemplateFieldId = 'newTagTemplateFieldId-1668354591'; + $request = (new RenameTagTemplateFieldRequest()) + ->setName($formattedName) + ->setNewTagTemplateFieldId($newTagTemplateFieldId); + try { + $gapicClient->renameTagTemplateField($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function renameTagTemplateFieldEnumValueTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $isRequired = true; + $description = 'description-1724546052'; + $order = 106006350; + $expectedResponse = new TagTemplateField(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setIsRequired($isRequired); + $expectedResponse->setDescription($description); + $expectedResponse->setOrder($order); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->tagTemplateFieldEnumValueName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]', '[TAG_TEMPLATE_FIELD_ID]', '[ENUM_VALUE_DISPLAY_NAME]'); + $newEnumValueDisplayName = 'newEnumValueDisplayName2138960469'; + $request = (new RenameTagTemplateFieldEnumValueRequest()) + ->setName($formattedName) + ->setNewEnumValueDisplayName($newEnumValueDisplayName); + $response = $gapicClient->renameTagTemplateFieldEnumValue($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/RenameTagTemplateFieldEnumValue', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getNewEnumValueDisplayName(); + $this->assertProtobufEquals($newEnumValueDisplayName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function renameTagTemplateFieldEnumValueExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->tagTemplateFieldEnumValueName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]', '[TAG_TEMPLATE_FIELD_ID]', '[ENUM_VALUE_DISPLAY_NAME]'); + $newEnumValueDisplayName = 'newEnumValueDisplayName2138960469'; + $request = (new RenameTagTemplateFieldEnumValueRequest()) + ->setName($formattedName) + ->setNewEnumValueDisplayName($newEnumValueDisplayName); + try { + $gapicClient->renameTagTemplateFieldEnumValue($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchCatalogTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $totalSize = 705419236; + $nextPageToken = ''; + $resultsElement = new SearchCatalogResult(); + $results = [ + $resultsElement, + ]; + $expectedResponse = new SearchCatalogResponse(); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setResults($results); + $transport->addResponse($expectedResponse); + // Mock request + $scope = new Scope(); + $query = 'query107944136'; + $request = (new SearchCatalogRequest()) + ->setScope($scope) + ->setQuery($query); + $response = $gapicClient->searchCatalog($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getResults()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/SearchCatalog', $actualFuncCall); + $actualValue = $actualRequestObject->getScope(); + $this->assertProtobufEquals($scope, $actualValue); + $actualValue = $actualRequestObject->getQuery(); + $this->assertProtobufEquals($query, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchCatalogExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $scope = new Scope(); + $query = 'query107944136'; + $request = (new SearchCatalogRequest()) + ->setScope($scope) + ->setQuery($query); + try { + $gapicClient->searchCatalog($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + $response = $gapicClient->setIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + try { + $gapicClient->setIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function starEntryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new StarEntryResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); + $request = (new StarEntryRequest()) + ->setName($formattedName); + $response = $gapicClient->starEntry($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/StarEntry', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function starEntryExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); + $request = (new StarEntryRequest()) + ->setName($formattedName); + try { + $gapicClient->starEntry($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + $response = $gapicClient->testIamPermissions($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + try { + $gapicClient->testIamPermissions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function unstarEntryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new UnstarEntryResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); + $request = (new UnstarEntryRequest()) + ->setName($formattedName); + $response = $gapicClient->unstarEntry($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/UnstarEntry', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function unstarEntryExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); + $request = (new UnstarEntryRequest()) + ->setName($formattedName); + try { + $gapicClient->unstarEntry($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateEntryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $linkedResource = 'linkedResource1544625012'; + $fullyQualifiedName = 'fullyQualifiedName338146659'; + $userSpecifiedType = 'userSpecifiedType-940364963'; + $userSpecifiedSystem = 'userSpecifiedSystem-1776119406'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new Entry(); + $expectedResponse->setName($name); + $expectedResponse->setLinkedResource($linkedResource); + $expectedResponse->setFullyQualifiedName($fullyQualifiedName); + $expectedResponse->setUserSpecifiedType($userSpecifiedType); + $expectedResponse->setUserSpecifiedSystem($userSpecifiedSystem); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $entry = new Entry(); + $request = (new UpdateEntryRequest()) + ->setEntry($entry); + $response = $gapicClient->updateEntry($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/UpdateEntry', $actualFuncCall); + $actualValue = $actualRequestObject->getEntry(); + $this->assertProtobufEquals($entry, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateEntryExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $entry = new Entry(); + $request = (new UpdateEntryRequest()) + ->setEntry($entry); + try { + $gapicClient->updateEntry($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateEntryGroupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new EntryGroup(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $entryGroup = new EntryGroup(); + $request = (new UpdateEntryGroupRequest()) + ->setEntryGroup($entryGroup); + $response = $gapicClient->updateEntryGroup($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/UpdateEntryGroup', $actualFuncCall); + $actualValue = $actualRequestObject->getEntryGroup(); + $this->assertProtobufEquals($entryGroup, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateEntryGroupExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $entryGroup = new EntryGroup(); + $request = (new UpdateEntryGroupRequest()) + ->setEntryGroup($entryGroup); + try { + $gapicClient->updateEntryGroup($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateTagTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $template = 'template-1321546630'; + $templateDisplayName = 'templateDisplayName-532252787'; + $column = 'column-1354837162'; + $expectedResponse = new Tag(); + $expectedResponse->setName($name); + $expectedResponse->setTemplate($template); + $expectedResponse->setTemplateDisplayName($templateDisplayName); + $expectedResponse->setColumn($column); + $transport->addResponse($expectedResponse); + // Mock request + $tag = new Tag(); + $tagTemplate = 'tagTemplate1678947892'; + $tag->setTemplate($tagTemplate); + $fieldsValue = new TagField(); + $tagFields = [ + 'fieldsKey' => $fieldsValue, + ]; + $tag->setFields($tagFields); + $request = (new UpdateTagRequest()) + ->setTag($tag); + $response = $gapicClient->updateTag($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/UpdateTag', $actualFuncCall); + $actualValue = $actualRequestObject->getTag(); + $this->assertProtobufEquals($tag, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateTagExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $tag = new Tag(); + $tagTemplate = 'tagTemplate1678947892'; + $tag->setTemplate($tagTemplate); + $fieldsValue = new TagField(); + $tagFields = [ + 'fieldsKey' => $fieldsValue, + ]; + $tag->setFields($tagFields); + $request = (new UpdateTagRequest()) + ->setTag($tag); + try { + $gapicClient->updateTag($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateTagTemplateTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $isPubliclyReadable = true; + $expectedResponse = new TagTemplate(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setIsPubliclyReadable($isPubliclyReadable); + $transport->addResponse($expectedResponse); + // Mock request + $tagTemplate = new TagTemplate(); + $fieldsValue = new TagTemplateField(); + $valueType = new FieldType(); + $fieldsValue->setType($valueType); + $tagTemplateFields = [ + 'fieldsKey' => $fieldsValue, + ]; + $tagTemplate->setFields($tagTemplateFields); + $request = (new UpdateTagTemplateRequest()) + ->setTagTemplate($tagTemplate); + $response = $gapicClient->updateTagTemplate($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/UpdateTagTemplate', $actualFuncCall); + $actualValue = $actualRequestObject->getTagTemplate(); + $this->assertProtobufEquals($tagTemplate, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateTagTemplateExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $tagTemplate = new TagTemplate(); + $fieldsValue = new TagTemplateField(); + $valueType = new FieldType(); + $fieldsValue->setType($valueType); + $tagTemplateFields = [ + 'fieldsKey' => $fieldsValue, + ]; + $tagTemplate->setFields($tagTemplateFields); + $request = (new UpdateTagTemplateRequest()) + ->setTagTemplate($tagTemplate); + try { + $gapicClient->updateTagTemplate($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateTagTemplateFieldTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $isRequired = true; + $description = 'description-1724546052'; + $order = 106006350; + $expectedResponse = new TagTemplateField(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setIsRequired($isRequired); + $expectedResponse->setDescription($description); + $expectedResponse->setOrder($order); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->tagTemplateFieldName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]', '[FIELD]'); + $tagTemplateField = new TagTemplateField(); + $tagTemplateFieldType = new FieldType(); + $tagTemplateField->setType($tagTemplateFieldType); + $request = (new UpdateTagTemplateFieldRequest()) + ->setName($formattedName) + ->setTagTemplateField($tagTemplateField); + $response = $gapicClient->updateTagTemplateField($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/UpdateTagTemplateField', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getTagTemplateField(); + $this->assertProtobufEquals($tagTemplateField, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateTagTemplateFieldExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->tagTemplateFieldName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]', '[FIELD]'); + $tagTemplateField = new TagTemplateField(); + $tagTemplateFieldType = new FieldType(); + $tagTemplateField->setType($tagTemplateFieldType); + $request = (new UpdateTagTemplateFieldRequest()) + ->setName($formattedName) + ->setTagTemplateField($tagTemplateField); + try { + $gapicClient->updateTagTemplateField($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createEntryAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $linkedResource = 'linkedResource1544625012'; + $fullyQualifiedName = 'fullyQualifiedName338146659'; + $userSpecifiedType = 'userSpecifiedType-940364963'; + $userSpecifiedSystem = 'userSpecifiedSystem-1776119406'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new Entry(); + $expectedResponse->setName($name); + $expectedResponse->setLinkedResource($linkedResource); + $expectedResponse->setFullyQualifiedName($fullyQualifiedName); + $expectedResponse->setUserSpecifiedType($userSpecifiedType); + $expectedResponse->setUserSpecifiedSystem($userSpecifiedSystem); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); + $entryId = 'entryId-2093663224'; + $entry = new Entry(); + $request = (new CreateEntryRequest()) + ->setParent($formattedParent) + ->setEntryId($entryId) + ->setEntry($entry); + $response = $gapicClient->createEntryAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/CreateEntry', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getEntryId(); + $this->assertProtobufEquals($entryId, $actualValue); + $actualValue = $actualRequestObject->getEntry(); + $this->assertProtobufEquals($entry, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/DataCatalog/v1/tests/Unit/V1/Client/PolicyTagManagerClientTest.php b/owl-bot-staging/DataCatalog/v1/tests/Unit/V1/Client/PolicyTagManagerClientTest.php new file mode 100644 index 000000000000..45dd9eece522 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/tests/Unit/V1/Client/PolicyTagManagerClientTest.php @@ -0,0 +1,991 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return PolicyTagManagerClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new PolicyTagManagerClient($options); + } + + /** @test */ + public function createPolicyTagTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $parentPolicyTag = 'parentPolicyTag2071382466'; + $expectedResponse = new PolicyTag(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setParentPolicyTag($parentPolicyTag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); + $request = (new CreatePolicyTagRequest()) + ->setParent($formattedParent); + $response = $gapicClient->createPolicyTag($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManager/CreatePolicyTag', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createPolicyTagExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); + $request = (new CreatePolicyTagRequest()) + ->setParent($formattedParent); + try { + $gapicClient->createPolicyTag($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createTaxonomyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $policyTagCount = 1074340189; + $expectedResponse = new Taxonomy(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setPolicyTagCount($policyTagCount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new CreateTaxonomyRequest()) + ->setParent($formattedParent); + $response = $gapicClient->createTaxonomy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManager/CreateTaxonomy', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createTaxonomyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new CreateTaxonomyRequest()) + ->setParent($formattedParent); + try { + $gapicClient->createTaxonomy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deletePolicyTagTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->policyTagName('[PROJECT]', '[LOCATION]', '[TAXONOMY]', '[POLICY_TAG]'); + $request = (new DeletePolicyTagRequest()) + ->setName($formattedName); + $gapicClient->deletePolicyTag($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManager/DeletePolicyTag', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deletePolicyTagExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->policyTagName('[PROJECT]', '[LOCATION]', '[TAXONOMY]', '[POLICY_TAG]'); + $request = (new DeletePolicyTagRequest()) + ->setName($formattedName); + try { + $gapicClient->deletePolicyTag($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteTaxonomyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); + $request = (new DeleteTaxonomyRequest()) + ->setName($formattedName); + $gapicClient->deleteTaxonomy($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManager/DeleteTaxonomy', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteTaxonomyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); + $request = (new DeleteTaxonomyRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteTaxonomy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + $response = $gapicClient->getIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManager/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + try { + $gapicClient->getIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getPolicyTagTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $parentPolicyTag = 'parentPolicyTag2071382466'; + $expectedResponse = new PolicyTag(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setParentPolicyTag($parentPolicyTag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->policyTagName('[PROJECT]', '[LOCATION]', '[TAXONOMY]', '[POLICY_TAG]'); + $request = (new GetPolicyTagRequest()) + ->setName($formattedName); + $response = $gapicClient->getPolicyTag($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManager/GetPolicyTag', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getPolicyTagExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->policyTagName('[PROJECT]', '[LOCATION]', '[TAXONOMY]', '[POLICY_TAG]'); + $request = (new GetPolicyTagRequest()) + ->setName($formattedName); + try { + $gapicClient->getPolicyTag($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTaxonomyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $policyTagCount = 1074340189; + $expectedResponse = new Taxonomy(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setPolicyTagCount($policyTagCount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); + $request = (new GetTaxonomyRequest()) + ->setName($formattedName); + $response = $gapicClient->getTaxonomy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManager/GetTaxonomy', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTaxonomyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); + $request = (new GetTaxonomyRequest()) + ->setName($formattedName); + try { + $gapicClient->getTaxonomy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPolicyTagsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $policyTagsElement = new PolicyTag(); + $policyTags = [ + $policyTagsElement, + ]; + $expectedResponse = new ListPolicyTagsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setPolicyTags($policyTags); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); + $request = (new ListPolicyTagsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listPolicyTags($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getPolicyTags()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManager/ListPolicyTags', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPolicyTagsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); + $request = (new ListPolicyTagsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listPolicyTags($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTaxonomiesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $taxonomiesElement = new Taxonomy(); + $taxonomies = [ + $taxonomiesElement, + ]; + $expectedResponse = new ListTaxonomiesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTaxonomies($taxonomies); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListTaxonomiesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listTaxonomies($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getTaxonomies()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManager/ListTaxonomies', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTaxonomiesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListTaxonomiesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listTaxonomies($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + $response = $gapicClient->setIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManager/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + try { + $gapicClient->setIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + $response = $gapicClient->testIamPermissions($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManager/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + try { + $gapicClient->testIamPermissions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updatePolicyTagTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $parentPolicyTag = 'parentPolicyTag2071382466'; + $expectedResponse = new PolicyTag(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setParentPolicyTag($parentPolicyTag); + $transport->addResponse($expectedResponse); + $request = new UpdatePolicyTagRequest(); + $response = $gapicClient->updatePolicyTag($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManager/UpdatePolicyTag', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updatePolicyTagExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new UpdatePolicyTagRequest(); + try { + $gapicClient->updatePolicyTag($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateTaxonomyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $policyTagCount = 1074340189; + $expectedResponse = new Taxonomy(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setPolicyTagCount($policyTagCount); + $transport->addResponse($expectedResponse); + $request = new UpdateTaxonomyRequest(); + $response = $gapicClient->updateTaxonomy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManager/UpdateTaxonomy', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateTaxonomyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new UpdateTaxonomyRequest(); + try { + $gapicClient->updateTaxonomy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createPolicyTagAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $parentPolicyTag = 'parentPolicyTag2071382466'; + $expectedResponse = new PolicyTag(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setParentPolicyTag($parentPolicyTag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); + $request = (new CreatePolicyTagRequest()) + ->setParent($formattedParent); + $response = $gapicClient->createPolicyTagAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManager/CreatePolicyTag', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/DataCatalog/v1/tests/Unit/V1/Client/PolicyTagManagerSerializationClientTest.php b/owl-bot-staging/DataCatalog/v1/tests/Unit/V1/Client/PolicyTagManagerSerializationClientTest.php new file mode 100644 index 000000000000..a9fa090478d9 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/tests/Unit/V1/Client/PolicyTagManagerSerializationClientTest.php @@ -0,0 +1,314 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return PolicyTagManagerSerializationClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new PolicyTagManagerSerializationClient($options); + } + + /** @test */ + public function exportTaxonomiesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ExportTaxonomiesResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $formattedTaxonomies = [ + $gapicClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'), + ]; + $request = (new ExportTaxonomiesRequest()) + ->setParent($formattedParent) + ->setTaxonomies($formattedTaxonomies); + $response = $gapicClient->exportTaxonomies($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManagerSerialization/ExportTaxonomies', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getTaxonomies(); + $this->assertProtobufEquals($formattedTaxonomies, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function exportTaxonomiesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $formattedTaxonomies = [ + $gapicClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'), + ]; + $request = (new ExportTaxonomiesRequest()) + ->setParent($formattedParent) + ->setTaxonomies($formattedTaxonomies); + try { + $gapicClient->exportTaxonomies($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function importTaxonomiesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ImportTaxonomiesResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ImportTaxonomiesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->importTaxonomies($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManagerSerialization/ImportTaxonomies', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function importTaxonomiesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ImportTaxonomiesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->importTaxonomies($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function replaceTaxonomyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $policyTagCount = 1074340189; + $expectedResponse = new Taxonomy(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setPolicyTagCount($policyTagCount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); + $serializedTaxonomy = new SerializedTaxonomy(); + $serializedTaxonomyDisplayName = 'serializedTaxonomyDisplayName1493662264'; + $serializedTaxonomy->setDisplayName($serializedTaxonomyDisplayName); + $request = (new ReplaceTaxonomyRequest()) + ->setName($formattedName) + ->setSerializedTaxonomy($serializedTaxonomy); + $response = $gapicClient->replaceTaxonomy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManagerSerialization/ReplaceTaxonomy', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getSerializedTaxonomy(); + $this->assertProtobufEquals($serializedTaxonomy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function replaceTaxonomyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); + $serializedTaxonomy = new SerializedTaxonomy(); + $serializedTaxonomyDisplayName = 'serializedTaxonomyDisplayName1493662264'; + $serializedTaxonomy->setDisplayName($serializedTaxonomyDisplayName); + $request = (new ReplaceTaxonomyRequest()) + ->setName($formattedName) + ->setSerializedTaxonomy($serializedTaxonomy); + try { + $gapicClient->replaceTaxonomy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function exportTaxonomiesAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ExportTaxonomiesResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $formattedTaxonomies = [ + $gapicClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'), + ]; + $request = (new ExportTaxonomiesRequest()) + ->setParent($formattedParent) + ->setTaxonomies($formattedTaxonomies); + $response = $gapicClient->exportTaxonomiesAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManagerSerialization/ExportTaxonomies', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getTaxonomies(); + $this->assertProtobufEquals($formattedTaxonomies, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/DataCatalog/v1/tests/Unit/V1/DataCatalogClientTest.php b/owl-bot-staging/DataCatalog/v1/tests/Unit/V1/DataCatalogClientTest.php new file mode 100644 index 000000000000..8e57110c879e --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/tests/Unit/V1/DataCatalogClientTest.php @@ -0,0 +1,2515 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return DataCatalogClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new DataCatalogClient($options); + } + + /** @test */ + public function createEntryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $linkedResource = 'linkedResource1544625012'; + $fullyQualifiedName = 'fullyQualifiedName338146659'; + $userSpecifiedType = 'userSpecifiedType-940364963'; + $userSpecifiedSystem = 'userSpecifiedSystem-1776119406'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new Entry(); + $expectedResponse->setName($name); + $expectedResponse->setLinkedResource($linkedResource); + $expectedResponse->setFullyQualifiedName($fullyQualifiedName); + $expectedResponse->setUserSpecifiedType($userSpecifiedType); + $expectedResponse->setUserSpecifiedSystem($userSpecifiedSystem); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); + $entryId = 'entryId-2093663224'; + $entry = new Entry(); + $response = $gapicClient->createEntry($formattedParent, $entryId, $entry); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/CreateEntry', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getEntryId(); + $this->assertProtobufEquals($entryId, $actualValue); + $actualValue = $actualRequestObject->getEntry(); + $this->assertProtobufEquals($entry, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createEntryExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); + $entryId = 'entryId-2093663224'; + $entry = new Entry(); + try { + $gapicClient->createEntry($formattedParent, $entryId, $entry); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createEntryGroupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new EntryGroup(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $entryGroupId = 'entryGroupId-43122680'; + $response = $gapicClient->createEntryGroup($formattedParent, $entryGroupId); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/CreateEntryGroup', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getEntryGroupId(); + $this->assertProtobufEquals($entryGroupId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createEntryGroupExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $entryGroupId = 'entryGroupId-43122680'; + try { + $gapicClient->createEntryGroup($formattedParent, $entryGroupId); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createTagTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $template = 'template-1321546630'; + $templateDisplayName = 'templateDisplayName-532252787'; + $column = 'column-1354837162'; + $expectedResponse = new Tag(); + $expectedResponse->setName($name); + $expectedResponse->setTemplate($template); + $expectedResponse->setTemplateDisplayName($templateDisplayName); + $expectedResponse->setColumn($column); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); + $tag = new Tag(); + $tagTemplate = 'tagTemplate1678947892'; + $tag->setTemplate($tagTemplate); + $fieldsValue = new TagField(); + $tagFields = [ + 'fieldsKey' => $fieldsValue, + ]; + $tag->setFields($tagFields); + $response = $gapicClient->createTag($formattedParent, $tag); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/CreateTag', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getTag(); + $this->assertProtobufEquals($tag, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createTagExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); + $tag = new Tag(); + $tagTemplate = 'tagTemplate1678947892'; + $tag->setTemplate($tagTemplate); + $fieldsValue = new TagField(); + $tagFields = [ + 'fieldsKey' => $fieldsValue, + ]; + $tag->setFields($tagFields); + try { + $gapicClient->createTag($formattedParent, $tag); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createTagTemplateTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $isPubliclyReadable = true; + $expectedResponse = new TagTemplate(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setIsPubliclyReadable($isPubliclyReadable); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $tagTemplateId = 'tagTemplateId-2020335141'; + $tagTemplate = new TagTemplate(); + $fieldsValue = new TagTemplateField(); + $valueType = new FieldType(); + $fieldsValue->setType($valueType); + $tagTemplateFields = [ + 'fieldsKey' => $fieldsValue, + ]; + $tagTemplate->setFields($tagTemplateFields); + $response = $gapicClient->createTagTemplate($formattedParent, $tagTemplateId, $tagTemplate); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/CreateTagTemplate', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getTagTemplateId(); + $this->assertProtobufEquals($tagTemplateId, $actualValue); + $actualValue = $actualRequestObject->getTagTemplate(); + $this->assertProtobufEquals($tagTemplate, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createTagTemplateExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $tagTemplateId = 'tagTemplateId-2020335141'; + $tagTemplate = new TagTemplate(); + $fieldsValue = new TagTemplateField(); + $valueType = new FieldType(); + $fieldsValue->setType($valueType); + $tagTemplateFields = [ + 'fieldsKey' => $fieldsValue, + ]; + $tagTemplate->setFields($tagTemplateFields); + try { + $gapicClient->createTagTemplate($formattedParent, $tagTemplateId, $tagTemplate); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createTagTemplateFieldTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $isRequired = true; + $description = 'description-1724546052'; + $order = 106006350; + $expectedResponse = new TagTemplateField(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setIsRequired($isRequired); + $expectedResponse->setDescription($description); + $expectedResponse->setOrder($order); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->tagTemplateName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); + $tagTemplateFieldId = 'tagTemplateFieldId-92144832'; + $tagTemplateField = new TagTemplateField(); + $tagTemplateFieldType = new FieldType(); + $tagTemplateField->setType($tagTemplateFieldType); + $response = $gapicClient->createTagTemplateField($formattedParent, $tagTemplateFieldId, $tagTemplateField); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/CreateTagTemplateField', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getTagTemplateFieldId(); + $this->assertProtobufEquals($tagTemplateFieldId, $actualValue); + $actualValue = $actualRequestObject->getTagTemplateField(); + $this->assertProtobufEquals($tagTemplateField, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createTagTemplateFieldExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->tagTemplateName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); + $tagTemplateFieldId = 'tagTemplateFieldId-92144832'; + $tagTemplateField = new TagTemplateField(); + $tagTemplateFieldType = new FieldType(); + $tagTemplateField->setType($tagTemplateFieldType); + try { + $gapicClient->createTagTemplateField($formattedParent, $tagTemplateFieldId, $tagTemplateField); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteEntryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); + $gapicClient->deleteEntry($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/DeleteEntry', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteEntryExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); + try { + $gapicClient->deleteEntry($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteEntryGroupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); + $gapicClient->deleteEntryGroup($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/DeleteEntryGroup', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteEntryGroupExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); + try { + $gapicClient->deleteEntryGroup($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteTagTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); + $gapicClient->deleteTag($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/DeleteTag', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteTagExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); + try { + $gapicClient->deleteTag($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteTagTemplateTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->tagTemplateName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); + $force = false; + $gapicClient->deleteTagTemplate($formattedName, $force); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/DeleteTagTemplate', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getForce(); + $this->assertProtobufEquals($force, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteTagTemplateExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->tagTemplateName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); + $force = false; + try { + $gapicClient->deleteTagTemplate($formattedName, $force); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteTagTemplateFieldTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->tagTemplateFieldName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]', '[FIELD]'); + $force = false; + $gapicClient->deleteTagTemplateField($formattedName, $force); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/DeleteTagTemplateField', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getForce(); + $this->assertProtobufEquals($force, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteTagTemplateFieldExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->tagTemplateFieldName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]', '[FIELD]'); + $force = false; + try { + $gapicClient->deleteTagTemplateField($formattedName, $force); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getEntryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $linkedResource = 'linkedResource1544625012'; + $fullyQualifiedName = 'fullyQualifiedName338146659'; + $userSpecifiedType = 'userSpecifiedType-940364963'; + $userSpecifiedSystem = 'userSpecifiedSystem-1776119406'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new Entry(); + $expectedResponse->setName($name2); + $expectedResponse->setLinkedResource($linkedResource); + $expectedResponse->setFullyQualifiedName($fullyQualifiedName); + $expectedResponse->setUserSpecifiedType($userSpecifiedType); + $expectedResponse->setUserSpecifiedSystem($userSpecifiedSystem); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); + $response = $gapicClient->getEntry($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/GetEntry', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getEntryExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); + try { + $gapicClient->getEntry($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getEntryGroupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new EntryGroup(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); + $response = $gapicClient->getEntryGroup($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/GetEntryGroup', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getEntryGroupExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); + try { + $gapicClient->getEntryGroup($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $response = $gapicClient->getIamPolicy($resource); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + try { + $gapicClient->getIamPolicy($resource); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTagTemplateTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $isPubliclyReadable = true; + $expectedResponse = new TagTemplate(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setIsPubliclyReadable($isPubliclyReadable); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->tagTemplateName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); + $response = $gapicClient->getTagTemplate($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/GetTagTemplate', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTagTemplateExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->tagTemplateName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); + try { + $gapicClient->getTagTemplate($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function importEntriesTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/importEntriesTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $upsertedEntriesCount = 250168367; + $deletedEntriesCount = 167383302; + $expectedResponse = new ImportEntriesResponse(); + $expectedResponse->setUpsertedEntriesCount($upsertedEntriesCount); + $expectedResponse->setDeletedEntriesCount($deletedEntriesCount); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/importEntriesTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); + $response = $gapicClient->importEntries($formattedParent); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/ImportEntries', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importEntriesTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function importEntriesExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/importEntriesTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); + $response = $gapicClient->importEntries($formattedParent); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importEntriesTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function listEntriesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $entriesElement = new Entry(); + $entries = [ + $entriesElement, + ]; + $expectedResponse = new ListEntriesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setEntries($entries); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); + $response = $gapicClient->listEntries($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getEntries()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/ListEntries', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listEntriesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); + try { + $gapicClient->listEntries($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listEntryGroupsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $entryGroupsElement = new EntryGroup(); + $entryGroups = [ + $entryGroupsElement, + ]; + $expectedResponse = new ListEntryGroupsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setEntryGroups($entryGroups); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listEntryGroups($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getEntryGroups()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/ListEntryGroups', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listEntryGroupsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + try { + $gapicClient->listEntryGroups($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTagsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $tagsElement = new Tag(); + $tags = [ + $tagsElement, + ]; + $expectedResponse = new ListTagsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTags($tags); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); + $response = $gapicClient->listTags($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getTags()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/ListTags', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTagsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); + try { + $gapicClient->listTags($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function lookupEntryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $linkedResource2 = 'linkedResource2-1674044889'; + $fullyQualifiedName = 'fullyQualifiedName338146659'; + $userSpecifiedType = 'userSpecifiedType-940364963'; + $userSpecifiedSystem = 'userSpecifiedSystem-1776119406'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new Entry(); + $expectedResponse->setName($name); + $expectedResponse->setLinkedResource($linkedResource2); + $expectedResponse->setFullyQualifiedName($fullyQualifiedName); + $expectedResponse->setUserSpecifiedType($userSpecifiedType); + $expectedResponse->setUserSpecifiedSystem($userSpecifiedSystem); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + $response = $gapicClient->lookupEntry(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/LookupEntry', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function lookupEntryExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + try { + $gapicClient->lookupEntry(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function modifyEntryContactsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new Contacts(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); + $contacts = new Contacts(); + $response = $gapicClient->modifyEntryContacts($formattedName, $contacts); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/ModifyEntryContacts', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getContacts(); + $this->assertProtobufEquals($contacts, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function modifyEntryContactsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); + $contacts = new Contacts(); + try { + $gapicClient->modifyEntryContacts($formattedName, $contacts); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function modifyEntryOverviewTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $overview = 'overview530115961'; + $expectedResponse = new EntryOverview(); + $expectedResponse->setOverview($overview); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); + $entryOverview = new EntryOverview(); + $response = $gapicClient->modifyEntryOverview($formattedName, $entryOverview); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/ModifyEntryOverview', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getEntryOverview(); + $this->assertProtobufEquals($entryOverview, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function modifyEntryOverviewExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); + $entryOverview = new EntryOverview(); + try { + $gapicClient->modifyEntryOverview($formattedName, $entryOverview); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function reconcileTagsTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/reconcileTagsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $createdTagsCount = 986601696; + $updatedTagsCount = 344847213; + $deletedTagsCount = 59637071; + $expectedResponse = new ReconcileTagsResponse(); + $expectedResponse->setCreatedTagsCount($createdTagsCount); + $expectedResponse->setUpdatedTagsCount($updatedTagsCount); + $expectedResponse->setDeletedTagsCount($deletedTagsCount); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/reconcileTagsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); + $formattedTagTemplate = $gapicClient->tagTemplateName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); + $response = $gapicClient->reconcileTags($formattedParent, $formattedTagTemplate); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/ReconcileTags', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getTagTemplate(); + $this->assertProtobufEquals($formattedTagTemplate, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/reconcileTagsTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function reconcileTagsExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/reconcileTagsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); + $formattedTagTemplate = $gapicClient->tagTemplateName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); + $response = $gapicClient->reconcileTags($formattedParent, $formattedTagTemplate); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/reconcileTagsTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function renameTagTemplateFieldTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $isRequired = true; + $description = 'description-1724546052'; + $order = 106006350; + $expectedResponse = new TagTemplateField(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setIsRequired($isRequired); + $expectedResponse->setDescription($description); + $expectedResponse->setOrder($order); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->tagTemplateFieldName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]', '[FIELD]'); + $newTagTemplateFieldId = 'newTagTemplateFieldId-1668354591'; + $response = $gapicClient->renameTagTemplateField($formattedName, $newTagTemplateFieldId); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/RenameTagTemplateField', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getNewTagTemplateFieldId(); + $this->assertProtobufEquals($newTagTemplateFieldId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function renameTagTemplateFieldExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->tagTemplateFieldName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]', '[FIELD]'); + $newTagTemplateFieldId = 'newTagTemplateFieldId-1668354591'; + try { + $gapicClient->renameTagTemplateField($formattedName, $newTagTemplateFieldId); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function renameTagTemplateFieldEnumValueTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $isRequired = true; + $description = 'description-1724546052'; + $order = 106006350; + $expectedResponse = new TagTemplateField(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setIsRequired($isRequired); + $expectedResponse->setDescription($description); + $expectedResponse->setOrder($order); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->tagTemplateFieldEnumValueName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]', '[TAG_TEMPLATE_FIELD_ID]', '[ENUM_VALUE_DISPLAY_NAME]'); + $newEnumValueDisplayName = 'newEnumValueDisplayName2138960469'; + $response = $gapicClient->renameTagTemplateFieldEnumValue($formattedName, $newEnumValueDisplayName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/RenameTagTemplateFieldEnumValue', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getNewEnumValueDisplayName(); + $this->assertProtobufEquals($newEnumValueDisplayName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function renameTagTemplateFieldEnumValueExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->tagTemplateFieldEnumValueName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]', '[TAG_TEMPLATE_FIELD_ID]', '[ENUM_VALUE_DISPLAY_NAME]'); + $newEnumValueDisplayName = 'newEnumValueDisplayName2138960469'; + try { + $gapicClient->renameTagTemplateFieldEnumValue($formattedName, $newEnumValueDisplayName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchCatalogTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $totalSize = 705419236; + $nextPageToken = ''; + $resultsElement = new SearchCatalogResult(); + $results = [ + $resultsElement, + ]; + $expectedResponse = new SearchCatalogResponse(); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setResults($results); + $transport->addResponse($expectedResponse); + // Mock request + $scope = new Scope(); + $query = 'query107944136'; + $response = $gapicClient->searchCatalog($scope, $query); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getResults()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/SearchCatalog', $actualFuncCall); + $actualValue = $actualRequestObject->getScope(); + $this->assertProtobufEquals($scope, $actualValue); + $actualValue = $actualRequestObject->getQuery(); + $this->assertProtobufEquals($query, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchCatalogExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $scope = new Scope(); + $query = 'query107944136'; + try { + $gapicClient->searchCatalog($scope, $query); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $response = $gapicClient->setIamPolicy($resource, $policy); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + try { + $gapicClient->setIamPolicy($resource, $policy); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function starEntryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new StarEntryResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); + $response = $gapicClient->starEntry($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/StarEntry', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function starEntryExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); + try { + $gapicClient->starEntry($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $response = $gapicClient->testIamPermissions($resource, $permissions); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + try { + $gapicClient->testIamPermissions($resource, $permissions); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function unstarEntryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new UnstarEntryResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); + $response = $gapicClient->unstarEntry($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/UnstarEntry', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function unstarEntryExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); + try { + $gapicClient->unstarEntry($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateEntryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $linkedResource = 'linkedResource1544625012'; + $fullyQualifiedName = 'fullyQualifiedName338146659'; + $userSpecifiedType = 'userSpecifiedType-940364963'; + $userSpecifiedSystem = 'userSpecifiedSystem-1776119406'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new Entry(); + $expectedResponse->setName($name); + $expectedResponse->setLinkedResource($linkedResource); + $expectedResponse->setFullyQualifiedName($fullyQualifiedName); + $expectedResponse->setUserSpecifiedType($userSpecifiedType); + $expectedResponse->setUserSpecifiedSystem($userSpecifiedSystem); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $entry = new Entry(); + $response = $gapicClient->updateEntry($entry); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/UpdateEntry', $actualFuncCall); + $actualValue = $actualRequestObject->getEntry(); + $this->assertProtobufEquals($entry, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateEntryExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $entry = new Entry(); + try { + $gapicClient->updateEntry($entry); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateEntryGroupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new EntryGroup(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $entryGroup = new EntryGroup(); + $response = $gapicClient->updateEntryGroup($entryGroup); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/UpdateEntryGroup', $actualFuncCall); + $actualValue = $actualRequestObject->getEntryGroup(); + $this->assertProtobufEquals($entryGroup, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateEntryGroupExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $entryGroup = new EntryGroup(); + try { + $gapicClient->updateEntryGroup($entryGroup); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateTagTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $template = 'template-1321546630'; + $templateDisplayName = 'templateDisplayName-532252787'; + $column = 'column-1354837162'; + $expectedResponse = new Tag(); + $expectedResponse->setName($name); + $expectedResponse->setTemplate($template); + $expectedResponse->setTemplateDisplayName($templateDisplayName); + $expectedResponse->setColumn($column); + $transport->addResponse($expectedResponse); + // Mock request + $tag = new Tag(); + $tagTemplate = 'tagTemplate1678947892'; + $tag->setTemplate($tagTemplate); + $fieldsValue = new TagField(); + $tagFields = [ + 'fieldsKey' => $fieldsValue, + ]; + $tag->setFields($tagFields); + $response = $gapicClient->updateTag($tag); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/UpdateTag', $actualFuncCall); + $actualValue = $actualRequestObject->getTag(); + $this->assertProtobufEquals($tag, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateTagExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $tag = new Tag(); + $tagTemplate = 'tagTemplate1678947892'; + $tag->setTemplate($tagTemplate); + $fieldsValue = new TagField(); + $tagFields = [ + 'fieldsKey' => $fieldsValue, + ]; + $tag->setFields($tagFields); + try { + $gapicClient->updateTag($tag); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateTagTemplateTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $isPubliclyReadable = true; + $expectedResponse = new TagTemplate(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setIsPubliclyReadable($isPubliclyReadable); + $transport->addResponse($expectedResponse); + // Mock request + $tagTemplate = new TagTemplate(); + $fieldsValue = new TagTemplateField(); + $valueType = new FieldType(); + $fieldsValue->setType($valueType); + $tagTemplateFields = [ + 'fieldsKey' => $fieldsValue, + ]; + $tagTemplate->setFields($tagTemplateFields); + $response = $gapicClient->updateTagTemplate($tagTemplate); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/UpdateTagTemplate', $actualFuncCall); + $actualValue = $actualRequestObject->getTagTemplate(); + $this->assertProtobufEquals($tagTemplate, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateTagTemplateExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $tagTemplate = new TagTemplate(); + $fieldsValue = new TagTemplateField(); + $valueType = new FieldType(); + $fieldsValue->setType($valueType); + $tagTemplateFields = [ + 'fieldsKey' => $fieldsValue, + ]; + $tagTemplate->setFields($tagTemplateFields); + try { + $gapicClient->updateTagTemplate($tagTemplate); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateTagTemplateFieldTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $isRequired = true; + $description = 'description-1724546052'; + $order = 106006350; + $expectedResponse = new TagTemplateField(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setIsRequired($isRequired); + $expectedResponse->setDescription($description); + $expectedResponse->setOrder($order); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->tagTemplateFieldName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]', '[FIELD]'); + $tagTemplateField = new TagTemplateField(); + $tagTemplateFieldType = new FieldType(); + $tagTemplateField->setType($tagTemplateFieldType); + $response = $gapicClient->updateTagTemplateField($formattedName, $tagTemplateField); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/UpdateTagTemplateField', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getTagTemplateField(); + $this->assertProtobufEquals($tagTemplateField, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateTagTemplateFieldExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->tagTemplateFieldName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]', '[FIELD]'); + $tagTemplateField = new TagTemplateField(); + $tagTemplateFieldType = new FieldType(); + $tagTemplateField->setType($tagTemplateFieldType); + try { + $gapicClient->updateTagTemplateField($formattedName, $tagTemplateField); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/DataCatalog/v1/tests/Unit/V1/PolicyTagManagerClientTest.php b/owl-bot-staging/DataCatalog/v1/tests/Unit/V1/PolicyTagManagerClientTest.php new file mode 100644 index 000000000000..dfa27389a713 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/tests/Unit/V1/PolicyTagManagerClientTest.php @@ -0,0 +1,891 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return PolicyTagManagerClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new PolicyTagManagerClient($options); + } + + /** @test */ + public function createPolicyTagTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $parentPolicyTag = 'parentPolicyTag2071382466'; + $expectedResponse = new PolicyTag(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setParentPolicyTag($parentPolicyTag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); + $response = $gapicClient->createPolicyTag($formattedParent); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManager/CreatePolicyTag', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createPolicyTagExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); + try { + $gapicClient->createPolicyTag($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createTaxonomyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $policyTagCount = 1074340189; + $expectedResponse = new Taxonomy(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setPolicyTagCount($policyTagCount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->createTaxonomy($formattedParent); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManager/CreateTaxonomy', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createTaxonomyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + try { + $gapicClient->createTaxonomy($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deletePolicyTagTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->policyTagName('[PROJECT]', '[LOCATION]', '[TAXONOMY]', '[POLICY_TAG]'); + $gapicClient->deletePolicyTag($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManager/DeletePolicyTag', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deletePolicyTagExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->policyTagName('[PROJECT]', '[LOCATION]', '[TAXONOMY]', '[POLICY_TAG]'); + try { + $gapicClient->deletePolicyTag($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteTaxonomyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); + $gapicClient->deleteTaxonomy($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManager/DeleteTaxonomy', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteTaxonomyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); + try { + $gapicClient->deleteTaxonomy($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $response = $gapicClient->getIamPolicy($resource); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManager/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + try { + $gapicClient->getIamPolicy($resource); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getPolicyTagTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $parentPolicyTag = 'parentPolicyTag2071382466'; + $expectedResponse = new PolicyTag(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setParentPolicyTag($parentPolicyTag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->policyTagName('[PROJECT]', '[LOCATION]', '[TAXONOMY]', '[POLICY_TAG]'); + $response = $gapicClient->getPolicyTag($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManager/GetPolicyTag', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getPolicyTagExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->policyTagName('[PROJECT]', '[LOCATION]', '[TAXONOMY]', '[POLICY_TAG]'); + try { + $gapicClient->getPolicyTag($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTaxonomyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $policyTagCount = 1074340189; + $expectedResponse = new Taxonomy(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setPolicyTagCount($policyTagCount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); + $response = $gapicClient->getTaxonomy($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManager/GetTaxonomy', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTaxonomyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); + try { + $gapicClient->getTaxonomy($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPolicyTagsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $policyTagsElement = new PolicyTag(); + $policyTags = [ + $policyTagsElement, + ]; + $expectedResponse = new ListPolicyTagsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setPolicyTags($policyTags); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); + $response = $gapicClient->listPolicyTags($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getPolicyTags()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManager/ListPolicyTags', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPolicyTagsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); + try { + $gapicClient->listPolicyTags($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTaxonomiesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $taxonomiesElement = new Taxonomy(); + $taxonomies = [ + $taxonomiesElement, + ]; + $expectedResponse = new ListTaxonomiesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTaxonomies($taxonomies); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listTaxonomies($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getTaxonomies()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManager/ListTaxonomies', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTaxonomiesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + try { + $gapicClient->listTaxonomies($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $response = $gapicClient->setIamPolicy($resource, $policy); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManager/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + try { + $gapicClient->setIamPolicy($resource, $policy); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $response = $gapicClient->testIamPermissions($resource, $permissions); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManager/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + try { + $gapicClient->testIamPermissions($resource, $permissions); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updatePolicyTagTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $parentPolicyTag = 'parentPolicyTag2071382466'; + $expectedResponse = new PolicyTag(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setParentPolicyTag($parentPolicyTag); + $transport->addResponse($expectedResponse); + $response = $gapicClient->updatePolicyTag(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManager/UpdatePolicyTag', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updatePolicyTagExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + try { + $gapicClient->updatePolicyTag(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateTaxonomyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $policyTagCount = 1074340189; + $expectedResponse = new Taxonomy(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setPolicyTagCount($policyTagCount); + $transport->addResponse($expectedResponse); + $response = $gapicClient->updateTaxonomy(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManager/UpdateTaxonomy', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateTaxonomyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + try { + $gapicClient->updateTaxonomy(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/DataCatalog/v1/tests/Unit/V1/PolicyTagManagerSerializationClientTest.php b/owl-bot-staging/DataCatalog/v1/tests/Unit/V1/PolicyTagManagerSerializationClientTest.php new file mode 100644 index 000000000000..d7fb8c02a939 --- /dev/null +++ b/owl-bot-staging/DataCatalog/v1/tests/Unit/V1/PolicyTagManagerSerializationClientTest.php @@ -0,0 +1,262 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return PolicyTagManagerSerializationClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new PolicyTagManagerSerializationClient($options); + } + + /** @test */ + public function exportTaxonomiesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ExportTaxonomiesResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $formattedTaxonomies = [ + $gapicClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'), + ]; + $response = $gapicClient->exportTaxonomies($formattedParent, $formattedTaxonomies); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManagerSerialization/ExportTaxonomies', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getTaxonomies(); + $this->assertProtobufEquals($formattedTaxonomies, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function exportTaxonomiesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $formattedTaxonomies = [ + $gapicClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'), + ]; + try { + $gapicClient->exportTaxonomies($formattedParent, $formattedTaxonomies); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function importTaxonomiesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ImportTaxonomiesResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->importTaxonomies($formattedParent); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManagerSerialization/ImportTaxonomies', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function importTaxonomiesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + try { + $gapicClient->importTaxonomies($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function replaceTaxonomyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $policyTagCount = 1074340189; + $expectedResponse = new Taxonomy(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setPolicyTagCount($policyTagCount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); + $serializedTaxonomy = new SerializedTaxonomy(); + $serializedTaxonomyDisplayName = 'serializedTaxonomyDisplayName1493662264'; + $serializedTaxonomy->setDisplayName($serializedTaxonomyDisplayName); + $response = $gapicClient->replaceTaxonomy($formattedName, $serializedTaxonomy); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManagerSerialization/ReplaceTaxonomy', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getSerializedTaxonomy(); + $this->assertProtobufEquals($serializedTaxonomy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function replaceTaxonomyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); + $serializedTaxonomy = new SerializedTaxonomy(); + $serializedTaxonomyDisplayName = 'serializedTaxonomyDisplayName1493662264'; + $serializedTaxonomy->setDisplayName($serializedTaxonomyDisplayName); + try { + $gapicClient->replaceTaxonomy($formattedName, $serializedTaxonomy); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} From 16f32d93e0e00c420a1d2e74658984587fdb43c0 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Wed, 5 Jul 2023 20:04:53 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- DataCatalog/src/V1/Entry.php | 12 +- DataCatalog/src/V1/EntryType.php | 23 +- .../src/V1/Gapic/DataCatalogGapicClient.php | 7 + DataCatalog/src/V1/SearchCatalogRequest.php | 32 +- .../Google/Cloud/Datacatalog/V1/Bigquery.php | Bin 1507 -> 0 bytes .../Google/Cloud/Datacatalog/V1/Common.php | Bin 1274 -> 0 bytes .../Cloud/Datacatalog/V1/DataSource.php | Bin 1270 -> 0 bytes .../Cloud/Datacatalog/V1/Datacatalog.php | Bin 21688 -> 0 bytes .../Cloud/Datacatalog/V1/DataplexSpec.php | 46 - .../Cloud/Datacatalog/V1/DumpContent.php | Bin 1441 -> 0 bytes .../Cloud/Datacatalog/V1/GcsFilesetSpec.php | 37 - .../Cloud/Datacatalog/V1/PhysicalSchema.php | Bin 1486 -> 0 bytes .../Cloud/Datacatalog/V1/Policytagmanager.php | Bin 6804 -> 0 bytes .../V1/Policytagmanagerserialization.php | Bin 3430 -> 0 bytes .../Google/Cloud/Datacatalog/V1/Schema.php | Bin 1812 -> 0 bytes .../Google/Cloud/Datacatalog/V1/Search.php | Bin 1629 -> 0 bytes .../Google/Cloud/Datacatalog/V1/TableSpec.php | Bin 1633 -> 0 bytes .../Google/Cloud/Datacatalog/V1/Tags.php | Bin 2882 -> 0 bytes .../Cloud/Datacatalog/V1/Timestamps.php | 33 - .../Google/Cloud/Datacatalog/V1/Usage.php | Bin 1739 -> 0 bytes .../DataCatalog/V1/BigQueryConnectionSpec.php | 147 - .../BigQueryConnectionSpec/ConnectionType.php | 57 - .../V1/BigQueryDateShardedSpec.php | 192 -- .../DataCatalog/V1/BigQueryRoutineSpec.php | 67 - .../DataCatalog/V1/BigQueryTableSpec.php | 148 - .../Cloud/DataCatalog/V1/BusinessContext.php | 121 - .../V1/CloudBigtableInstanceSpec.php | 69 - .../CloudBigtableClusterSpec.php | 172 - .../V1/CloudBigtableSystemSpec.php | 73 - .../V1/CloudSqlBigQueryConnectionSpec.php | 135 - .../DatabaseType.php | 64 - .../Cloud/DataCatalog/V1/ColumnSchema.php | 422 --- .../V1/ColumnSchema/IndexingType.php | 78 - .../V1/ColumnSchema/LookerColumnSpec.php | 70 - .../LookerColumnSpec/LookerColumnType.php | 85 - .../Cloud/DataCatalog/V1/CommonUsageStats.php | 78 - .../Google/Cloud/DataCatalog/V1/Contacts.php | 67 - .../Cloud/DataCatalog/V1/Contacts/Person.php | 108 - .../V1/CreateEntryGroupRequest.php | 196 -- .../DataCatalog/V1/CreateEntryRequest.php | 191 -- .../DataCatalog/V1/CreatePolicyTagRequest.php | 128 - .../Cloud/DataCatalog/V1/CreateTagRequest.php | 150 - .../V1/CreateTagTemplateFieldRequest.php | 196 -- .../V1/CreateTagTemplateRequest.php | 185 -- .../DataCatalog/V1/CreateTaxonomyRequest.php | 128 - .../DataCatalog/V1/CrossRegionalSource.php | 68 - .../Cloud/DataCatalog/V1/DataSource.php | 181 -- .../DataCatalog/V1/DataSource/Service.php | 64 - .../V1/DataSourceConnectionSpec.php | 80 - .../DataCatalog/V1/DatabaseTableSpec.php | 164 - .../V1/DatabaseTableSpec/DatabaseViewSpec.php | 145 - .../DatabaseViewSpec/ViewType.php | 64 - .../V1/DatabaseTableSpec/TableType.php | 64 - .../DataCatalog/V1/DataplexExternalTable.php | 175 -- .../DataCatalog/V1/DataplexFilesetSpec.php | 77 - .../Cloud/DataCatalog/V1/DataplexSpec.php | 195 -- .../DataCatalog/V1/DataplexTableSpec.php | 153 - .../V1/DeleteEntryGroupRequest.php | 116 - .../DataCatalog/V1/DeleteEntryRequest.php | 82 - .../DataCatalog/V1/DeletePolicyTagRequest.php | 88 - .../Cloud/DataCatalog/V1/DeleteTagRequest.php | 82 - .../V1/DeleteTagTemplateFieldRequest.php | 124 - .../V1/DeleteTagTemplateRequest.php | 124 - .../DataCatalog/V1/DeleteTaxonomyRequest.php | 88 - .../Google/Cloud/DataCatalog/V1/DumpItem.php | 75 - .../src/Google/Cloud/DataCatalog/V1/Entry.php | 1272 -------- .../Cloud/DataCatalog/V1/EntryGroup.php | 201 -- .../Cloud/DataCatalog/V1/EntryOverview.php | 87 - .../Google/Cloud/DataCatalog/V1/EntryType.php | 171 - .../V1/ExportTaxonomiesRequest.php | 151 - .../V1/ExportTaxonomiesResponse.php | 68 - .../Google/Cloud/DataCatalog/V1/FieldType.php | 106 - .../DataCatalog/V1/FieldType/EnumType.php | 92 - .../V1/FieldType/EnumType/EnumValue.php | 84 - .../V1/FieldType/PrimitiveType.php | 83 - .../Cloud/DataCatalog/V1/FilesetSpec.php | 82 - .../Cloud/DataCatalog/V1/GcsFileSpec.php | 149 - .../Cloud/DataCatalog/V1/GcsFilesetSpec.php | 193 -- .../DataCatalog/V1/GetEntryGroupRequest.php | 142 - .../Cloud/DataCatalog/V1/GetEntryRequest.php | 82 - .../DataCatalog/V1/GetPolicyTagRequest.php | 82 - .../DataCatalog/V1/GetTagTemplateRequest.php | 82 - .../DataCatalog/V1/GetTaxonomyRequest.php | 82 - .../DataCatalog/V1/ImportEntriesMetadata.php | 115 - .../V1/ImportEntriesMetadata/ImportState.php | 78 - .../DataCatalog/V1/ImportEntriesRequest.php | 149 - .../DataCatalog/V1/ImportEntriesResponse.php | 127 - .../V1/ImportTaxonomiesRequest.php | 147 - .../V1/ImportTaxonomiesResponse.php | 68 - .../Cloud/DataCatalog/V1/InlineSource.php | 67 - .../Cloud/DataCatalog/V1/IntegratedSystem.php | 103 - .../DataCatalog/V1/ListEntriesRequest.php | 220 -- .../DataCatalog/V1/ListEntriesResponse.php | 106 - .../DataCatalog/V1/ListEntryGroupsRequest.php | 168 - .../V1/ListEntryGroupsResponse.php | 106 - .../DataCatalog/V1/ListPolicyTagsRequest.php | 166 - .../DataCatalog/V1/ListPolicyTagsResponse.php | 106 - .../Cloud/DataCatalog/V1/ListTagsRequest.php | 170 - .../Cloud/DataCatalog/V1/ListTagsResponse.php | 106 - .../DataCatalog/V1/ListTaxonomiesRequest.php | 200 -- .../DataCatalog/V1/ListTaxonomiesResponse.php | 106 - .../Cloud/DataCatalog/V1/LookerSystemSpec.php | 243 -- .../DataCatalog/V1/LookupEntryRequest.php | 295 -- .../Cloud/DataCatalog/V1/ManagingSystem.php | 62 - .../V1/ModifyEntryContactsRequest.php | 112 - .../V1/ModifyEntryOverviewRequest.php | 112 - .../Cloud/DataCatalog/V1/PersonalDetails.php | 111 - .../Cloud/DataCatalog/V1/PhysicalSchema.php | 241 -- .../V1/PhysicalSchema/AvroSchema.php | 70 - .../V1/PhysicalSchema/CsvSchema.php | 36 - .../V1/PhysicalSchema/OrcSchema.php | 36 - .../V1/PhysicalSchema/ParquetSchema.php | 36 - .../V1/PhysicalSchema/ProtobufSchema.php | 70 - .../V1/PhysicalSchema/ThriftSchema.php | 70 - .../Google/Cloud/DataCatalog/V1/PolicyTag.php | 255 -- .../DataCatalog/V1/ReconcileTagsMetadata.php | 107 - .../ReconciliationState.php | 71 - .../DataCatalog/V1/ReconcileTagsRequest.php | 190 -- .../DataCatalog/V1/ReconcileTagsResponse.php | 137 - ...RenameTagTemplateFieldEnumValueRequest.php | 123 - .../V1/RenameTagTemplateFieldRequest.php | 123 - .../DataCatalog/V1/ReplaceTaxonomyRequest.php | 112 - .../Cloud/DataCatalog/V1/RoutineSpec.php | 262 -- .../DataCatalog/V1/RoutineSpec/Argument.php | 146 - .../V1/RoutineSpec/Argument/Mode.php | 71 - .../V1/RoutineSpec/RoutineType.php | 64 - .../Google/Cloud/DataCatalog/V1/Schema.php | 75 - .../DataCatalog/V1/SearchCatalogRequest.php | 368 --- .../V1/SearchCatalogRequest/Scope.php | 313 -- .../DataCatalog/V1/SearchCatalogResponse.php | 190 -- .../DataCatalog/V1/SearchCatalogResult.php | 474 --- .../Cloud/DataCatalog/V1/SearchResultType.php | 68 - .../DataCatalog/V1/SerializedPolicyTag.php | 186 -- .../DataCatalog/V1/SerializedTaxonomy.php | 179 -- .../Cloud/DataCatalog/V1/ServiceSpec.php | 79 - .../DataCatalog/V1/SqlDatabaseSystemSpec.php | 197 -- .../Cloud/DataCatalog/V1/StarEntryRequest.php | 82 - .../DataCatalog/V1/StarEntryResponse.php | 35 - .../DataCatalog/V1/StorageProperties.php | 169 - .../Cloud/DataCatalog/V1/SystemTimestamps.php | 189 -- .../Cloud/DataCatalog/V1/TableSourceType.php | 68 - .../Google/Cloud/DataCatalog/V1/TableSpec.php | 83 - .../src/Google/Cloud/DataCatalog/V1/Tag.php | 256 -- .../Google/Cloud/DataCatalog/V1/TagField.php | 344 -- .../DataCatalog/V1/TagField/EnumValue.php | 70 - .../Cloud/DataCatalog/V1/TagTemplate.php | 244 -- .../Cloud/DataCatalog/V1/TagTemplateField.php | 303 -- .../Cloud/DataCatalog/V1/TaggedEntry.php | 152 - .../Google/Cloud/DataCatalog/V1/Taxonomy.php | 354 --- .../DataCatalog/V1/Taxonomy/PolicyType.php | 58 - .../Cloud/DataCatalog/V1/Taxonomy/Service.php | 104 - .../DataCatalog/V1/UnstarEntryRequest.php | 82 - .../DataCatalog/V1/UnstarEntryResponse.php | 35 - .../V1/UpdateEntryGroupRequest.php | 166 - .../DataCatalog/V1/UpdateEntryRequest.php | 258 -- .../DataCatalog/V1/UpdatePolicyTagRequest.php | 156 - .../Cloud/DataCatalog/V1/UpdateTagRequest.php | 171 - .../V1/UpdateTagTemplateFieldRequest.php | 253 -- .../V1/UpdateTagTemplateRequest.php | 182 -- .../DataCatalog/V1/UpdateTaxonomyRequest.php | 152 - .../Cloud/DataCatalog/V1/UsageSignal.php | 203 -- .../Cloud/DataCatalog/V1/UsageStats.php | 176 -- .../Google/Cloud/DataCatalog/V1/ViewSpec.php | 67 - .../V1/DataCatalogClient/create_entry.php | 88 - .../DataCatalogClient/create_entry_group.php | 102 - .../V1/DataCatalogClient/create_tag.php | 100 - .../DataCatalogClient/create_tag_template.php | 83 - .../create_tag_template_field.php | 92 - .../V1/DataCatalogClient/delete_entry.php | 78 - .../DataCatalogClient/delete_entry_group.php | 69 - .../V1/DataCatalogClient/delete_tag.php | 69 - .../DataCatalogClient/delete_tag_template.php | 72 - .../delete_tag_template_field.php | 78 - .../V1/DataCatalogClient/get_entry.php | 71 - .../V1/DataCatalogClient/get_entry_group.php | 66 - .../V1/DataCatalogClient/get_iam_policy.php | 86 - .../V1/DataCatalogClient/get_tag_template.php | 66 - .../V1/DataCatalogClient/import_entries.php | 95 - .../V1/DataCatalogClient/list_entries.php | 77 - .../DataCatalogClient/list_entry_groups.php | 73 - .../V1/DataCatalogClient/list_tags.php | 82 - .../V1/DataCatalogClient/lookup_entry.php | 55 - .../modify_entry_contacts.php | 78 - .../modify_entry_overview.php | 78 - .../V1/DataCatalogClient/reconcile_tags.php | 102 - .../rename_tag_template_field.php | 80 - .../rename_tag_template_field_enum_value.php | 82 - .../V1/DataCatalogClient/search_catalog.php | 99 - .../V1/DataCatalogClient/set_iam_policy.php | 85 - .../V1/DataCatalogClient/star_entry.php | 72 - .../test_iam_permissions.php | 87 - .../V1/DataCatalogClient/unstar_entry.php | 72 - .../V1/DataCatalogClient/update_entry.php | 61 - .../DataCatalogClient/update_entry_group.php | 61 - .../V1/DataCatalogClient/update_tag.php | 75 - .../DataCatalogClient/update_tag_template.php | 66 - .../update_tag_template_field.php | 84 - .../create_policy_tag.php | 66 - .../create_taxonomy.php | 68 - .../delete_policy_tag.php | 76 - .../delete_taxonomy.php | 68 - .../PolicyTagManagerClient/get_iam_policy.php | 66 - .../PolicyTagManagerClient/get_policy_tag.php | 71 - .../PolicyTagManagerClient/get_taxonomy.php | 66 - .../list_policy_tags.php | 71 - .../list_taxonomies.php | 72 - .../PolicyTagManagerClient/set_iam_policy.php | 69 - .../test_iam_permissions.php | 75 - .../update_policy_tag.php | 54 - .../update_taxonomy.php | 54 - .../export_taxonomies.php | 87 - .../import_taxonomies.php | 74 - .../replace_taxonomy.php | 95 - .../BaseClient/DataCatalogBaseClient.php | 1486 --------- .../BaseClient/PolicyTagManagerBaseClient.php | 608 ---- ...olicyTagManagerSerializationBaseClient.php | 337 -- .../v1/src/V1/Client/DataCatalogClient.php | 40 - .../src/V1/Client/PolicyTagManagerClient.php | 40 - .../PolicyTagManagerSerializationClient.php | 40 - .../v1/src/V1/DataCatalogClient.php | 34 - .../src/V1/Gapic/DataCatalogGapicClient.php | 2616 ---------------- .../V1/Gapic/PolicyTagManagerGapicClient.php | 992 ------ ...licyTagManagerSerializationGapicClient.php | 460 --- .../v1/src/V1/PolicyTagManagerClient.php | 34 - .../PolicyTagManagerSerializationClient.php | 34 - .../DataCatalog/v1/src/V1/gapic_metadata.json | 286 -- .../resources/data_catalog_client_config.json | 206 -- .../data_catalog_descriptor_config.php | 459 --- .../data_catalog_rest_client_config.php | 515 --- .../policy_tag_manager_client_config.json | 107 - .../policy_tag_manager_descriptor_config.php | 187 -- .../policy_tag_manager_rest_client_config.php | 227 -- ...g_manager_serialization_client_config.json | 47 - ...anager_serialization_descriptor_config.php | 48 - ...nager_serialization_rest_client_config.php | 89 - .../Unit/V1/Client/DataCatalogClientTest.php | 2770 ----------------- .../V1/Client/PolicyTagManagerClientTest.php | 991 ------ ...olicyTagManagerSerializationClientTest.php | 314 -- .../tests/Unit/V1/DataCatalogClientTest.php | 2515 --------------- .../Unit/V1/PolicyTagManagerClientTest.php | 891 ------ ...olicyTagManagerSerializationClientTest.php | 262 -- 241 files changed, 54 insertions(+), 41336 deletions(-) delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/Bigquery.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/Common.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/DataSource.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/Datacatalog.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/DataplexSpec.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/DumpContent.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/GcsFilesetSpec.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/PhysicalSchema.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/Policytagmanager.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/Policytagmanagerserialization.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/Schema.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/Search.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/TableSpec.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/Tags.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/Timestamps.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/Usage.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/BigQueryConnectionSpec.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/BigQueryConnectionSpec/ConnectionType.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/BigQueryDateShardedSpec.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/BigQueryRoutineSpec.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/BigQueryTableSpec.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/BusinessContext.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CloudBigtableInstanceSpec.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CloudBigtableInstanceSpec/CloudBigtableClusterSpec.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CloudBigtableSystemSpec.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CloudSqlBigQueryConnectionSpec.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CloudSqlBigQueryConnectionSpec/DatabaseType.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ColumnSchema.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ColumnSchema/IndexingType.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ColumnSchema/LookerColumnSpec.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ColumnSchema/LookerColumnSpec/LookerColumnType.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CommonUsageStats.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Contacts.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Contacts/Person.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CreateEntryGroupRequest.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CreateEntryRequest.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CreatePolicyTagRequest.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CreateTagRequest.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CreateTagTemplateFieldRequest.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CreateTagTemplateRequest.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CreateTaxonomyRequest.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CrossRegionalSource.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DataSource.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DataSource/Service.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DataSourceConnectionSpec.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DatabaseTableSpec.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DatabaseTableSpec/DatabaseViewSpec.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DatabaseTableSpec/DatabaseViewSpec/ViewType.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DatabaseTableSpec/TableType.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DataplexExternalTable.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DataplexFilesetSpec.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DataplexSpec.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DataplexTableSpec.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DeleteEntryGroupRequest.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DeleteEntryRequest.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DeletePolicyTagRequest.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DeleteTagRequest.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DeleteTagTemplateFieldRequest.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DeleteTagTemplateRequest.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DeleteTaxonomyRequest.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DumpItem.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Entry.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/EntryGroup.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/EntryOverview.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/EntryType.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ExportTaxonomiesRequest.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ExportTaxonomiesResponse.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/FieldType.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/FieldType/EnumType.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/FieldType/EnumType/EnumValue.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/FieldType/PrimitiveType.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/FilesetSpec.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/GcsFileSpec.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/GcsFilesetSpec.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/GetEntryGroupRequest.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/GetEntryRequest.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/GetPolicyTagRequest.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/GetTagTemplateRequest.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/GetTaxonomyRequest.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ImportEntriesMetadata.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ImportEntriesMetadata/ImportState.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ImportEntriesRequest.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ImportEntriesResponse.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ImportTaxonomiesRequest.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ImportTaxonomiesResponse.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/InlineSource.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/IntegratedSystem.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListEntriesRequest.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListEntriesResponse.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListEntryGroupsRequest.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListEntryGroupsResponse.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListPolicyTagsRequest.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListPolicyTagsResponse.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListTagsRequest.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListTagsResponse.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListTaxonomiesRequest.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListTaxonomiesResponse.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/LookerSystemSpec.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/LookupEntryRequest.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ManagingSystem.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ModifyEntryContactsRequest.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ModifyEntryOverviewRequest.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PersonalDetails.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PhysicalSchema.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PhysicalSchema/AvroSchema.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PhysicalSchema/CsvSchema.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PhysicalSchema/OrcSchema.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PhysicalSchema/ParquetSchema.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PhysicalSchema/ProtobufSchema.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PhysicalSchema/ThriftSchema.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PolicyTag.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ReconcileTagsMetadata.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ReconcileTagsMetadata/ReconciliationState.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ReconcileTagsRequest.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ReconcileTagsResponse.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/RenameTagTemplateFieldEnumValueRequest.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/RenameTagTemplateFieldRequest.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ReplaceTaxonomyRequest.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/RoutineSpec.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/RoutineSpec/Argument.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/RoutineSpec/Argument/Mode.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/RoutineSpec/RoutineType.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Schema.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SearchCatalogRequest.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SearchCatalogRequest/Scope.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SearchCatalogResponse.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SearchCatalogResult.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SearchResultType.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SerializedPolicyTag.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SerializedTaxonomy.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ServiceSpec.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SqlDatabaseSystemSpec.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/StarEntryRequest.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/StarEntryResponse.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/StorageProperties.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SystemTimestamps.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/TableSourceType.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/TableSpec.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Tag.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/TagField.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/TagField/EnumValue.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/TagTemplate.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/TagTemplateField.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/TaggedEntry.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Taxonomy.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Taxonomy/PolicyType.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Taxonomy/Service.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UnstarEntryRequest.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UnstarEntryResponse.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UpdateEntryGroupRequest.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UpdateEntryRequest.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UpdatePolicyTagRequest.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UpdateTagRequest.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UpdateTagTemplateFieldRequest.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UpdateTagTemplateRequest.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UpdateTaxonomyRequest.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UsageSignal.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UsageStats.php delete mode 100644 owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ViewSpec.php delete mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/create_entry.php delete mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/create_entry_group.php delete mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/create_tag.php delete mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/create_tag_template.php delete mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/create_tag_template_field.php delete mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/delete_entry.php delete mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/delete_entry_group.php delete mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/delete_tag.php delete mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/delete_tag_template.php delete mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/delete_tag_template_field.php delete mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/get_entry.php delete mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/get_entry_group.php delete mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/get_iam_policy.php delete mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/get_tag_template.php delete mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/import_entries.php delete mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/list_entries.php delete mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/list_entry_groups.php delete mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/list_tags.php delete mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/lookup_entry.php delete mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/modify_entry_contacts.php delete mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/modify_entry_overview.php delete mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/reconcile_tags.php delete mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/rename_tag_template_field.php delete mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/rename_tag_template_field_enum_value.php delete mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/search_catalog.php delete mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/set_iam_policy.php delete mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/star_entry.php delete mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/unstar_entry.php delete mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/update_entry.php delete mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/update_entry_group.php delete mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/update_tag.php delete mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/update_tag_template.php delete mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/update_tag_template_field.php delete mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/create_policy_tag.php delete mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/create_taxonomy.php delete mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/delete_policy_tag.php delete mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/delete_taxonomy.php delete mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/get_iam_policy.php delete mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/get_policy_tag.php delete mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/get_taxonomy.php delete mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/list_policy_tags.php delete mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/list_taxonomies.php delete mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/set_iam_policy.php delete mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/update_policy_tag.php delete mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/update_taxonomy.php delete mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerSerializationClient/export_taxonomies.php delete mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerSerializationClient/import_taxonomies.php delete mode 100644 owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerSerializationClient/replace_taxonomy.php delete mode 100644 owl-bot-staging/DataCatalog/v1/src/V1/Client/BaseClient/DataCatalogBaseClient.php delete mode 100644 owl-bot-staging/DataCatalog/v1/src/V1/Client/BaseClient/PolicyTagManagerBaseClient.php delete mode 100644 owl-bot-staging/DataCatalog/v1/src/V1/Client/BaseClient/PolicyTagManagerSerializationBaseClient.php delete mode 100644 owl-bot-staging/DataCatalog/v1/src/V1/Client/DataCatalogClient.php delete mode 100644 owl-bot-staging/DataCatalog/v1/src/V1/Client/PolicyTagManagerClient.php delete mode 100644 owl-bot-staging/DataCatalog/v1/src/V1/Client/PolicyTagManagerSerializationClient.php delete mode 100644 owl-bot-staging/DataCatalog/v1/src/V1/DataCatalogClient.php delete mode 100644 owl-bot-staging/DataCatalog/v1/src/V1/Gapic/DataCatalogGapicClient.php delete mode 100644 owl-bot-staging/DataCatalog/v1/src/V1/Gapic/PolicyTagManagerGapicClient.php delete mode 100644 owl-bot-staging/DataCatalog/v1/src/V1/Gapic/PolicyTagManagerSerializationGapicClient.php delete mode 100644 owl-bot-staging/DataCatalog/v1/src/V1/PolicyTagManagerClient.php delete mode 100644 owl-bot-staging/DataCatalog/v1/src/V1/PolicyTagManagerSerializationClient.php delete mode 100644 owl-bot-staging/DataCatalog/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/DataCatalog/v1/src/V1/resources/data_catalog_client_config.json delete mode 100644 owl-bot-staging/DataCatalog/v1/src/V1/resources/data_catalog_descriptor_config.php delete mode 100644 owl-bot-staging/DataCatalog/v1/src/V1/resources/data_catalog_rest_client_config.php delete mode 100644 owl-bot-staging/DataCatalog/v1/src/V1/resources/policy_tag_manager_client_config.json delete mode 100644 owl-bot-staging/DataCatalog/v1/src/V1/resources/policy_tag_manager_descriptor_config.php delete mode 100644 owl-bot-staging/DataCatalog/v1/src/V1/resources/policy_tag_manager_rest_client_config.php delete mode 100644 owl-bot-staging/DataCatalog/v1/src/V1/resources/policy_tag_manager_serialization_client_config.json delete mode 100644 owl-bot-staging/DataCatalog/v1/src/V1/resources/policy_tag_manager_serialization_descriptor_config.php delete mode 100644 owl-bot-staging/DataCatalog/v1/src/V1/resources/policy_tag_manager_serialization_rest_client_config.php delete mode 100644 owl-bot-staging/DataCatalog/v1/tests/Unit/V1/Client/DataCatalogClientTest.php delete mode 100644 owl-bot-staging/DataCatalog/v1/tests/Unit/V1/Client/PolicyTagManagerClientTest.php delete mode 100644 owl-bot-staging/DataCatalog/v1/tests/Unit/V1/Client/PolicyTagManagerSerializationClientTest.php delete mode 100644 owl-bot-staging/DataCatalog/v1/tests/Unit/V1/DataCatalogClientTest.php delete mode 100644 owl-bot-staging/DataCatalog/v1/tests/Unit/V1/PolicyTagManagerClientTest.php delete mode 100644 owl-bot-staging/DataCatalog/v1/tests/Unit/V1/PolicyTagManagerSerializationClientTest.php diff --git a/DataCatalog/src/V1/Entry.php b/DataCatalog/src/V1/Entry.php index 6d9f9ba4db2f..ef9c69a48c56 100644 --- a/DataCatalog/src/V1/Entry.php +++ b/DataCatalog/src/V1/Entry.php @@ -167,9 +167,7 @@ class Entry extends \Google\Protobuf\Internal\Message * be used for search and lookup of the entries. * @type int $type * The type of the entry. - * Only used for entries with types listed in the `EntryType` enum. - * Currently, only `FILESET` enum value is allowed. All other entries - * created in Data Catalog must use the `user_specified_type`. + * For details, see [`EntryType`](#entrytype). * @type string $user_specified_type * Custom entry type that doesn't match any of the values allowed for input * and listed in the `EntryType` enum. @@ -383,9 +381,7 @@ public function setFullyQualifiedName($var) /** * The type of the entry. - * Only used for entries with types listed in the `EntryType` enum. - * Currently, only `FILESET` enum value is allowed. All other entries - * created in Data Catalog must use the `user_specified_type`. + * For details, see [`EntryType`](#entrytype). * * Generated from protobuf field .google.cloud.datacatalog.v1.EntryType type = 2; * @return int @@ -402,9 +398,7 @@ public function hasType() /** * The type of the entry. - * Only used for entries with types listed in the `EntryType` enum. - * Currently, only `FILESET` enum value is allowed. All other entries - * created in Data Catalog must use the `user_specified_type`. + * For details, see [`EntryType`](#entrytype). * * Generated from protobuf field .google.cloud.datacatalog.v1.EntryType type = 2; * @param int $var diff --git a/DataCatalog/src/V1/EntryType.php b/DataCatalog/src/V1/EntryType.php index 905e712fff98..6e3f7b41f6df 100644 --- a/DataCatalog/src/V1/EntryType.php +++ b/DataCatalog/src/V1/EntryType.php @@ -7,8 +7,17 @@ use UnexpectedValueException; /** - * The enum field that lists all the types of entry resources in Data - * Catalog. For example, a BigQuery table entry has the `TABLE` type. + * Metadata automatically ingested from Google Cloud resources like BigQuery + * tables or Pub/Sub topics always uses enum values from `EntryType` as the type + * of entry. + * Other sources of metadata like Hive or Oracle databases can identify the type + * by either using one of the enum values from `EntryType` (for example, + * `FILESET` for a Cloud Storage fileset) or specifying a custom value using + * the [`Entry`](#resource:-entry) field `user_specified_type`. For more + * information, see + * [Surface files from Cloud Storage with fileset + * entries](https://cloud.google.com/data-catalog/docs/how-to/filesets) or [Create custom entries for + * your data sources](https://cloud.google.com/data-catalog/docs/how-to/custom-entries). * * Protobuf type google.cloud.datacatalog.v1.EntryType */ @@ -28,9 +37,9 @@ class EntryType */ const TABLE = 2; /** - * Output only. The type of models. - * For more information, see [Supported models in BigQuery ML] - * (https://cloud.google.com/bigquery-ml/docs/introduction#supported_models_in). + * The type of models. + * For more information, see [Supported models in BigQuery + * ML](https://cloud.google.com/bigquery/docs/bqml-introduction#supported_models). * * Generated from protobuf enum MODEL = 5; */ @@ -61,14 +70,14 @@ class EntryType */ const DATABASE = 7; /** - * Output only. Connection to a data source. For example, a BigQuery + * Connection to a data source. For example, a BigQuery * connection. * * Generated from protobuf enum DATA_SOURCE_CONNECTION = 8; */ const DATA_SOURCE_CONNECTION = 8; /** - * Output only. Routine, for example, a BigQuery routine. + * Routine, for example, a BigQuery routine. * * Generated from protobuf enum ROUTINE = 9; */ diff --git a/DataCatalog/src/V1/Gapic/DataCatalogGapicClient.php b/DataCatalog/src/V1/Gapic/DataCatalogGapicClient.php index 4cc9cb597bd8..791847de75ad 100644 --- a/DataCatalog/src/V1/Gapic/DataCatalogGapicClient.php +++ b/DataCatalog/src/V1/Gapic/DataCatalogGapicClient.php @@ -2052,6 +2052,13 @@ public function renameTagTemplateFieldEnumValue($name, $newEnumValueDisplayName, * * `last_modified_timestamp [asc|desc]` with descending (`desc`) as default * * `default` that can only be descending * + * Search queries don't guarantee full recall. Results that match your query + * might not be returned, even in subsequent result pages. Additionally, + * returned (and not returned) results can vary if you repeat search queries. + * If you are experiencing recall issues and you don't have to fetch the + * results in any specific order, consider setting this parameter to + * `default`. + * * If this parameter is omitted, it defaults to the descending `relevance`. * @type RetrySettings|array $retrySettings * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an diff --git a/DataCatalog/src/V1/SearchCatalogRequest.php b/DataCatalog/src/V1/SearchCatalogRequest.php index 37d568c2eee2..f3ef7f104ab8 100644 --- a/DataCatalog/src/V1/SearchCatalogRequest.php +++ b/DataCatalog/src/V1/SearchCatalogRequest.php @@ -40,7 +40,7 @@ class SearchCatalogRequest extends \Google\Protobuf\Internal\Message */ private $query = ''; /** - * Number of results to return in a single search page. + * Upper bound on the number of results you can get in a single response. * Can't be negative or 0, defaults to 10 in this case. * The maximum number is 1000. If exceeded, throws an "invalid argument" * exception. @@ -66,6 +66,12 @@ class SearchCatalogRequest extends \Google\Protobuf\Internal\Message * * `relevance` that can only be descending * * `last_modified_timestamp [asc|desc]` with descending (`desc`) as default * * `default` that can only be descending + * Search queries don't guarantee full recall. Results that match your query + * might not be returned, even in subsequent result pages. Additionally, + * returned (and not returned) results can vary if you repeat search queries. + * If you are experiencing recall issues and you don't have to fetch the + * results in any specific order, consider setting this parameter to + * `default`. * If this parameter is omitted, it defaults to the descending `relevance`. * * Generated from protobuf field string order_by = 5; @@ -124,7 +130,7 @@ public static function build(\Google\Cloud\DataCatalog\V1\SearchCatalogRequest\S * * `column:y` * * `description:z` * @type int $page_size - * Number of results to return in a single search page. + * Upper bound on the number of results you can get in a single response. * Can't be negative or 0, defaults to 10 in this case. * The maximum number is 1000. If exceeded, throws an "invalid argument" * exception. @@ -142,6 +148,12 @@ public static function build(\Google\Cloud\DataCatalog\V1\SearchCatalogRequest\S * * `relevance` that can only be descending * * `last_modified_timestamp [asc|desc]` with descending (`desc`) as default * * `default` that can only be descending + * Search queries don't guarantee full recall. Results that match your query + * might not be returned, even in subsequent result pages. Additionally, + * returned (and not returned) results can vary if you repeat search queries. + * If you are experiencing recall issues and you don't have to fetch the + * results in any specific order, consider setting this parameter to + * `default`. * If this parameter is omitted, it defaults to the descending `relevance`. * } */ @@ -235,7 +247,7 @@ public function setQuery($var) } /** - * Number of results to return in a single search page. + * Upper bound on the number of results you can get in a single response. * Can't be negative or 0, defaults to 10 in this case. * The maximum number is 1000. If exceeded, throws an "invalid argument" * exception. @@ -249,7 +261,7 @@ public function getPageSize() } /** - * Number of results to return in a single search page. + * Upper bound on the number of results you can get in a single response. * Can't be negative or 0, defaults to 10 in this case. * The maximum number is 1000. If exceeded, throws an "invalid argument" * exception. @@ -310,6 +322,12 @@ public function setPageToken($var) * * `relevance` that can only be descending * * `last_modified_timestamp [asc|desc]` with descending (`desc`) as default * * `default` that can only be descending + * Search queries don't guarantee full recall. Results that match your query + * might not be returned, even in subsequent result pages. Additionally, + * returned (and not returned) results can vary if you repeat search queries. + * If you are experiencing recall issues and you don't have to fetch the + * results in any specific order, consider setting this parameter to + * `default`. * If this parameter is omitted, it defaults to the descending `relevance`. * * Generated from protobuf field string order_by = 5; @@ -326,6 +344,12 @@ public function getOrderBy() * * `relevance` that can only be descending * * `last_modified_timestamp [asc|desc]` with descending (`desc`) as default * * `default` that can only be descending + * Search queries don't guarantee full recall. Results that match your query + * might not be returned, even in subsequent result pages. Additionally, + * returned (and not returned) results can vary if you repeat search queries. + * If you are experiencing recall issues and you don't have to fetch the + * results in any specific order, consider setting this parameter to + * `default`. * If this parameter is omitted, it defaults to the descending `relevance`. * * Generated from protobuf field string order_by = 5; diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/Bigquery.php b/owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/Bigquery.php deleted file mode 100644 index ee848a4826c8ee574ff897f7e962dddde95853f0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1507 zcmbtU+iuf95Uo?Fnr$0`D^-Pxb_tc5B5;)Q=1?H_MrsqcNh1|3S-xzNl^n0Twks9X zAL5y>;GJ(k;tO~|Vs~>b4G|KSBFFa3nVB&vf+?3T%q~kWh_ktL98MKpiBusxyq)##J~ny-6%OAi4d;G=-uYI&B zK`EU$C@6CfmDy;@1iZzNWDUecKSprrZpIkw%0X@}tPo%G(wz-|v>5kk>%Gc-%NI8O_t< zq*Qo#i->@6llm@!?fD(a>tF?YOj}IB26hB>aXAT=`2s96Kw|2++y?gqwY=HH!O?$k zpzxE)kvYMs3RsX-1iA(&SbdQq9(;CU_&mZa_4HGcKF7AI!mAXq9KlGDvBKO=X=lHVzUo6O6J9p_t}`?H5!)W5 qtE$LXRZihBKvmmWYf1RztG)4wd@=BdDNFgQoruW6p}zq)0Q?3z!0Chl diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/Common.php b/owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/Common.php deleted file mode 100644 index 4b9e78194ba73e422fe71561d0022821920625c7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1274 zcma)6+iuf95XAv{S$Z*+K!pO`LZzk^brg7WDaeUk6OqJD;#3q_iZ;&1HFCU`y{S}C zzk`3^A9&?~PvHxAWW7$@^nyerEAi}{nKN_tfkPZ4iU+WN2I&cgQA{Xt zNdWuf;Sk5rC8Nj>a4bWpnXqZvP}geqCW9tq9J^S79wA`K0xB*HMSmkxVR{+^38utU= zg$YHJeQo(k&kud-qrm^d<~V>u6eO5IujdZOp-X)d!W3YJE-voCtY(_K6%jV~0h}_j z(p9iEIJJ=CI7ES?;lz#oh?3Z1sfyxZnlCVo6n7?V({lb07Bh~Da*gBxr12Qfc84&= zbR38KoOfE_Jpbj~u&R1EVyufQe5$>-{$vJqFvuw%GGU8(leFbF_;wc* z|5s6IJL|O&&jA!I}Vt;)1jX7SlkFvKiJ2 zEOhVHV|h}PUmCW4IUjKMhXBM>43A&g&RIh7NZJHXYfW1>+N!N2xb%L3#)zO|@04ZB}~?-Bvrc+1AC| zDUQeM`bY7ObRR5dxQ?YZn|fQElO(W`g;;r8t<-gKURnl=leAV{T#x{mtDEKrmcF?A z8LTu=h&(^^CgeB3dP8lhMy+YwO#KO1yPA+w5~N4q!PQgKe$RRpDnA9V!R$BP=1me= z!Y4J0Pjw`tl1DC?7)3tw@r<-lfB(|kA3^wDSU0$dWo}|QHE}ij6OfO}zow_o#N*uL xlXHi;{CDA523Hi0SCp9oigHx$&+)tPdON?XFEjhhxb2@#x*B#I`18I#sYELF$9Yy+?FD78wrWq%t+ipbq@ePKv4vf!{V zSykOc6RC&W4h7~R3fv}+d`_64yemU(dxFJW$>gNGou*Cb$QYJ&jkbNI$O9;Nj2E** z$gzldxToq)2rlRU+`nj6W5hiqI2hIO8JZHxZ9D5KBT-H5yd-H0wb5u^@u3`Wd7dN5 zxCK7n1UvsVS#w>7TWS%kg+;KY)r~JX0J8a+ufcMJ`IPv$WI&^Qcei3)gSIlH)z>hy z2v#`On^nq5idFLwDClPohk{>}^2upE|D%>SkANA;S)mE`oIgyWx1J$NjF;XdkwnW^u_}19uunozte*Kk4*pEvIOh z1+Y?Yx89vPz4ygjy#PQ~%EmreyOPO#019I{8IK{6tesRUFWX!LtLju-FswVTe>cDr z>C@{Pso%>qRO{R|KGgK2X2R3+%7p%5V8lr3;ndP>xVJD@HvDB6Uvuj%6D^7bb~n3iw#6>?quU3HwpgGoihlHWTP)CirDzLu`{e@LqTP=o{n@rC`a*%8 zbMC#vnGrc0N)8ZMoO|!N=Y7sS=gz$LdSkc2F2?T~HKSQ<89VXq{djBFh&P(`R=rfO z#<$xK9vIDdslL~!RE=gL9$(7D*E9KedTAwp0hXHecC%!p;^lh1Ts7uP)p~npey7+f zmf-(ty*&Tun*C>jATw4g?ipsISTf>wHx|~6RuPwM-6bGfiwIc(56`|8~*vSQrrWdxCQ@g)WP=+U;%RF zpvzY4wQ{pvt5s^{txN-h#b8dx@}1zh(tC~802o_K$>FRO&4>Q^lx>u@a^Ml$J>)|! z{_5?Dbm;odj^)46a%L@$i~jdA`-ATW*wuj|9X}_gCrTL85<8ukmUwh6HX~sb8x@G0 z=z>Ljj6H7~cz}Mkuq_>}oN(4Qp((wo9Ga6uw4*)tVkq90E>q5(^_mMoAN-=6*_Z5s zaOraTycb~P0=l?@2|i9PNO~>}Yd|PBTl_6H zVwM1n=x97J8%};PA+YRfKZ$M-5;NN>JN=tbf_~o!p7>&9iv&;-j9ypfB`w3g2m1KLK&fgj5?AJ^4D0{Hb{CBPHtWHWI+eE_9@`K*#JDc;H^7B zqiPNSS}68BFpIz!(AXq;F@>G7$AlFzwJ!(QnY%`-gQDW%O*V{YF&7V+Paa-nA&}0F zUo75dGfPI*=*E@f;Q@yJpbqCy;)JjR?UMkTUagomnoULYaaCvfkPi{2*UOP;AF!E2 zs7O1z#l~%#ri{(Es-Yip8x(rAkoMaF#%;FKk9NNzpJHPIU#G!bXCw4j>Y}D}v0L7g zAT=aS)(#lA8Hz&Ef+noPFEl=|U92*0)5y;DcB7aj$D*-#Kfj`_unA>k#|8DPAidRk z{b9R7%u?XavWaS?_7L2@%KC)mEhkkFP=1z1ue0ISK4b`}=BJXE`fFMqW&@$mvdOjy!5p(r!3P2pL7*_4VW;sNP^Lmy z!Q3|?WJXWZ9#=j0z;cjSm7_(d*h9+!{ydv zzC=J@^+aA{10*hHNF_ag~-6CXzJA#`NJ_uK!K}beUEJg{b4c6GCC3_pvQ6ESvv0F$l z5A&@pb`IgmlUSituhk&?gw#=Be2(D$lqWL~t|((ITB}K^hWQ(891^8gr6x{5(engu z))QP-Ea*V6pW>nyd_b@juz*Cs0WA1Yr6h5f^8q0z7DybT!zi60!pV!Ct3{m+ zyirsfsFew~tWzR6<#5v5kcF9b>QnqS8>f>aB;#eMT}My)U>#MZax@>-k5-G@M%9d- zqT_(KQBinEtkMDzDj@B(DQENyZQm!&>1ZRF4EVJO98k?V;9uB*ra=X;iTRMohFr8H z))27RRTj467iL2bjeQYK`AIhNs90@_7!yhbZv;{wey+FsrvUtI8B5LikK|tm^D3Ic zGxg`eykQ+^;4%FW2N5w+G1Sw8g>lBjIEJf*G0-LvW*{nyzsS57!YqUn#E(%nY=WoJ z{$iM&MlND}v3vz+wuqpZU7bqa@YKgcs}lqVV=Bnw6v~upIj{#D+b|}Flis?45OIlx zj}Y#Aj3Y3LgpVr5W8t*WKEuh^2SiaJeGlNE;m3X<$Rh5C{5=+;jVKKeyjVWwMhV=J zcyop^BBjF@Ofn`}2t&T8O2`aN%djzP*;zJqZzcURh5Wl4>B8oEZX><8a%UyI6nO?J z7bkOheSJyKE){T2B*3TG=`}r{&aUXIEBDj#ad2UhotDmH$9O=^uzF3?S%^4J*u~g% zUSC*EciV@t(RDq)axV=VjI*)yJFvmJz8VQ?@3OGXAM-a^1SLk|myVt6r(dlA1%Zof zu;7Fg#mC)Z58q@_D-gSbnm8c5;wd&2hMgfz`?Fydwgo64#|m&ZjqpxwZ0i&9Z{jcJ z(8XH04V5Oci4b39r<*c-LMq+f1CutP;((QvYo6HKx6tKE3|OK)SRhnIz=C|bBk#g? zeMeTU_}gsCVxU3--Gj`vyem73dp10lpNV}hz{V_W#_dG}zQl(2>N_ewzdkT=i8WXa znkRe|8Hsj-4b#&zEV7naa$CkI3$Cn#ww_=^nazA8$U|&oWgY(<0^?FbCc&I%(JTzC ztanxYNj8yN)K~Rv;m+pzVtyrqP*1YZMmDpUUfRs2BSAb2+1#!MS=Ut8JRHkkXzNC; z3^{}hEKy-H!pT8Y!fb<%>tMbO;K^MBPTQ^&x8l`;}U=epx&SQ*=(ie2P=3+%jm%#rYj-9T03EEHAMs(wN3@vLLOu~w+rG&?1ykoSb0=_twLENXx5Sc%o# z5J+*R$5{XlXHym}j+I1}_J09(*0FR&5{}-Tx7m5u5d{jfaDEeKJylc5cxqx#=n2Qj zq5w=mrNW}U#<)Ar6vD9|t%V>QYL3Mm_lcNzu6@kHwmg>q>>+|J=8;_sujp-h4%F@J zTzgXaH~W2N>! z*WdSBozah-$!dQR01Kh=J@nf1vIC(?S#Y2b?n3Z!AwgxfS$+x0mQ+h^u*&x~Fi<3# zus1d=7lxDu`63&)k4p9OKCRlI6A*2aO+h`+_E_Qmnq8_2bLJCs?N@*;qUhNLv>S0@ z%7Y<3cpbC~=@(VzyI^!IVzCG3D$NJAFR_TF7K)|UUFvX&)FIBF^Hv9*WJ9fDS;{x= z={|rqA=k$&V)0+?FX0Gw`-3w$o0s7fqS&l9e$}B%KFQX87+}v@JXEGd{T>Ckhkg0g zQm(NnV64?Rga$m`Lx5;cPD@zXI^&1uQ0CIlKY=V9SPQ}YGf-to#xbs_(jDA-g_Ptf zd)Zq_9FTZ-q(%JkE~<1zn!oC7#-aNTCq0^RNNPa)29TOHFgCcMK1EV5v9mQeNgtMx zQ;yni2H2(U$fRrSy?a;+QCPj{5Ws6Bfa~nl0R&)yX zYZ;D1nhLF_pcmadRfA1n;|@e*H4l&KsJdJ{fD?kd53aoj`M$NI>=7p5ECd+H?4_@B z>fICkF|>iR2IO2NxJ_dx>W0hv`tEtbY432L4GkI+spEqUTqx^df4Hz$F`@EWCRZ}X z75&4Mz4fJEd&s6-R7ys|!Kp;~$PU^BmUY|m{=g6(s@l|3cZ{J9(wIQZF@}~tqnO1%po-JU!z8|S#OF9C*kDnBfw1)0LoKi zP?@#;n<1$!YhoaAaNxX_b8Y~W%Y6i2mR4zS5?sJ_7B+4N#&eQ{-V1xiYp^#W9| z^6uk1)Vy4?-rh`aLd`1x&C8f;Xl10s+jhlvi=i!DVlq2M@~Qto)!x;o7u&50V2nGT9jeO zaG9*!MnZgy4X^5Nr6Uagx{oeDj1zL{?7fx6bmSB&gMwSgEiR|m^vDEOa+mbn@h#>?-Loz$=5rU;NJ!mCG&F!7BPyb(_{f|-4EN8xer0MnTnuZ8ox|L+?*4# z@NL32^rd^^*u7OAl6!YU)HH>hAEl9q^5Y}=CAg&1xdq#YmA09KU>hU0p5YW`QJko> zRoWH9PFPtmJno0Up#x{kySHuwZAJYzg_I@pJRL(1i|e?EzlC#om+Y5&zgE*_h2rM` z`K|U25t7x`$mWist|@3vyEFGxV2=N_lPr}q`zK4SP-OXRJ3d{C6cR|$KL*%o;h~`_ zrwW|h`>y7p`HC9f%_6NzB6>snLVxdmFb@?og_)Uh6#bs)7o~59Ih~FHxOn?-{zn0J z3fzgELhrQLIeBpMUMKRBT#)Cbfp*%!%_~3o?;sWtaqLKYi{;S#!SOyIyw{SqNGx_9 zdIl{Q5pEf|L>9Hfbp$Y|ot+k8$v@SH<}0du1+%n}&D;@WLtl@$LS04vX^>4HG6d>_ z@sy8z$VQ;Oc@`V252Sr9K-6S>rAaO^%~NB|Om*p`J<;d8*_G&IZX8$X^6V|=Y)kj;pFFGQ3 zgx5`LZ}bg}J(<&_&LKpOC;D?lc+WN;|5lJa-yQuLxIlndfeMM zt$7N`{{6G>3iJJHK&t2fNvQ3xfeC||!rK}5Z)w;2XBh5m)>;mPJ;nIEt zs$eN)A9h&t6gzt9>(>PnKA!9EqWaK(|HhmUJ({Gi8k*vq%EA5v&Z>A$$^$q0oK@8{ zMV_}|bY{zv%r8o+xuE(OT7UlrKcd2S&TgMW#Z&cEsaMavE1r(IiUZFo$8P(|Lm~q& z(NI5G`>LQgqrEw(d3H3N4hAN;-;%gi072<9J>lw!tJ5uaHs)1R3H@=%>L~WnVr!lv z())E2+jJ@C4f4i|+HE4*zhcVT0Ggx;ZBB~5RPLoxoUL2gr%Yg*sYviH6F3$~BCimBS_WmTG-93^{!RJq0cp{VE((d?z=HSjjsynbvZDVj? zc2;)<%l{sNfukMYCm1;9Do*za1|K^-$^g;NdSx+Hp_>`NREhvDB!m#T^TvdV0I~JY z^jPmpgny$ac3Um@%-a0?edt4 z2;A4jbM=uS_(Dv%?)YXF>;bJ!8)A*^n~q=q6$t!(@Z4Sca;11xBw=eFC+=PQOpR{I z4_nfgEoCct3qIradGI;0Je8t%GEylUfK&=5=syS?@rLEs0#-M+&-QL@@YTXA$>09S8c$2m3UCx8;QEK14a@qQ%+7internalAddGeneratedFile( - ' - -/google/cloud/datacatalog/v1/dataplex_spec.protogoogle.cloud.datacatalog.v11google/cloud/datacatalog/v1/physical_schema.proto" - DataplexSpec -asset ( @ - data_format ( 2+.google.cloud.datacatalog.v1.PhysicalSchema -compression_format (  - -project_id ( "W -DataplexFilesetSpec@ - dataplex_spec ( 2).google.cloud.datacatalog.v1.DataplexSpec" -DataplexTableSpecK -external_tables ( 22.google.cloud.datacatalog.v1.DataplexExternalTable@ - dataplex_spec ( 2).google.cloud.datacatalog.v1.DataplexSpec - user_managed (" -DataplexExternalTable= -system (2-.google.cloud.datacatalog.v1.IntegratedSystem -fully_qualified_name (  -google_cloud_resource (  -data_catalog_entry ( B -com.google.cloud.datacatalog.v1BDataplexSpecProtoPZAcloud.google.com/go/datacatalog/apiv1/datacatalogpb;datacatalogpbGoogle.Cloud.DataCatalog.V1Google\\Cloud\\DataCatalog\\V1Google::Cloud::DataCatalog::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/DumpContent.php b/owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/DumpContent.php deleted file mode 100644 index 93abced0982c92f02b61a28898d76109fa771dc6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1441 zcmbtUU279T6z#UQmPsEZPo)LD)?!nz8&biCiB+>no902AhtLOE2$S8(W?-{3%+3a? z^!Et<5y4;JqtE^VADx-aCykL}V96$X&zXD9-g{oZ6$62uL6as_5=BGk-GCZU5Rxk% z@ECeozfUCud?;8fY;EAG%axFDN2^rEwVvEPmav_>CEhe_g2}6vQM=p`qF8IT`wl zKz~Hmi&+4vB1(T9vb4(*rWlFYCoSm=`Xo-N#^0^&XGx$KPrv}Kl7N3Dpsp<{h0CYXQ0XdHTUKt_y9jAyE5B+H=7{GPY}KbbltN|#euhfm(H zv7fatoZ5Gx=dCmqY~&xIFPq4{-=G!u^Lp0~raL#7?x?bNvXX2ze)-VuJzrI>w8*^f z;G2UAT609h^F+y;;w!X0s&w`6%bQ&XoKoTRU@T*4TdqZ2t`)0jM@X7#VArtkuEU1L z!b+?@*W376bBY)hNN;iysXq=Oy9VRuzK)?^>yL9d#ukt990A7HmEM+3xR*!M*?p0( S_FNMDH3e*CzN@$B7NI|XG~D$7 diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/GcsFilesetSpec.php b/owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/GcsFilesetSpec.php deleted file mode 100644 index 2350c774ebd3..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/GcsFilesetSpec.php +++ /dev/null @@ -1,37 +0,0 @@ -internalAddGeneratedFile( - ' - -2google/cloud/datacatalog/v1/gcs_fileset_spec.protogoogle.cloud.datacatalog.v1,google/cloud/datacatalog/v1/timestamps.proto"z -GcsFilesetSpec - file_patterns ( BAL -sample_gcs_file_specs ( 2(.google.cloud.datacatalog.v1.GcsFileSpecBA" - GcsFileSpec - file_path ( BAJ -gcs_timestamps ( 2-.google.cloud.datacatalog.v1.SystemTimestampsBA - -size_bytes (BAB -com.google.cloud.datacatalog.v1PZAcloud.google.com/go/datacatalog/apiv1/datacatalogpb;datacatalogpbGoogle.Cloud.DataCatalog.V1Google\\Cloud\\DataCatalog\\V1Google::Cloud::DataCatalog::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/PhysicalSchema.php b/owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/PhysicalSchema.php deleted file mode 100644 index a23ebb0ee67868f70ca71d05a93f144e8f4428de..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1486 zcmb7^-)_?|6vpXRy6tR$RBoyc4Fi+bNsy`_5Tq2;KdcPF8i}eGDAMG*ZfhxxgY8rd z)Ysr4cobd%@d7*nmpD$FrJI=4N>P*ed_SL@bNs!09gG8bfZEij0xLQ|{WGM-6a|7S zPPm8q;c!R=B771sj|vN+RtKGQy68>oxO-1aB@YFmHX3n0@@ScOJRFn4lVrYD?UC+QDG7{Z2k?CZDl4}szZ**|(^)Ik zS!-Ik|2qpemz$A4f-Ig2UdW(KY5Var>k7HGEVb%d7q|57wfsBCsj*-~Rai5m=c|yq zMwzfqVAIT;?pk5p(Ck%ci;gF}_plLQ@j0ZbkTtj$E8${kLTkY~7o>3Ake;qW>Ijmi z5IHU6R;M)ObU`T=0nWRS-+`>6UzF+PR`Cw(r0aTNbx%*i{A9$m3+uPwhLisA;x=q0 z`9}{)8jVfJNprFrzcO%Fd(TxhY203(B9nxZ`BaYwb}@c@QXcUoW5NN`-jo{XpkG~j z`kTr8SlewIKeCJ;S&<(#V`H;=m7j}McWzh4ujcEnHmpBud$HWMjo!9X0Nd_W`Z+U~ ZPY#l!`Y?8YlwthWEKFqV3p1Dj`~#T@b z;=)Std6*iw4ZlKkwdT4tn`A4t+o)!%W@uL6zwOqtyE9qOwXI4sG;4L!F>Bz3xktz` z>m=~Z3Q?B}^S4Q8(s`w2=BbpYo=OXCPo=vvvj|meGYHf|!XtW!RQTsLwqPYS2+a^a zE?Ys_a;(rYZR=f#ZBE@b?SO!jy|&v8rxIGOqtXfMPK8WfQMpfQd)ad#7jvq_R-oyD z)Rb17kob;imljA+@hvZO{Q{WkdX0opQt59duZU%-J8N5=`uD4@qyV!4H-nNJn_BUtAB6fA2?3lZj>-RTx zg9rkp2HA}lrMz3OyH5J0yE-XaK*!LmdwryA#jFD_OYp%dnI3|e+3&Q7dQkYqx)(On zuNX~b^}1~a_qxwzY`^-NCAe)=s}Yr#Km;Zu@=+?jgg%-^x&FH!pXYNjOffPs#mMZ= zOq>%AP0s>Jp^W63F>x_AuuW-K-V(eM2G7O}d_gWTG%1GIib;(Eg#!i&%jsU0VMG&Q zeL+}TW}T`Xe3ZH3iSdcf@s2T(g)CDnV*Dsr4Ck(9c(7f|n%QgyA*r|fj61x8#!L|3UAh5@ z%$38YM}qNV>fq$5+_j!QW%wE1Nky1Q-6}Ybjt9iwwJK!%cnWNhpG`iAVVk&%j*Fl1 ztFiQ+%DvnZ)NQ)aSx$`yj7QK3s|qBx!sa+Dfp!a_HeP%lohz)buH@e=7vC%_mhY@> z78dg>ODl^DBhTQA=={>k+G2Tm!+?*4vXRd(Zf=(I>ubf0_0Q}iHXW?))>`>@C9_HvSUGix2YHa#|8zn_4k#hMhji;5p^5sokN8!jxR;C zM$^U)9<(u9+NTN{&HDssD-*my-f6%Vf@je&9+&9Fm;W#Z{xM#_sfu(RoscPKWEsxA z(35L&acu*QE)bjSg%fA)(7XVXiZR*;5aS&Wvb-n8I83TIX<_0l8g4L;Wh!JM#0eRq z)VfTxNogMghE*#FMW8^+|0K_6(2xhG(Q*KXLx$og#t5-rh3-8fBoUuN$F?mSj(MDz znvKSiU;+=?hk!sJQ8<7Il^;x>lXK{_LmogIP(XZjt`qABFB2JgQ^tLWf_|o;F;3d3 zKcv?i3D!nbcf~zqI7MqeFUL$ z?sjn-2g~W35^VqceUH;O0uj;oa0ySxU(Mlsjjt~FI*W$AsA7_^X|u2|V_!#Sfw9qY zl3a%=rv-c6@s zyXaJW_tYaPe`1{Gv!G5wL!13LF zs`bQRr%3!0pzBor1JHFEOLQsoTV!DKx$7*yGDVrxsN;!_a*n@;7&^uJfEYTBWel&# z40n~WWoXC{HmbSi46t! zPFTWP!cD0>T7@NcMVmdi6+4+7JILuV`F~=FL+Er{4e=w0DzPOU5LLojMzvpe-eOVA zP4OtwW<3@{w%w|~0ocSwcL3OgwFH~C1T_Y}m|Nl{h&GYb{n{BvXEkD_!9R-zj?_O$ z(ZFqE8CP#U(gu#t5e>Y`D})cjvvxOsr=XMZeG&Kmt2S;bqexpFK`jCNaMXIrVMq5{ zSd%IQ*Bo$DlL4U7paeRau;IzozE)U9zf`oFj5qRnCe^k?Z&ag&bY<$T*R|EYy(DOt zaEWQKo3Ul~1REdxUxN)|DE^~h6E5)=0|*!4k5!sf;@7PppqBu6GEuv|CNl6VDJ(@R zJ>r%BM$s1gu31YD_n@RHc|+Ui+gGCgT^&!XJvJuxzgGCg$n1n6ToGrp_wU~qDTr=b z%tpAw-$1UyrCYe|`t|wW6?749VPv+togwB&BmEJ_+X8)IC@60k++1F&!DUX(?YO#x zrQt*x!|QF$cKr0WqC6Tnzsw$0GI{!_l39R9l{|l*$=scJEJsV?&4oR>i18BKZa*Ek tz^Cgvo3HCJ2fBWDX6qO`dcN{fbTd57A2DKY9{av`FiZX}(LybR{slVOE|>rS diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/Policytagmanagerserialization.php b/owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/Policytagmanagerserialization.php deleted file mode 100644 index 104108eed9895c30af198ae652af86b01a939fd8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3430 zcmcIn-EJF26z)1DN+&Hp8?|*)L56LsI)Uzzl!Dk`f}NyEgxa`ih!C=5jn`v)(0XUt z9VZP{Zg>UW0VJ+?0wk`GdI{G^T=c3hP{bAUxAw+%96J?}BH5lfXTI+{KXc~Om9QCt z8*l>$I6@59VD%8PCWc`|8TF_StL=InN6@3KkoY*VAza&r54U&W`r6j+yWBLU?a0F} zY*5w2wBhV8IwAFmcgRqqg#y&TQH&#keDWP)ga)=e3xEK%a2z5J z!;Mn$0cJ=zDQ`%(m@r>={W3|D=E12&$`eS-a35jW93q0xAzJ6NaI$RGzLNx3&U27{1c zyz?2+K`Yd1ofzHcd7ta3Dm1Gx^iI4im_7_WA87{Ue(@FNO(yJ-Bp>) z&ZQRWLflGKtE)F$OKpg>gnDU7FO5{A%EtQ30On&|uDG^~p3s1{4$W)eVvWS1j}9xM zZnFk7au(5& z32PBtB7si=Tv3fdqnsa#a!Xn~mY3A#InMX87tuJbM7Y7T6ZwfR5wX+4vMMZhv|-}1 zI0YsZ9_uS`F@2o534m6VOTZb6oIjhUyI^L(;btC8bwZ{paGc; zWR|Uu#N75&w3R%c&%VJPi=73>r+lgtlLPJl4$cNqFRI7;zwiELYf!>^n}Z|G0q(7Sy!4*gb|Ltb+D*c_Jw zmX$aA@L6H@{44{5ERPV-E(7gXdlfd{|vR_U#|T_&IZZL%s}bIrQ0U{AIAJ9vt@G z;c*YWPmg>LSLt#wDIRWHKK9oU#?)gcNn2QN)mM6!Hpf1 zVJ5MU1Ip*#N0%KL$tw67OwDIF^li`V;m8R|z-VajP(_(zwpw6fY3$@>6F4$MjjTsS zxz^-9VquJn)e#CYi$i}e?K=UuSp75Ku&;JN%macww}Th<8KI$~tfyLoq(go69mz*% zyY8yv1I}w>RU@hR1b*Lw#!U$oA7qhoO1)g5UOsEpdr-+(6BXFx2P$6rkyJwEMs;^b zen+C*O=Gj%`l|}uDH_BNp^||~6(lsaI^{pxCGi8;VCMmrgtbY6s++UL3Fn3LU?B-! zQWs0*wdp==yLe{D9<$DDFUHb)Yu`ht(aE-S=|Ksj5jHe)al>UT6E5os(06UV% zo2%|BH*fAJ#mJf92tV8s@4@EWvBKEHQgyYi`+o~idp%e@E%0-9_wfIhm5b2HqUyiA zRxdG%b$E27>xb&d>gq?6!O$9?8mcuJ9vf;`JJ8f#?UuL=TRm-{4v#f`SQGfUdVlq3 z^+)=|sFg&3%7Jz?R!6n6ScT1j+CH9))Y?XpY_v!1ftvVk*MAk@PLV$GA$+0@d+Jkd z*nd;)k3qcZ9_mAtH}NS**X+D)?Z=7AyOH4DRd4PoUoU5jv_X4xY8|SlwT;d;RHO5V z;blsG=MMosHmEQn3B|}Z)we}7{a9)fp-sDxU^dxocc<;d>CU=4+oT%) zkPrS0AN&@9=m(ngld5_S<&-*TOJ^n{%H$N!k zW8_9&PnVb49jYm3X@>@OI?_Z=V+S0q}?$$FL=Nz$XCtCrsJ| zdoX4$<6ql2c5r|hb_xE-bsWHsOJc;KS93c_;4w@CC;;`qL%Ch3I7RMuNV)C55I! zSRAB10(UP{#YtPT&2hFxZ3Enk5aEU&AaR!*Jx9z_HZ9NZgB5~<_sE}|X0OYGJXq>e zA9se15S6{jgGyt;+>fnxetFGJ%PCSem>Sq@?>|c_^lqgh7f=cP{#q^tN z+9tT0#3*v&5P7(Rd5I&^MNuG6cnH=y2_Zx0L&9fRW=Lf~3RnZnK8{1;4wc?z8C?ZS z{%9EaJZEo-U}*u&E9$2{$Xx007T9Q+#b)`9(==NrZ!O0Cmzm5|E9V@X1MnNOZ4bHt diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/TableSpec.php b/owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/TableSpec.php deleted file mode 100644 index d766306c82d11e54dac334c8c3a3dbeb76f317c3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1633 zcmb7EZBNrs7-gU$52Db-I3VhEpbmpwhMz1T*;tuNKn9E%Nt32)@5W7PTW@bsB>W*0 z|AZg>;IHtb@fR3Bd0)CRqYz!vZ0(+N?s?Ah^sKB!hY`%7Iu0;(81_)-7_mc)A{w&L z4Sm!}x?N0>8@`T+kExDOZ5zGVZXvVQXx-z`I83OE4b%(6o{vkeA0}SObC~1u%MW{{ zqjHHk9Ut3qgk4<{0|d@%97m3eQN3B+!pso}t1daLb-`iP&N!@gc^Sa&ICd$CSV)_^)G&IOWj=~0#f9`(K}Wi%s5BbJA0k%~ zqX`~79U+QYLW5LTVUiU7eAf2i?W#82^frRy=-2 z(#9*Em-V^9m!g;{6FMKlr%_n^pKZ`)Rkbd6M<3W7{ir-Mol-dwDbZA>+M>d@986V7 zZzsX@I9m&C6Qy z@umA0vb1@%SkLD}+6q9bgx}{!B>2IF;H-=1L)CE@6Vm0$g*mv|C)REONJ(!*-?FnY zskN{PV;OS0gxragsGfsZju&;MsyZ5pmAQzDAHDTfw9*aY4H%tO14I5EYD8NmhONg1R z3i^wXzr;;d=tn1TLv^1`P`d}WTb1gjY42_C@2;D6>s8aV_h0Na&Gp7c!>mmXX;Uy! zZPa)6&D~dayJ5bZ9M&|ro;{NA$;;Xun8}`PRa)k5qq5mJFl!1kTK$}ZyWF~qhTF^? zRMdv|mylcC3xCT>J^~(>1EYyL%fH?I$mKo^&(>v5>M|#FJ{xD9Up#B|cKJ*HUn`AK ynWO3d77x+iFeKhE1_%tJUG7|w8U5s8_F6Bhcp6BvbCXO~s=PUcQ-EJ~@(e@( diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/Tags.php b/owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/Tags.php deleted file mode 100644 index d6799ad6d0a4091072adbd71037d71cb63f3e6d2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2882 zcmb_e&2HO95RN3vkw%H5vQD8Wg|kspM?n)3c2l6C;}()7I|5=`wHc!=2naN}lG#us zORn6yh6?16K1vULf!=%Qp-<7XPd)b7*(E8-e~J$kK!}{(nVtFOo7s8(rGMbVM`VM# zG%y&o$o>&w2bB1M$2`+>$o`<)r2#R$zHd7;kO^sQldWxyG#f4LKB|V^ATX&)dY;#F zsA4+az)~!O874lC*HaFc6lU~7S(pTHjXn*1!=z-RUEie4;CuBAp{=iRZM`wp*7ufH z08GaSL!zM-I0k}0f3WY^CJC9r@b7^gc5K&Xw&B=6VGOIJYd9fA#q)c+1J`7>=Mt{4 z?V7auh(tE|-Uq&iF|U%upEid9A<$bcqk(HUdV_{$VEfDq+PGC!dz6j9u1n+OEX;f;+j;0*)GpkSjv!0 zwXpnHo)V0V&d4IUVbf*7kvO=lL198B6(IAP9>u;sh3ui>3?fGh%OAhXx-g`sKToM| zQYW>aVPO)@$TI{ol(F;`j*PA&c;8Wzh01aKHdGuB%N)xIWy$MMq1@q(z#I4|79X7+ z|B6;@nn;JDF(}8(=nd=FAsd>WPb+_;;}pOmEgXxC^Z_n;*av859Civ} zMtR5r+wH~jObq`#z&;jeEageb;qK4i)`$x65>H}bxt!paP(~h+9@Uxv)E)F=jai|g zBpMfyljl=}BsWoSk0%PvlwdBf%>zb%WU;AS?5zY@FR*A(x{iXZh`4+o@*`zw{z7DC zVdk~%T9uPD6!1hXChr+qpVbxAmOg}eY@|_Zb&fg##nz1QmN*_csda|EPu~@7a`t%^ z>-rQLKR-?5Cs#dYOlSY3)`!LEY)+h$)~-rwBx$0A{Kc;hi@_aMeosSj0_}*p@5P;j zlSA~4%*8pAp1}+|@{_tNyd5xoxuOj$s`AJ_r4u&?k;q0owNDXh$>{YWp9-N&2!kah$nyx!-Q zr*mzjFSiqAju4ht1M;FuC*Yl4q+?UO&>}14w<*XapVC(_XE=`c1GS=p4YB+3X8!DI zX%p4Y?T*_(d2zC=FKu|~iVHVS1t={*xxLfcY-z2%W=H#`-R!*D+HE)2TI;Q5qj*gM zm~Cvos=sU&Q~Z5b+i7iW6w^`;X6oD9FN+yuMP6%dHg~n!X1h3pT_U&BT6>{2zt)P` zdI9nrxQ<0lr~YRO?%_=^Ey{N4+gjB6l6wtrj-GdF7{nU|=fMfq`THxUzWz<6eoNoo z5aXaM#zDD(Wmj3C( Y(HQbL8pS3iw@arsu``;jhA;&94_^wBQvd(} diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/Timestamps.php b/owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/Timestamps.php deleted file mode 100644 index cbfa95d8ad26..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/Timestamps.php +++ /dev/null @@ -1,33 +0,0 @@ -internalAddGeneratedFile( - ' - -,google/cloud/datacatalog/v1/timestamps.protogoogle.cloud.datacatalog.v1google/protobuf/timestamp.proto" -SystemTimestamps/ - create_time ( 2.google.protobuf.Timestamp/ - update_time ( 2.google.protobuf.Timestamp4 - expire_time ( 2.google.protobuf.TimestampBAB -com.google.cloud.datacatalog.v1PZAcloud.google.com/go/datacatalog/apiv1/datacatalogpb;datacatalogpbGoogle.Cloud.DataCatalog.V1Google\\Cloud\\DataCatalog\\V1Google::Cloud::DataCatalog::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/Usage.php b/owl-bot-staging/DataCatalog/v1/proto/src/GPBMetadata/Google/Cloud/Datacatalog/V1/Usage.php deleted file mode 100644 index 0207a8caefe7ad06496ba913040540765965cf9c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1739 zcma)6(M}UV6m?rPdK*z{B2W?-(WE8HHig8P1vHdG;Xxsan3zpA)9tjKINjOI&KA+| z?yJAxqlv%agJ0pZU*MxNvu)Xif;4Hm-I;Umxo6It^%r3$gomh30wS;^P1HC+vO`cP zxa2-(s1dhXL?EAcL&}J-5vuK@SNn%(yS8`uKtUrO3!gZs&3T)Vvd?(jEH|;lzWOrW zF83PsTA-t5*5+}+Y}w{`}1k1A^bKEqLj-s&>&8Ibyf zaf4AGMG{N(^N21x|-g?ijf?L+b8O!kSgm!9B`_IM^Xo=OJ-79FH}EEI+6H z@i&{z;j}x-5v3tN&9(?XZh~99q8IXW$wu3l#!i{W?o|p4{VK*b>IBMiKs0gE;#Uj6 zSmKQ`L6o0`Dan=PJndCR^btoh7P3m2{C${AmRgvySdeHYW8Tlfy*>mhA26o8q(ND; zxC)PxMe>pOv0m{s1FywJx`o%JjL~RjLW33^xVy!>T^^)}O#}2OIaZ)JkcLrq_u3cB zs@{g2ceb+lZ31!$jJB20@@2@yp%R6dz6O|EDcF6@2C~@0^UHT&I@VXjJEpQj`*Z~k z+C%Z1TwgV|ns@dP0*?b7|N@X>scTvNvX}EjkhAGv? zwaw4LWDEDWph}KJNG*6GWT6SOhWuD$4zeG}iIMMC{wZAVVHRsaEG39ryaGY(E+_NM zDul4`Kbj-W)<>HyU)n2G+4xy^tWLolZ*=VHPYV{5_LtQ#oY}KbiRi?l=bT jIH>}Tb5v>EFeY9t4m0FQl8C7Qy)Zn@&LrYa;S}H>KJPjz diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/BigQueryConnectionSpec.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/BigQueryConnectionSpec.php deleted file mode 100644 index 4e2d0f006d00..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/BigQueryConnectionSpec.php +++ /dev/null @@ -1,147 +0,0 @@ -google.cloud.datacatalog.v1.BigQueryConnectionSpec - */ -class BigQueryConnectionSpec extends \Google\Protobuf\Internal\Message -{ - /** - * The type of the BigQuery connection. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.BigQueryConnectionSpec.ConnectionType connection_type = 1; - */ - protected $connection_type = 0; - /** - * True if there are credentials attached to the BigQuery connection; false - * otherwise. - * - * Generated from protobuf field bool has_credential = 3; - */ - protected $has_credential = false; - protected $connection_spec; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $connection_type - * The type of the BigQuery connection. - * @type \Google\Cloud\DataCatalog\V1\CloudSqlBigQueryConnectionSpec $cloud_sql - * Specification for the BigQuery connection to a Cloud SQL instance. - * @type bool $has_credential - * True if there are credentials attached to the BigQuery connection; false - * otherwise. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Bigquery::initOnce(); - parent::__construct($data); - } - - /** - * The type of the BigQuery connection. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.BigQueryConnectionSpec.ConnectionType connection_type = 1; - * @return int - */ - public function getConnectionType() - { - return $this->connection_type; - } - - /** - * The type of the BigQuery connection. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.BigQueryConnectionSpec.ConnectionType connection_type = 1; - * @param int $var - * @return $this - */ - public function setConnectionType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\DataCatalog\V1\BigQueryConnectionSpec\ConnectionType::class); - $this->connection_type = $var; - - return $this; - } - - /** - * Specification for the BigQuery connection to a Cloud SQL instance. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec cloud_sql = 2; - * @return \Google\Cloud\DataCatalog\V1\CloudSqlBigQueryConnectionSpec|null - */ - public function getCloudSql() - { - return $this->readOneof(2); - } - - public function hasCloudSql() - { - return $this->hasOneof(2); - } - - /** - * Specification for the BigQuery connection to a Cloud SQL instance. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec cloud_sql = 2; - * @param \Google\Cloud\DataCatalog\V1\CloudSqlBigQueryConnectionSpec $var - * @return $this - */ - public function setCloudSql($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\CloudSqlBigQueryConnectionSpec::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * True if there are credentials attached to the BigQuery connection; false - * otherwise. - * - * Generated from protobuf field bool has_credential = 3; - * @return bool - */ - public function getHasCredential() - { - return $this->has_credential; - } - - /** - * True if there are credentials attached to the BigQuery connection; false - * otherwise. - * - * Generated from protobuf field bool has_credential = 3; - * @param bool $var - * @return $this - */ - public function setHasCredential($var) - { - GPBUtil::checkBool($var); - $this->has_credential = $var; - - return $this; - } - - /** - * @return string - */ - public function getConnectionSpec() - { - return $this->whichOneof("connection_spec"); - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/BigQueryConnectionSpec/ConnectionType.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/BigQueryConnectionSpec/ConnectionType.php deleted file mode 100644 index 7d8e9296d0aa..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/BigQueryConnectionSpec/ConnectionType.php +++ /dev/null @@ -1,57 +0,0 @@ -google.cloud.datacatalog.v1.BigQueryConnectionSpec.ConnectionType - */ -class ConnectionType -{ - /** - * Unspecified type. - * - * Generated from protobuf enum CONNECTION_TYPE_UNSPECIFIED = 0; - */ - const CONNECTION_TYPE_UNSPECIFIED = 0; - /** - * Cloud SQL connection. - * - * Generated from protobuf enum CLOUD_SQL = 1; - */ - const CLOUD_SQL = 1; - - private static $valueToName = [ - self::CONNECTION_TYPE_UNSPECIFIED => 'CONNECTION_TYPE_UNSPECIFIED', - self::CLOUD_SQL => 'CLOUD_SQL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ConnectionType::class, \Google\Cloud\DataCatalog\V1\BigQueryConnectionSpec_ConnectionType::class); - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/BigQueryDateShardedSpec.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/BigQueryDateShardedSpec.php deleted file mode 100644 index d2a24365367c..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/BigQueryDateShardedSpec.php +++ /dev/null @@ -1,192 +0,0 @@ -google.cloud.datacatalog.v1.BigQueryDateShardedSpec - */ -class BigQueryDateShardedSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The Data Catalog resource name of the dataset entry the - * current table belongs to. For example: - * `projects/{PROJECT_ID}/locations/{LOCATION}/entrygroups/{ENTRY_GROUP_ID}/entries/{ENTRY_ID}`. - * - * Generated from protobuf field string dataset = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $dataset = ''; - /** - * Output only. The table name prefix of the shards. - * The name of any given shard is `[table_prefix]YYYYMMDD`. - * For example, for the `MyTable20180101` shard, the - * `table_prefix` is `MyTable`. - * - * Generated from protobuf field string table_prefix = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $table_prefix = ''; - /** - * Output only. Total number of shards. - * - * Generated from protobuf field int64 shard_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $shard_count = 0; - /** - * Output only. BigQuery resource name of the latest shard. - * - * Generated from protobuf field string latest_shard_resource = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $latest_shard_resource = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $dataset - * Output only. The Data Catalog resource name of the dataset entry the - * current table belongs to. For example: - * `projects/{PROJECT_ID}/locations/{LOCATION}/entrygroups/{ENTRY_GROUP_ID}/entries/{ENTRY_ID}`. - * @type string $table_prefix - * Output only. The table name prefix of the shards. - * The name of any given shard is `[table_prefix]YYYYMMDD`. - * For example, for the `MyTable20180101` shard, the - * `table_prefix` is `MyTable`. - * @type int|string $shard_count - * Output only. Total number of shards. - * @type string $latest_shard_resource - * Output only. BigQuery resource name of the latest shard. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\TableSpec::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The Data Catalog resource name of the dataset entry the - * current table belongs to. For example: - * `projects/{PROJECT_ID}/locations/{LOCATION}/entrygroups/{ENTRY_GROUP_ID}/entries/{ENTRY_ID}`. - * - * Generated from protobuf field string dataset = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getDataset() - { - return $this->dataset; - } - - /** - * Output only. The Data Catalog resource name of the dataset entry the - * current table belongs to. For example: - * `projects/{PROJECT_ID}/locations/{LOCATION}/entrygroups/{ENTRY_GROUP_ID}/entries/{ENTRY_ID}`. - * - * Generated from protobuf field string dataset = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setDataset($var) - { - GPBUtil::checkString($var, True); - $this->dataset = $var; - - return $this; - } - - /** - * Output only. The table name prefix of the shards. - * The name of any given shard is `[table_prefix]YYYYMMDD`. - * For example, for the `MyTable20180101` shard, the - * `table_prefix` is `MyTable`. - * - * Generated from protobuf field string table_prefix = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getTablePrefix() - { - return $this->table_prefix; - } - - /** - * Output only. The table name prefix of the shards. - * The name of any given shard is `[table_prefix]YYYYMMDD`. - * For example, for the `MyTable20180101` shard, the - * `table_prefix` is `MyTable`. - * - * Generated from protobuf field string table_prefix = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setTablePrefix($var) - { - GPBUtil::checkString($var, True); - $this->table_prefix = $var; - - return $this; - } - - /** - * Output only. Total number of shards. - * - * Generated from protobuf field int64 shard_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getShardCount() - { - return $this->shard_count; - } - - /** - * Output only. Total number of shards. - * - * Generated from protobuf field int64 shard_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setShardCount($var) - { - GPBUtil::checkInt64($var); - $this->shard_count = $var; - - return $this; - } - - /** - * Output only. BigQuery resource name of the latest shard. - * - * Generated from protobuf field string latest_shard_resource = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getLatestShardResource() - { - return $this->latest_shard_resource; - } - - /** - * Output only. BigQuery resource name of the latest shard. - * - * Generated from protobuf field string latest_shard_resource = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setLatestShardResource($var) - { - GPBUtil::checkString($var, True); - $this->latest_shard_resource = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/BigQueryRoutineSpec.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/BigQueryRoutineSpec.php deleted file mode 100644 index e83b2495d5ff..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/BigQueryRoutineSpec.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.datacatalog.v1.BigQueryRoutineSpec - */ -class BigQueryRoutineSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Paths of the imported libraries. - * - * Generated from protobuf field repeated string imported_libraries = 1; - */ - private $imported_libraries; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $imported_libraries - * Paths of the imported libraries. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Bigquery::initOnce(); - parent::__construct($data); - } - - /** - * Paths of the imported libraries. - * - * Generated from protobuf field repeated string imported_libraries = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getImportedLibraries() - { - return $this->imported_libraries; - } - - /** - * Paths of the imported libraries. - * - * Generated from protobuf field repeated string imported_libraries = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setImportedLibraries($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->imported_libraries = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/BigQueryTableSpec.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/BigQueryTableSpec.php deleted file mode 100644 index 0cb87b4b854f..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/BigQueryTableSpec.php +++ /dev/null @@ -1,148 +0,0 @@ -google.cloud.datacatalog.v1.BigQueryTableSpec - */ -class BigQueryTableSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The table source type. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.TableSourceType table_source_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $table_source_type = 0; - protected $type_spec; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $table_source_type - * Output only. The table source type. - * @type \Google\Cloud\DataCatalog\V1\ViewSpec $view_spec - * Table view specification. Populated only if - * the `table_source_type` is `BIGQUERY_VIEW`. - * @type \Google\Cloud\DataCatalog\V1\TableSpec $table_spec - * Specification of a BigQuery table. Populated only if - * the `table_source_type` is `BIGQUERY_TABLE`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\TableSpec::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The table source type. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.TableSourceType table_source_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getTableSourceType() - { - return $this->table_source_type; - } - - /** - * Output only. The table source type. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.TableSourceType table_source_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setTableSourceType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\DataCatalog\V1\TableSourceType::class); - $this->table_source_type = $var; - - return $this; - } - - /** - * Table view specification. Populated only if - * the `table_source_type` is `BIGQUERY_VIEW`. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.ViewSpec view_spec = 2; - * @return \Google\Cloud\DataCatalog\V1\ViewSpec|null - */ - public function getViewSpec() - { - return $this->readOneof(2); - } - - public function hasViewSpec() - { - return $this->hasOneof(2); - } - - /** - * Table view specification. Populated only if - * the `table_source_type` is `BIGQUERY_VIEW`. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.ViewSpec view_spec = 2; - * @param \Google\Cloud\DataCatalog\V1\ViewSpec $var - * @return $this - */ - public function setViewSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\ViewSpec::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Specification of a BigQuery table. Populated only if - * the `table_source_type` is `BIGQUERY_TABLE`. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.TableSpec table_spec = 3; - * @return \Google\Cloud\DataCatalog\V1\TableSpec|null - */ - public function getTableSpec() - { - return $this->readOneof(3); - } - - public function hasTableSpec() - { - return $this->hasOneof(3); - } - - /** - * Specification of a BigQuery table. Populated only if - * the `table_source_type` is `BIGQUERY_TABLE`. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.TableSpec table_spec = 3; - * @param \Google\Cloud\DataCatalog\V1\TableSpec $var - * @return $this - */ - public function setTableSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\TableSpec::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getTypeSpec() - { - return $this->whichOneof("type_spec"); - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/BusinessContext.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/BusinessContext.php deleted file mode 100644 index 21c5c7db22dc..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/BusinessContext.php +++ /dev/null @@ -1,121 +0,0 @@ -google.cloud.datacatalog.v1.BusinessContext - */ -class BusinessContext extends \Google\Protobuf\Internal\Message -{ - /** - * Entry overview fields for rich text descriptions of entries. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.EntryOverview entry_overview = 1; - */ - protected $entry_overview = null; - /** - * Contact people for the entry. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.Contacts contacts = 2; - */ - protected $contacts = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DataCatalog\V1\EntryOverview $entry_overview - * Entry overview fields for rich text descriptions of entries. - * @type \Google\Cloud\DataCatalog\V1\Contacts $contacts - * Contact people for the entry. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * Entry overview fields for rich text descriptions of entries. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.EntryOverview entry_overview = 1; - * @return \Google\Cloud\DataCatalog\V1\EntryOverview|null - */ - public function getEntryOverview() - { - return $this->entry_overview; - } - - public function hasEntryOverview() - { - return isset($this->entry_overview); - } - - public function clearEntryOverview() - { - unset($this->entry_overview); - } - - /** - * Entry overview fields for rich text descriptions of entries. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.EntryOverview entry_overview = 1; - * @param \Google\Cloud\DataCatalog\V1\EntryOverview $var - * @return $this - */ - public function setEntryOverview($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\EntryOverview::class); - $this->entry_overview = $var; - - return $this; - } - - /** - * Contact people for the entry. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.Contacts contacts = 2; - * @return \Google\Cloud\DataCatalog\V1\Contacts|null - */ - public function getContacts() - { - return $this->contacts; - } - - public function hasContacts() - { - return isset($this->contacts); - } - - public function clearContacts() - { - unset($this->contacts); - } - - /** - * Contact people for the entry. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.Contacts contacts = 2; - * @param \Google\Cloud\DataCatalog\V1\Contacts $var - * @return $this - */ - public function setContacts($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\Contacts::class); - $this->contacts = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CloudBigtableInstanceSpec.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CloudBigtableInstanceSpec.php deleted file mode 100644 index 58a2f17b3fcd..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CloudBigtableInstanceSpec.php +++ /dev/null @@ -1,69 +0,0 @@ -google.cloud.datacatalog.v1.CloudBigtableInstanceSpec - */ -class CloudBigtableInstanceSpec extends \Google\Protobuf\Internal\Message -{ - /** - * The list of clusters for the Instance. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec cloud_bigtable_cluster_specs = 1; - */ - private $cloud_bigtable_cluster_specs; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\DataCatalog\V1\CloudBigtableInstanceSpec\CloudBigtableClusterSpec>|\Google\Protobuf\Internal\RepeatedField $cloud_bigtable_cluster_specs - * The list of clusters for the Instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * The list of clusters for the Instance. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec cloud_bigtable_cluster_specs = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCloudBigtableClusterSpecs() - { - return $this->cloud_bigtable_cluster_specs; - } - - /** - * The list of clusters for the Instance. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec cloud_bigtable_cluster_specs = 1; - * @param array<\Google\Cloud\DataCatalog\V1\CloudBigtableInstanceSpec\CloudBigtableClusterSpec>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCloudBigtableClusterSpecs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DataCatalog\V1\CloudBigtableInstanceSpec\CloudBigtableClusterSpec::class); - $this->cloud_bigtable_cluster_specs = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CloudBigtableInstanceSpec/CloudBigtableClusterSpec.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CloudBigtableInstanceSpec/CloudBigtableClusterSpec.php deleted file mode 100644 index 089284475331..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CloudBigtableInstanceSpec/CloudBigtableClusterSpec.php +++ /dev/null @@ -1,172 +0,0 @@ -google.cloud.datacatalog.v1.CloudBigtableInstanceSpec.CloudBigtableClusterSpec - */ -class CloudBigtableClusterSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Name of the cluster. - * - * Generated from protobuf field string display_name = 1; - */ - protected $display_name = ''; - /** - * Location of the cluster, typically a Cloud zone. - * - * Generated from protobuf field string location = 2; - */ - protected $location = ''; - /** - * Type of the resource. For a cluster this would be "CLUSTER". - * - * Generated from protobuf field string type = 3; - */ - protected $type = ''; - /** - * A link back to the parent resource, in this case Instance. - * - * Generated from protobuf field string linked_resource = 4; - */ - protected $linked_resource = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * Name of the cluster. - * @type string $location - * Location of the cluster, typically a Cloud zone. - * @type string $type - * Type of the resource. For a cluster this would be "CLUSTER". - * @type string $linked_resource - * A link back to the parent resource, in this case Instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * Name of the cluster. - * - * Generated from protobuf field string display_name = 1; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Name of the cluster. - * - * Generated from protobuf field string display_name = 1; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Location of the cluster, typically a Cloud zone. - * - * Generated from protobuf field string location = 2; - * @return string - */ - public function getLocation() - { - return $this->location; - } - - /** - * Location of the cluster, typically a Cloud zone. - * - * Generated from protobuf field string location = 2; - * @param string $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkString($var, True); - $this->location = $var; - - return $this; - } - - /** - * Type of the resource. For a cluster this would be "CLUSTER". - * - * Generated from protobuf field string type = 3; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * Type of the resource. For a cluster this would be "CLUSTER". - * - * Generated from protobuf field string type = 3; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - - /** - * A link back to the parent resource, in this case Instance. - * - * Generated from protobuf field string linked_resource = 4; - * @return string - */ - public function getLinkedResource() - { - return $this->linked_resource; - } - - /** - * A link back to the parent resource, in this case Instance. - * - * Generated from protobuf field string linked_resource = 4; - * @param string $var - * @return $this - */ - public function setLinkedResource($var) - { - GPBUtil::checkString($var, True); - $this->linked_resource = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CloudBigtableClusterSpec::class, \Google\Cloud\DataCatalog\V1\CloudBigtableInstanceSpec_CloudBigtableClusterSpec::class); - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CloudBigtableSystemSpec.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CloudBigtableSystemSpec.php deleted file mode 100644 index 4e0008126b26..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CloudBigtableSystemSpec.php +++ /dev/null @@ -1,73 +0,0 @@ -google.cloud.datacatalog.v1.CloudBigtableSystemSpec - */ -class CloudBigtableSystemSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Display name of the Instance. This is user specified and different from - * the resource name. - * - * Generated from protobuf field string instance_display_name = 1; - */ - protected $instance_display_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance_display_name - * Display name of the Instance. This is user specified and different from - * the resource name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * Display name of the Instance. This is user specified and different from - * the resource name. - * - * Generated from protobuf field string instance_display_name = 1; - * @return string - */ - public function getInstanceDisplayName() - { - return $this->instance_display_name; - } - - /** - * Display name of the Instance. This is user specified and different from - * the resource name. - * - * Generated from protobuf field string instance_display_name = 1; - * @param string $var - * @return $this - */ - public function setInstanceDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->instance_display_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CloudSqlBigQueryConnectionSpec.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CloudSqlBigQueryConnectionSpec.php deleted file mode 100644 index 5069ad521666..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CloudSqlBigQueryConnectionSpec.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec - */ -class CloudSqlBigQueryConnectionSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Cloud SQL instance ID in the format of `project:location:instance`. - * - * Generated from protobuf field string instance_id = 1; - */ - protected $instance_id = ''; - /** - * Database name. - * - * Generated from protobuf field string database = 2; - */ - protected $database = ''; - /** - * Type of the Cloud SQL database. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec.DatabaseType type = 3; - */ - protected $type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance_id - * Cloud SQL instance ID in the format of `project:location:instance`. - * @type string $database - * Database name. - * @type int $type - * Type of the Cloud SQL database. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Bigquery::initOnce(); - parent::__construct($data); - } - - /** - * Cloud SQL instance ID in the format of `project:location:instance`. - * - * Generated from protobuf field string instance_id = 1; - * @return string - */ - public function getInstanceId() - { - return $this->instance_id; - } - - /** - * Cloud SQL instance ID in the format of `project:location:instance`. - * - * Generated from protobuf field string instance_id = 1; - * @param string $var - * @return $this - */ - public function setInstanceId($var) - { - GPBUtil::checkString($var, True); - $this->instance_id = $var; - - return $this; - } - - /** - * Database name. - * - * Generated from protobuf field string database = 2; - * @return string - */ - public function getDatabase() - { - return $this->database; - } - - /** - * Database name. - * - * Generated from protobuf field string database = 2; - * @param string $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkString($var, True); - $this->database = $var; - - return $this; - } - - /** - * Type of the Cloud SQL database. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec.DatabaseType type = 3; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Type of the Cloud SQL database. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec.DatabaseType type = 3; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\DataCatalog\V1\CloudSqlBigQueryConnectionSpec\DatabaseType::class); - $this->type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CloudSqlBigQueryConnectionSpec/DatabaseType.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CloudSqlBigQueryConnectionSpec/DatabaseType.php deleted file mode 100644 index 97f9d2e09bcd..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CloudSqlBigQueryConnectionSpec/DatabaseType.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec.DatabaseType - */ -class DatabaseType -{ - /** - * Unspecified database type. - * - * Generated from protobuf enum DATABASE_TYPE_UNSPECIFIED = 0; - */ - const DATABASE_TYPE_UNSPECIFIED = 0; - /** - * Cloud SQL for PostgreSQL. - * - * Generated from protobuf enum POSTGRES = 1; - */ - const POSTGRES = 1; - /** - * Cloud SQL for MySQL. - * - * Generated from protobuf enum MYSQL = 2; - */ - const MYSQL = 2; - - private static $valueToName = [ - self::DATABASE_TYPE_UNSPECIFIED => 'DATABASE_TYPE_UNSPECIFIED', - self::POSTGRES => 'POSTGRES', - self::MYSQL => 'MYSQL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DatabaseType::class, \Google\Cloud\DataCatalog\V1\CloudSqlBigQueryConnectionSpec_DatabaseType::class); - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ColumnSchema.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ColumnSchema.php deleted file mode 100644 index d2ce3a54127a..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ColumnSchema.php +++ /dev/null @@ -1,422 +0,0 @@ -google.cloud.datacatalog.v1.ColumnSchema - */ -class ColumnSchema extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the column. - * Must be a UTF-8 string without dots (.). - * The maximum size is 64 bytes. - * - * Generated from protobuf field string column = 6 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $column = ''; - /** - * Required. Type of the column. - * Must be a UTF-8 string with the maximum size of 128 bytes. - * - * Generated from protobuf field string type = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $type = ''; - /** - * Optional. Description of the column. Default value is an empty string. - * The description must be a UTF-8 string with the maximum size of 2000 - * bytes. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Optional. A column's mode indicates whether values in this column are - * required, nullable, or repeated. - * Only `NULLABLE`, `REQUIRED`, and `REPEATED` values are supported. - * Default mode is `NULLABLE`. - * - * Generated from protobuf field string mode = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $mode = ''; - /** - * Optional. Default value for the column. - * - * Generated from protobuf field string default_value = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $default_value = ''; - /** - * Optional. Ordinal position - * - * Generated from protobuf field int32 ordinal_position = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $ordinal_position = 0; - /** - * Optional. Most important inclusion of this column. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.ColumnSchema.IndexingType highest_indexing_type = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $highest_indexing_type = 0; - /** - * Optional. Schema of sub-columns. A column can have zero or more - * sub-columns. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.ColumnSchema subcolumns = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $subcolumns; - /** - * Optional. Garbage collection policy for the column or column family. - * Applies to systems like Cloud Bigtable. - * - * Generated from protobuf field string gc_rule = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $gc_rule = ''; - protected $system_spec; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $column - * Required. Name of the column. - * Must be a UTF-8 string without dots (.). - * The maximum size is 64 bytes. - * @type string $type - * Required. Type of the column. - * Must be a UTF-8 string with the maximum size of 128 bytes. - * @type string $description - * Optional. Description of the column. Default value is an empty string. - * The description must be a UTF-8 string with the maximum size of 2000 - * bytes. - * @type string $mode - * Optional. A column's mode indicates whether values in this column are - * required, nullable, or repeated. - * Only `NULLABLE`, `REQUIRED`, and `REPEATED` values are supported. - * Default mode is `NULLABLE`. - * @type string $default_value - * Optional. Default value for the column. - * @type int $ordinal_position - * Optional. Ordinal position - * @type int $highest_indexing_type - * Optional. Most important inclusion of this column. - * @type array<\Google\Cloud\DataCatalog\V1\ColumnSchema>|\Google\Protobuf\Internal\RepeatedField $subcolumns - * Optional. Schema of sub-columns. A column can have zero or more - * sub-columns. - * @type \Google\Cloud\DataCatalog\V1\ColumnSchema\LookerColumnSpec $looker_column_spec - * Looker specific column info of this column. - * @type string $gc_rule - * Optional. Garbage collection policy for the column or column family. - * Applies to systems like Cloud Bigtable. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Schema::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the column. - * Must be a UTF-8 string without dots (.). - * The maximum size is 64 bytes. - * - * Generated from protobuf field string column = 6 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getColumn() - { - return $this->column; - } - - /** - * Required. Name of the column. - * Must be a UTF-8 string without dots (.). - * The maximum size is 64 bytes. - * - * Generated from protobuf field string column = 6 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setColumn($var) - { - GPBUtil::checkString($var, True); - $this->column = $var; - - return $this; - } - - /** - * Required. Type of the column. - * Must be a UTF-8 string with the maximum size of 128 bytes. - * - * Generated from protobuf field string type = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * Required. Type of the column. - * Must be a UTF-8 string with the maximum size of 128 bytes. - * - * Generated from protobuf field string type = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - - /** - * Optional. Description of the column. Default value is an empty string. - * The description must be a UTF-8 string with the maximum size of 2000 - * bytes. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. Description of the column. Default value is an empty string. - * The description must be a UTF-8 string with the maximum size of 2000 - * bytes. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Optional. A column's mode indicates whether values in this column are - * required, nullable, or repeated. - * Only `NULLABLE`, `REQUIRED`, and `REPEATED` values are supported. - * Default mode is `NULLABLE`. - * - * Generated from protobuf field string mode = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getMode() - { - return $this->mode; - } - - /** - * Optional. A column's mode indicates whether values in this column are - * required, nullable, or repeated. - * Only `NULLABLE`, `REQUIRED`, and `REPEATED` values are supported. - * Default mode is `NULLABLE`. - * - * Generated from protobuf field string mode = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setMode($var) - { - GPBUtil::checkString($var, True); - $this->mode = $var; - - return $this; - } - - /** - * Optional. Default value for the column. - * - * Generated from protobuf field string default_value = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDefaultValue() - { - return $this->default_value; - } - - /** - * Optional. Default value for the column. - * - * Generated from protobuf field string default_value = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDefaultValue($var) - { - GPBUtil::checkString($var, True); - $this->default_value = $var; - - return $this; - } - - /** - * Optional. Ordinal position - * - * Generated from protobuf field int32 ordinal_position = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getOrdinalPosition() - { - return $this->ordinal_position; - } - - /** - * Optional. Ordinal position - * - * Generated from protobuf field int32 ordinal_position = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setOrdinalPosition($var) - { - GPBUtil::checkInt32($var); - $this->ordinal_position = $var; - - return $this; - } - - /** - * Optional. Most important inclusion of this column. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.ColumnSchema.IndexingType highest_indexing_type = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getHighestIndexingType() - { - return $this->highest_indexing_type; - } - - /** - * Optional. Most important inclusion of this column. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.ColumnSchema.IndexingType highest_indexing_type = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setHighestIndexingType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\DataCatalog\V1\ColumnSchema\IndexingType::class); - $this->highest_indexing_type = $var; - - return $this; - } - - /** - * Optional. Schema of sub-columns. A column can have zero or more - * sub-columns. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.ColumnSchema subcolumns = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSubcolumns() - { - return $this->subcolumns; - } - - /** - * Optional. Schema of sub-columns. A column can have zero or more - * sub-columns. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.ColumnSchema subcolumns = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\DataCatalog\V1\ColumnSchema>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSubcolumns($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DataCatalog\V1\ColumnSchema::class); - $this->subcolumns = $arr; - - return $this; - } - - /** - * Looker specific column info of this column. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec looker_column_spec = 18; - * @return \Google\Cloud\DataCatalog\V1\ColumnSchema\LookerColumnSpec|null - */ - public function getLookerColumnSpec() - { - return $this->readOneof(18); - } - - public function hasLookerColumnSpec() - { - return $this->hasOneof(18); - } - - /** - * Looker specific column info of this column. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec looker_column_spec = 18; - * @param \Google\Cloud\DataCatalog\V1\ColumnSchema\LookerColumnSpec $var - * @return $this - */ - public function setLookerColumnSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\ColumnSchema\LookerColumnSpec::class); - $this->writeOneof(18, $var); - - return $this; - } - - /** - * Optional. Garbage collection policy for the column or column family. - * Applies to systems like Cloud Bigtable. - * - * Generated from protobuf field string gc_rule = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getGcRule() - { - return $this->gc_rule; - } - - /** - * Optional. Garbage collection policy for the column or column family. - * Applies to systems like Cloud Bigtable. - * - * Generated from protobuf field string gc_rule = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setGcRule($var) - { - GPBUtil::checkString($var, True); - $this->gc_rule = $var; - - return $this; - } - - /** - * @return string - */ - public function getSystemSpec() - { - return $this->whichOneof("system_spec"); - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ColumnSchema/IndexingType.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ColumnSchema/IndexingType.php deleted file mode 100644 index 88e5298ab423..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ColumnSchema/IndexingType.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.datacatalog.v1.ColumnSchema.IndexingType - */ -class IndexingType -{ - /** - * Unspecified. - * - * Generated from protobuf enum INDEXING_TYPE_UNSPECIFIED = 0; - */ - const INDEXING_TYPE_UNSPECIFIED = 0; - /** - * Column not a part of an index. - * - * Generated from protobuf enum INDEXING_TYPE_NONE = 1; - */ - const INDEXING_TYPE_NONE = 1; - /** - * Column Part of non unique index. - * - * Generated from protobuf enum INDEXING_TYPE_NON_UNIQUE = 2; - */ - const INDEXING_TYPE_NON_UNIQUE = 2; - /** - * Column part of unique index. - * - * Generated from protobuf enum INDEXING_TYPE_UNIQUE = 3; - */ - const INDEXING_TYPE_UNIQUE = 3; - /** - * Column part of the primary key. - * - * Generated from protobuf enum INDEXING_TYPE_PRIMARY_KEY = 4; - */ - const INDEXING_TYPE_PRIMARY_KEY = 4; - - private static $valueToName = [ - self::INDEXING_TYPE_UNSPECIFIED => 'INDEXING_TYPE_UNSPECIFIED', - self::INDEXING_TYPE_NONE => 'INDEXING_TYPE_NONE', - self::INDEXING_TYPE_NON_UNIQUE => 'INDEXING_TYPE_NON_UNIQUE', - self::INDEXING_TYPE_UNIQUE => 'INDEXING_TYPE_UNIQUE', - self::INDEXING_TYPE_PRIMARY_KEY => 'INDEXING_TYPE_PRIMARY_KEY', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(IndexingType::class, \Google\Cloud\DataCatalog\V1\ColumnSchema_IndexingType::class); - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ColumnSchema/LookerColumnSpec.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ColumnSchema/LookerColumnSpec.php deleted file mode 100644 index 7fa381a72a8f..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ColumnSchema/LookerColumnSpec.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec - */ -class LookerColumnSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Looker specific column type of this column. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec.LookerColumnType type = 1; - */ - protected $type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * Looker specific column type of this column. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Schema::initOnce(); - parent::__construct($data); - } - - /** - * Looker specific column type of this column. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec.LookerColumnType type = 1; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Looker specific column type of this column. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec.LookerColumnType type = 1; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\DataCatalog\V1\ColumnSchema\LookerColumnSpec\LookerColumnType::class); - $this->type = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(LookerColumnSpec::class, \Google\Cloud\DataCatalog\V1\ColumnSchema_LookerColumnSpec::class); - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ColumnSchema/LookerColumnSpec/LookerColumnType.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ColumnSchema/LookerColumnSpec/LookerColumnType.php deleted file mode 100644 index b2db79f640d0..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ColumnSchema/LookerColumnSpec/LookerColumnType.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.datacatalog.v1.ColumnSchema.LookerColumnSpec.LookerColumnType - */ -class LookerColumnType -{ - /** - * Unspecified. - * - * Generated from protobuf enum LOOKER_COLUMN_TYPE_UNSPECIFIED = 0; - */ - const LOOKER_COLUMN_TYPE_UNSPECIFIED = 0; - /** - * Dimension. - * - * Generated from protobuf enum DIMENSION = 1; - */ - const DIMENSION = 1; - /** - * Dimension group - parent for Dimension. - * - * Generated from protobuf enum DIMENSION_GROUP = 2; - */ - const DIMENSION_GROUP = 2; - /** - * Filter. - * - * Generated from protobuf enum FILTER = 3; - */ - const FILTER = 3; - /** - * Measure. - * - * Generated from protobuf enum MEASURE = 4; - */ - const MEASURE = 4; - /** - * Parameter. - * - * Generated from protobuf enum PARAMETER = 5; - */ - const PARAMETER = 5; - - private static $valueToName = [ - self::LOOKER_COLUMN_TYPE_UNSPECIFIED => 'LOOKER_COLUMN_TYPE_UNSPECIFIED', - self::DIMENSION => 'DIMENSION', - self::DIMENSION_GROUP => 'DIMENSION_GROUP', - self::FILTER => 'FILTER', - self::MEASURE => 'MEASURE', - self::PARAMETER => 'PARAMETER', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(LookerColumnType::class, \Google\Cloud\DataCatalog\V1\ColumnSchema_LookerColumnSpec_LookerColumnType::class); - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CommonUsageStats.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CommonUsageStats.php deleted file mode 100644 index a3f5a8bd425a..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CommonUsageStats.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.datacatalog.v1.CommonUsageStats - */ -class CommonUsageStats extends \Google\Protobuf\Internal\Message -{ - /** - * View count in source system. - * - * Generated from protobuf field optional int64 view_count = 1; - */ - protected $view_count = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $view_count - * View count in source system. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Usage::initOnce(); - parent::__construct($data); - } - - /** - * View count in source system. - * - * Generated from protobuf field optional int64 view_count = 1; - * @return int|string - */ - public function getViewCount() - { - return isset($this->view_count) ? $this->view_count : 0; - } - - public function hasViewCount() - { - return isset($this->view_count); - } - - public function clearViewCount() - { - unset($this->view_count); - } - - /** - * View count in source system. - * - * Generated from protobuf field optional int64 view_count = 1; - * @param int|string $var - * @return $this - */ - public function setViewCount($var) - { - GPBUtil::checkInt64($var); - $this->view_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Contacts.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Contacts.php deleted file mode 100644 index 3da08ebbe67c..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Contacts.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.datacatalog.v1.Contacts - */ -class Contacts extends \Google\Protobuf\Internal\Message -{ - /** - * The list of contact people for the entry. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Contacts.Person people = 1; - */ - private $people; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\DataCatalog\V1\Contacts\Person>|\Google\Protobuf\Internal\RepeatedField $people - * The list of contact people for the entry. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * The list of contact people for the entry. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Contacts.Person people = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPeople() - { - return $this->people; - } - - /** - * The list of contact people for the entry. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Contacts.Person people = 1; - * @param array<\Google\Cloud\DataCatalog\V1\Contacts\Person>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPeople($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DataCatalog\V1\Contacts\Person::class); - $this->people = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Contacts/Person.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Contacts/Person.php deleted file mode 100644 index a517a943a789..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Contacts/Person.php +++ /dev/null @@ -1,108 +0,0 @@ -google.cloud.datacatalog.v1.Contacts.Person - */ -class Person extends \Google\Protobuf\Internal\Message -{ - /** - * Designation of the person, for example, Data Steward. - * - * Generated from protobuf field string designation = 1; - */ - protected $designation = ''; - /** - * Email of the person in the format of `john.doe@xyz`, - * ``, or `John Doe`. - * - * Generated from protobuf field string email = 2; - */ - protected $email = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $designation - * Designation of the person, for example, Data Steward. - * @type string $email - * Email of the person in the format of `john.doe@xyz`, - * ``, or `John Doe`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * Designation of the person, for example, Data Steward. - * - * Generated from protobuf field string designation = 1; - * @return string - */ - public function getDesignation() - { - return $this->designation; - } - - /** - * Designation of the person, for example, Data Steward. - * - * Generated from protobuf field string designation = 1; - * @param string $var - * @return $this - */ - public function setDesignation($var) - { - GPBUtil::checkString($var, True); - $this->designation = $var; - - return $this; - } - - /** - * Email of the person in the format of `john.doe@xyz`, - * ``, or `John Doe`. - * - * Generated from protobuf field string email = 2; - * @return string - */ - public function getEmail() - { - return $this->email; - } - - /** - * Email of the person in the format of `john.doe@xyz`, - * ``, or `John Doe`. - * - * Generated from protobuf field string email = 2; - * @param string $var - * @return $this - */ - public function setEmail($var) - { - GPBUtil::checkString($var, True); - $this->email = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Person::class, \Google\Cloud\DataCatalog\V1\Contacts_Person::class); - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CreateEntryGroupRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CreateEntryGroupRequest.php deleted file mode 100644 index 39f4d66f8d5e..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CreateEntryGroupRequest.php +++ /dev/null @@ -1,196 +0,0 @@ -google.cloud.datacatalog.v1.CreateEntryGroupRequest - */ -class CreateEntryGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The names of the project and location that the new entry group - * belongs to. - * Note: The entry group itself and its child resources might not be - * stored in the location specified in its name. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The ID of the entry group to create. - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and must start with a letter or underscore. - * The maximum size is 64 bytes when encoded in UTF-8. - * - * Generated from protobuf field string entry_group_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $entry_group_id = ''; - /** - * The entry group to create. Defaults to empty. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.EntryGroup entry_group = 2; - */ - protected $entry_group = null; - - /** - * @param string $parent Required. The names of the project and location that the new entry group - * belongs to. - * - * Note: The entry group itself and its child resources might not be - * stored in the location specified in its name. Please see - * {@see DataCatalogClient::locationName()} for help formatting this field. - * @param string $entryGroupId Required. The ID of the entry group to create. - * - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and must start with a letter or underscore. - * The maximum size is 64 bytes when encoded in UTF-8. - * @param \Google\Cloud\DataCatalog\V1\EntryGroup $entryGroup The entry group to create. Defaults to empty. - * - * @return \Google\Cloud\DataCatalog\V1\CreateEntryGroupRequest - * - * @experimental - */ - public static function build(string $parent, string $entryGroupId, \Google\Cloud\DataCatalog\V1\EntryGroup $entryGroup): self - { - return (new self()) - ->setParent($parent) - ->setEntryGroupId($entryGroupId) - ->setEntryGroup($entryGroup); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The names of the project and location that the new entry group - * belongs to. - * Note: The entry group itself and its child resources might not be - * stored in the location specified in its name. - * @type string $entry_group_id - * Required. The ID of the entry group to create. - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and must start with a letter or underscore. - * The maximum size is 64 bytes when encoded in UTF-8. - * @type \Google\Cloud\DataCatalog\V1\EntryGroup $entry_group - * The entry group to create. Defaults to empty. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * Required. The names of the project and location that the new entry group - * belongs to. - * Note: The entry group itself and its child resources might not be - * stored in the location specified in its name. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The names of the project and location that the new entry group - * belongs to. - * Note: The entry group itself and its child resources might not be - * stored in the location specified in its name. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The ID of the entry group to create. - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and must start with a letter or underscore. - * The maximum size is 64 bytes when encoded in UTF-8. - * - * Generated from protobuf field string entry_group_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getEntryGroupId() - { - return $this->entry_group_id; - } - - /** - * Required. The ID of the entry group to create. - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and must start with a letter or underscore. - * The maximum size is 64 bytes when encoded in UTF-8. - * - * Generated from protobuf field string entry_group_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setEntryGroupId($var) - { - GPBUtil::checkString($var, True); - $this->entry_group_id = $var; - - return $this; - } - - /** - * The entry group to create. Defaults to empty. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.EntryGroup entry_group = 2; - * @return \Google\Cloud\DataCatalog\V1\EntryGroup|null - */ - public function getEntryGroup() - { - return $this->entry_group; - } - - public function hasEntryGroup() - { - return isset($this->entry_group); - } - - public function clearEntryGroup() - { - unset($this->entry_group); - } - - /** - * The entry group to create. Defaults to empty. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.EntryGroup entry_group = 2; - * @param \Google\Cloud\DataCatalog\V1\EntryGroup $var - * @return $this - */ - public function setEntryGroup($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\EntryGroup::class); - $this->entry_group = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CreateEntryRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CreateEntryRequest.php deleted file mode 100644 index fd4686b7581c..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CreateEntryRequest.php +++ /dev/null @@ -1,191 +0,0 @@ -google.cloud.datacatalog.v1.CreateEntryRequest - */ -class CreateEntryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the entry group this entry belongs to. - * Note: The entry itself and its child resources might not be stored in - * the location specified in its name. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The ID of the entry to create. - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * and underscores (_). - * The maximum size is 64 bytes when encoded in UTF-8. - * - * Generated from protobuf field string entry_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $entry_id = ''; - /** - * Required. The entry to create. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.Entry entry = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $entry = null; - - /** - * @param string $parent Required. The name of the entry group this entry belongs to. - * - * Note: The entry itself and its child resources might not be stored in - * the location specified in its name. Please see - * {@see DataCatalogClient::entryGroupName()} for help formatting this field. - * @param string $entryId Required. The ID of the entry to create. - * - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * and underscores (_). - * The maximum size is 64 bytes when encoded in UTF-8. - * @param \Google\Cloud\DataCatalog\V1\Entry $entry Required. The entry to create. - * - * @return \Google\Cloud\DataCatalog\V1\CreateEntryRequest - * - * @experimental - */ - public static function build(string $parent, string $entryId, \Google\Cloud\DataCatalog\V1\Entry $entry): self - { - return (new self()) - ->setParent($parent) - ->setEntryId($entryId) - ->setEntry($entry); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the entry group this entry belongs to. - * Note: The entry itself and its child resources might not be stored in - * the location specified in its name. - * @type string $entry_id - * Required. The ID of the entry to create. - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * and underscores (_). - * The maximum size is 64 bytes when encoded in UTF-8. - * @type \Google\Cloud\DataCatalog\V1\Entry $entry - * Required. The entry to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the entry group this entry belongs to. - * Note: The entry itself and its child resources might not be stored in - * the location specified in its name. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The name of the entry group this entry belongs to. - * Note: The entry itself and its child resources might not be stored in - * the location specified in its name. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The ID of the entry to create. - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * and underscores (_). - * The maximum size is 64 bytes when encoded in UTF-8. - * - * Generated from protobuf field string entry_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getEntryId() - { - return $this->entry_id; - } - - /** - * Required. The ID of the entry to create. - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * and underscores (_). - * The maximum size is 64 bytes when encoded in UTF-8. - * - * Generated from protobuf field string entry_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setEntryId($var) - { - GPBUtil::checkString($var, True); - $this->entry_id = $var; - - return $this; - } - - /** - * Required. The entry to create. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.Entry entry = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\DataCatalog\V1\Entry|null - */ - public function getEntry() - { - return $this->entry; - } - - public function hasEntry() - { - return isset($this->entry); - } - - public function clearEntry() - { - unset($this->entry); - } - - /** - * Required. The entry to create. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.Entry entry = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\DataCatalog\V1\Entry $var - * @return $this - */ - public function setEntry($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\Entry::class); - $this->entry = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CreatePolicyTagRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CreatePolicyTagRequest.php deleted file mode 100644 index 064c852d0a2b..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CreatePolicyTagRequest.php +++ /dev/null @@ -1,128 +0,0 @@ -google.cloud.datacatalog.v1.CreatePolicyTagRequest - */ -class CreatePolicyTagRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the taxonomy that the policy tag will belong to. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The policy tag to create. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.PolicyTag policy_tag = 2; - */ - protected $policy_tag = null; - - /** - * @param string $parent Required. Resource name of the taxonomy that the policy tag will belong to. Please see - * {@see PolicyTagManagerClient::taxonomyName()} for help formatting this field. - * @param \Google\Cloud\DataCatalog\V1\PolicyTag $policyTag The policy tag to create. - * - * @return \Google\Cloud\DataCatalog\V1\CreatePolicyTagRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\DataCatalog\V1\PolicyTag $policyTag): self - { - return (new self()) - ->setParent($parent) - ->setPolicyTag($policyTag); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Resource name of the taxonomy that the policy tag will belong to. - * @type \Google\Cloud\DataCatalog\V1\PolicyTag $policy_tag - * The policy tag to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Policytagmanager::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the taxonomy that the policy tag will belong to. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Resource name of the taxonomy that the policy tag will belong to. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The policy tag to create. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.PolicyTag policy_tag = 2; - * @return \Google\Cloud\DataCatalog\V1\PolicyTag|null - */ - public function getPolicyTag() - { - return $this->policy_tag; - } - - public function hasPolicyTag() - { - return isset($this->policy_tag); - } - - public function clearPolicyTag() - { - unset($this->policy_tag); - } - - /** - * The policy tag to create. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.PolicyTag policy_tag = 2; - * @param \Google\Cloud\DataCatalog\V1\PolicyTag $var - * @return $this - */ - public function setPolicyTag($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\PolicyTag::class); - $this->policy_tag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CreateTagRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CreateTagRequest.php deleted file mode 100644 index a226f5e17c49..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CreateTagRequest.php +++ /dev/null @@ -1,150 +0,0 @@ -google.cloud.datacatalog.v1.CreateTagRequest - */ -class CreateTagRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the resource to attach this tag to. - * Tags can be attached to entries or entry groups. An entry can have up to - * 1000 attached tags. - * Note: The tag and its child resources might not be stored in - * the location specified in its name. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The tag to create. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.Tag tag = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $tag = null; - - /** - * @param string $parent Required. The name of the resource to attach this tag to. - * - * Tags can be attached to entries or entry groups. An entry can have up to - * 1000 attached tags. - * - * Note: The tag and its child resources might not be stored in - * the location specified in its name. Please see - * {@see DataCatalogClient::entryName()} for help formatting this field. - * @param \Google\Cloud\DataCatalog\V1\Tag $tag Required. The tag to create. - * - * @return \Google\Cloud\DataCatalog\V1\CreateTagRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\DataCatalog\V1\Tag $tag): self - { - return (new self()) - ->setParent($parent) - ->setTag($tag); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the resource to attach this tag to. - * Tags can be attached to entries or entry groups. An entry can have up to - * 1000 attached tags. - * Note: The tag and its child resources might not be stored in - * the location specified in its name. - * @type \Google\Cloud\DataCatalog\V1\Tag $tag - * Required. The tag to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the resource to attach this tag to. - * Tags can be attached to entries or entry groups. An entry can have up to - * 1000 attached tags. - * Note: The tag and its child resources might not be stored in - * the location specified in its name. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The name of the resource to attach this tag to. - * Tags can be attached to entries or entry groups. An entry can have up to - * 1000 attached tags. - * Note: The tag and its child resources might not be stored in - * the location specified in its name. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The tag to create. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.Tag tag = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\DataCatalog\V1\Tag|null - */ - public function getTag() - { - return $this->tag; - } - - public function hasTag() - { - return isset($this->tag); - } - - public function clearTag() - { - unset($this->tag); - } - - /** - * Required. The tag to create. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.Tag tag = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\DataCatalog\V1\Tag $var - * @return $this - */ - public function setTag($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\Tag::class); - $this->tag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CreateTagTemplateFieldRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CreateTagTemplateFieldRequest.php deleted file mode 100644 index e9b59f4f670e..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CreateTagTemplateFieldRequest.php +++ /dev/null @@ -1,196 +0,0 @@ -google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest - */ -class CreateTagTemplateFieldRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the project and the template location - * [region](https://cloud.google.com/data-catalog/docs/concepts/regions). - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The ID of the tag template field to create. - * Note: Adding a required field to an existing template is *not* allowed. - * Field IDs can contain letters (both uppercase and lowercase), numbers - * (0-9), underscores (_) and dashes (-). Field IDs must be at least 1 - * character long and at most 128 characters long. Field IDs must also be - * unique within their template. - * - * Generated from protobuf field string tag_template_field_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $tag_template_field_id = ''; - /** - * Required. The tag template field to create. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.TagTemplateField tag_template_field = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $tag_template_field = null; - - /** - * @param string $parent Required. The name of the project and the template location - * [region](https://cloud.google.com/data-catalog/docs/concepts/regions). Please see - * {@see DataCatalogClient::tagTemplateName()} for help formatting this field. - * @param string $tagTemplateFieldId Required. The ID of the tag template field to create. - * - * Note: Adding a required field to an existing template is *not* allowed. - * - * Field IDs can contain letters (both uppercase and lowercase), numbers - * (0-9), underscores (_) and dashes (-). Field IDs must be at least 1 - * character long and at most 128 characters long. Field IDs must also be - * unique within their template. - * @param \Google\Cloud\DataCatalog\V1\TagTemplateField $tagTemplateField Required. The tag template field to create. - * - * @return \Google\Cloud\DataCatalog\V1\CreateTagTemplateFieldRequest - * - * @experimental - */ - public static function build(string $parent, string $tagTemplateFieldId, \Google\Cloud\DataCatalog\V1\TagTemplateField $tagTemplateField): self - { - return (new self()) - ->setParent($parent) - ->setTagTemplateFieldId($tagTemplateFieldId) - ->setTagTemplateField($tagTemplateField); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the project and the template location - * [region](https://cloud.google.com/data-catalog/docs/concepts/regions). - * @type string $tag_template_field_id - * Required. The ID of the tag template field to create. - * Note: Adding a required field to an existing template is *not* allowed. - * Field IDs can contain letters (both uppercase and lowercase), numbers - * (0-9), underscores (_) and dashes (-). Field IDs must be at least 1 - * character long and at most 128 characters long. Field IDs must also be - * unique within their template. - * @type \Google\Cloud\DataCatalog\V1\TagTemplateField $tag_template_field - * Required. The tag template field to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the project and the template location - * [region](https://cloud.google.com/data-catalog/docs/concepts/regions). - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The name of the project and the template location - * [region](https://cloud.google.com/data-catalog/docs/concepts/regions). - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The ID of the tag template field to create. - * Note: Adding a required field to an existing template is *not* allowed. - * Field IDs can contain letters (both uppercase and lowercase), numbers - * (0-9), underscores (_) and dashes (-). Field IDs must be at least 1 - * character long and at most 128 characters long. Field IDs must also be - * unique within their template. - * - * Generated from protobuf field string tag_template_field_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTagTemplateFieldId() - { - return $this->tag_template_field_id; - } - - /** - * Required. The ID of the tag template field to create. - * Note: Adding a required field to an existing template is *not* allowed. - * Field IDs can contain letters (both uppercase and lowercase), numbers - * (0-9), underscores (_) and dashes (-). Field IDs must be at least 1 - * character long and at most 128 characters long. Field IDs must also be - * unique within their template. - * - * Generated from protobuf field string tag_template_field_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTagTemplateFieldId($var) - { - GPBUtil::checkString($var, True); - $this->tag_template_field_id = $var; - - return $this; - } - - /** - * Required. The tag template field to create. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.TagTemplateField tag_template_field = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\DataCatalog\V1\TagTemplateField|null - */ - public function getTagTemplateField() - { - return $this->tag_template_field; - } - - public function hasTagTemplateField() - { - return isset($this->tag_template_field); - } - - public function clearTagTemplateField() - { - unset($this->tag_template_field); - } - - /** - * Required. The tag template field to create. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.TagTemplateField tag_template_field = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\DataCatalog\V1\TagTemplateField $var - * @return $this - */ - public function setTagTemplateField($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\TagTemplateField::class); - $this->tag_template_field = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CreateTagTemplateRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CreateTagTemplateRequest.php deleted file mode 100644 index 59ff04cc98e8..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CreateTagTemplateRequest.php +++ /dev/null @@ -1,185 +0,0 @@ -google.cloud.datacatalog.v1.CreateTagTemplateRequest - */ -class CreateTagTemplateRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the project and the template location - * [region](https://cloud.google.com/data-catalog/docs/concepts/regions). - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The ID of the tag template to create. - * The ID must contain only lowercase letters (a-z), numbers (0-9), - * or underscores (_), and must start with a letter or underscore. - * The maximum size is 64 bytes when encoded in UTF-8. - * - * Generated from protobuf field string tag_template_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $tag_template_id = ''; - /** - * Required. The tag template to create. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.TagTemplate tag_template = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $tag_template = null; - - /** - * @param string $parent Required. The name of the project and the template location - * [region](https://cloud.google.com/data-catalog/docs/concepts/regions). Please see - * {@see DataCatalogClient::locationName()} for help formatting this field. - * @param string $tagTemplateId Required. The ID of the tag template to create. - * - * The ID must contain only lowercase letters (a-z), numbers (0-9), - * or underscores (_), and must start with a letter or underscore. - * The maximum size is 64 bytes when encoded in UTF-8. - * @param \Google\Cloud\DataCatalog\V1\TagTemplate $tagTemplate Required. The tag template to create. - * - * @return \Google\Cloud\DataCatalog\V1\CreateTagTemplateRequest - * - * @experimental - */ - public static function build(string $parent, string $tagTemplateId, \Google\Cloud\DataCatalog\V1\TagTemplate $tagTemplate): self - { - return (new self()) - ->setParent($parent) - ->setTagTemplateId($tagTemplateId) - ->setTagTemplate($tagTemplate); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the project and the template location - * [region](https://cloud.google.com/data-catalog/docs/concepts/regions). - * @type string $tag_template_id - * Required. The ID of the tag template to create. - * The ID must contain only lowercase letters (a-z), numbers (0-9), - * or underscores (_), and must start with a letter or underscore. - * The maximum size is 64 bytes when encoded in UTF-8. - * @type \Google\Cloud\DataCatalog\V1\TagTemplate $tag_template - * Required. The tag template to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the project and the template location - * [region](https://cloud.google.com/data-catalog/docs/concepts/regions). - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The name of the project and the template location - * [region](https://cloud.google.com/data-catalog/docs/concepts/regions). - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The ID of the tag template to create. - * The ID must contain only lowercase letters (a-z), numbers (0-9), - * or underscores (_), and must start with a letter or underscore. - * The maximum size is 64 bytes when encoded in UTF-8. - * - * Generated from protobuf field string tag_template_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTagTemplateId() - { - return $this->tag_template_id; - } - - /** - * Required. The ID of the tag template to create. - * The ID must contain only lowercase letters (a-z), numbers (0-9), - * or underscores (_), and must start with a letter or underscore. - * The maximum size is 64 bytes when encoded in UTF-8. - * - * Generated from protobuf field string tag_template_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTagTemplateId($var) - { - GPBUtil::checkString($var, True); - $this->tag_template_id = $var; - - return $this; - } - - /** - * Required. The tag template to create. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.TagTemplate tag_template = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\DataCatalog\V1\TagTemplate|null - */ - public function getTagTemplate() - { - return $this->tag_template; - } - - public function hasTagTemplate() - { - return isset($this->tag_template); - } - - public function clearTagTemplate() - { - unset($this->tag_template); - } - - /** - * Required. The tag template to create. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.TagTemplate tag_template = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\DataCatalog\V1\TagTemplate $var - * @return $this - */ - public function setTagTemplate($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\TagTemplate::class); - $this->tag_template = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CreateTaxonomyRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CreateTaxonomyRequest.php deleted file mode 100644 index 915bbd53a633..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CreateTaxonomyRequest.php +++ /dev/null @@ -1,128 +0,0 @@ -google.cloud.datacatalog.v1.CreateTaxonomyRequest - */ -class CreateTaxonomyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the project that the taxonomy will belong to. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The taxonomy to create. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.Taxonomy taxonomy = 2; - */ - protected $taxonomy = null; - - /** - * @param string $parent Required. Resource name of the project that the taxonomy will belong to. Please see - * {@see PolicyTagManagerClient::locationName()} for help formatting this field. - * @param \Google\Cloud\DataCatalog\V1\Taxonomy $taxonomy The taxonomy to create. - * - * @return \Google\Cloud\DataCatalog\V1\CreateTaxonomyRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\DataCatalog\V1\Taxonomy $taxonomy): self - { - return (new self()) - ->setParent($parent) - ->setTaxonomy($taxonomy); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Resource name of the project that the taxonomy will belong to. - * @type \Google\Cloud\DataCatalog\V1\Taxonomy $taxonomy - * The taxonomy to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Policytagmanager::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the project that the taxonomy will belong to. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Resource name of the project that the taxonomy will belong to. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The taxonomy to create. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.Taxonomy taxonomy = 2; - * @return \Google\Cloud\DataCatalog\V1\Taxonomy|null - */ - public function getTaxonomy() - { - return $this->taxonomy; - } - - public function hasTaxonomy() - { - return isset($this->taxonomy); - } - - public function clearTaxonomy() - { - unset($this->taxonomy); - } - - /** - * The taxonomy to create. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.Taxonomy taxonomy = 2; - * @param \Google\Cloud\DataCatalog\V1\Taxonomy $var - * @return $this - */ - public function setTaxonomy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\Taxonomy::class); - $this->taxonomy = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CrossRegionalSource.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CrossRegionalSource.php deleted file mode 100644 index fd871a9080bf..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/CrossRegionalSource.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.datacatalog.v1.CrossRegionalSource - */ -class CrossRegionalSource extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the source taxonomy to import. - * - * Generated from protobuf field string taxonomy = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $taxonomy = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $taxonomy - * Required. The resource name of the source taxonomy to import. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Policytagmanagerserialization::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the source taxonomy to import. - * - * Generated from protobuf field string taxonomy = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getTaxonomy() - { - return $this->taxonomy; - } - - /** - * Required. The resource name of the source taxonomy to import. - * - * Generated from protobuf field string taxonomy = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setTaxonomy($var) - { - GPBUtil::checkString($var, True); - $this->taxonomy = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DataSource.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DataSource.php deleted file mode 100644 index 09404782fe65..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DataSource.php +++ /dev/null @@ -1,181 +0,0 @@ -google.cloud.datacatalog.v1.DataSource - */ -class DataSource extends \Google\Protobuf\Internal\Message -{ - /** - * Service that physically stores the data. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.DataSource.Service service = 1; - */ - protected $service = 0; - /** - * Full name of a resource as defined by the service. For example: - * `//bigquery.googleapis.com/projects/{PROJECT_ID}/locations/{LOCATION}/datasets/{DATASET_ID}/tables/{TABLE_ID}` - * - * Generated from protobuf field string resource = 2; - */ - protected $resource = ''; - /** - * Output only. Data Catalog entry name, if applicable. - * - * Generated from protobuf field string source_entry = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $source_entry = ''; - protected $properties; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $service - * Service that physically stores the data. - * @type string $resource - * Full name of a resource as defined by the service. For example: - * `//bigquery.googleapis.com/projects/{PROJECT_ID}/locations/{LOCATION}/datasets/{DATASET_ID}/tables/{TABLE_ID}` - * @type string $source_entry - * Output only. Data Catalog entry name, if applicable. - * @type \Google\Cloud\DataCatalog\V1\StorageProperties $storage_properties - * Detailed properties of the underlying storage. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\DataSource::initOnce(); - parent::__construct($data); - } - - /** - * Service that physically stores the data. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.DataSource.Service service = 1; - * @return int - */ - public function getService() - { - return $this->service; - } - - /** - * Service that physically stores the data. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.DataSource.Service service = 1; - * @param int $var - * @return $this - */ - public function setService($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\DataCatalog\V1\DataSource\Service::class); - $this->service = $var; - - return $this; - } - - /** - * Full name of a resource as defined by the service. For example: - * `//bigquery.googleapis.com/projects/{PROJECT_ID}/locations/{LOCATION}/datasets/{DATASET_ID}/tables/{TABLE_ID}` - * - * Generated from protobuf field string resource = 2; - * @return string - */ - public function getResource() - { - return $this->resource; - } - - /** - * Full name of a resource as defined by the service. For example: - * `//bigquery.googleapis.com/projects/{PROJECT_ID}/locations/{LOCATION}/datasets/{DATASET_ID}/tables/{TABLE_ID}` - * - * Generated from protobuf field string resource = 2; - * @param string $var - * @return $this - */ - public function setResource($var) - { - GPBUtil::checkString($var, True); - $this->resource = $var; - - return $this; - } - - /** - * Output only. Data Catalog entry name, if applicable. - * - * Generated from protobuf field string source_entry = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getSourceEntry() - { - return $this->source_entry; - } - - /** - * Output only. Data Catalog entry name, if applicable. - * - * Generated from protobuf field string source_entry = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setSourceEntry($var) - { - GPBUtil::checkString($var, True); - $this->source_entry = $var; - - return $this; - } - - /** - * Detailed properties of the underlying storage. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.StorageProperties storage_properties = 4; - * @return \Google\Cloud\DataCatalog\V1\StorageProperties|null - */ - public function getStorageProperties() - { - return $this->readOneof(4); - } - - public function hasStorageProperties() - { - return $this->hasOneof(4); - } - - /** - * Detailed properties of the underlying storage. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.StorageProperties storage_properties = 4; - * @param \Google\Cloud\DataCatalog\V1\StorageProperties $var - * @return $this - */ - public function setStorageProperties($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\StorageProperties::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * @return string - */ - public function getProperties() - { - return $this->whichOneof("properties"); - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DataSource/Service.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DataSource/Service.php deleted file mode 100644 index 57568d1de5b2..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DataSource/Service.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.datacatalog.v1.DataSource.Service - */ -class Service -{ - /** - * Default unknown service. - * - * Generated from protobuf enum SERVICE_UNSPECIFIED = 0; - */ - const SERVICE_UNSPECIFIED = 0; - /** - * Google Cloud Storage service. - * - * Generated from protobuf enum CLOUD_STORAGE = 1; - */ - const CLOUD_STORAGE = 1; - /** - * BigQuery service. - * - * Generated from protobuf enum BIGQUERY = 2; - */ - const BIGQUERY = 2; - - private static $valueToName = [ - self::SERVICE_UNSPECIFIED => 'SERVICE_UNSPECIFIED', - self::CLOUD_STORAGE => 'CLOUD_STORAGE', - self::BIGQUERY => 'BIGQUERY', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Service::class, \Google\Cloud\DataCatalog\V1\DataSource_Service::class); - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DataSourceConnectionSpec.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DataSourceConnectionSpec.php deleted file mode 100644 index 79706866f1ef..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DataSourceConnectionSpec.php +++ /dev/null @@ -1,80 +0,0 @@ -google.cloud.datacatalog.v1.DataSourceConnectionSpec - */ -class DataSourceConnectionSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Fields specific to BigQuery connections. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.BigQueryConnectionSpec bigquery_connection_spec = 1; - */ - protected $bigquery_connection_spec = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DataCatalog\V1\BigQueryConnectionSpec $bigquery_connection_spec - * Output only. Fields specific to BigQuery connections. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Fields specific to BigQuery connections. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.BigQueryConnectionSpec bigquery_connection_spec = 1; - * @return \Google\Cloud\DataCatalog\V1\BigQueryConnectionSpec|null - */ - public function getBigqueryConnectionSpec() - { - return $this->bigquery_connection_spec; - } - - public function hasBigqueryConnectionSpec() - { - return isset($this->bigquery_connection_spec); - } - - public function clearBigqueryConnectionSpec() - { - unset($this->bigquery_connection_spec); - } - - /** - * Output only. Fields specific to BigQuery connections. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.BigQueryConnectionSpec bigquery_connection_spec = 1; - * @param \Google\Cloud\DataCatalog\V1\BigQueryConnectionSpec $var - * @return $this - */ - public function setBigqueryConnectionSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\BigQueryConnectionSpec::class); - $this->bigquery_connection_spec = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DatabaseTableSpec.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DatabaseTableSpec.php deleted file mode 100644 index 8baa72ed9130..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DatabaseTableSpec.php +++ /dev/null @@ -1,164 +0,0 @@ -google.cloud.datacatalog.v1.DatabaseTableSpec - */ -class DatabaseTableSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Type of this table. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.DatabaseTableSpec.TableType type = 1; - */ - protected $type = 0; - /** - * Output only. Fields specific to a Dataplex table and present only in the - * Dataplex table entries. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.DataplexTableSpec dataplex_table = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $dataplex_table = null; - /** - * Spec what aplies to tables that are actually views. - * Not set for "real" tables. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec database_view_spec = 3; - */ - protected $database_view_spec = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * Type of this table. - * @type \Google\Cloud\DataCatalog\V1\DataplexTableSpec $dataplex_table - * Output only. Fields specific to a Dataplex table and present only in the - * Dataplex table entries. - * @type \Google\Cloud\DataCatalog\V1\DatabaseTableSpec\DatabaseViewSpec $database_view_spec - * Spec what aplies to tables that are actually views. - * Not set for "real" tables. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * Type of this table. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.DatabaseTableSpec.TableType type = 1; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Type of this table. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.DatabaseTableSpec.TableType type = 1; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\DataCatalog\V1\DatabaseTableSpec\TableType::class); - $this->type = $var; - - return $this; - } - - /** - * Output only. Fields specific to a Dataplex table and present only in the - * Dataplex table entries. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.DataplexTableSpec dataplex_table = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\DataCatalog\V1\DataplexTableSpec|null - */ - public function getDataplexTable() - { - return $this->dataplex_table; - } - - public function hasDataplexTable() - { - return isset($this->dataplex_table); - } - - public function clearDataplexTable() - { - unset($this->dataplex_table); - } - - /** - * Output only. Fields specific to a Dataplex table and present only in the - * Dataplex table entries. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.DataplexTableSpec dataplex_table = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\DataCatalog\V1\DataplexTableSpec $var - * @return $this - */ - public function setDataplexTable($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\DataplexTableSpec::class); - $this->dataplex_table = $var; - - return $this; - } - - /** - * Spec what aplies to tables that are actually views. - * Not set for "real" tables. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec database_view_spec = 3; - * @return \Google\Cloud\DataCatalog\V1\DatabaseTableSpec\DatabaseViewSpec|null - */ - public function getDatabaseViewSpec() - { - return $this->database_view_spec; - } - - public function hasDatabaseViewSpec() - { - return isset($this->database_view_spec); - } - - public function clearDatabaseViewSpec() - { - unset($this->database_view_spec); - } - - /** - * Spec what aplies to tables that are actually views. - * Not set for "real" tables. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec database_view_spec = 3; - * @param \Google\Cloud\DataCatalog\V1\DatabaseTableSpec\DatabaseViewSpec $var - * @return $this - */ - public function setDatabaseViewSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\DatabaseTableSpec\DatabaseViewSpec::class); - $this->database_view_spec = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DatabaseTableSpec/DatabaseViewSpec.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DatabaseTableSpec/DatabaseViewSpec.php deleted file mode 100644 index 6be384655ea3..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DatabaseTableSpec/DatabaseViewSpec.php +++ /dev/null @@ -1,145 +0,0 @@ -google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec - */ -class DatabaseViewSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Type of this view. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec.ViewType view_type = 1; - */ - protected $view_type = 0; - protected $source_definition; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $view_type - * Type of this view. - * @type string $base_table - * Name of a singular table this view reflects one to one. - * @type string $sql_query - * SQL query used to generate this view. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * Type of this view. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec.ViewType view_type = 1; - * @return int - */ - public function getViewType() - { - return $this->view_type; - } - - /** - * Type of this view. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec.ViewType view_type = 1; - * @param int $var - * @return $this - */ - public function setViewType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\DataCatalog\V1\DatabaseTableSpec\DatabaseViewSpec\ViewType::class); - $this->view_type = $var; - - return $this; - } - - /** - * Name of a singular table this view reflects one to one. - * - * Generated from protobuf field string base_table = 2; - * @return string - */ - public function getBaseTable() - { - return $this->readOneof(2); - } - - public function hasBaseTable() - { - return $this->hasOneof(2); - } - - /** - * Name of a singular table this view reflects one to one. - * - * Generated from protobuf field string base_table = 2; - * @param string $var - * @return $this - */ - public function setBaseTable($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * SQL query used to generate this view. - * - * Generated from protobuf field string sql_query = 3; - * @return string - */ - public function getSqlQuery() - { - return $this->readOneof(3); - } - - public function hasSqlQuery() - { - return $this->hasOneof(3); - } - - /** - * SQL query used to generate this view. - * - * Generated from protobuf field string sql_query = 3; - * @param string $var - * @return $this - */ - public function setSqlQuery($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getSourceDefinition() - { - return $this->whichOneof("source_definition"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DatabaseViewSpec::class, \Google\Cloud\DataCatalog\V1\DatabaseTableSpec_DatabaseViewSpec::class); - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DatabaseTableSpec/DatabaseViewSpec/ViewType.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DatabaseTableSpec/DatabaseViewSpec/ViewType.php deleted file mode 100644 index 6e0092c6b218..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DatabaseTableSpec/DatabaseViewSpec/ViewType.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec.ViewType - */ -class ViewType -{ - /** - * Default unknown view type. - * - * Generated from protobuf enum VIEW_TYPE_UNSPECIFIED = 0; - */ - const VIEW_TYPE_UNSPECIFIED = 0; - /** - * Standard view. - * - * Generated from protobuf enum STANDARD_VIEW = 1; - */ - const STANDARD_VIEW = 1; - /** - * Materialized view. - * - * Generated from protobuf enum MATERIALIZED_VIEW = 2; - */ - const MATERIALIZED_VIEW = 2; - - private static $valueToName = [ - self::VIEW_TYPE_UNSPECIFIED => 'VIEW_TYPE_UNSPECIFIED', - self::STANDARD_VIEW => 'STANDARD_VIEW', - self::MATERIALIZED_VIEW => 'MATERIALIZED_VIEW', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ViewType::class, \Google\Cloud\DataCatalog\V1\DatabaseTableSpec_DatabaseViewSpec_ViewType::class); - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DatabaseTableSpec/TableType.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DatabaseTableSpec/TableType.php deleted file mode 100644 index c25cc7a54b26..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DatabaseTableSpec/TableType.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.datacatalog.v1.DatabaseTableSpec.TableType - */ -class TableType -{ - /** - * Default unknown table type. - * - * Generated from protobuf enum TABLE_TYPE_UNSPECIFIED = 0; - */ - const TABLE_TYPE_UNSPECIFIED = 0; - /** - * Native table. - * - * Generated from protobuf enum NATIVE = 1; - */ - const NATIVE = 1; - /** - * External table. - * - * Generated from protobuf enum EXTERNAL = 2; - */ - const EXTERNAL = 2; - - private static $valueToName = [ - self::TABLE_TYPE_UNSPECIFIED => 'TABLE_TYPE_UNSPECIFIED', - self::NATIVE => 'NATIVE', - self::EXTERNAL => 'EXTERNAL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TableType::class, \Google\Cloud\DataCatalog\V1\DatabaseTableSpec_TableType::class); - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DataplexExternalTable.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DataplexExternalTable.php deleted file mode 100644 index b80f582eeee2..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DataplexExternalTable.php +++ /dev/null @@ -1,175 +0,0 @@ -google.cloud.datacatalog.v1.DataplexExternalTable - */ -class DataplexExternalTable extends \Google\Protobuf\Internal\Message -{ - /** - * Service in which the external table is registered. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.IntegratedSystem system = 1; - */ - protected $system = 0; - /** - * Fully qualified name (FQN) of the external table. - * - * Generated from protobuf field string fully_qualified_name = 28; - */ - protected $fully_qualified_name = ''; - /** - * Google Cloud resource name of the external table. - * - * Generated from protobuf field string google_cloud_resource = 3; - */ - protected $google_cloud_resource = ''; - /** - * Name of the Data Catalog entry representing the external table. - * - * Generated from protobuf field string data_catalog_entry = 4; - */ - protected $data_catalog_entry = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $system - * Service in which the external table is registered. - * @type string $fully_qualified_name - * Fully qualified name (FQN) of the external table. - * @type string $google_cloud_resource - * Google Cloud resource name of the external table. - * @type string $data_catalog_entry - * Name of the Data Catalog entry representing the external table. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\DataplexSpec::initOnce(); - parent::__construct($data); - } - - /** - * Service in which the external table is registered. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.IntegratedSystem system = 1; - * @return int - */ - public function getSystem() - { - return $this->system; - } - - /** - * Service in which the external table is registered. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.IntegratedSystem system = 1; - * @param int $var - * @return $this - */ - public function setSystem($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\DataCatalog\V1\IntegratedSystem::class); - $this->system = $var; - - return $this; - } - - /** - * Fully qualified name (FQN) of the external table. - * - * Generated from protobuf field string fully_qualified_name = 28; - * @return string - */ - public function getFullyQualifiedName() - { - return $this->fully_qualified_name; - } - - /** - * Fully qualified name (FQN) of the external table. - * - * Generated from protobuf field string fully_qualified_name = 28; - * @param string $var - * @return $this - */ - public function setFullyQualifiedName($var) - { - GPBUtil::checkString($var, True); - $this->fully_qualified_name = $var; - - return $this; - } - - /** - * Google Cloud resource name of the external table. - * - * Generated from protobuf field string google_cloud_resource = 3; - * @return string - */ - public function getGoogleCloudResource() - { - return $this->google_cloud_resource; - } - - /** - * Google Cloud resource name of the external table. - * - * Generated from protobuf field string google_cloud_resource = 3; - * @param string $var - * @return $this - */ - public function setGoogleCloudResource($var) - { - GPBUtil::checkString($var, True); - $this->google_cloud_resource = $var; - - return $this; - } - - /** - * Name of the Data Catalog entry representing the external table. - * - * Generated from protobuf field string data_catalog_entry = 4; - * @return string - */ - public function getDataCatalogEntry() - { - return $this->data_catalog_entry; - } - - /** - * Name of the Data Catalog entry representing the external table. - * - * Generated from protobuf field string data_catalog_entry = 4; - * @param string $var - * @return $this - */ - public function setDataCatalogEntry($var) - { - GPBUtil::checkString($var, True); - $this->data_catalog_entry = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DataplexFilesetSpec.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DataplexFilesetSpec.php deleted file mode 100644 index 2d446c2e89ed..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DataplexFilesetSpec.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.datacatalog.v1.DataplexFilesetSpec - */ -class DataplexFilesetSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Common Dataplex fields. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.DataplexSpec dataplex_spec = 1; - */ - protected $dataplex_spec = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DataCatalog\V1\DataplexSpec $dataplex_spec - * Common Dataplex fields. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\DataplexSpec::initOnce(); - parent::__construct($data); - } - - /** - * Common Dataplex fields. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.DataplexSpec dataplex_spec = 1; - * @return \Google\Cloud\DataCatalog\V1\DataplexSpec|null - */ - public function getDataplexSpec() - { - return $this->dataplex_spec; - } - - public function hasDataplexSpec() - { - return isset($this->dataplex_spec); - } - - public function clearDataplexSpec() - { - unset($this->dataplex_spec); - } - - /** - * Common Dataplex fields. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.DataplexSpec dataplex_spec = 1; - * @param \Google\Cloud\DataCatalog\V1\DataplexSpec $var - * @return $this - */ - public function setDataplexSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\DataplexSpec::class); - $this->dataplex_spec = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DataplexSpec.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DataplexSpec.php deleted file mode 100644 index 1cd799f4c9ca..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DataplexSpec.php +++ /dev/null @@ -1,195 +0,0 @@ -google.cloud.datacatalog.v1.DataplexSpec - */ -class DataplexSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Fully qualified resource name of an asset in Dataplex, to which the - * underlying data source (Cloud Storage bucket or BigQuery dataset) of the - * entity is attached. - * - * Generated from protobuf field string asset = 1; - */ - protected $asset = ''; - /** - * Format of the data. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.PhysicalSchema data_format = 2; - */ - protected $data_format = null; - /** - * Compression format of the data, e.g., zip, gzip etc. - * - * Generated from protobuf field string compression_format = 3; - */ - protected $compression_format = ''; - /** - * Project ID of the underlying Cloud Storage or BigQuery data. Note that - * this may not be the same project as the correspondingly Dataplex lake / - * zone / asset. - * - * Generated from protobuf field string project_id = 4; - */ - protected $project_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $asset - * Fully qualified resource name of an asset in Dataplex, to which the - * underlying data source (Cloud Storage bucket or BigQuery dataset) of the - * entity is attached. - * @type \Google\Cloud\DataCatalog\V1\PhysicalSchema $data_format - * Format of the data. - * @type string $compression_format - * Compression format of the data, e.g., zip, gzip etc. - * @type string $project_id - * Project ID of the underlying Cloud Storage or BigQuery data. Note that - * this may not be the same project as the correspondingly Dataplex lake / - * zone / asset. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\DataplexSpec::initOnce(); - parent::__construct($data); - } - - /** - * Fully qualified resource name of an asset in Dataplex, to which the - * underlying data source (Cloud Storage bucket or BigQuery dataset) of the - * entity is attached. - * - * Generated from protobuf field string asset = 1; - * @return string - */ - public function getAsset() - { - return $this->asset; - } - - /** - * Fully qualified resource name of an asset in Dataplex, to which the - * underlying data source (Cloud Storage bucket or BigQuery dataset) of the - * entity is attached. - * - * Generated from protobuf field string asset = 1; - * @param string $var - * @return $this - */ - public function setAsset($var) - { - GPBUtil::checkString($var, True); - $this->asset = $var; - - return $this; - } - - /** - * Format of the data. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.PhysicalSchema data_format = 2; - * @return \Google\Cloud\DataCatalog\V1\PhysicalSchema|null - */ - public function getDataFormat() - { - return $this->data_format; - } - - public function hasDataFormat() - { - return isset($this->data_format); - } - - public function clearDataFormat() - { - unset($this->data_format); - } - - /** - * Format of the data. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.PhysicalSchema data_format = 2; - * @param \Google\Cloud\DataCatalog\V1\PhysicalSchema $var - * @return $this - */ - public function setDataFormat($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\PhysicalSchema::class); - $this->data_format = $var; - - return $this; - } - - /** - * Compression format of the data, e.g., zip, gzip etc. - * - * Generated from protobuf field string compression_format = 3; - * @return string - */ - public function getCompressionFormat() - { - return $this->compression_format; - } - - /** - * Compression format of the data, e.g., zip, gzip etc. - * - * Generated from protobuf field string compression_format = 3; - * @param string $var - * @return $this - */ - public function setCompressionFormat($var) - { - GPBUtil::checkString($var, True); - $this->compression_format = $var; - - return $this; - } - - /** - * Project ID of the underlying Cloud Storage or BigQuery data. Note that - * this may not be the same project as the correspondingly Dataplex lake / - * zone / asset. - * - * Generated from protobuf field string project_id = 4; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * Project ID of the underlying Cloud Storage or BigQuery data. Note that - * this may not be the same project as the correspondingly Dataplex lake / - * zone / asset. - * - * Generated from protobuf field string project_id = 4; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DataplexTableSpec.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DataplexTableSpec.php deleted file mode 100644 index 307535cce500..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DataplexTableSpec.php +++ /dev/null @@ -1,153 +0,0 @@ -google.cloud.datacatalog.v1.DataplexTableSpec - */ -class DataplexTableSpec extends \Google\Protobuf\Internal\Message -{ - /** - * List of external tables registered by Dataplex in other systems based on - * the same underlying data. - * External tables allow to query this data in those systems. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.DataplexExternalTable external_tables = 1; - */ - private $external_tables; - /** - * Common Dataplex fields. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.DataplexSpec dataplex_spec = 2; - */ - protected $dataplex_spec = null; - /** - * Indicates if the table schema is managed by the user or not. - * - * Generated from protobuf field bool user_managed = 3; - */ - protected $user_managed = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\DataCatalog\V1\DataplexExternalTable>|\Google\Protobuf\Internal\RepeatedField $external_tables - * List of external tables registered by Dataplex in other systems based on - * the same underlying data. - * External tables allow to query this data in those systems. - * @type \Google\Cloud\DataCatalog\V1\DataplexSpec $dataplex_spec - * Common Dataplex fields. - * @type bool $user_managed - * Indicates if the table schema is managed by the user or not. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\DataplexSpec::initOnce(); - parent::__construct($data); - } - - /** - * List of external tables registered by Dataplex in other systems based on - * the same underlying data. - * External tables allow to query this data in those systems. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.DataplexExternalTable external_tables = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getExternalTables() - { - return $this->external_tables; - } - - /** - * List of external tables registered by Dataplex in other systems based on - * the same underlying data. - * External tables allow to query this data in those systems. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.DataplexExternalTable external_tables = 1; - * @param array<\Google\Cloud\DataCatalog\V1\DataplexExternalTable>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setExternalTables($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DataCatalog\V1\DataplexExternalTable::class); - $this->external_tables = $arr; - - return $this; - } - - /** - * Common Dataplex fields. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.DataplexSpec dataplex_spec = 2; - * @return \Google\Cloud\DataCatalog\V1\DataplexSpec|null - */ - public function getDataplexSpec() - { - return $this->dataplex_spec; - } - - public function hasDataplexSpec() - { - return isset($this->dataplex_spec); - } - - public function clearDataplexSpec() - { - unset($this->dataplex_spec); - } - - /** - * Common Dataplex fields. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.DataplexSpec dataplex_spec = 2; - * @param \Google\Cloud\DataCatalog\V1\DataplexSpec $var - * @return $this - */ - public function setDataplexSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\DataplexSpec::class); - $this->dataplex_spec = $var; - - return $this; - } - - /** - * Indicates if the table schema is managed by the user or not. - * - * Generated from protobuf field bool user_managed = 3; - * @return bool - */ - public function getUserManaged() - { - return $this->user_managed; - } - - /** - * Indicates if the table schema is managed by the user or not. - * - * Generated from protobuf field bool user_managed = 3; - * @param bool $var - * @return $this - */ - public function setUserManaged($var) - { - GPBUtil::checkBool($var); - $this->user_managed = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DeleteEntryGroupRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DeleteEntryGroupRequest.php deleted file mode 100644 index 18b895c7bc8b..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DeleteEntryGroupRequest.php +++ /dev/null @@ -1,116 +0,0 @@ -google.cloud.datacatalog.v1.DeleteEntryGroupRequest - */ -class DeleteEntryGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the entry group to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. If true, deletes all entries in the entry group. - * - * Generated from protobuf field bool force = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $force = false; - - /** - * @param string $name Required. The name of the entry group to delete. Please see - * {@see DataCatalogClient::entryGroupName()} for help formatting this field. - * - * @return \Google\Cloud\DataCatalog\V1\DeleteEntryGroupRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the entry group to delete. - * @type bool $force - * Optional. If true, deletes all entries in the entry group. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the entry group to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the entry group to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. If true, deletes all entries in the entry group. - * - * Generated from protobuf field bool force = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getForce() - { - return $this->force; - } - - /** - * Optional. If true, deletes all entries in the entry group. - * - * Generated from protobuf field bool force = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setForce($var) - { - GPBUtil::checkBool($var); - $this->force = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DeleteEntryRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DeleteEntryRequest.php deleted file mode 100644 index 42fa737bce1e..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DeleteEntryRequest.php +++ /dev/null @@ -1,82 +0,0 @@ -google.cloud.datacatalog.v1.DeleteEntryRequest - */ -class DeleteEntryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the entry to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the entry to delete. Please see - * {@see DataCatalogClient::entryName()} for help formatting this field. - * - * @return \Google\Cloud\DataCatalog\V1\DeleteEntryRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the entry to delete. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the entry to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the entry to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DeletePolicyTagRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DeletePolicyTagRequest.php deleted file mode 100644 index bf6f2daa89c2..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DeletePolicyTagRequest.php +++ /dev/null @@ -1,88 +0,0 @@ -google.cloud.datacatalog.v1.DeletePolicyTagRequest - */ -class DeletePolicyTagRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the policy tag to delete. - * Note: All of its descendant policy tags are also deleted. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Resource name of the policy tag to delete. - * - * Note: All of its descendant policy tags are also deleted. Please see - * {@see PolicyTagManagerClient::policyTagName()} for help formatting this field. - * - * @return \Google\Cloud\DataCatalog\V1\DeletePolicyTagRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Resource name of the policy tag to delete. - * Note: All of its descendant policy tags are also deleted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Policytagmanager::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the policy tag to delete. - * Note: All of its descendant policy tags are also deleted. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Resource name of the policy tag to delete. - * Note: All of its descendant policy tags are also deleted. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DeleteTagRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DeleteTagRequest.php deleted file mode 100644 index b2313041c5e7..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DeleteTagRequest.php +++ /dev/null @@ -1,82 +0,0 @@ -google.cloud.datacatalog.v1.DeleteTagRequest - */ -class DeleteTagRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the tag to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the tag to delete. Please see - * {@see DataCatalogClient::entryName()} for help formatting this field. - * - * @return \Google\Cloud\DataCatalog\V1\DeleteTagRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the tag to delete. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the tag to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the tag to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DeleteTagTemplateFieldRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DeleteTagTemplateFieldRequest.php deleted file mode 100644 index e50e145c3d78..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DeleteTagTemplateFieldRequest.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest - */ -class DeleteTagTemplateFieldRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the tag template field to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. If true, deletes this field from any tags that use it. - * Currently, `true` is the only supported value. - * - * Generated from protobuf field bool force = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $force = false; - - /** - * @param string $name Required. The name of the tag template field to delete. Please see - * {@see DataCatalogClient::tagTemplateFieldName()} for help formatting this field. - * @param bool $force Required. If true, deletes this field from any tags that use it. - * - * Currently, `true` is the only supported value. - * - * @return \Google\Cloud\DataCatalog\V1\DeleteTagTemplateFieldRequest - * - * @experimental - */ - public static function build(string $name, bool $force): self - { - return (new self()) - ->setName($name) - ->setForce($force); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the tag template field to delete. - * @type bool $force - * Required. If true, deletes this field from any tags that use it. - * Currently, `true` is the only supported value. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the tag template field to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the tag template field to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. If true, deletes this field from any tags that use it. - * Currently, `true` is the only supported value. - * - * Generated from protobuf field bool force = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return bool - */ - public function getForce() - { - return $this->force; - } - - /** - * Required. If true, deletes this field from any tags that use it. - * Currently, `true` is the only supported value. - * - * Generated from protobuf field bool force = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param bool $var - * @return $this - */ - public function setForce($var) - { - GPBUtil::checkBool($var); - $this->force = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DeleteTagTemplateRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DeleteTagTemplateRequest.php deleted file mode 100644 index 68b359b7f6fc..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DeleteTagTemplateRequest.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.datacatalog.v1.DeleteTagTemplateRequest - */ -class DeleteTagTemplateRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the tag template to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. If true, deletes all tags that use this template. - * Currently, `true` is the only supported value. - * - * Generated from protobuf field bool force = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $force = false; - - /** - * @param string $name Required. The name of the tag template to delete. Please see - * {@see DataCatalogClient::tagTemplateName()} for help formatting this field. - * @param bool $force Required. If true, deletes all tags that use this template. - * - * Currently, `true` is the only supported value. - * - * @return \Google\Cloud\DataCatalog\V1\DeleteTagTemplateRequest - * - * @experimental - */ - public static function build(string $name, bool $force): self - { - return (new self()) - ->setName($name) - ->setForce($force); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the tag template to delete. - * @type bool $force - * Required. If true, deletes all tags that use this template. - * Currently, `true` is the only supported value. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the tag template to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the tag template to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. If true, deletes all tags that use this template. - * Currently, `true` is the only supported value. - * - * Generated from protobuf field bool force = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return bool - */ - public function getForce() - { - return $this->force; - } - - /** - * Required. If true, deletes all tags that use this template. - * Currently, `true` is the only supported value. - * - * Generated from protobuf field bool force = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param bool $var - * @return $this - */ - public function setForce($var) - { - GPBUtil::checkBool($var); - $this->force = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DeleteTaxonomyRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DeleteTaxonomyRequest.php deleted file mode 100644 index f0bcf2735ebc..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DeleteTaxonomyRequest.php +++ /dev/null @@ -1,88 +0,0 @@ -google.cloud.datacatalog.v1.DeleteTaxonomyRequest - */ -class DeleteTaxonomyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the taxonomy to delete. - * Note: All policy tags in this taxonomy are also deleted. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Resource name of the taxonomy to delete. - * - * Note: All policy tags in this taxonomy are also deleted. Please see - * {@see PolicyTagManagerClient::taxonomyName()} for help formatting this field. - * - * @return \Google\Cloud\DataCatalog\V1\DeleteTaxonomyRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Resource name of the taxonomy to delete. - * Note: All policy tags in this taxonomy are also deleted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Policytagmanager::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the taxonomy to delete. - * Note: All policy tags in this taxonomy are also deleted. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Resource name of the taxonomy to delete. - * Note: All policy tags in this taxonomy are also deleted. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DumpItem.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DumpItem.php deleted file mode 100644 index c664523acfae..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/DumpItem.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.datacatalog.v1.DumpItem - */ -class DumpItem extends \Google\Protobuf\Internal\Message -{ - protected $item; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DataCatalog\V1\TaggedEntry $tagged_entry - * Entry and its tags. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\DumpContent::initOnce(); - parent::__construct($data); - } - - /** - * Entry and its tags. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.TaggedEntry tagged_entry = 1; - * @return \Google\Cloud\DataCatalog\V1\TaggedEntry|null - */ - public function getTaggedEntry() - { - return $this->readOneof(1); - } - - public function hasTaggedEntry() - { - return $this->hasOneof(1); - } - - /** - * Entry and its tags. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.TaggedEntry tagged_entry = 1; - * @param \Google\Cloud\DataCatalog\V1\TaggedEntry $var - * @return $this - */ - public function setTaggedEntry($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\TaggedEntry::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * @return string - */ - public function getItem() - { - return $this->whichOneof("item"); - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Entry.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Entry.php deleted file mode 100644 index 56259566562b..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Entry.php +++ /dev/null @@ -1,1272 +0,0 @@ -google.cloud.datacatalog.v1.Entry - */ -class Entry extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of an entry in URL format. - * Note: The entry itself and its child resources might not be - * stored in the location specified in its name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The resource this metadata entry refers to. - * For Google Cloud Platform resources, `linked_resource` is the - * [Full Resource Name] - * (https://cloud.google.com/apis/design/resource_names#full_resource_name). - * For example, the `linked_resource` for a table resource from BigQuery is: - * `//bigquery.googleapis.com/projects/{PROJECT_ID}/datasets/{DATASET_ID}/tables/{TABLE_ID}` - * Output only when the entry is one of the types in the `EntryType` enum. - * For entries with a `user_specified_type`, this field is optional and - * defaults to an empty string. - * The resource string must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), periods (.), colons (:), slashes (/), dashes (-), - * and hashes (#). - * The maximum size is 200 bytes when encoded in UTF-8. - * - * Generated from protobuf field string linked_resource = 9; - */ - protected $linked_resource = ''; - /** - * [Fully Qualified Name - * (FQN)](https://cloud.google.com//data-catalog/docs/fully-qualified-names) - * of the resource. Set automatically for entries representing resources from - * synced systems. Settable only during creation, and read-only later. Can - * be used for search and lookup of the entries. - * - * Generated from protobuf field string fully_qualified_name = 29; - */ - protected $fully_qualified_name = ''; - /** - * Display name of an entry. - * The maximum size is 500 bytes when encoded in UTF-8. - * Default value is an empty string. - * - * Generated from protobuf field string display_name = 3; - */ - protected $display_name = ''; - /** - * Entry description that can consist of several sentences or paragraphs - * that describe entry contents. - * The description must not contain Unicode non-characters as well as C0 - * and C1 control codes except tabs (HT), new lines (LF), carriage returns - * (CR), and page breaks (FF). - * The maximum size is 2000 bytes when encoded in UTF-8. - * Default value is an empty string. - * - * Generated from protobuf field string description = 4; - */ - protected $description = ''; - /** - * Business Context of the entry. Not supported for BigQuery datasets - * - * Generated from protobuf field .google.cloud.datacatalog.v1.BusinessContext business_context = 37; - */ - protected $business_context = null; - /** - * Schema of the entry. An entry might not have any schema attached to it. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.Schema schema = 5; - */ - protected $schema = null; - /** - * Timestamps from the underlying resource, not from the Data Catalog - * entry. - * Output only when the entry has a system listed in the `IntegratedSystem` - * enum. For entries with `user_specified_system`, this field is optional - * and defaults to an empty timestamp. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.SystemTimestamps source_system_timestamps = 7; - */ - protected $source_system_timestamps = null; - /** - * Resource usage statistics. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.UsageSignal usage_signal = 13; - */ - protected $usage_signal = null; - /** - * Cloud labels attached to the entry. - * In Data Catalog, you can create and modify labels attached only to custom - * entries. Synced entries have unmodifiable labels that come from the source - * system. - * - * Generated from protobuf field map labels = 14; - */ - private $labels; - /** - * Output only. Physical location of the entry. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.DataSource data_source = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $data_source = null; - /** - * Output only. Additional information related to the entry. Private to the - * current user. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.PersonalDetails personal_details = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $personal_details = null; - protected $entry_type; - protected $system; - protected $system_spec; - protected $type_spec; - protected $spec; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name of an entry in URL format. - * Note: The entry itself and its child resources might not be - * stored in the location specified in its name. - * @type string $linked_resource - * The resource this metadata entry refers to. - * For Google Cloud Platform resources, `linked_resource` is the - * [Full Resource Name] - * (https://cloud.google.com/apis/design/resource_names#full_resource_name). - * For example, the `linked_resource` for a table resource from BigQuery is: - * `//bigquery.googleapis.com/projects/{PROJECT_ID}/datasets/{DATASET_ID}/tables/{TABLE_ID}` - * Output only when the entry is one of the types in the `EntryType` enum. - * For entries with a `user_specified_type`, this field is optional and - * defaults to an empty string. - * The resource string must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), periods (.), colons (:), slashes (/), dashes (-), - * and hashes (#). - * The maximum size is 200 bytes when encoded in UTF-8. - * @type string $fully_qualified_name - * [Fully Qualified Name - * (FQN)](https://cloud.google.com//data-catalog/docs/fully-qualified-names) - * of the resource. Set automatically for entries representing resources from - * synced systems. Settable only during creation, and read-only later. Can - * be used for search and lookup of the entries. - * @type int $type - * The type of the entry. - * For details, see [`EntryType`](#entrytype). - * @type string $user_specified_type - * Custom entry type that doesn't match any of the values allowed for input - * and listed in the `EntryType` enum. - * When creating an entry, first check the type values in the enum. - * If there are no appropriate types for the new entry, - * provide a custom value, for example, `my_special_type`. - * The `user_specified_type` string has the following limitations: - * * Is case insensitive. - * * Must begin with a letter or underscore. - * * Can only contain letters, numbers, and underscores. - * * Must be at least 1 character and at most 64 characters long. - * @type int $integrated_system - * Output only. Indicates the entry's source system that Data Catalog - * integrates with, such as BigQuery, Pub/Sub, or Dataproc Metastore. - * @type string $user_specified_system - * Indicates the entry's source system that Data Catalog doesn't - * automatically integrate with. - * The `user_specified_system` string has the following limitations: - * * Is case insensitive. - * * Must begin with a letter or underscore. - * * Can only contain letters, numbers, and underscores. - * * Must be at least 1 character and at most 64 characters long. - * @type \Google\Cloud\DataCatalog\V1\SqlDatabaseSystemSpec $sql_database_system_spec - * Specification that applies to a relational database system. Only settable - * when `user_specified_system` is equal to `SQL_DATABASE` - * @type \Google\Cloud\DataCatalog\V1\LookerSystemSpec $looker_system_spec - * Specification that applies to Looker sysstem. Only settable when - * `user_specified_system` is equal to `LOOKER` - * @type \Google\Cloud\DataCatalog\V1\CloudBigtableSystemSpec $cloud_bigtable_system_spec - * Specification that applies to Cloud Bigtable system. Only settable when - * `integrated_system` is equal to `CLOUD_BIGTABLE` - * @type \Google\Cloud\DataCatalog\V1\GcsFilesetSpec $gcs_fileset_spec - * Specification that applies to a Cloud Storage fileset. Valid only - * for entries with the `FILESET` type. - * @type \Google\Cloud\DataCatalog\V1\BigQueryTableSpec $bigquery_table_spec - * Output only. Specification that applies to a BigQuery table. Valid only - * for entries with the `TABLE` type. - * @type \Google\Cloud\DataCatalog\V1\BigQueryDateShardedSpec $bigquery_date_sharded_spec - * Output only. Specification for a group of BigQuery tables with - * the `[prefix]YYYYMMDD` name pattern. - * For more information, see [Introduction to partitioned tables] - * (https://cloud.google.com/bigquery/docs/partitioned-tables#partitioning_versus_sharding). - * @type \Google\Cloud\DataCatalog\V1\DatabaseTableSpec $database_table_spec - * Specification that applies to a table resource. Valid only - * for entries with the `TABLE` or `EXPLORE` type. - * @type \Google\Cloud\DataCatalog\V1\DataSourceConnectionSpec $data_source_connection_spec - * Specification that applies to a data source connection. Valid only - * for entries with the `DATA_SOURCE_CONNECTION` type. - * @type \Google\Cloud\DataCatalog\V1\RoutineSpec $routine_spec - * Specification that applies to a user-defined function or procedure. Valid - * only for entries with the `ROUTINE` type. - * @type \Google\Cloud\DataCatalog\V1\FilesetSpec $fileset_spec - * Specification that applies to a fileset resource. Valid only - * for entries with the `FILESET` type. - * @type \Google\Cloud\DataCatalog\V1\ServiceSpec $service_spec - * Specification that applies to a Service resource. - * @type string $display_name - * Display name of an entry. - * The maximum size is 500 bytes when encoded in UTF-8. - * Default value is an empty string. - * @type string $description - * Entry description that can consist of several sentences or paragraphs - * that describe entry contents. - * The description must not contain Unicode non-characters as well as C0 - * and C1 control codes except tabs (HT), new lines (LF), carriage returns - * (CR), and page breaks (FF). - * The maximum size is 2000 bytes when encoded in UTF-8. - * Default value is an empty string. - * @type \Google\Cloud\DataCatalog\V1\BusinessContext $business_context - * Business Context of the entry. Not supported for BigQuery datasets - * @type \Google\Cloud\DataCatalog\V1\Schema $schema - * Schema of the entry. An entry might not have any schema attached to it. - * @type \Google\Cloud\DataCatalog\V1\SystemTimestamps $source_system_timestamps - * Timestamps from the underlying resource, not from the Data Catalog - * entry. - * Output only when the entry has a system listed in the `IntegratedSystem` - * enum. For entries with `user_specified_system`, this field is optional - * and defaults to an empty timestamp. - * @type \Google\Cloud\DataCatalog\V1\UsageSignal $usage_signal - * Resource usage statistics. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Cloud labels attached to the entry. - * In Data Catalog, you can create and modify labels attached only to custom - * entries. Synced entries have unmodifiable labels that come from the source - * system. - * @type \Google\Cloud\DataCatalog\V1\DataSource $data_source - * Output only. Physical location of the entry. - * @type \Google\Cloud\DataCatalog\V1\PersonalDetails $personal_details - * Output only. Additional information related to the entry. Private to the - * current user. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name of an entry in URL format. - * Note: The entry itself and its child resources might not be - * stored in the location specified in its name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The resource name of an entry in URL format. - * Note: The entry itself and its child resources might not be - * stored in the location specified in its name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The resource this metadata entry refers to. - * For Google Cloud Platform resources, `linked_resource` is the - * [Full Resource Name] - * (https://cloud.google.com/apis/design/resource_names#full_resource_name). - * For example, the `linked_resource` for a table resource from BigQuery is: - * `//bigquery.googleapis.com/projects/{PROJECT_ID}/datasets/{DATASET_ID}/tables/{TABLE_ID}` - * Output only when the entry is one of the types in the `EntryType` enum. - * For entries with a `user_specified_type`, this field is optional and - * defaults to an empty string. - * The resource string must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), periods (.), colons (:), slashes (/), dashes (-), - * and hashes (#). - * The maximum size is 200 bytes when encoded in UTF-8. - * - * Generated from protobuf field string linked_resource = 9; - * @return string - */ - public function getLinkedResource() - { - return $this->linked_resource; - } - - /** - * The resource this metadata entry refers to. - * For Google Cloud Platform resources, `linked_resource` is the - * [Full Resource Name] - * (https://cloud.google.com/apis/design/resource_names#full_resource_name). - * For example, the `linked_resource` for a table resource from BigQuery is: - * `//bigquery.googleapis.com/projects/{PROJECT_ID}/datasets/{DATASET_ID}/tables/{TABLE_ID}` - * Output only when the entry is one of the types in the `EntryType` enum. - * For entries with a `user_specified_type`, this field is optional and - * defaults to an empty string. - * The resource string must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), periods (.), colons (:), slashes (/), dashes (-), - * and hashes (#). - * The maximum size is 200 bytes when encoded in UTF-8. - * - * Generated from protobuf field string linked_resource = 9; - * @param string $var - * @return $this - */ - public function setLinkedResource($var) - { - GPBUtil::checkString($var, True); - $this->linked_resource = $var; - - return $this; - } - - /** - * [Fully Qualified Name - * (FQN)](https://cloud.google.com//data-catalog/docs/fully-qualified-names) - * of the resource. Set automatically for entries representing resources from - * synced systems. Settable only during creation, and read-only later. Can - * be used for search and lookup of the entries. - * - * Generated from protobuf field string fully_qualified_name = 29; - * @return string - */ - public function getFullyQualifiedName() - { - return $this->fully_qualified_name; - } - - /** - * [Fully Qualified Name - * (FQN)](https://cloud.google.com//data-catalog/docs/fully-qualified-names) - * of the resource. Set automatically for entries representing resources from - * synced systems. Settable only during creation, and read-only later. Can - * be used for search and lookup of the entries. - * - * Generated from protobuf field string fully_qualified_name = 29; - * @param string $var - * @return $this - */ - public function setFullyQualifiedName($var) - { - GPBUtil::checkString($var, True); - $this->fully_qualified_name = $var; - - return $this; - } - - /** - * The type of the entry. - * For details, see [`EntryType`](#entrytype). - * - * Generated from protobuf field .google.cloud.datacatalog.v1.EntryType type = 2; - * @return int - */ - public function getType() - { - return $this->readOneof(2); - } - - public function hasType() - { - return $this->hasOneof(2); - } - - /** - * The type of the entry. - * For details, see [`EntryType`](#entrytype). - * - * Generated from protobuf field .google.cloud.datacatalog.v1.EntryType type = 2; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\DataCatalog\V1\EntryType::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Custom entry type that doesn't match any of the values allowed for input - * and listed in the `EntryType` enum. - * When creating an entry, first check the type values in the enum. - * If there are no appropriate types for the new entry, - * provide a custom value, for example, `my_special_type`. - * The `user_specified_type` string has the following limitations: - * * Is case insensitive. - * * Must begin with a letter or underscore. - * * Can only contain letters, numbers, and underscores. - * * Must be at least 1 character and at most 64 characters long. - * - * Generated from protobuf field string user_specified_type = 16; - * @return string - */ - public function getUserSpecifiedType() - { - return $this->readOneof(16); - } - - public function hasUserSpecifiedType() - { - return $this->hasOneof(16); - } - - /** - * Custom entry type that doesn't match any of the values allowed for input - * and listed in the `EntryType` enum. - * When creating an entry, first check the type values in the enum. - * If there are no appropriate types for the new entry, - * provide a custom value, for example, `my_special_type`. - * The `user_specified_type` string has the following limitations: - * * Is case insensitive. - * * Must begin with a letter or underscore. - * * Can only contain letters, numbers, and underscores. - * * Must be at least 1 character and at most 64 characters long. - * - * Generated from protobuf field string user_specified_type = 16; - * @param string $var - * @return $this - */ - public function setUserSpecifiedType($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(16, $var); - - return $this; - } - - /** - * Output only. Indicates the entry's source system that Data Catalog - * integrates with, such as BigQuery, Pub/Sub, or Dataproc Metastore. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.IntegratedSystem integrated_system = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getIntegratedSystem() - { - return $this->readOneof(17); - } - - public function hasIntegratedSystem() - { - return $this->hasOneof(17); - } - - /** - * Output only. Indicates the entry's source system that Data Catalog - * integrates with, such as BigQuery, Pub/Sub, or Dataproc Metastore. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.IntegratedSystem integrated_system = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setIntegratedSystem($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\DataCatalog\V1\IntegratedSystem::class); - $this->writeOneof(17, $var); - - return $this; - } - - /** - * Indicates the entry's source system that Data Catalog doesn't - * automatically integrate with. - * The `user_specified_system` string has the following limitations: - * * Is case insensitive. - * * Must begin with a letter or underscore. - * * Can only contain letters, numbers, and underscores. - * * Must be at least 1 character and at most 64 characters long. - * - * Generated from protobuf field string user_specified_system = 18; - * @return string - */ - public function getUserSpecifiedSystem() - { - return $this->readOneof(18); - } - - public function hasUserSpecifiedSystem() - { - return $this->hasOneof(18); - } - - /** - * Indicates the entry's source system that Data Catalog doesn't - * automatically integrate with. - * The `user_specified_system` string has the following limitations: - * * Is case insensitive. - * * Must begin with a letter or underscore. - * * Can only contain letters, numbers, and underscores. - * * Must be at least 1 character and at most 64 characters long. - * - * Generated from protobuf field string user_specified_system = 18; - * @param string $var - * @return $this - */ - public function setUserSpecifiedSystem($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(18, $var); - - return $this; - } - - /** - * Specification that applies to a relational database system. Only settable - * when `user_specified_system` is equal to `SQL_DATABASE` - * - * Generated from protobuf field .google.cloud.datacatalog.v1.SqlDatabaseSystemSpec sql_database_system_spec = 39; - * @return \Google\Cloud\DataCatalog\V1\SqlDatabaseSystemSpec|null - */ - public function getSqlDatabaseSystemSpec() - { - return $this->readOneof(39); - } - - public function hasSqlDatabaseSystemSpec() - { - return $this->hasOneof(39); - } - - /** - * Specification that applies to a relational database system. Only settable - * when `user_specified_system` is equal to `SQL_DATABASE` - * - * Generated from protobuf field .google.cloud.datacatalog.v1.SqlDatabaseSystemSpec sql_database_system_spec = 39; - * @param \Google\Cloud\DataCatalog\V1\SqlDatabaseSystemSpec $var - * @return $this - */ - public function setSqlDatabaseSystemSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\SqlDatabaseSystemSpec::class); - $this->writeOneof(39, $var); - - return $this; - } - - /** - * Specification that applies to Looker sysstem. Only settable when - * `user_specified_system` is equal to `LOOKER` - * - * Generated from protobuf field .google.cloud.datacatalog.v1.LookerSystemSpec looker_system_spec = 40; - * @return \Google\Cloud\DataCatalog\V1\LookerSystemSpec|null - */ - public function getLookerSystemSpec() - { - return $this->readOneof(40); - } - - public function hasLookerSystemSpec() - { - return $this->hasOneof(40); - } - - /** - * Specification that applies to Looker sysstem. Only settable when - * `user_specified_system` is equal to `LOOKER` - * - * Generated from protobuf field .google.cloud.datacatalog.v1.LookerSystemSpec looker_system_spec = 40; - * @param \Google\Cloud\DataCatalog\V1\LookerSystemSpec $var - * @return $this - */ - public function setLookerSystemSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\LookerSystemSpec::class); - $this->writeOneof(40, $var); - - return $this; - } - - /** - * Specification that applies to Cloud Bigtable system. Only settable when - * `integrated_system` is equal to `CLOUD_BIGTABLE` - * - * Generated from protobuf field .google.cloud.datacatalog.v1.CloudBigtableSystemSpec cloud_bigtable_system_spec = 41; - * @return \Google\Cloud\DataCatalog\V1\CloudBigtableSystemSpec|null - */ - public function getCloudBigtableSystemSpec() - { - return $this->readOneof(41); - } - - public function hasCloudBigtableSystemSpec() - { - return $this->hasOneof(41); - } - - /** - * Specification that applies to Cloud Bigtable system. Only settable when - * `integrated_system` is equal to `CLOUD_BIGTABLE` - * - * Generated from protobuf field .google.cloud.datacatalog.v1.CloudBigtableSystemSpec cloud_bigtable_system_spec = 41; - * @param \Google\Cloud\DataCatalog\V1\CloudBigtableSystemSpec $var - * @return $this - */ - public function setCloudBigtableSystemSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\CloudBigtableSystemSpec::class); - $this->writeOneof(41, $var); - - return $this; - } - - /** - * Specification that applies to a Cloud Storage fileset. Valid only - * for entries with the `FILESET` type. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.GcsFilesetSpec gcs_fileset_spec = 6; - * @return \Google\Cloud\DataCatalog\V1\GcsFilesetSpec|null - */ - public function getGcsFilesetSpec() - { - return $this->readOneof(6); - } - - public function hasGcsFilesetSpec() - { - return $this->hasOneof(6); - } - - /** - * Specification that applies to a Cloud Storage fileset. Valid only - * for entries with the `FILESET` type. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.GcsFilesetSpec gcs_fileset_spec = 6; - * @param \Google\Cloud\DataCatalog\V1\GcsFilesetSpec $var - * @return $this - */ - public function setGcsFilesetSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\GcsFilesetSpec::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Output only. Specification that applies to a BigQuery table. Valid only - * for entries with the `TABLE` type. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.BigQueryTableSpec bigquery_table_spec = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\DataCatalog\V1\BigQueryTableSpec|null - */ - public function getBigqueryTableSpec() - { - return $this->readOneof(12); - } - - public function hasBigqueryTableSpec() - { - return $this->hasOneof(12); - } - - /** - * Output only. Specification that applies to a BigQuery table. Valid only - * for entries with the `TABLE` type. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.BigQueryTableSpec bigquery_table_spec = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\DataCatalog\V1\BigQueryTableSpec $var - * @return $this - */ - public function setBigqueryTableSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\BigQueryTableSpec::class); - $this->writeOneof(12, $var); - - return $this; - } - - /** - * Output only. Specification for a group of BigQuery tables with - * the `[prefix]YYYYMMDD` name pattern. - * For more information, see [Introduction to partitioned tables] - * (https://cloud.google.com/bigquery/docs/partitioned-tables#partitioning_versus_sharding). - * - * Generated from protobuf field .google.cloud.datacatalog.v1.BigQueryDateShardedSpec bigquery_date_sharded_spec = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\DataCatalog\V1\BigQueryDateShardedSpec|null - */ - public function getBigqueryDateShardedSpec() - { - return $this->readOneof(15); - } - - public function hasBigqueryDateShardedSpec() - { - return $this->hasOneof(15); - } - - /** - * Output only. Specification for a group of BigQuery tables with - * the `[prefix]YYYYMMDD` name pattern. - * For more information, see [Introduction to partitioned tables] - * (https://cloud.google.com/bigquery/docs/partitioned-tables#partitioning_versus_sharding). - * - * Generated from protobuf field .google.cloud.datacatalog.v1.BigQueryDateShardedSpec bigquery_date_sharded_spec = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\DataCatalog\V1\BigQueryDateShardedSpec $var - * @return $this - */ - public function setBigqueryDateShardedSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\BigQueryDateShardedSpec::class); - $this->writeOneof(15, $var); - - return $this; - } - - /** - * Specification that applies to a table resource. Valid only - * for entries with the `TABLE` or `EXPLORE` type. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.DatabaseTableSpec database_table_spec = 24; - * @return \Google\Cloud\DataCatalog\V1\DatabaseTableSpec|null - */ - public function getDatabaseTableSpec() - { - return $this->readOneof(24); - } - - public function hasDatabaseTableSpec() - { - return $this->hasOneof(24); - } - - /** - * Specification that applies to a table resource. Valid only - * for entries with the `TABLE` or `EXPLORE` type. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.DatabaseTableSpec database_table_spec = 24; - * @param \Google\Cloud\DataCatalog\V1\DatabaseTableSpec $var - * @return $this - */ - public function setDatabaseTableSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\DatabaseTableSpec::class); - $this->writeOneof(24, $var); - - return $this; - } - - /** - * Specification that applies to a data source connection. Valid only - * for entries with the `DATA_SOURCE_CONNECTION` type. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.DataSourceConnectionSpec data_source_connection_spec = 27; - * @return \Google\Cloud\DataCatalog\V1\DataSourceConnectionSpec|null - */ - public function getDataSourceConnectionSpec() - { - return $this->readOneof(27); - } - - public function hasDataSourceConnectionSpec() - { - return $this->hasOneof(27); - } - - /** - * Specification that applies to a data source connection. Valid only - * for entries with the `DATA_SOURCE_CONNECTION` type. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.DataSourceConnectionSpec data_source_connection_spec = 27; - * @param \Google\Cloud\DataCatalog\V1\DataSourceConnectionSpec $var - * @return $this - */ - public function setDataSourceConnectionSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\DataSourceConnectionSpec::class); - $this->writeOneof(27, $var); - - return $this; - } - - /** - * Specification that applies to a user-defined function or procedure. Valid - * only for entries with the `ROUTINE` type. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.RoutineSpec routine_spec = 28; - * @return \Google\Cloud\DataCatalog\V1\RoutineSpec|null - */ - public function getRoutineSpec() - { - return $this->readOneof(28); - } - - public function hasRoutineSpec() - { - return $this->hasOneof(28); - } - - /** - * Specification that applies to a user-defined function or procedure. Valid - * only for entries with the `ROUTINE` type. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.RoutineSpec routine_spec = 28; - * @param \Google\Cloud\DataCatalog\V1\RoutineSpec $var - * @return $this - */ - public function setRoutineSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\RoutineSpec::class); - $this->writeOneof(28, $var); - - return $this; - } - - /** - * Specification that applies to a fileset resource. Valid only - * for entries with the `FILESET` type. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.FilesetSpec fileset_spec = 33; - * @return \Google\Cloud\DataCatalog\V1\FilesetSpec|null - */ - public function getFilesetSpec() - { - return $this->readOneof(33); - } - - public function hasFilesetSpec() - { - return $this->hasOneof(33); - } - - /** - * Specification that applies to a fileset resource. Valid only - * for entries with the `FILESET` type. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.FilesetSpec fileset_spec = 33; - * @param \Google\Cloud\DataCatalog\V1\FilesetSpec $var - * @return $this - */ - public function setFilesetSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\FilesetSpec::class); - $this->writeOneof(33, $var); - - return $this; - } - - /** - * Specification that applies to a Service resource. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.ServiceSpec service_spec = 42; - * @return \Google\Cloud\DataCatalog\V1\ServiceSpec|null - */ - public function getServiceSpec() - { - return $this->readOneof(42); - } - - public function hasServiceSpec() - { - return $this->hasOneof(42); - } - - /** - * Specification that applies to a Service resource. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.ServiceSpec service_spec = 42; - * @param \Google\Cloud\DataCatalog\V1\ServiceSpec $var - * @return $this - */ - public function setServiceSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\ServiceSpec::class); - $this->writeOneof(42, $var); - - return $this; - } - - /** - * Display name of an entry. - * The maximum size is 500 bytes when encoded in UTF-8. - * Default value is an empty string. - * - * Generated from protobuf field string display_name = 3; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Display name of an entry. - * The maximum size is 500 bytes when encoded in UTF-8. - * Default value is an empty string. - * - * Generated from protobuf field string display_name = 3; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Entry description that can consist of several sentences or paragraphs - * that describe entry contents. - * The description must not contain Unicode non-characters as well as C0 - * and C1 control codes except tabs (HT), new lines (LF), carriage returns - * (CR), and page breaks (FF). - * The maximum size is 2000 bytes when encoded in UTF-8. - * Default value is an empty string. - * - * Generated from protobuf field string description = 4; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Entry description that can consist of several sentences or paragraphs - * that describe entry contents. - * The description must not contain Unicode non-characters as well as C0 - * and C1 control codes except tabs (HT), new lines (LF), carriage returns - * (CR), and page breaks (FF). - * The maximum size is 2000 bytes when encoded in UTF-8. - * Default value is an empty string. - * - * Generated from protobuf field string description = 4; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Business Context of the entry. Not supported for BigQuery datasets - * - * Generated from protobuf field .google.cloud.datacatalog.v1.BusinessContext business_context = 37; - * @return \Google\Cloud\DataCatalog\V1\BusinessContext|null - */ - public function getBusinessContext() - { - return $this->business_context; - } - - public function hasBusinessContext() - { - return isset($this->business_context); - } - - public function clearBusinessContext() - { - unset($this->business_context); - } - - /** - * Business Context of the entry. Not supported for BigQuery datasets - * - * Generated from protobuf field .google.cloud.datacatalog.v1.BusinessContext business_context = 37; - * @param \Google\Cloud\DataCatalog\V1\BusinessContext $var - * @return $this - */ - public function setBusinessContext($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\BusinessContext::class); - $this->business_context = $var; - - return $this; - } - - /** - * Schema of the entry. An entry might not have any schema attached to it. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.Schema schema = 5; - * @return \Google\Cloud\DataCatalog\V1\Schema|null - */ - public function getSchema() - { - return $this->schema; - } - - public function hasSchema() - { - return isset($this->schema); - } - - public function clearSchema() - { - unset($this->schema); - } - - /** - * Schema of the entry. An entry might not have any schema attached to it. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.Schema schema = 5; - * @param \Google\Cloud\DataCatalog\V1\Schema $var - * @return $this - */ - public function setSchema($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\Schema::class); - $this->schema = $var; - - return $this; - } - - /** - * Timestamps from the underlying resource, not from the Data Catalog - * entry. - * Output only when the entry has a system listed in the `IntegratedSystem` - * enum. For entries with `user_specified_system`, this field is optional - * and defaults to an empty timestamp. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.SystemTimestamps source_system_timestamps = 7; - * @return \Google\Cloud\DataCatalog\V1\SystemTimestamps|null - */ - public function getSourceSystemTimestamps() - { - return $this->source_system_timestamps; - } - - public function hasSourceSystemTimestamps() - { - return isset($this->source_system_timestamps); - } - - public function clearSourceSystemTimestamps() - { - unset($this->source_system_timestamps); - } - - /** - * Timestamps from the underlying resource, not from the Data Catalog - * entry. - * Output only when the entry has a system listed in the `IntegratedSystem` - * enum. For entries with `user_specified_system`, this field is optional - * and defaults to an empty timestamp. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.SystemTimestamps source_system_timestamps = 7; - * @param \Google\Cloud\DataCatalog\V1\SystemTimestamps $var - * @return $this - */ - public function setSourceSystemTimestamps($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\SystemTimestamps::class); - $this->source_system_timestamps = $var; - - return $this; - } - - /** - * Resource usage statistics. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.UsageSignal usage_signal = 13; - * @return \Google\Cloud\DataCatalog\V1\UsageSignal|null - */ - public function getUsageSignal() - { - return $this->usage_signal; - } - - public function hasUsageSignal() - { - return isset($this->usage_signal); - } - - public function clearUsageSignal() - { - unset($this->usage_signal); - } - - /** - * Resource usage statistics. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.UsageSignal usage_signal = 13; - * @param \Google\Cloud\DataCatalog\V1\UsageSignal $var - * @return $this - */ - public function setUsageSignal($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\UsageSignal::class); - $this->usage_signal = $var; - - return $this; - } - - /** - * Cloud labels attached to the entry. - * In Data Catalog, you can create and modify labels attached only to custom - * entries. Synced entries have unmodifiable labels that come from the source - * system. - * - * Generated from protobuf field map labels = 14; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Cloud labels attached to the entry. - * In Data Catalog, you can create and modify labels attached only to custom - * entries. Synced entries have unmodifiable labels that come from the source - * system. - * - * Generated from protobuf field map labels = 14; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Output only. Physical location of the entry. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.DataSource data_source = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\DataCatalog\V1\DataSource|null - */ - public function getDataSource() - { - return $this->data_source; - } - - public function hasDataSource() - { - return isset($this->data_source); - } - - public function clearDataSource() - { - unset($this->data_source); - } - - /** - * Output only. Physical location of the entry. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.DataSource data_source = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\DataCatalog\V1\DataSource $var - * @return $this - */ - public function setDataSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\DataSource::class); - $this->data_source = $var; - - return $this; - } - - /** - * Output only. Additional information related to the entry. Private to the - * current user. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.PersonalDetails personal_details = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\DataCatalog\V1\PersonalDetails|null - */ - public function getPersonalDetails() - { - return $this->personal_details; - } - - public function hasPersonalDetails() - { - return isset($this->personal_details); - } - - public function clearPersonalDetails() - { - unset($this->personal_details); - } - - /** - * Output only. Additional information related to the entry. Private to the - * current user. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.PersonalDetails personal_details = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\DataCatalog\V1\PersonalDetails $var - * @return $this - */ - public function setPersonalDetails($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\PersonalDetails::class); - $this->personal_details = $var; - - return $this; - } - - /** - * @return string - */ - public function getEntryType() - { - return $this->whichOneof("entry_type"); - } - - /** - * @return string - */ - public function getSystem() - { - return $this->whichOneof("system"); - } - - /** - * @return string - */ - public function getSystemSpec() - { - return $this->whichOneof("system_spec"); - } - - /** - * @return string - */ - public function getTypeSpec() - { - return $this->whichOneof("type_spec"); - } - - /** - * @return string - */ - public function getSpec() - { - return $this->whichOneof("spec"); - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/EntryGroup.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/EntryGroup.php deleted file mode 100644 index 0b5f74f3273d..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/EntryGroup.php +++ /dev/null @@ -1,201 +0,0 @@ -google.cloud.datacatalog.v1.EntryGroup - */ -class EntryGroup extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the entry group in URL format. - * Note: The entry group itself and its child resources might not be - * stored in the location specified in its name. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * A short name to identify the entry group, for example, - * "analytics data - jan 2011". Default value is an empty string. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - /** - * Entry group description. Can consist of several sentences or - * paragraphs that describe the entry group contents. - * Default value is an empty string. - * - * Generated from protobuf field string description = 3; - */ - protected $description = ''; - /** - * Output only. Timestamps of the entry group. Default value is empty. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.SystemTimestamps data_catalog_timestamps = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $data_catalog_timestamps = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the entry group in URL format. - * Note: The entry group itself and its child resources might not be - * stored in the location specified in its name. - * @type string $display_name - * A short name to identify the entry group, for example, - * "analytics data - jan 2011". Default value is an empty string. - * @type string $description - * Entry group description. Can consist of several sentences or - * paragraphs that describe the entry group contents. - * Default value is an empty string. - * @type \Google\Cloud\DataCatalog\V1\SystemTimestamps $data_catalog_timestamps - * Output only. Timestamps of the entry group. Default value is empty. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the entry group in URL format. - * Note: The entry group itself and its child resources might not be - * stored in the location specified in its name. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the entry group in URL format. - * Note: The entry group itself and its child resources might not be - * stored in the location specified in its name. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * A short name to identify the entry group, for example, - * "analytics data - jan 2011". Default value is an empty string. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * A short name to identify the entry group, for example, - * "analytics data - jan 2011". Default value is an empty string. - * - * Generated from protobuf field string display_name = 2; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Entry group description. Can consist of several sentences or - * paragraphs that describe the entry group contents. - * Default value is an empty string. - * - * Generated from protobuf field string description = 3; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Entry group description. Can consist of several sentences or - * paragraphs that describe the entry group contents. - * Default value is an empty string. - * - * Generated from protobuf field string description = 3; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. Timestamps of the entry group. Default value is empty. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.SystemTimestamps data_catalog_timestamps = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\DataCatalog\V1\SystemTimestamps|null - */ - public function getDataCatalogTimestamps() - { - return $this->data_catalog_timestamps; - } - - public function hasDataCatalogTimestamps() - { - return isset($this->data_catalog_timestamps); - } - - public function clearDataCatalogTimestamps() - { - unset($this->data_catalog_timestamps); - } - - /** - * Output only. Timestamps of the entry group. Default value is empty. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.SystemTimestamps data_catalog_timestamps = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\DataCatalog\V1\SystemTimestamps $var - * @return $this - */ - public function setDataCatalogTimestamps($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\SystemTimestamps::class); - $this->data_catalog_timestamps = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/EntryOverview.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/EntryOverview.php deleted file mode 100644 index b4ff526f9098..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/EntryOverview.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.datacatalog.v1.EntryOverview - */ -class EntryOverview extends \Google\Protobuf\Internal\Message -{ - /** - * Entry overview with support for rich text. - * The overview must only contain Unicode characters, and should be - * formatted using HTML. - * The maximum length is 10 MiB as this value holds HTML descriptions - * including encoded images. The maximum length of the text without images - * is 100 KiB. - * - * Generated from protobuf field string overview = 1; - */ - protected $overview = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $overview - * Entry overview with support for rich text. - * The overview must only contain Unicode characters, and should be - * formatted using HTML. - * The maximum length is 10 MiB as this value holds HTML descriptions - * including encoded images. The maximum length of the text without images - * is 100 KiB. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * Entry overview with support for rich text. - * The overview must only contain Unicode characters, and should be - * formatted using HTML. - * The maximum length is 10 MiB as this value holds HTML descriptions - * including encoded images. The maximum length of the text without images - * is 100 KiB. - * - * Generated from protobuf field string overview = 1; - * @return string - */ - public function getOverview() - { - return $this->overview; - } - - /** - * Entry overview with support for rich text. - * The overview must only contain Unicode characters, and should be - * formatted using HTML. - * The maximum length is 10 MiB as this value holds HTML descriptions - * including encoded images. The maximum length of the text without images - * is 100 KiB. - * - * Generated from protobuf field string overview = 1; - * @param string $var - * @return $this - */ - public function setOverview($var) - { - GPBUtil::checkString($var, True); - $this->overview = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/EntryType.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/EntryType.php deleted file mode 100644 index 77a152984899..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/EntryType.php +++ /dev/null @@ -1,171 +0,0 @@ -google.cloud.datacatalog.v1.EntryType - */ -class EntryType -{ - /** - * Default unknown type. - * - * Generated from protobuf enum ENTRY_TYPE_UNSPECIFIED = 0; - */ - const ENTRY_TYPE_UNSPECIFIED = 0; - /** - * The entry type that has a GoogleSQL schema, including - * logical views. - * - * Generated from protobuf enum TABLE = 2; - */ - const TABLE = 2; - /** - * The type of models. - * For more information, see [Supported models in BigQuery - * ML](/bigquery/docs/bqml-introduction#supported_models). - * - * Generated from protobuf enum MODEL = 5; - */ - const MODEL = 5; - /** - * An entry type for streaming entries. For example, a Pub/Sub topic. - * - * Generated from protobuf enum DATA_STREAM = 3; - */ - const DATA_STREAM = 3; - /** - * An entry type for a set of files or objects. For example, a - * Cloud Storage fileset. - * - * Generated from protobuf enum FILESET = 4; - */ - const FILESET = 4; - /** - * A group of servers that work together. For example, a Kafka cluster. - * - * Generated from protobuf enum CLUSTER = 6; - */ - const CLUSTER = 6; - /** - * A database. - * - * Generated from protobuf enum DATABASE = 7; - */ - const DATABASE = 7; - /** - * Connection to a data source. For example, a BigQuery - * connection. - * - * Generated from protobuf enum DATA_SOURCE_CONNECTION = 8; - */ - const DATA_SOURCE_CONNECTION = 8; - /** - * Routine, for example, a BigQuery routine. - * - * Generated from protobuf enum ROUTINE = 9; - */ - const ROUTINE = 9; - /** - * A Dataplex lake. - * - * Generated from protobuf enum LAKE = 10; - */ - const LAKE = 10; - /** - * A Dataplex zone. - * - * Generated from protobuf enum ZONE = 11; - */ - const ZONE = 11; - /** - * A service, for example, a Dataproc Metastore service. - * - * Generated from protobuf enum SERVICE = 14; - */ - const SERVICE = 14; - /** - * Schema within a relational database. - * - * Generated from protobuf enum DATABASE_SCHEMA = 15; - */ - const DATABASE_SCHEMA = 15; - /** - * A Dashboard, for example from Looker. - * - * Generated from protobuf enum DASHBOARD = 16; - */ - const DASHBOARD = 16; - /** - * A Looker Explore. - * For more information, see [Looker Explore API] - * (https://developers.looker.com/api/explorer/4.0/methods/LookmlModel/lookml_model_explore). - * - * Generated from protobuf enum EXPLORE = 17; - */ - const EXPLORE = 17; - /** - * A Looker Look. - * For more information, see [Looker Look API] - * (https://developers.looker.com/api/explorer/4.0/methods/Look). - * - * Generated from protobuf enum LOOK = 18; - */ - const LOOK = 18; - - private static $valueToName = [ - self::ENTRY_TYPE_UNSPECIFIED => 'ENTRY_TYPE_UNSPECIFIED', - self::TABLE => 'TABLE', - self::MODEL => 'MODEL', - self::DATA_STREAM => 'DATA_STREAM', - self::FILESET => 'FILESET', - self::CLUSTER => 'CLUSTER', - self::DATABASE => 'DATABASE', - self::DATA_SOURCE_CONNECTION => 'DATA_SOURCE_CONNECTION', - self::ROUTINE => 'ROUTINE', - self::LAKE => 'LAKE', - self::ZONE => 'ZONE', - self::SERVICE => 'SERVICE', - self::DATABASE_SCHEMA => 'DATABASE_SCHEMA', - self::DASHBOARD => 'DASHBOARD', - self::EXPLORE => 'EXPLORE', - self::LOOK => 'LOOK', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ExportTaxonomiesRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ExportTaxonomiesRequest.php deleted file mode 100644 index 1bc6ad77ffb2..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ExportTaxonomiesRequest.php +++ /dev/null @@ -1,151 +0,0 @@ -google.cloud.datacatalog.v1.ExportTaxonomiesRequest - */ -class ExportTaxonomiesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the project that the exported taxonomies belong - * to. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Resource names of the taxonomies to export. - * - * Generated from protobuf field repeated string taxonomies = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - private $taxonomies; - protected $destination; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Resource name of the project that the exported taxonomies belong - * to. - * @type array|\Google\Protobuf\Internal\RepeatedField $taxonomies - * Required. Resource names of the taxonomies to export. - * @type bool $serialized_taxonomies - * Serialized export taxonomies that contain all the policy - * tags as nested protocol buffers. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Policytagmanagerserialization::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the project that the exported taxonomies belong - * to. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Resource name of the project that the exported taxonomies belong - * to. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. Resource names of the taxonomies to export. - * - * Generated from protobuf field repeated string taxonomies = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTaxonomies() - { - return $this->taxonomies; - } - - /** - * Required. Resource names of the taxonomies to export. - * - * Generated from protobuf field repeated string taxonomies = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTaxonomies($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->taxonomies = $arr; - - return $this; - } - - /** - * Serialized export taxonomies that contain all the policy - * tags as nested protocol buffers. - * - * Generated from protobuf field bool serialized_taxonomies = 3; - * @return bool - */ - public function getSerializedTaxonomies() - { - return $this->readOneof(3); - } - - public function hasSerializedTaxonomies() - { - return $this->hasOneof(3); - } - - /** - * Serialized export taxonomies that contain all the policy - * tags as nested protocol buffers. - * - * Generated from protobuf field bool serialized_taxonomies = 3; - * @param bool $var - * @return $this - */ - public function setSerializedTaxonomies($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getDestination() - { - return $this->whichOneof("destination"); - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ExportTaxonomiesResponse.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ExportTaxonomiesResponse.php deleted file mode 100644 index 95c8a255a460..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ExportTaxonomiesResponse.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.datacatalog.v1.ExportTaxonomiesResponse - */ -class ExportTaxonomiesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of taxonomies and policy tags as nested protocol buffers. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1; - */ - private $taxonomies; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\DataCatalog\V1\SerializedTaxonomy>|\Google\Protobuf\Internal\RepeatedField $taxonomies - * List of taxonomies and policy tags as nested protocol buffers. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Policytagmanagerserialization::initOnce(); - parent::__construct($data); - } - - /** - * List of taxonomies and policy tags as nested protocol buffers. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTaxonomies() - { - return $this->taxonomies; - } - - /** - * List of taxonomies and policy tags as nested protocol buffers. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1; - * @param array<\Google\Cloud\DataCatalog\V1\SerializedTaxonomy>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTaxonomies($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DataCatalog\V1\SerializedTaxonomy::class); - $this->taxonomies = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/FieldType.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/FieldType.php deleted file mode 100644 index 5d952db4056b..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/FieldType.php +++ /dev/null @@ -1,106 +0,0 @@ -google.cloud.datacatalog.v1.FieldType - */ -class FieldType extends \Google\Protobuf\Internal\Message -{ - protected $type_decl; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $primitive_type - * Primitive types, such as string, boolean, etc. - * @type \Google\Cloud\DataCatalog\V1\FieldType\EnumType $enum_type - * An enum type. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Tags::initOnce(); - parent::__construct($data); - } - - /** - * Primitive types, such as string, boolean, etc. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.FieldType.PrimitiveType primitive_type = 1; - * @return int - */ - public function getPrimitiveType() - { - return $this->readOneof(1); - } - - public function hasPrimitiveType() - { - return $this->hasOneof(1); - } - - /** - * Primitive types, such as string, boolean, etc. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.FieldType.PrimitiveType primitive_type = 1; - * @param int $var - * @return $this - */ - public function setPrimitiveType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\DataCatalog\V1\FieldType\PrimitiveType::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * An enum type. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.FieldType.EnumType enum_type = 2; - * @return \Google\Cloud\DataCatalog\V1\FieldType\EnumType|null - */ - public function getEnumType() - { - return $this->readOneof(2); - } - - public function hasEnumType() - { - return $this->hasOneof(2); - } - - /** - * An enum type. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.FieldType.EnumType enum_type = 2; - * @param \Google\Cloud\DataCatalog\V1\FieldType\EnumType $var - * @return $this - */ - public function setEnumType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\FieldType\EnumType::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getTypeDecl() - { - return $this->whichOneof("type_decl"); - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/FieldType/EnumType.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/FieldType/EnumType.php deleted file mode 100644 index 1c20119a3004..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/FieldType/EnumType.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.datacatalog.v1.FieldType.EnumType - */ -class EnumType extends \Google\Protobuf\Internal\Message -{ - /** - * The set of allowed values for this enum. - * This set must not be empty and can include up to 100 allowed values. - * The display names of the values in this set must not be empty and must - * be case-insensitively unique within this set. - * The order of items in this set is preserved. This field can be used to - * create, remove, and reorder enum values. To rename enum values, use the - * `RenameTagTemplateFieldEnumValue` method. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue allowed_values = 1; - */ - private $allowed_values; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\DataCatalog\V1\FieldType\EnumType\EnumValue>|\Google\Protobuf\Internal\RepeatedField $allowed_values - * The set of allowed values for this enum. - * This set must not be empty and can include up to 100 allowed values. - * The display names of the values in this set must not be empty and must - * be case-insensitively unique within this set. - * The order of items in this set is preserved. This field can be used to - * create, remove, and reorder enum values. To rename enum values, use the - * `RenameTagTemplateFieldEnumValue` method. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Tags::initOnce(); - parent::__construct($data); - } - - /** - * The set of allowed values for this enum. - * This set must not be empty and can include up to 100 allowed values. - * The display names of the values in this set must not be empty and must - * be case-insensitively unique within this set. - * The order of items in this set is preserved. This field can be used to - * create, remove, and reorder enum values. To rename enum values, use the - * `RenameTagTemplateFieldEnumValue` method. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue allowed_values = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAllowedValues() - { - return $this->allowed_values; - } - - /** - * The set of allowed values for this enum. - * This set must not be empty and can include up to 100 allowed values. - * The display names of the values in this set must not be empty and must - * be case-insensitively unique within this set. - * The order of items in this set is preserved. This field can be used to - * create, remove, and reorder enum values. To rename enum values, use the - * `RenameTagTemplateFieldEnumValue` method. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue allowed_values = 1; - * @param array<\Google\Cloud\DataCatalog\V1\FieldType\EnumType\EnumValue>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAllowedValues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DataCatalog\V1\FieldType\EnumType\EnumValue::class); - $this->allowed_values = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(EnumType::class, \Google\Cloud\DataCatalog\V1\FieldType_EnumType::class); - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/FieldType/EnumType/EnumValue.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/FieldType/EnumType/EnumValue.php deleted file mode 100644 index 25183374dd76..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/FieldType/EnumType/EnumValue.php +++ /dev/null @@ -1,84 +0,0 @@ -google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue - */ -class EnumValue extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The display name of the enum value. Must not be an empty - * string. - * The name must contain only Unicode letters, numbers (0-9), underscores - * (_), dashes (-), spaces ( ), and can't start or end with spaces. The - * maximum length is 200 characters. - * - * Generated from protobuf field string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $display_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * Required. The display name of the enum value. Must not be an empty - * string. - * The name must contain only Unicode letters, numbers (0-9), underscores - * (_), dashes (-), spaces ( ), and can't start or end with spaces. The - * maximum length is 200 characters. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Tags::initOnce(); - parent::__construct($data); - } - - /** - * Required. The display name of the enum value. Must not be an empty - * string. - * The name must contain only Unicode letters, numbers (0-9), underscores - * (_), dashes (-), spaces ( ), and can't start or end with spaces. The - * maximum length is 200 characters. - * - * Generated from protobuf field string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Required. The display name of the enum value. Must not be an empty - * string. - * The name must contain only Unicode letters, numbers (0-9), underscores - * (_), dashes (-), spaces ( ), and can't start or end with spaces. The - * maximum length is 200 characters. - * - * Generated from protobuf field string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(EnumValue::class, \Google\Cloud\DataCatalog\V1\FieldType_EnumType_EnumValue::class); - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/FieldType/PrimitiveType.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/FieldType/PrimitiveType.php deleted file mode 100644 index 66a488a3619c..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/FieldType/PrimitiveType.php +++ /dev/null @@ -1,83 +0,0 @@ -google.cloud.datacatalog.v1.FieldType.PrimitiveType - */ -class PrimitiveType -{ - /** - * The default invalid value for a type. - * - * Generated from protobuf enum PRIMITIVE_TYPE_UNSPECIFIED = 0; - */ - const PRIMITIVE_TYPE_UNSPECIFIED = 0; - /** - * A double precision number. - * - * Generated from protobuf enum DOUBLE = 1; - */ - const DOUBLE = 1; - /** - * An UTF-8 string. - * - * Generated from protobuf enum STRING = 2; - */ - const STRING = 2; - /** - * A boolean value. - * - * Generated from protobuf enum BOOL = 3; - */ - const BOOL = 3; - /** - * A timestamp. - * - * Generated from protobuf enum TIMESTAMP = 4; - */ - const TIMESTAMP = 4; - /** - * A Richtext description. - * - * Generated from protobuf enum RICHTEXT = 5; - */ - const RICHTEXT = 5; - - private static $valueToName = [ - self::PRIMITIVE_TYPE_UNSPECIFIED => 'PRIMITIVE_TYPE_UNSPECIFIED', - self::DOUBLE => 'DOUBLE', - self::STRING => 'STRING', - self::BOOL => 'BOOL', - self::TIMESTAMP => 'TIMESTAMP', - self::RICHTEXT => 'RICHTEXT', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PrimitiveType::class, \Google\Cloud\DataCatalog\V1\FieldType_PrimitiveType::class); - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/FilesetSpec.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/FilesetSpec.php deleted file mode 100644 index 1034f0dffb15..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/FilesetSpec.php +++ /dev/null @@ -1,82 +0,0 @@ -google.cloud.datacatalog.v1.FilesetSpec - */ -class FilesetSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Fields specific to a Dataplex fileset and present only in the Dataplex - * fileset entries. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.DataplexFilesetSpec dataplex_fileset = 1; - */ - protected $dataplex_fileset = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DataCatalog\V1\DataplexFilesetSpec $dataplex_fileset - * Fields specific to a Dataplex fileset and present only in the Dataplex - * fileset entries. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * Fields specific to a Dataplex fileset and present only in the Dataplex - * fileset entries. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.DataplexFilesetSpec dataplex_fileset = 1; - * @return \Google\Cloud\DataCatalog\V1\DataplexFilesetSpec|null - */ - public function getDataplexFileset() - { - return $this->dataplex_fileset; - } - - public function hasDataplexFileset() - { - return isset($this->dataplex_fileset); - } - - public function clearDataplexFileset() - { - unset($this->dataplex_fileset); - } - - /** - * Fields specific to a Dataplex fileset and present only in the Dataplex - * fileset entries. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.DataplexFilesetSpec dataplex_fileset = 1; - * @param \Google\Cloud\DataCatalog\V1\DataplexFilesetSpec $var - * @return $this - */ - public function setDataplexFileset($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\DataplexFilesetSpec::class); - $this->dataplex_fileset = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/GcsFileSpec.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/GcsFileSpec.php deleted file mode 100644 index 1d7a9dc320c3..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/GcsFileSpec.php +++ /dev/null @@ -1,149 +0,0 @@ -google.cloud.datacatalog.v1.GcsFileSpec - */ -class GcsFileSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Full file path. Example: `gs://bucket_name/a/b.txt`. - * - * Generated from protobuf field string file_path = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $file_path = ''; - /** - * Output only. Creation, modification, and expiration timestamps of a Cloud - * Storage file. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.SystemTimestamps gcs_timestamps = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $gcs_timestamps = null; - /** - * Output only. File size in bytes. - * - * Generated from protobuf field int64 size_bytes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $size_bytes = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $file_path - * Required. Full file path. Example: `gs://bucket_name/a/b.txt`. - * @type \Google\Cloud\DataCatalog\V1\SystemTimestamps $gcs_timestamps - * Output only. Creation, modification, and expiration timestamps of a Cloud - * Storage file. - * @type int|string $size_bytes - * Output only. File size in bytes. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\GcsFilesetSpec::initOnce(); - parent::__construct($data); - } - - /** - * Required. Full file path. Example: `gs://bucket_name/a/b.txt`. - * - * Generated from protobuf field string file_path = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getFilePath() - { - return $this->file_path; - } - - /** - * Required. Full file path. Example: `gs://bucket_name/a/b.txt`. - * - * Generated from protobuf field string file_path = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setFilePath($var) - { - GPBUtil::checkString($var, True); - $this->file_path = $var; - - return $this; - } - - /** - * Output only. Creation, modification, and expiration timestamps of a Cloud - * Storage file. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.SystemTimestamps gcs_timestamps = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\DataCatalog\V1\SystemTimestamps|null - */ - public function getGcsTimestamps() - { - return $this->gcs_timestamps; - } - - public function hasGcsTimestamps() - { - return isset($this->gcs_timestamps); - } - - public function clearGcsTimestamps() - { - unset($this->gcs_timestamps); - } - - /** - * Output only. Creation, modification, and expiration timestamps of a Cloud - * Storage file. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.SystemTimestamps gcs_timestamps = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\DataCatalog\V1\SystemTimestamps $var - * @return $this - */ - public function setGcsTimestamps($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\SystemTimestamps::class); - $this->gcs_timestamps = $var; - - return $this; - } - - /** - * Output only. File size in bytes. - * - * Generated from protobuf field int64 size_bytes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getSizeBytes() - { - return $this->size_bytes; - } - - /** - * Output only. File size in bytes. - * - * Generated from protobuf field int64 size_bytes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setSizeBytes($var) - { - GPBUtil::checkInt64($var); - $this->size_bytes = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/GcsFilesetSpec.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/GcsFilesetSpec.php deleted file mode 100644 index c124b211405d..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/GcsFilesetSpec.php +++ /dev/null @@ -1,193 +0,0 @@ -google.cloud.datacatalog.v1.GcsFilesetSpec - */ -class GcsFilesetSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Patterns to identify a set of files in Google Cloud Storage. - * For more information, see [Wildcard Names] - * (https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames). - * Note: Currently, bucket wildcards are not supported. - * Examples of valid `file_patterns`: - * * `gs://bucket_name/dir/*`: matches all files in `bucket_name/dir` - * directory - * * `gs://bucket_name/dir/**`: matches all files in `bucket_name/dir` - * and all subdirectories - * * `gs://bucket_name/file*`: matches files prefixed by `file` in - * `bucket_name` - * * `gs://bucket_name/??.txt`: matches files with two characters followed by - * `.txt` in `bucket_name` - * * `gs://bucket_name/[aeiou].txt`: matches files that contain a single - * vowel character followed by `.txt` in - * `bucket_name` - * * `gs://bucket_name/[a-m].txt`: matches files that contain `a`, `b`, ... - * or `m` followed by `.txt` in `bucket_name` - * * `gs://bucket_name/a/*/b`: matches all files in `bucket_name` that match - * the `a/*/b` pattern, such as `a/c/b`, `a/d/b` - * * `gs://another_bucket/a.txt`: matches `gs://another_bucket/a.txt` - * You can combine wildcards to match complex sets of files, for example: - * `gs://bucket_name/[a-m]??.j*g` - * - * Generated from protobuf field repeated string file_patterns = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $file_patterns; - /** - * Output only. Sample files contained in this fileset, not all files - * contained in this fileset are represented here. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.GcsFileSpec sample_gcs_file_specs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $sample_gcs_file_specs; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $file_patterns - * Required. Patterns to identify a set of files in Google Cloud Storage. - * For more information, see [Wildcard Names] - * (https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames). - * Note: Currently, bucket wildcards are not supported. - * Examples of valid `file_patterns`: - * * `gs://bucket_name/dir/*`: matches all files in `bucket_name/dir` - * directory - * * `gs://bucket_name/dir/**`: matches all files in `bucket_name/dir` - * and all subdirectories - * * `gs://bucket_name/file*`: matches files prefixed by `file` in - * `bucket_name` - * * `gs://bucket_name/??.txt`: matches files with two characters followed by - * `.txt` in `bucket_name` - * * `gs://bucket_name/[aeiou].txt`: matches files that contain a single - * vowel character followed by `.txt` in - * `bucket_name` - * * `gs://bucket_name/[a-m].txt`: matches files that contain `a`, `b`, ... - * or `m` followed by `.txt` in `bucket_name` - * * `gs://bucket_name/a/*/b`: matches all files in `bucket_name` that match - * the `a/*/b` pattern, such as `a/c/b`, `a/d/b` - * * `gs://another_bucket/a.txt`: matches `gs://another_bucket/a.txt` - * You can combine wildcards to match complex sets of files, for example: - * `gs://bucket_name/[a-m]??.j*g` - * @type array<\Google\Cloud\DataCatalog\V1\GcsFileSpec>|\Google\Protobuf\Internal\RepeatedField $sample_gcs_file_specs - * Output only. Sample files contained in this fileset, not all files - * contained in this fileset are represented here. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\GcsFilesetSpec::initOnce(); - parent::__construct($data); - } - - /** - * Required. Patterns to identify a set of files in Google Cloud Storage. - * For more information, see [Wildcard Names] - * (https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames). - * Note: Currently, bucket wildcards are not supported. - * Examples of valid `file_patterns`: - * * `gs://bucket_name/dir/*`: matches all files in `bucket_name/dir` - * directory - * * `gs://bucket_name/dir/**`: matches all files in `bucket_name/dir` - * and all subdirectories - * * `gs://bucket_name/file*`: matches files prefixed by `file` in - * `bucket_name` - * * `gs://bucket_name/??.txt`: matches files with two characters followed by - * `.txt` in `bucket_name` - * * `gs://bucket_name/[aeiou].txt`: matches files that contain a single - * vowel character followed by `.txt` in - * `bucket_name` - * * `gs://bucket_name/[a-m].txt`: matches files that contain `a`, `b`, ... - * or `m` followed by `.txt` in `bucket_name` - * * `gs://bucket_name/a/*/b`: matches all files in `bucket_name` that match - * the `a/*/b` pattern, such as `a/c/b`, `a/d/b` - * * `gs://another_bucket/a.txt`: matches `gs://another_bucket/a.txt` - * You can combine wildcards to match complex sets of files, for example: - * `gs://bucket_name/[a-m]??.j*g` - * - * Generated from protobuf field repeated string file_patterns = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFilePatterns() - { - return $this->file_patterns; - } - - /** - * Required. Patterns to identify a set of files in Google Cloud Storage. - * For more information, see [Wildcard Names] - * (https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames). - * Note: Currently, bucket wildcards are not supported. - * Examples of valid `file_patterns`: - * * `gs://bucket_name/dir/*`: matches all files in `bucket_name/dir` - * directory - * * `gs://bucket_name/dir/**`: matches all files in `bucket_name/dir` - * and all subdirectories - * * `gs://bucket_name/file*`: matches files prefixed by `file` in - * `bucket_name` - * * `gs://bucket_name/??.txt`: matches files with two characters followed by - * `.txt` in `bucket_name` - * * `gs://bucket_name/[aeiou].txt`: matches files that contain a single - * vowel character followed by `.txt` in - * `bucket_name` - * * `gs://bucket_name/[a-m].txt`: matches files that contain `a`, `b`, ... - * or `m` followed by `.txt` in `bucket_name` - * * `gs://bucket_name/a/*/b`: matches all files in `bucket_name` that match - * the `a/*/b` pattern, such as `a/c/b`, `a/d/b` - * * `gs://another_bucket/a.txt`: matches `gs://another_bucket/a.txt` - * You can combine wildcards to match complex sets of files, for example: - * `gs://bucket_name/[a-m]??.j*g` - * - * Generated from protobuf field repeated string file_patterns = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFilePatterns($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->file_patterns = $arr; - - return $this; - } - - /** - * Output only. Sample files contained in this fileset, not all files - * contained in this fileset are represented here. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.GcsFileSpec sample_gcs_file_specs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSampleGcsFileSpecs() - { - return $this->sample_gcs_file_specs; - } - - /** - * Output only. Sample files contained in this fileset, not all files - * contained in this fileset are represented here. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.GcsFileSpec sample_gcs_file_specs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\DataCatalog\V1\GcsFileSpec>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSampleGcsFileSpecs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DataCatalog\V1\GcsFileSpec::class); - $this->sample_gcs_file_specs = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/GetEntryGroupRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/GetEntryGroupRequest.php deleted file mode 100644 index 76b61e38e9bd..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/GetEntryGroupRequest.php +++ /dev/null @@ -1,142 +0,0 @@ -google.cloud.datacatalog.v1.GetEntryGroupRequest - */ -class GetEntryGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the entry group to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The fields to return. If empty or omitted, all fields are returned. - * - * Generated from protobuf field .google.protobuf.FieldMask read_mask = 2; - */ - protected $read_mask = null; - - /** - * @param string $name Required. The name of the entry group to get. Please see - * {@see DataCatalogClient::entryGroupName()} for help formatting this field. - * - * @return \Google\Cloud\DataCatalog\V1\GetEntryGroupRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * @param string $name Required. The name of the entry group to get. Please see - * {@see DataCatalogClient::entryGroupName()} for help formatting this field. - * @param \Google\Protobuf\FieldMask $readMask The fields to return. If empty or omitted, all fields are returned. - * - * @return \Google\Cloud\DataCatalog\V1\GetEntryGroupRequest - * - * @experimental - */ - public static function buildFromNameReadMask(string $name, \Google\Protobuf\FieldMask $readMask): self - { - return (new self()) - ->setName($name) - ->setReadMask($readMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the entry group to get. - * @type \Google\Protobuf\FieldMask $read_mask - * The fields to return. If empty or omitted, all fields are returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the entry group to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the entry group to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The fields to return. If empty or omitted, all fields are returned. - * - * Generated from protobuf field .google.protobuf.FieldMask read_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getReadMask() - { - return $this->read_mask; - } - - public function hasReadMask() - { - return isset($this->read_mask); - } - - public function clearReadMask() - { - unset($this->read_mask); - } - - /** - * The fields to return. If empty or omitted, all fields are returned. - * - * Generated from protobuf field .google.protobuf.FieldMask read_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setReadMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->read_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/GetEntryRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/GetEntryRequest.php deleted file mode 100644 index d75c330de5f0..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/GetEntryRequest.php +++ /dev/null @@ -1,82 +0,0 @@ -google.cloud.datacatalog.v1.GetEntryRequest - */ -class GetEntryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the entry to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the entry to get. Please see - * {@see DataCatalogClient::entryName()} for help formatting this field. - * - * @return \Google\Cloud\DataCatalog\V1\GetEntryRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the entry to get. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the entry to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the entry to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/GetPolicyTagRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/GetPolicyTagRequest.php deleted file mode 100644 index 69deebd11459..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/GetPolicyTagRequest.php +++ /dev/null @@ -1,82 +0,0 @@ -google.cloud.datacatalog.v1.GetPolicyTagRequest - */ -class GetPolicyTagRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the policy tag. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Resource name of the policy tag. Please see - * {@see PolicyTagManagerClient::policyTagName()} for help formatting this field. - * - * @return \Google\Cloud\DataCatalog\V1\GetPolicyTagRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Resource name of the policy tag. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Policytagmanager::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the policy tag. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Resource name of the policy tag. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/GetTagTemplateRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/GetTagTemplateRequest.php deleted file mode 100644 index 2abfb6facd24..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/GetTagTemplateRequest.php +++ /dev/null @@ -1,82 +0,0 @@ -google.cloud.datacatalog.v1.GetTagTemplateRequest - */ -class GetTagTemplateRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the tag template to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the tag template to get. Please see - * {@see DataCatalogClient::tagTemplateName()} for help formatting this field. - * - * @return \Google\Cloud\DataCatalog\V1\GetTagTemplateRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the tag template to get. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the tag template to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the tag template to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/GetTaxonomyRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/GetTaxonomyRequest.php deleted file mode 100644 index 6efa888ac7b1..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/GetTaxonomyRequest.php +++ /dev/null @@ -1,82 +0,0 @@ -google.cloud.datacatalog.v1.GetTaxonomyRequest - */ -class GetTaxonomyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the taxonomy to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Resource name of the taxonomy to get. Please see - * {@see PolicyTagManagerClient::taxonomyName()} for help formatting this field. - * - * @return \Google\Cloud\DataCatalog\V1\GetTaxonomyRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Resource name of the taxonomy to get. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Policytagmanager::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the taxonomy to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Resource name of the taxonomy to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ImportEntriesMetadata.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ImportEntriesMetadata.php deleted file mode 100644 index d5afa31cf075..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ImportEntriesMetadata.php +++ /dev/null @@ -1,115 +0,0 @@ -google.cloud.datacatalog.v1.ImportEntriesMetadata - */ -class ImportEntriesMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * State of the import operation. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.ImportEntriesMetadata.ImportState state = 1; - */ - protected $state = 0; - /** - * Partial errors that are encountered during the ImportEntries operation. - * There is no guarantee that all the encountered errors are reported. - * However, if no errors are reported, it means that no errors were - * encountered. - * - * Generated from protobuf field repeated .google.rpc.Status errors = 2; - */ - private $errors; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * State of the import operation. - * @type array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $errors - * Partial errors that are encountered during the ImportEntries operation. - * There is no guarantee that all the encountered errors are reported. - * However, if no errors are reported, it means that no errors were - * encountered. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * State of the import operation. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.ImportEntriesMetadata.ImportState state = 1; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * State of the import operation. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.ImportEntriesMetadata.ImportState state = 1; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\DataCatalog\V1\ImportEntriesMetadata\ImportState::class); - $this->state = $var; - - return $this; - } - - /** - * Partial errors that are encountered during the ImportEntries operation. - * There is no guarantee that all the encountered errors are reported. - * However, if no errors are reported, it means that no errors were - * encountered. - * - * Generated from protobuf field repeated .google.rpc.Status errors = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getErrors() - { - return $this->errors; - } - - /** - * Partial errors that are encountered during the ImportEntries operation. - * There is no guarantee that all the encountered errors are reported. - * However, if no errors are reported, it means that no errors were - * encountered. - * - * Generated from protobuf field repeated .google.rpc.Status errors = 2; - * @param array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setErrors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Status::class); - $this->errors = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ImportEntriesMetadata/ImportState.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ImportEntriesMetadata/ImportState.php deleted file mode 100644 index 00f1fae63c91..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ImportEntriesMetadata/ImportState.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.datacatalog.v1.ImportEntriesMetadata.ImportState - */ -class ImportState -{ - /** - * Default value. This value is unused. - * - * Generated from protobuf enum IMPORT_STATE_UNSPECIFIED = 0; - */ - const IMPORT_STATE_UNSPECIFIED = 0; - /** - * The dump with entries has been queued for import. - * - * Generated from protobuf enum IMPORT_QUEUED = 1; - */ - const IMPORT_QUEUED = 1; - /** - * The import of entries is in progress. - * - * Generated from protobuf enum IMPORT_IN_PROGRESS = 2; - */ - const IMPORT_IN_PROGRESS = 2; - /** - * The import of entries has been finished. - * - * Generated from protobuf enum IMPORT_DONE = 3; - */ - const IMPORT_DONE = 3; - /** - * The import of entries has been abandoned in favor of a newer request. - * - * Generated from protobuf enum IMPORT_OBSOLETE = 4; - */ - const IMPORT_OBSOLETE = 4; - - private static $valueToName = [ - self::IMPORT_STATE_UNSPECIFIED => 'IMPORT_STATE_UNSPECIFIED', - self::IMPORT_QUEUED => 'IMPORT_QUEUED', - self::IMPORT_IN_PROGRESS => 'IMPORT_IN_PROGRESS', - self::IMPORT_DONE => 'IMPORT_DONE', - self::IMPORT_OBSOLETE => 'IMPORT_OBSOLETE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ImportState::class, \Google\Cloud\DataCatalog\V1\ImportEntriesMetadata_ImportState::class); - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ImportEntriesRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ImportEntriesRequest.php deleted file mode 100644 index fa7fc355ef12..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ImportEntriesRequest.php +++ /dev/null @@ -1,149 +0,0 @@ -google.cloud.datacatalog.v1.ImportEntriesRequest - */ -class ImportEntriesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Target entry group for ingested entries. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. (Optional) Dataplex task job id, if specified will be used as - * part of ImportEntries LRO ID - * - * Generated from protobuf field string job_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $job_id = ''; - protected $source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Target entry group for ingested entries. - * @type string $gcs_bucket_path - * Path to a Cloud Storage bucket that contains a dump ready for ingestion. - * @type string $job_id - * Optional. (Optional) Dataplex task job id, if specified will be used as - * part of ImportEntries LRO ID - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * Required. Target entry group for ingested entries. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Target entry group for ingested entries. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Path to a Cloud Storage bucket that contains a dump ready for ingestion. - * - * Generated from protobuf field string gcs_bucket_path = 2; - * @return string - */ - public function getGcsBucketPath() - { - return $this->readOneof(2); - } - - public function hasGcsBucketPath() - { - return $this->hasOneof(2); - } - - /** - * Path to a Cloud Storage bucket that contains a dump ready for ingestion. - * - * Generated from protobuf field string gcs_bucket_path = 2; - * @param string $var - * @return $this - */ - public function setGcsBucketPath($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Optional. (Optional) Dataplex task job id, if specified will be used as - * part of ImportEntries LRO ID - * - * Generated from protobuf field string job_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getJobId() - { - return $this->job_id; - } - - /** - * Optional. (Optional) Dataplex task job id, if specified will be used as - * part of ImportEntries LRO ID - * - * Generated from protobuf field string job_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setJobId($var) - { - GPBUtil::checkString($var, True); - $this->job_id = $var; - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ImportEntriesResponse.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ImportEntriesResponse.php deleted file mode 100644 index 01f193e90eef..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ImportEntriesResponse.php +++ /dev/null @@ -1,127 +0,0 @@ -google.cloud.datacatalog.v1.ImportEntriesResponse - */ -class ImportEntriesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Cumulative number of entries created and entries updated as a result of - * import operation. - * - * Generated from protobuf field optional int64 upserted_entries_count = 5; - */ - protected $upserted_entries_count = null; - /** - * Number of entries deleted as a result of import operation. - * - * Generated from protobuf field optional int64 deleted_entries_count = 6; - */ - protected $deleted_entries_count = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $upserted_entries_count - * Cumulative number of entries created and entries updated as a result of - * import operation. - * @type int|string $deleted_entries_count - * Number of entries deleted as a result of import operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * Cumulative number of entries created and entries updated as a result of - * import operation. - * - * Generated from protobuf field optional int64 upserted_entries_count = 5; - * @return int|string - */ - public function getUpsertedEntriesCount() - { - return isset($this->upserted_entries_count) ? $this->upserted_entries_count : 0; - } - - public function hasUpsertedEntriesCount() - { - return isset($this->upserted_entries_count); - } - - public function clearUpsertedEntriesCount() - { - unset($this->upserted_entries_count); - } - - /** - * Cumulative number of entries created and entries updated as a result of - * import operation. - * - * Generated from protobuf field optional int64 upserted_entries_count = 5; - * @param int|string $var - * @return $this - */ - public function setUpsertedEntriesCount($var) - { - GPBUtil::checkInt64($var); - $this->upserted_entries_count = $var; - - return $this; - } - - /** - * Number of entries deleted as a result of import operation. - * - * Generated from protobuf field optional int64 deleted_entries_count = 6; - * @return int|string - */ - public function getDeletedEntriesCount() - { - return isset($this->deleted_entries_count) ? $this->deleted_entries_count : 0; - } - - public function hasDeletedEntriesCount() - { - return isset($this->deleted_entries_count); - } - - public function clearDeletedEntriesCount() - { - unset($this->deleted_entries_count); - } - - /** - * Number of entries deleted as a result of import operation. - * - * Generated from protobuf field optional int64 deleted_entries_count = 6; - * @param int|string $var - * @return $this - */ - public function setDeletedEntriesCount($var) - { - GPBUtil::checkInt64($var); - $this->deleted_entries_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ImportTaxonomiesRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ImportTaxonomiesRequest.php deleted file mode 100644 index f725b621eb8c..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ImportTaxonomiesRequest.php +++ /dev/null @@ -1,147 +0,0 @@ -google.cloud.datacatalog.v1.ImportTaxonomiesRequest - */ -class ImportTaxonomiesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of project that the imported taxonomies will belong - * to. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - protected $source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Resource name of project that the imported taxonomies will belong - * to. - * @type \Google\Cloud\DataCatalog\V1\InlineSource $inline_source - * Inline source taxonomy to import. - * @type \Google\Cloud\DataCatalog\V1\CrossRegionalSource $cross_regional_source - * Cross-regional source taxonomy to import. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Policytagmanagerserialization::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of project that the imported taxonomies will belong - * to. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Resource name of project that the imported taxonomies will belong - * to. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Inline source taxonomy to import. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.InlineSource inline_source = 2; - * @return \Google\Cloud\DataCatalog\V1\InlineSource|null - */ - public function getInlineSource() - { - return $this->readOneof(2); - } - - public function hasInlineSource() - { - return $this->hasOneof(2); - } - - /** - * Inline source taxonomy to import. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.InlineSource inline_source = 2; - * @param \Google\Cloud\DataCatalog\V1\InlineSource $var - * @return $this - */ - public function setInlineSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\InlineSource::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Cross-regional source taxonomy to import. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.CrossRegionalSource cross_regional_source = 3; - * @return \Google\Cloud\DataCatalog\V1\CrossRegionalSource|null - */ - public function getCrossRegionalSource() - { - return $this->readOneof(3); - } - - public function hasCrossRegionalSource() - { - return $this->hasOneof(3); - } - - /** - * Cross-regional source taxonomy to import. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.CrossRegionalSource cross_regional_source = 3; - * @param \Google\Cloud\DataCatalog\V1\CrossRegionalSource $var - * @return $this - */ - public function setCrossRegionalSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\CrossRegionalSource::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ImportTaxonomiesResponse.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ImportTaxonomiesResponse.php deleted file mode 100644 index 7035fcae827c..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ImportTaxonomiesResponse.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.datacatalog.v1.ImportTaxonomiesResponse - */ -class ImportTaxonomiesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Imported taxonomies. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; - */ - private $taxonomies; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\DataCatalog\V1\Taxonomy>|\Google\Protobuf\Internal\RepeatedField $taxonomies - * Imported taxonomies. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Policytagmanagerserialization::initOnce(); - parent::__construct($data); - } - - /** - * Imported taxonomies. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTaxonomies() - { - return $this->taxonomies; - } - - /** - * Imported taxonomies. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; - * @param array<\Google\Cloud\DataCatalog\V1\Taxonomy>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTaxonomies($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DataCatalog\V1\Taxonomy::class); - $this->taxonomies = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/InlineSource.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/InlineSource.php deleted file mode 100644 index 10b938fcf9fd..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/InlineSource.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.datacatalog.v1.InlineSource - */ -class InlineSource extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Taxonomies to import. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $taxonomies; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\DataCatalog\V1\SerializedTaxonomy>|\Google\Protobuf\Internal\RepeatedField $taxonomies - * Required. Taxonomies to import. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Policytagmanagerserialization::initOnce(); - parent::__construct($data); - } - - /** - * Required. Taxonomies to import. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTaxonomies() - { - return $this->taxonomies; - } - - /** - * Required. Taxonomies to import. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\DataCatalog\V1\SerializedTaxonomy>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTaxonomies($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DataCatalog\V1\SerializedTaxonomy::class); - $this->taxonomies = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/IntegratedSystem.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/IntegratedSystem.php deleted file mode 100644 index 904268fbeca7..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/IntegratedSystem.php +++ /dev/null @@ -1,103 +0,0 @@ -google.cloud.datacatalog.v1.IntegratedSystem - */ -class IntegratedSystem -{ - /** - * Default unknown system. - * - * Generated from protobuf enum INTEGRATED_SYSTEM_UNSPECIFIED = 0; - */ - const INTEGRATED_SYSTEM_UNSPECIFIED = 0; - /** - * BigQuery. - * - * Generated from protobuf enum BIGQUERY = 1; - */ - const BIGQUERY = 1; - /** - * Cloud Pub/Sub. - * - * Generated from protobuf enum CLOUD_PUBSUB = 2; - */ - const CLOUD_PUBSUB = 2; - /** - * Dataproc Metastore. - * - * Generated from protobuf enum DATAPROC_METASTORE = 3; - */ - const DATAPROC_METASTORE = 3; - /** - * Dataplex. - * - * Generated from protobuf enum DATAPLEX = 4; - */ - const DATAPLEX = 4; - /** - * Cloud Spanner - * - * Generated from protobuf enum CLOUD_SPANNER = 6; - */ - const CLOUD_SPANNER = 6; - /** - * Cloud Bigtable - * - * Generated from protobuf enum CLOUD_BIGTABLE = 7; - */ - const CLOUD_BIGTABLE = 7; - /** - * Cloud Sql - * - * Generated from protobuf enum CLOUD_SQL = 8; - */ - const CLOUD_SQL = 8; - /** - * Looker - * - * Generated from protobuf enum LOOKER = 9; - */ - const LOOKER = 9; - - private static $valueToName = [ - self::INTEGRATED_SYSTEM_UNSPECIFIED => 'INTEGRATED_SYSTEM_UNSPECIFIED', - self::BIGQUERY => 'BIGQUERY', - self::CLOUD_PUBSUB => 'CLOUD_PUBSUB', - self::DATAPROC_METASTORE => 'DATAPROC_METASTORE', - self::DATAPLEX => 'DATAPLEX', - self::CLOUD_SPANNER => 'CLOUD_SPANNER', - self::CLOUD_BIGTABLE => 'CLOUD_BIGTABLE', - self::CLOUD_SQL => 'CLOUD_SQL', - self::LOOKER => 'LOOKER', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListEntriesRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListEntriesRequest.php deleted file mode 100644 index 40e55423d130..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListEntriesRequest.php +++ /dev/null @@ -1,220 +0,0 @@ -google.cloud.datacatalog.v1.ListEntriesRequest - */ -class ListEntriesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the entry group that contains the entries to list. - * Can be provided in URL format. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return. Default is 10. Maximum limit is - * 1000. Throws an invalid argument if `page_size` is more than 1000. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * Pagination token that specifies the next page to return. If empty, the - * first page is returned. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * The fields to return for each entry. If empty or omitted, all - * fields are returned. - * For example, to return a list of entries with only the `name` field, - * set `read_mask` to only one path with the `name` value. - * - * Generated from protobuf field .google.protobuf.FieldMask read_mask = 4; - */ - protected $read_mask = null; - - /** - * @param string $parent Required. The name of the entry group that contains the entries to list. - * - * Can be provided in URL format. Please see - * {@see DataCatalogClient::entryGroupName()} for help formatting this field. - * - * @return \Google\Cloud\DataCatalog\V1\ListEntriesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the entry group that contains the entries to list. - * Can be provided in URL format. - * @type int $page_size - * The maximum number of items to return. Default is 10. Maximum limit is - * 1000. Throws an invalid argument if `page_size` is more than 1000. - * @type string $page_token - * Pagination token that specifies the next page to return. If empty, the - * first page is returned. - * @type \Google\Protobuf\FieldMask $read_mask - * The fields to return for each entry. If empty or omitted, all - * fields are returned. - * For example, to return a list of entries with only the `name` field, - * set `read_mask` to only one path with the `name` value. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the entry group that contains the entries to list. - * Can be provided in URL format. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The name of the entry group that contains the entries to list. - * Can be provided in URL format. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of items to return. Default is 10. Maximum limit is - * 1000. Throws an invalid argument if `page_size` is more than 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items to return. Default is 10. Maximum limit is - * 1000. Throws an invalid argument if `page_size` is more than 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Pagination token that specifies the next page to return. If empty, the - * first page is returned. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Pagination token that specifies the next page to return. If empty, the - * first page is returned. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * The fields to return for each entry. If empty or omitted, all - * fields are returned. - * For example, to return a list of entries with only the `name` field, - * set `read_mask` to only one path with the `name` value. - * - * Generated from protobuf field .google.protobuf.FieldMask read_mask = 4; - * @return \Google\Protobuf\FieldMask|null - */ - public function getReadMask() - { - return $this->read_mask; - } - - public function hasReadMask() - { - return isset($this->read_mask); - } - - public function clearReadMask() - { - unset($this->read_mask); - } - - /** - * The fields to return for each entry. If empty or omitted, all - * fields are returned. - * For example, to return a list of entries with only the `name` field, - * set `read_mask` to only one path with the `name` value. - * - * Generated from protobuf field .google.protobuf.FieldMask read_mask = 4; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setReadMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->read_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListEntriesResponse.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListEntriesResponse.php deleted file mode 100644 index 095ade948b0a..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListEntriesResponse.php +++ /dev/null @@ -1,106 +0,0 @@ -google.cloud.datacatalog.v1.ListEntriesResponse - */ -class ListEntriesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Entry details. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Entry entries = 1; - */ - private $entries; - /** - * Pagination token of the next results page. Empty if there are no more items - * in results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\DataCatalog\V1\Entry>|\Google\Protobuf\Internal\RepeatedField $entries - * Entry details. - * @type string $next_page_token - * Pagination token of the next results page. Empty if there are no more items - * in results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * Entry details. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Entry entries = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntries() - { - return $this->entries; - } - - /** - * Entry details. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Entry entries = 1; - * @param array<\Google\Cloud\DataCatalog\V1\Entry>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntries($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DataCatalog\V1\Entry::class); - $this->entries = $arr; - - return $this; - } - - /** - * Pagination token of the next results page. Empty if there are no more items - * in results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Pagination token of the next results page. Empty if there are no more items - * in results. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListEntryGroupsRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListEntryGroupsRequest.php deleted file mode 100644 index 5aeb672daa93..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListEntryGroupsRequest.php +++ /dev/null @@ -1,168 +0,0 @@ -google.cloud.datacatalog.v1.ListEntryGroupsRequest - */ -class ListEntryGroupsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the location that contains the entry groups to list. - * Can be provided as a URL. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of items to return. - * Default is 10. Maximum limit is 1000. - * Throws an invalid argument if `page_size` is greater than 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. Pagination token that specifies the next page to return. - * If empty, returns the first page. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The name of the location that contains the entry groups to list. - * - * Can be provided as a URL. Please see - * {@see DataCatalogClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\DataCatalog\V1\ListEntryGroupsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the location that contains the entry groups to list. - * Can be provided as a URL. - * @type int $page_size - * Optional. The maximum number of items to return. - * Default is 10. Maximum limit is 1000. - * Throws an invalid argument if `page_size` is greater than 1000. - * @type string $page_token - * Optional. Pagination token that specifies the next page to return. - * If empty, returns the first page. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the location that contains the entry groups to list. - * Can be provided as a URL. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The name of the location that contains the entry groups to list. - * Can be provided as a URL. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The maximum number of items to return. - * Default is 10. Maximum limit is 1000. - * Throws an invalid argument if `page_size` is greater than 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of items to return. - * Default is 10. Maximum limit is 1000. - * Throws an invalid argument if `page_size` is greater than 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. Pagination token that specifies the next page to return. - * If empty, returns the first page. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. Pagination token that specifies the next page to return. - * If empty, returns the first page. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListEntryGroupsResponse.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListEntryGroupsResponse.php deleted file mode 100644 index 01ce90d13e57..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListEntryGroupsResponse.php +++ /dev/null @@ -1,106 +0,0 @@ -google.cloud.datacatalog.v1.ListEntryGroupsResponse - */ -class ListEntryGroupsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Entry group details. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.EntryGroup entry_groups = 1; - */ - private $entry_groups; - /** - * Pagination token to specify in the next call to retrieve the next page of - * results. Empty if there are no more items. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\DataCatalog\V1\EntryGroup>|\Google\Protobuf\Internal\RepeatedField $entry_groups - * Entry group details. - * @type string $next_page_token - * Pagination token to specify in the next call to retrieve the next page of - * results. Empty if there are no more items. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * Entry group details. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.EntryGroup entry_groups = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntryGroups() - { - return $this->entry_groups; - } - - /** - * Entry group details. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.EntryGroup entry_groups = 1; - * @param array<\Google\Cloud\DataCatalog\V1\EntryGroup>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntryGroups($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DataCatalog\V1\EntryGroup::class); - $this->entry_groups = $arr; - - return $this; - } - - /** - * Pagination token to specify in the next call to retrieve the next page of - * results. Empty if there are no more items. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Pagination token to specify in the next call to retrieve the next page of - * results. Empty if there are no more items. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListPolicyTagsRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListPolicyTagsRequest.php deleted file mode 100644 index 0f1f7cbcfd82..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListPolicyTagsRequest.php +++ /dev/null @@ -1,166 +0,0 @@ -google.cloud.datacatalog.v1.ListPolicyTagsRequest - */ -class ListPolicyTagsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the taxonomy to list the policy tags of. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return. Must be a value between 1 and 1000 - * inclusively. - * If not set, defaults to 50. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The pagination token of the next results page. If not set, returns the - * first page. - * The token is returned in the response to a previous list request. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. Resource name of the taxonomy to list the policy tags of. Please see - * {@see PolicyTagManagerClient::taxonomyName()} for help formatting this field. - * - * @return \Google\Cloud\DataCatalog\V1\ListPolicyTagsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Resource name of the taxonomy to list the policy tags of. - * @type int $page_size - * The maximum number of items to return. Must be a value between 1 and 1000 - * inclusively. - * If not set, defaults to 50. - * @type string $page_token - * The pagination token of the next results page. If not set, returns the - * first page. - * The token is returned in the response to a previous list request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Policytagmanager::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the taxonomy to list the policy tags of. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Resource name of the taxonomy to list the policy tags of. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of items to return. Must be a value between 1 and 1000 - * inclusively. - * If not set, defaults to 50. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items to return. Must be a value between 1 and 1000 - * inclusively. - * If not set, defaults to 50. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The pagination token of the next results page. If not set, returns the - * first page. - * The token is returned in the response to a previous list request. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The pagination token of the next results page. If not set, returns the - * first page. - * The token is returned in the response to a previous list request. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListPolicyTagsResponse.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListPolicyTagsResponse.php deleted file mode 100644 index 71ccac60ef68..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListPolicyTagsResponse.php +++ /dev/null @@ -1,106 +0,0 @@ -google.cloud.datacatalog.v1.ListPolicyTagsResponse - */ -class ListPolicyTagsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The policy tags that belong to the taxonomy. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.PolicyTag policy_tags = 1; - */ - private $policy_tags; - /** - * Pagination token of the next results page. Empty if there are no - * more results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\DataCatalog\V1\PolicyTag>|\Google\Protobuf\Internal\RepeatedField $policy_tags - * The policy tags that belong to the taxonomy. - * @type string $next_page_token - * Pagination token of the next results page. Empty if there are no - * more results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Policytagmanager::initOnce(); - parent::__construct($data); - } - - /** - * The policy tags that belong to the taxonomy. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.PolicyTag policy_tags = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPolicyTags() - { - return $this->policy_tags; - } - - /** - * The policy tags that belong to the taxonomy. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.PolicyTag policy_tags = 1; - * @param array<\Google\Cloud\DataCatalog\V1\PolicyTag>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPolicyTags($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DataCatalog\V1\PolicyTag::class); - $this->policy_tags = $arr; - - return $this; - } - - /** - * Pagination token of the next results page. Empty if there are no - * more results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Pagination token of the next results page. Empty if there are no - * more results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListTagsRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListTagsRequest.php deleted file mode 100644 index 764a3df3a9a6..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListTagsRequest.php +++ /dev/null @@ -1,170 +0,0 @@ -google.cloud.datacatalog.v1.ListTagsRequest - */ -class ListTagsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the Data Catalog resource to list the tags of. - * The resource can be an [Entry][google.cloud.datacatalog.v1.Entry] - * or an [EntryGroup][google.cloud.datacatalog.v1.EntryGroup] - * (without `/entries/{entries}` at the end). - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of tags to return. Default is 10. Maximum limit is 1000. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * Pagination token that specifies the next page to return. If empty, the - * first page is returned. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The name of the Data Catalog resource to list the tags of. - * - * The resource can be an [Entry][google.cloud.datacatalog.v1.Entry] - * or an [EntryGroup][google.cloud.datacatalog.v1.EntryGroup] - * (without `/entries/{entries}` at the end). Please see - * {@see DataCatalogClient::entryName()} for help formatting this field. - * - * @return \Google\Cloud\DataCatalog\V1\ListTagsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the Data Catalog resource to list the tags of. - * The resource can be an [Entry][google.cloud.datacatalog.v1.Entry] - * or an [EntryGroup][google.cloud.datacatalog.v1.EntryGroup] - * (without `/entries/{entries}` at the end). - * @type int $page_size - * The maximum number of tags to return. Default is 10. Maximum limit is 1000. - * @type string $page_token - * Pagination token that specifies the next page to return. If empty, the - * first page is returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the Data Catalog resource to list the tags of. - * The resource can be an [Entry][google.cloud.datacatalog.v1.Entry] - * or an [EntryGroup][google.cloud.datacatalog.v1.EntryGroup] - * (without `/entries/{entries}` at the end). - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The name of the Data Catalog resource to list the tags of. - * The resource can be an [Entry][google.cloud.datacatalog.v1.Entry] - * or an [EntryGroup][google.cloud.datacatalog.v1.EntryGroup] - * (without `/entries/{entries}` at the end). - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of tags to return. Default is 10. Maximum limit is 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of tags to return. Default is 10. Maximum limit is 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Pagination token that specifies the next page to return. If empty, the - * first page is returned. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Pagination token that specifies the next page to return. If empty, the - * first page is returned. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListTagsResponse.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListTagsResponse.php deleted file mode 100644 index 5e61e71914c4..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListTagsResponse.php +++ /dev/null @@ -1,106 +0,0 @@ -google.cloud.datacatalog.v1.ListTagsResponse - */ -class ListTagsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * [Tag][google.cloud.datacatalog.v1.Tag] details. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Tag tags = 1; - */ - private $tags; - /** - * Pagination token of the next results page. Empty if there are - * no more items in results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\DataCatalog\V1\Tag>|\Google\Protobuf\Internal\RepeatedField $tags - * [Tag][google.cloud.datacatalog.v1.Tag] details. - * @type string $next_page_token - * Pagination token of the next results page. Empty if there are - * no more items in results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * [Tag][google.cloud.datacatalog.v1.Tag] details. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Tag tags = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTags() - { - return $this->tags; - } - - /** - * [Tag][google.cloud.datacatalog.v1.Tag] details. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Tag tags = 1; - * @param array<\Google\Cloud\DataCatalog\V1\Tag>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTags($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DataCatalog\V1\Tag::class); - $this->tags = $arr; - - return $this; - } - - /** - * Pagination token of the next results page. Empty if there are - * no more items in results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Pagination token of the next results page. Empty if there are - * no more items in results. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListTaxonomiesRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListTaxonomiesRequest.php deleted file mode 100644 index bc7f181f1a7b..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListTaxonomiesRequest.php +++ /dev/null @@ -1,200 +0,0 @@ -google.cloud.datacatalog.v1.ListTaxonomiesRequest - */ -class ListTaxonomiesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the project to list the taxonomies of. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return. Must be a value between 1 and 1000 - * inclusively. If not set, defaults to 50. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The pagination token of the next results page. If not set, - * the first page is returned. - * The token is returned in the response to a previous list request. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Supported field for filter is 'service' and value is 'dataplex'. - * Eg: service=dataplex. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - - /** - * @param string $parent Required. Resource name of the project to list the taxonomies of. Please see - * {@see PolicyTagManagerClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\DataCatalog\V1\ListTaxonomiesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Resource name of the project to list the taxonomies of. - * @type int $page_size - * The maximum number of items to return. Must be a value between 1 and 1000 - * inclusively. If not set, defaults to 50. - * @type string $page_token - * The pagination token of the next results page. If not set, - * the first page is returned. - * The token is returned in the response to a previous list request. - * @type string $filter - * Supported field for filter is 'service' and value is 'dataplex'. - * Eg: service=dataplex. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Policytagmanager::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the project to list the taxonomies of. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Resource name of the project to list the taxonomies of. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of items to return. Must be a value between 1 and 1000 - * inclusively. If not set, defaults to 50. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items to return. Must be a value between 1 and 1000 - * inclusively. If not set, defaults to 50. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The pagination token of the next results page. If not set, - * the first page is returned. - * The token is returned in the response to a previous list request. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The pagination token of the next results page. If not set, - * the first page is returned. - * The token is returned in the response to a previous list request. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Supported field for filter is 'service' and value is 'dataplex'. - * Eg: service=dataplex. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Supported field for filter is 'service' and value is 'dataplex'. - * Eg: service=dataplex. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListTaxonomiesResponse.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListTaxonomiesResponse.php deleted file mode 100644 index 43049d7f29b0..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ListTaxonomiesResponse.php +++ /dev/null @@ -1,106 +0,0 @@ -google.cloud.datacatalog.v1.ListTaxonomiesResponse - */ -class ListTaxonomiesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Taxonomies that the project contains. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; - */ - private $taxonomies; - /** - * Pagination token of the next results page. Empty if there are no - * more results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\DataCatalog\V1\Taxonomy>|\Google\Protobuf\Internal\RepeatedField $taxonomies - * Taxonomies that the project contains. - * @type string $next_page_token - * Pagination token of the next results page. Empty if there are no - * more results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Policytagmanager::initOnce(); - parent::__construct($data); - } - - /** - * Taxonomies that the project contains. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTaxonomies() - { - return $this->taxonomies; - } - - /** - * Taxonomies that the project contains. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; - * @param array<\Google\Cloud\DataCatalog\V1\Taxonomy>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTaxonomies($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DataCatalog\V1\Taxonomy::class); - $this->taxonomies = $arr; - - return $this; - } - - /** - * Pagination token of the next results page. Empty if there are no - * more results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Pagination token of the next results page. Empty if there are no - * more results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/LookerSystemSpec.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/LookerSystemSpec.php deleted file mode 100644 index 924a3e643eae..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/LookerSystemSpec.php +++ /dev/null @@ -1,243 +0,0 @@ -google.cloud.datacatalog.v1.LookerSystemSpec - */ -class LookerSystemSpec extends \Google\Protobuf\Internal\Message -{ - /** - * ID of the parent Looker Instance. Empty if it does not exist. - * Example value: `someinstance.looker.com` - * - * Generated from protobuf field string parent_instance_id = 1; - */ - protected $parent_instance_id = ''; - /** - * Name of the parent Looker Instance. Empty if it does not exist. - * - * Generated from protobuf field string parent_instance_display_name = 2; - */ - protected $parent_instance_display_name = ''; - /** - * ID of the parent Model. Empty if it does not exist. - * - * Generated from protobuf field string parent_model_id = 3; - */ - protected $parent_model_id = ''; - /** - * Name of the parent Model. Empty if it does not exist. - * - * Generated from protobuf field string parent_model_display_name = 4; - */ - protected $parent_model_display_name = ''; - /** - * ID of the parent View. Empty if it does not exist. - * - * Generated from protobuf field string parent_view_id = 5; - */ - protected $parent_view_id = ''; - /** - * Name of the parent View. Empty if it does not exist. - * - * Generated from protobuf field string parent_view_display_name = 6; - */ - protected $parent_view_display_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent_instance_id - * ID of the parent Looker Instance. Empty if it does not exist. - * Example value: `someinstance.looker.com` - * @type string $parent_instance_display_name - * Name of the parent Looker Instance. Empty if it does not exist. - * @type string $parent_model_id - * ID of the parent Model. Empty if it does not exist. - * @type string $parent_model_display_name - * Name of the parent Model. Empty if it does not exist. - * @type string $parent_view_id - * ID of the parent View. Empty if it does not exist. - * @type string $parent_view_display_name - * Name of the parent View. Empty if it does not exist. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * ID of the parent Looker Instance. Empty if it does not exist. - * Example value: `someinstance.looker.com` - * - * Generated from protobuf field string parent_instance_id = 1; - * @return string - */ - public function getParentInstanceId() - { - return $this->parent_instance_id; - } - - /** - * ID of the parent Looker Instance. Empty if it does not exist. - * Example value: `someinstance.looker.com` - * - * Generated from protobuf field string parent_instance_id = 1; - * @param string $var - * @return $this - */ - public function setParentInstanceId($var) - { - GPBUtil::checkString($var, True); - $this->parent_instance_id = $var; - - return $this; - } - - /** - * Name of the parent Looker Instance. Empty if it does not exist. - * - * Generated from protobuf field string parent_instance_display_name = 2; - * @return string - */ - public function getParentInstanceDisplayName() - { - return $this->parent_instance_display_name; - } - - /** - * Name of the parent Looker Instance. Empty if it does not exist. - * - * Generated from protobuf field string parent_instance_display_name = 2; - * @param string $var - * @return $this - */ - public function setParentInstanceDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->parent_instance_display_name = $var; - - return $this; - } - - /** - * ID of the parent Model. Empty if it does not exist. - * - * Generated from protobuf field string parent_model_id = 3; - * @return string - */ - public function getParentModelId() - { - return $this->parent_model_id; - } - - /** - * ID of the parent Model. Empty if it does not exist. - * - * Generated from protobuf field string parent_model_id = 3; - * @param string $var - * @return $this - */ - public function setParentModelId($var) - { - GPBUtil::checkString($var, True); - $this->parent_model_id = $var; - - return $this; - } - - /** - * Name of the parent Model. Empty if it does not exist. - * - * Generated from protobuf field string parent_model_display_name = 4; - * @return string - */ - public function getParentModelDisplayName() - { - return $this->parent_model_display_name; - } - - /** - * Name of the parent Model. Empty if it does not exist. - * - * Generated from protobuf field string parent_model_display_name = 4; - * @param string $var - * @return $this - */ - public function setParentModelDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->parent_model_display_name = $var; - - return $this; - } - - /** - * ID of the parent View. Empty if it does not exist. - * - * Generated from protobuf field string parent_view_id = 5; - * @return string - */ - public function getParentViewId() - { - return $this->parent_view_id; - } - - /** - * ID of the parent View. Empty if it does not exist. - * - * Generated from protobuf field string parent_view_id = 5; - * @param string $var - * @return $this - */ - public function setParentViewId($var) - { - GPBUtil::checkString($var, True); - $this->parent_view_id = $var; - - return $this; - } - - /** - * Name of the parent View. Empty if it does not exist. - * - * Generated from protobuf field string parent_view_display_name = 6; - * @return string - */ - public function getParentViewDisplayName() - { - return $this->parent_view_display_name; - } - - /** - * Name of the parent View. Empty if it does not exist. - * - * Generated from protobuf field string parent_view_display_name = 6; - * @param string $var - * @return $this - */ - public function setParentViewDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->parent_view_display_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/LookupEntryRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/LookupEntryRequest.php deleted file mode 100644 index 45caf368d1f6..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/LookupEntryRequest.php +++ /dev/null @@ -1,295 +0,0 @@ -google.cloud.datacatalog.v1.LookupEntryRequest - */ -class LookupEntryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Project where the lookup should be performed. Required to lookup - * entry that is not a part of `DPMS` or `DATAPLEX` `integrated_system` - * using its `fully_qualified_name`. Ignored in other cases. - * - * Generated from protobuf field string project = 6; - */ - protected $project = ''; - /** - * Location where the lookup should be performed. Required to lookup - * entry that is not a part of `DPMS` or `DATAPLEX` `integrated_system` - * using its `fully_qualified_name`. Ignored in other cases. - * - * Generated from protobuf field string location = 7; - */ - protected $location = ''; - protected $target_name; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $linked_resource - * The full name of the Google Cloud Platform resource the Data Catalog - * entry represents. For more information, see [Full Resource Name] - * (https://cloud.google.com/apis/design/resource_names#full_resource_name). - * Full names are case-sensitive. For example: - * * `//bigquery.googleapis.com/projects/{PROJECT_ID}/datasets/{DATASET_ID}/tables/{TABLE_ID}` - * * `//pubsub.googleapis.com/projects/{PROJECT_ID}/topics/{TOPIC_ID}` - * @type string $sql_resource - * The SQL name of the entry. SQL names are case-sensitive. - * Examples: - * * `pubsub.topic.{PROJECT_ID}.{TOPIC_ID}` - * * `pubsub.topic.{PROJECT_ID}.`\``{TOPIC.ID.SEPARATED.WITH.DOTS}`\` - * * `bigquery.table.{PROJECT_ID}.{DATASET_ID}.{TABLE_ID}` - * * `bigquery.dataset.{PROJECT_ID}.{DATASET_ID}` - * * `datacatalog.entry.{PROJECT_ID}.{LOCATION_ID}.{ENTRY_GROUP_ID}.{ENTRY_ID}` - * Identifiers (`*_ID`) should comply with the - * [Lexical structure in Standard SQL] - * (https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical). - * @type string $fully_qualified_name - * [Fully Qualified Name - * (FQN)](https://cloud.google.com//data-catalog/docs/fully-qualified-names) - * of the resource. - * FQNs take two forms: - * * For non-regionalized resources: - * `{SYSTEM}:{PROJECT}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}` - * * For regionalized resources: - * `{SYSTEM}:{PROJECT}.{LOCATION_ID}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}` - * Example for a DPMS table: - * `dataproc_metastore:{PROJECT_ID}.{LOCATION_ID}.{INSTANCE_ID}.{DATABASE_ID}.{TABLE_ID}` - * @type string $project - * Project where the lookup should be performed. Required to lookup - * entry that is not a part of `DPMS` or `DATAPLEX` `integrated_system` - * using its `fully_qualified_name`. Ignored in other cases. - * @type string $location - * Location where the lookup should be performed. Required to lookup - * entry that is not a part of `DPMS` or `DATAPLEX` `integrated_system` - * using its `fully_qualified_name`. Ignored in other cases. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * The full name of the Google Cloud Platform resource the Data Catalog - * entry represents. For more information, see [Full Resource Name] - * (https://cloud.google.com/apis/design/resource_names#full_resource_name). - * Full names are case-sensitive. For example: - * * `//bigquery.googleapis.com/projects/{PROJECT_ID}/datasets/{DATASET_ID}/tables/{TABLE_ID}` - * * `//pubsub.googleapis.com/projects/{PROJECT_ID}/topics/{TOPIC_ID}` - * - * Generated from protobuf field string linked_resource = 1; - * @return string - */ - public function getLinkedResource() - { - return $this->readOneof(1); - } - - public function hasLinkedResource() - { - return $this->hasOneof(1); - } - - /** - * The full name of the Google Cloud Platform resource the Data Catalog - * entry represents. For more information, see [Full Resource Name] - * (https://cloud.google.com/apis/design/resource_names#full_resource_name). - * Full names are case-sensitive. For example: - * * `//bigquery.googleapis.com/projects/{PROJECT_ID}/datasets/{DATASET_ID}/tables/{TABLE_ID}` - * * `//pubsub.googleapis.com/projects/{PROJECT_ID}/topics/{TOPIC_ID}` - * - * Generated from protobuf field string linked_resource = 1; - * @param string $var - * @return $this - */ - public function setLinkedResource($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * The SQL name of the entry. SQL names are case-sensitive. - * Examples: - * * `pubsub.topic.{PROJECT_ID}.{TOPIC_ID}` - * * `pubsub.topic.{PROJECT_ID}.`\``{TOPIC.ID.SEPARATED.WITH.DOTS}`\` - * * `bigquery.table.{PROJECT_ID}.{DATASET_ID}.{TABLE_ID}` - * * `bigquery.dataset.{PROJECT_ID}.{DATASET_ID}` - * * `datacatalog.entry.{PROJECT_ID}.{LOCATION_ID}.{ENTRY_GROUP_ID}.{ENTRY_ID}` - * Identifiers (`*_ID`) should comply with the - * [Lexical structure in Standard SQL] - * (https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical). - * - * Generated from protobuf field string sql_resource = 3; - * @return string - */ - public function getSqlResource() - { - return $this->readOneof(3); - } - - public function hasSqlResource() - { - return $this->hasOneof(3); - } - - /** - * The SQL name of the entry. SQL names are case-sensitive. - * Examples: - * * `pubsub.topic.{PROJECT_ID}.{TOPIC_ID}` - * * `pubsub.topic.{PROJECT_ID}.`\``{TOPIC.ID.SEPARATED.WITH.DOTS}`\` - * * `bigquery.table.{PROJECT_ID}.{DATASET_ID}.{TABLE_ID}` - * * `bigquery.dataset.{PROJECT_ID}.{DATASET_ID}` - * * `datacatalog.entry.{PROJECT_ID}.{LOCATION_ID}.{ENTRY_GROUP_ID}.{ENTRY_ID}` - * Identifiers (`*_ID`) should comply with the - * [Lexical structure in Standard SQL] - * (https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical). - * - * Generated from protobuf field string sql_resource = 3; - * @param string $var - * @return $this - */ - public function setSqlResource($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * [Fully Qualified Name - * (FQN)](https://cloud.google.com//data-catalog/docs/fully-qualified-names) - * of the resource. - * FQNs take two forms: - * * For non-regionalized resources: - * `{SYSTEM}:{PROJECT}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}` - * * For regionalized resources: - * `{SYSTEM}:{PROJECT}.{LOCATION_ID}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}` - * Example for a DPMS table: - * `dataproc_metastore:{PROJECT_ID}.{LOCATION_ID}.{INSTANCE_ID}.{DATABASE_ID}.{TABLE_ID}` - * - * Generated from protobuf field string fully_qualified_name = 5; - * @return string - */ - public function getFullyQualifiedName() - { - return $this->readOneof(5); - } - - public function hasFullyQualifiedName() - { - return $this->hasOneof(5); - } - - /** - * [Fully Qualified Name - * (FQN)](https://cloud.google.com//data-catalog/docs/fully-qualified-names) - * of the resource. - * FQNs take two forms: - * * For non-regionalized resources: - * `{SYSTEM}:{PROJECT}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}` - * * For regionalized resources: - * `{SYSTEM}:{PROJECT}.{LOCATION_ID}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}` - * Example for a DPMS table: - * `dataproc_metastore:{PROJECT_ID}.{LOCATION_ID}.{INSTANCE_ID}.{DATABASE_ID}.{TABLE_ID}` - * - * Generated from protobuf field string fully_qualified_name = 5; - * @param string $var - * @return $this - */ - public function setFullyQualifiedName($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Project where the lookup should be performed. Required to lookup - * entry that is not a part of `DPMS` or `DATAPLEX` `integrated_system` - * using its `fully_qualified_name`. Ignored in other cases. - * - * Generated from protobuf field string project = 6; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Project where the lookup should be performed. Required to lookup - * entry that is not a part of `DPMS` or `DATAPLEX` `integrated_system` - * using its `fully_qualified_name`. Ignored in other cases. - * - * Generated from protobuf field string project = 6; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - - /** - * Location where the lookup should be performed. Required to lookup - * entry that is not a part of `DPMS` or `DATAPLEX` `integrated_system` - * using its `fully_qualified_name`. Ignored in other cases. - * - * Generated from protobuf field string location = 7; - * @return string - */ - public function getLocation() - { - return $this->location; - } - - /** - * Location where the lookup should be performed. Required to lookup - * entry that is not a part of `DPMS` or `DATAPLEX` `integrated_system` - * using its `fully_qualified_name`. Ignored in other cases. - * - * Generated from protobuf field string location = 7; - * @param string $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkString($var, True); - $this->location = $var; - - return $this; - } - - /** - * @return string - */ - public function getTargetName() - { - return $this->whichOneof("target_name"); - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ManagingSystem.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ManagingSystem.php deleted file mode 100644 index cb3d83bc4ae1..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ManagingSystem.php +++ /dev/null @@ -1,62 +0,0 @@ -google.cloud.datacatalog.v1.ManagingSystem - */ -class ManagingSystem -{ - /** - * Default value - * - * Generated from protobuf enum MANAGING_SYSTEM_UNSPECIFIED = 0; - */ - const MANAGING_SYSTEM_UNSPECIFIED = 0; - /** - * Dataplex. - * - * Generated from protobuf enum MANAGING_SYSTEM_DATAPLEX = 1; - */ - const MANAGING_SYSTEM_DATAPLEX = 1; - /** - * Other - * - * Generated from protobuf enum MANAGING_SYSTEM_OTHER = 2; - */ - const MANAGING_SYSTEM_OTHER = 2; - - private static $valueToName = [ - self::MANAGING_SYSTEM_UNSPECIFIED => 'MANAGING_SYSTEM_UNSPECIFIED', - self::MANAGING_SYSTEM_DATAPLEX => 'MANAGING_SYSTEM_DATAPLEX', - self::MANAGING_SYSTEM_OTHER => 'MANAGING_SYSTEM_OTHER', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ModifyEntryContactsRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ModifyEntryContactsRequest.php deleted file mode 100644 index 214f3fb6b0e9..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ModifyEntryContactsRequest.php +++ /dev/null @@ -1,112 +0,0 @@ -google.cloud.datacatalog.v1.ModifyEntryContactsRequest - */ -class ModifyEntryContactsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full resource name of the entry. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The new value for the Contacts. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.Contacts contacts = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $contacts = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The full resource name of the entry. - * @type \Google\Cloud\DataCatalog\V1\Contacts $contacts - * Required. The new value for the Contacts. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full resource name of the entry. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The full resource name of the entry. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The new value for the Contacts. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.Contacts contacts = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\DataCatalog\V1\Contacts|null - */ - public function getContacts() - { - return $this->contacts; - } - - public function hasContacts() - { - return isset($this->contacts); - } - - public function clearContacts() - { - unset($this->contacts); - } - - /** - * Required. The new value for the Contacts. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.Contacts contacts = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\DataCatalog\V1\Contacts $var - * @return $this - */ - public function setContacts($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\Contacts::class); - $this->contacts = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ModifyEntryOverviewRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ModifyEntryOverviewRequest.php deleted file mode 100644 index 31f931ef546f..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ModifyEntryOverviewRequest.php +++ /dev/null @@ -1,112 +0,0 @@ -google.cloud.datacatalog.v1.ModifyEntryOverviewRequest - */ -class ModifyEntryOverviewRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full resource name of the entry. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The new value for the Entry Overview. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.EntryOverview entry_overview = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $entry_overview = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The full resource name of the entry. - * @type \Google\Cloud\DataCatalog\V1\EntryOverview $entry_overview - * Required. The new value for the Entry Overview. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full resource name of the entry. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The full resource name of the entry. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The new value for the Entry Overview. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.EntryOverview entry_overview = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\DataCatalog\V1\EntryOverview|null - */ - public function getEntryOverview() - { - return $this->entry_overview; - } - - public function hasEntryOverview() - { - return isset($this->entry_overview); - } - - public function clearEntryOverview() - { - unset($this->entry_overview); - } - - /** - * Required. The new value for the Entry Overview. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.EntryOverview entry_overview = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\DataCatalog\V1\EntryOverview $var - * @return $this - */ - public function setEntryOverview($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\EntryOverview::class); - $this->entry_overview = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PersonalDetails.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PersonalDetails.php deleted file mode 100644 index 15b11371fec6..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PersonalDetails.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.datacatalog.v1.PersonalDetails - */ -class PersonalDetails extends \Google\Protobuf\Internal\Message -{ - /** - * True if the entry is starred by the user; false otherwise. - * - * Generated from protobuf field bool starred = 1; - */ - protected $starred = false; - /** - * Set if the entry is starred; unset otherwise. - * - * Generated from protobuf field .google.protobuf.Timestamp star_time = 2; - */ - protected $star_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $starred - * True if the entry is starred by the user; false otherwise. - * @type \Google\Protobuf\Timestamp $star_time - * Set if the entry is starred; unset otherwise. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * True if the entry is starred by the user; false otherwise. - * - * Generated from protobuf field bool starred = 1; - * @return bool - */ - public function getStarred() - { - return $this->starred; - } - - /** - * True if the entry is starred by the user; false otherwise. - * - * Generated from protobuf field bool starred = 1; - * @param bool $var - * @return $this - */ - public function setStarred($var) - { - GPBUtil::checkBool($var); - $this->starred = $var; - - return $this; - } - - /** - * Set if the entry is starred; unset otherwise. - * - * Generated from protobuf field .google.protobuf.Timestamp star_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStarTime() - { - return $this->star_time; - } - - public function hasStarTime() - { - return isset($this->star_time); - } - - public function clearStarTime() - { - unset($this->star_time); - } - - /** - * Set if the entry is starred; unset otherwise. - * - * Generated from protobuf field .google.protobuf.Timestamp star_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStarTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->star_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PhysicalSchema.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PhysicalSchema.php deleted file mode 100644 index cfe389201252..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PhysicalSchema.php +++ /dev/null @@ -1,241 +0,0 @@ -google.cloud.datacatalog.v1.PhysicalSchema - */ -class PhysicalSchema extends \Google\Protobuf\Internal\Message -{ - protected $schema; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DataCatalog\V1\PhysicalSchema\AvroSchema $avro - * Schema in Avro JSON format. - * @type \Google\Cloud\DataCatalog\V1\PhysicalSchema\ThriftSchema $thrift - * Schema in Thrift format. - * @type \Google\Cloud\DataCatalog\V1\PhysicalSchema\ProtobufSchema $protobuf - * Schema in protocol buffer format. - * @type \Google\Cloud\DataCatalog\V1\PhysicalSchema\ParquetSchema $parquet - * Marks a Parquet-encoded data source. - * @type \Google\Cloud\DataCatalog\V1\PhysicalSchema\OrcSchema $orc - * Marks an ORC-encoded data source. - * @type \Google\Cloud\DataCatalog\V1\PhysicalSchema\CsvSchema $csv - * Marks a CSV-encoded data source. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\PhysicalSchema::initOnce(); - parent::__construct($data); - } - - /** - * Schema in Avro JSON format. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.PhysicalSchema.AvroSchema avro = 1; - * @return \Google\Cloud\DataCatalog\V1\PhysicalSchema\AvroSchema|null - */ - public function getAvro() - { - return $this->readOneof(1); - } - - public function hasAvro() - { - return $this->hasOneof(1); - } - - /** - * Schema in Avro JSON format. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.PhysicalSchema.AvroSchema avro = 1; - * @param \Google\Cloud\DataCatalog\V1\PhysicalSchema\AvroSchema $var - * @return $this - */ - public function setAvro($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\PhysicalSchema\AvroSchema::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Schema in Thrift format. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.PhysicalSchema.ThriftSchema thrift = 2; - * @return \Google\Cloud\DataCatalog\V1\PhysicalSchema\ThriftSchema|null - */ - public function getThrift() - { - return $this->readOneof(2); - } - - public function hasThrift() - { - return $this->hasOneof(2); - } - - /** - * Schema in Thrift format. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.PhysicalSchema.ThriftSchema thrift = 2; - * @param \Google\Cloud\DataCatalog\V1\PhysicalSchema\ThriftSchema $var - * @return $this - */ - public function setThrift($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\PhysicalSchema\ThriftSchema::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Schema in protocol buffer format. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.PhysicalSchema.ProtobufSchema protobuf = 3; - * @return \Google\Cloud\DataCatalog\V1\PhysicalSchema\ProtobufSchema|null - */ - public function getProtobuf() - { - return $this->readOneof(3); - } - - public function hasProtobuf() - { - return $this->hasOneof(3); - } - - /** - * Schema in protocol buffer format. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.PhysicalSchema.ProtobufSchema protobuf = 3; - * @param \Google\Cloud\DataCatalog\V1\PhysicalSchema\ProtobufSchema $var - * @return $this - */ - public function setProtobuf($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\PhysicalSchema\ProtobufSchema::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Marks a Parquet-encoded data source. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.PhysicalSchema.ParquetSchema parquet = 4; - * @return \Google\Cloud\DataCatalog\V1\PhysicalSchema\ParquetSchema|null - */ - public function getParquet() - { - return $this->readOneof(4); - } - - public function hasParquet() - { - return $this->hasOneof(4); - } - - /** - * Marks a Parquet-encoded data source. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.PhysicalSchema.ParquetSchema parquet = 4; - * @param \Google\Cloud\DataCatalog\V1\PhysicalSchema\ParquetSchema $var - * @return $this - */ - public function setParquet($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\PhysicalSchema\ParquetSchema::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Marks an ORC-encoded data source. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.PhysicalSchema.OrcSchema orc = 5; - * @return \Google\Cloud\DataCatalog\V1\PhysicalSchema\OrcSchema|null - */ - public function getOrc() - { - return $this->readOneof(5); - } - - public function hasOrc() - { - return $this->hasOneof(5); - } - - /** - * Marks an ORC-encoded data source. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.PhysicalSchema.OrcSchema orc = 5; - * @param \Google\Cloud\DataCatalog\V1\PhysicalSchema\OrcSchema $var - * @return $this - */ - public function setOrc($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\PhysicalSchema\OrcSchema::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Marks a CSV-encoded data source. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.PhysicalSchema.CsvSchema csv = 6; - * @return \Google\Cloud\DataCatalog\V1\PhysicalSchema\CsvSchema|null - */ - public function getCsv() - { - return $this->readOneof(6); - } - - public function hasCsv() - { - return $this->hasOneof(6); - } - - /** - * Marks a CSV-encoded data source. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.PhysicalSchema.CsvSchema csv = 6; - * @param \Google\Cloud\DataCatalog\V1\PhysicalSchema\CsvSchema $var - * @return $this - */ - public function setCsv($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\PhysicalSchema\CsvSchema::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * @return string - */ - public function getSchema() - { - return $this->whichOneof("schema"); - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PhysicalSchema/AvroSchema.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PhysicalSchema/AvroSchema.php deleted file mode 100644 index 7ff45e2f48dd..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PhysicalSchema/AvroSchema.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.datacatalog.v1.PhysicalSchema.AvroSchema - */ -class AvroSchema extends \Google\Protobuf\Internal\Message -{ - /** - * JSON source of the Avro schema. - * - * Generated from protobuf field string text = 1; - */ - protected $text = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $text - * JSON source of the Avro schema. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\PhysicalSchema::initOnce(); - parent::__construct($data); - } - - /** - * JSON source of the Avro schema. - * - * Generated from protobuf field string text = 1; - * @return string - */ - public function getText() - { - return $this->text; - } - - /** - * JSON source of the Avro schema. - * - * Generated from protobuf field string text = 1; - * @param string $var - * @return $this - */ - public function setText($var) - { - GPBUtil::checkString($var, True); - $this->text = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AvroSchema::class, \Google\Cloud\DataCatalog\V1\PhysicalSchema_AvroSchema::class); - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PhysicalSchema/CsvSchema.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PhysicalSchema/CsvSchema.php deleted file mode 100644 index 6df505123b75..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PhysicalSchema/CsvSchema.php +++ /dev/null @@ -1,36 +0,0 @@ -google.cloud.datacatalog.v1.PhysicalSchema.CsvSchema - */ -class CsvSchema extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\PhysicalSchema::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CsvSchema::class, \Google\Cloud\DataCatalog\V1\PhysicalSchema_CsvSchema::class); - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PhysicalSchema/OrcSchema.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PhysicalSchema/OrcSchema.php deleted file mode 100644 index 3537fd33c759..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PhysicalSchema/OrcSchema.php +++ /dev/null @@ -1,36 +0,0 @@ -google.cloud.datacatalog.v1.PhysicalSchema.OrcSchema - */ -class OrcSchema extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\PhysicalSchema::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(OrcSchema::class, \Google\Cloud\DataCatalog\V1\PhysicalSchema_OrcSchema::class); - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PhysicalSchema/ParquetSchema.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PhysicalSchema/ParquetSchema.php deleted file mode 100644 index 3a2aa3425642..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PhysicalSchema/ParquetSchema.php +++ /dev/null @@ -1,36 +0,0 @@ -google.cloud.datacatalog.v1.PhysicalSchema.ParquetSchema - */ -class ParquetSchema extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\PhysicalSchema::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ParquetSchema::class, \Google\Cloud\DataCatalog\V1\PhysicalSchema_ParquetSchema::class); - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PhysicalSchema/ProtobufSchema.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PhysicalSchema/ProtobufSchema.php deleted file mode 100644 index a4f253051183..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PhysicalSchema/ProtobufSchema.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.datacatalog.v1.PhysicalSchema.ProtobufSchema - */ -class ProtobufSchema extends \Google\Protobuf\Internal\Message -{ - /** - * Protocol buffer source of the schema. - * - * Generated from protobuf field string text = 1; - */ - protected $text = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $text - * Protocol buffer source of the schema. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\PhysicalSchema::initOnce(); - parent::__construct($data); - } - - /** - * Protocol buffer source of the schema. - * - * Generated from protobuf field string text = 1; - * @return string - */ - public function getText() - { - return $this->text; - } - - /** - * Protocol buffer source of the schema. - * - * Generated from protobuf field string text = 1; - * @param string $var - * @return $this - */ - public function setText($var) - { - GPBUtil::checkString($var, True); - $this->text = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ProtobufSchema::class, \Google\Cloud\DataCatalog\V1\PhysicalSchema_ProtobufSchema::class); - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PhysicalSchema/ThriftSchema.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PhysicalSchema/ThriftSchema.php deleted file mode 100644 index 58bbfae5de28..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PhysicalSchema/ThriftSchema.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.datacatalog.v1.PhysicalSchema.ThriftSchema - */ -class ThriftSchema extends \Google\Protobuf\Internal\Message -{ - /** - * Thrift IDL source of the schema. - * - * Generated from protobuf field string text = 1; - */ - protected $text = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $text - * Thrift IDL source of the schema. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\PhysicalSchema::initOnce(); - parent::__construct($data); - } - - /** - * Thrift IDL source of the schema. - * - * Generated from protobuf field string text = 1; - * @return string - */ - public function getText() - { - return $this->text; - } - - /** - * Thrift IDL source of the schema. - * - * Generated from protobuf field string text = 1; - * @param string $var - * @return $this - */ - public function setText($var) - { - GPBUtil::checkString($var, True); - $this->text = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ThriftSchema::class, \Google\Cloud\DataCatalog\V1\PhysicalSchema_ThriftSchema::class); - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PolicyTag.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PolicyTag.php deleted file mode 100644 index ba1c3c14999b..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/PolicyTag.php +++ /dev/null @@ -1,255 +0,0 @@ -google.cloud.datacatalog.v1.PolicyTag - */ -class PolicyTag extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Resource name of this policy tag in the URL format. - * The policy tag manager generates unique taxonomy IDs and policy tag IDs. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Required. User-defined name of this policy tag. - * The name can't start or end with spaces and must be unique within the - * parent taxonomy, contain only Unicode letters, numbers, underscores, dashes - * and spaces, and be at most 200 bytes long when encoded in UTF-8. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $display_name = ''; - /** - * Description of this policy tag. If not set, defaults to empty. - * The description must contain only Unicode characters, - * tabs, newlines, carriage returns and page breaks, and be at most 2000 bytes - * long when encoded in UTF-8. - * - * Generated from protobuf field string description = 3; - */ - protected $description = ''; - /** - * Resource name of this policy tag's parent policy tag. If empty, this is a - * top level tag. If not set, defaults to an empty string. - * For example, for the "LatLong" policy tag in the example above, this field - * contains the resource name of the "Geolocation" policy tag, and, for - * "Geolocation", this field is empty. - * - * Generated from protobuf field string parent_policy_tag = 4; - */ - protected $parent_policy_tag = ''; - /** - * Output only. Resource names of child policy tags of this policy tag. - * - * Generated from protobuf field repeated string child_policy_tags = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $child_policy_tags; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. Resource name of this policy tag in the URL format. - * The policy tag manager generates unique taxonomy IDs and policy tag IDs. - * @type string $display_name - * Required. User-defined name of this policy tag. - * The name can't start or end with spaces and must be unique within the - * parent taxonomy, contain only Unicode letters, numbers, underscores, dashes - * and spaces, and be at most 200 bytes long when encoded in UTF-8. - * @type string $description - * Description of this policy tag. If not set, defaults to empty. - * The description must contain only Unicode characters, - * tabs, newlines, carriage returns and page breaks, and be at most 2000 bytes - * long when encoded in UTF-8. - * @type string $parent_policy_tag - * Resource name of this policy tag's parent policy tag. If empty, this is a - * top level tag. If not set, defaults to an empty string. - * For example, for the "LatLong" policy tag in the example above, this field - * contains the resource name of the "Geolocation" policy tag, and, for - * "Geolocation", this field is empty. - * @type array|\Google\Protobuf\Internal\RepeatedField $child_policy_tags - * Output only. Resource names of child policy tags of this policy tag. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Policytagmanager::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Resource name of this policy tag in the URL format. - * The policy tag manager generates unique taxonomy IDs and policy tag IDs. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. Resource name of this policy tag in the URL format. - * The policy tag manager generates unique taxonomy IDs and policy tag IDs. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. User-defined name of this policy tag. - * The name can't start or end with spaces and must be unique within the - * parent taxonomy, contain only Unicode letters, numbers, underscores, dashes - * and spaces, and be at most 200 bytes long when encoded in UTF-8. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Required. User-defined name of this policy tag. - * The name can't start or end with spaces and must be unique within the - * parent taxonomy, contain only Unicode letters, numbers, underscores, dashes - * and spaces, and be at most 200 bytes long when encoded in UTF-8. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Description of this policy tag. If not set, defaults to empty. - * The description must contain only Unicode characters, - * tabs, newlines, carriage returns and page breaks, and be at most 2000 bytes - * long when encoded in UTF-8. - * - * Generated from protobuf field string description = 3; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Description of this policy tag. If not set, defaults to empty. - * The description must contain only Unicode characters, - * tabs, newlines, carriage returns and page breaks, and be at most 2000 bytes - * long when encoded in UTF-8. - * - * Generated from protobuf field string description = 3; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Resource name of this policy tag's parent policy tag. If empty, this is a - * top level tag. If not set, defaults to an empty string. - * For example, for the "LatLong" policy tag in the example above, this field - * contains the resource name of the "Geolocation" policy tag, and, for - * "Geolocation", this field is empty. - * - * Generated from protobuf field string parent_policy_tag = 4; - * @return string - */ - public function getParentPolicyTag() - { - return $this->parent_policy_tag; - } - - /** - * Resource name of this policy tag's parent policy tag. If empty, this is a - * top level tag. If not set, defaults to an empty string. - * For example, for the "LatLong" policy tag in the example above, this field - * contains the resource name of the "Geolocation" policy tag, and, for - * "Geolocation", this field is empty. - * - * Generated from protobuf field string parent_policy_tag = 4; - * @param string $var - * @return $this - */ - public function setParentPolicyTag($var) - { - GPBUtil::checkString($var, True); - $this->parent_policy_tag = $var; - - return $this; - } - - /** - * Output only. Resource names of child policy tags of this policy tag. - * - * Generated from protobuf field repeated string child_policy_tags = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getChildPolicyTags() - { - return $this->child_policy_tags; - } - - /** - * Output only. Resource names of child policy tags of this policy tag. - * - * Generated from protobuf field repeated string child_policy_tags = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setChildPolicyTags($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->child_policy_tags = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ReconcileTagsMetadata.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ReconcileTagsMetadata.php deleted file mode 100644 index 2a72e0e8e924..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ReconcileTagsMetadata.php +++ /dev/null @@ -1,107 +0,0 @@ -google.cloud.datacatalog.v1.ReconcileTagsMetadata - */ -class ReconcileTagsMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * State of the reconciliation operation. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.ReconcileTagsMetadata.ReconciliationState state = 1; - */ - protected $state = 0; - /** - * Maps the name of each tagged column (or empty string for a - * sole entry) to tagging operation [status][google.rpc.Status]. - * - * Generated from protobuf field map errors = 2; - */ - private $errors; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * State of the reconciliation operation. - * @type array|\Google\Protobuf\Internal\MapField $errors - * Maps the name of each tagged column (or empty string for a - * sole entry) to tagging operation [status][google.rpc.Status]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * State of the reconciliation operation. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.ReconcileTagsMetadata.ReconciliationState state = 1; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * State of the reconciliation operation. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.ReconcileTagsMetadata.ReconciliationState state = 1; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\DataCatalog\V1\ReconcileTagsMetadata\ReconciliationState::class); - $this->state = $var; - - return $this; - } - - /** - * Maps the name of each tagged column (or empty string for a - * sole entry) to tagging operation [status][google.rpc.Status]. - * - * Generated from protobuf field map errors = 2; - * @return \Google\Protobuf\Internal\MapField - */ - public function getErrors() - { - return $this->errors; - } - - /** - * Maps the name of each tagged column (or empty string for a - * sole entry) to tagging operation [status][google.rpc.Status]. - * - * Generated from protobuf field map errors = 2; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setErrors($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Status::class); - $this->errors = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ReconcileTagsMetadata/ReconciliationState.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ReconcileTagsMetadata/ReconciliationState.php deleted file mode 100644 index 2f40d719bcfd..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ReconcileTagsMetadata/ReconciliationState.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.datacatalog.v1.ReconcileTagsMetadata.ReconciliationState - */ -class ReconciliationState -{ - /** - * Default value. This value is unused. - * - * Generated from protobuf enum RECONCILIATION_STATE_UNSPECIFIED = 0; - */ - const RECONCILIATION_STATE_UNSPECIFIED = 0; - /** - * The reconciliation has been queued and awaits for execution. - * - * Generated from protobuf enum RECONCILIATION_QUEUED = 1; - */ - const RECONCILIATION_QUEUED = 1; - /** - * The reconciliation is in progress. - * - * Generated from protobuf enum RECONCILIATION_IN_PROGRESS = 2; - */ - const RECONCILIATION_IN_PROGRESS = 2; - /** - * The reconciliation has been finished. - * - * Generated from protobuf enum RECONCILIATION_DONE = 3; - */ - const RECONCILIATION_DONE = 3; - - private static $valueToName = [ - self::RECONCILIATION_STATE_UNSPECIFIED => 'RECONCILIATION_STATE_UNSPECIFIED', - self::RECONCILIATION_QUEUED => 'RECONCILIATION_QUEUED', - self::RECONCILIATION_IN_PROGRESS => 'RECONCILIATION_IN_PROGRESS', - self::RECONCILIATION_DONE => 'RECONCILIATION_DONE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ReconciliationState::class, \Google\Cloud\DataCatalog\V1\ReconcileTagsMetadata_ReconciliationState::class); - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ReconcileTagsRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ReconcileTagsRequest.php deleted file mode 100644 index fbc95fd3d4eb..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ReconcileTagsRequest.php +++ /dev/null @@ -1,190 +0,0 @@ -google.cloud.datacatalog.v1.ReconcileTagsRequest - */ -class ReconcileTagsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of [Entry][google.cloud.datacatalog.v1.Entry] to be tagged. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The name of the tag template, which is used for reconciliation. - * - * Generated from protobuf field string tag_template = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $tag_template = ''; - /** - * If set to `true`, deletes entry tags related to a tag template - * not listed in the tags source from an entry. If set to `false`, - * unlisted tags are retained. - * - * Generated from protobuf field bool force_delete_missing = 3; - */ - protected $force_delete_missing = false; - /** - * A list of tags to apply to an entry. A tag can specify a - * tag template, which must be the template specified in the - * `ReconcileTagsRequest`. - * The sole entry and each of its columns must be mentioned at most once. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Tag tags = 4; - */ - private $tags; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Name of [Entry][google.cloud.datacatalog.v1.Entry] to be tagged. - * @type string $tag_template - * Required. The name of the tag template, which is used for reconciliation. - * @type bool $force_delete_missing - * If set to `true`, deletes entry tags related to a tag template - * not listed in the tags source from an entry. If set to `false`, - * unlisted tags are retained. - * @type array<\Google\Cloud\DataCatalog\V1\Tag>|\Google\Protobuf\Internal\RepeatedField $tags - * A list of tags to apply to an entry. A tag can specify a - * tag template, which must be the template specified in the - * `ReconcileTagsRequest`. - * The sole entry and each of its columns must be mentioned at most once. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of [Entry][google.cloud.datacatalog.v1.Entry] to be tagged. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Name of [Entry][google.cloud.datacatalog.v1.Entry] to be tagged. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The name of the tag template, which is used for reconciliation. - * - * Generated from protobuf field string tag_template = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getTagTemplate() - { - return $this->tag_template; - } - - /** - * Required. The name of the tag template, which is used for reconciliation. - * - * Generated from protobuf field string tag_template = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setTagTemplate($var) - { - GPBUtil::checkString($var, True); - $this->tag_template = $var; - - return $this; - } - - /** - * If set to `true`, deletes entry tags related to a tag template - * not listed in the tags source from an entry. If set to `false`, - * unlisted tags are retained. - * - * Generated from protobuf field bool force_delete_missing = 3; - * @return bool - */ - public function getForceDeleteMissing() - { - return $this->force_delete_missing; - } - - /** - * If set to `true`, deletes entry tags related to a tag template - * not listed in the tags source from an entry. If set to `false`, - * unlisted tags are retained. - * - * Generated from protobuf field bool force_delete_missing = 3; - * @param bool $var - * @return $this - */ - public function setForceDeleteMissing($var) - { - GPBUtil::checkBool($var); - $this->force_delete_missing = $var; - - return $this; - } - - /** - * A list of tags to apply to an entry. A tag can specify a - * tag template, which must be the template specified in the - * `ReconcileTagsRequest`. - * The sole entry and each of its columns must be mentioned at most once. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Tag tags = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTags() - { - return $this->tags; - } - - /** - * A list of tags to apply to an entry. A tag can specify a - * tag template, which must be the template specified in the - * `ReconcileTagsRequest`. - * The sole entry and each of its columns must be mentioned at most once. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Tag tags = 4; - * @param array<\Google\Cloud\DataCatalog\V1\Tag>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTags($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DataCatalog\V1\Tag::class); - $this->tags = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ReconcileTagsResponse.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ReconcileTagsResponse.php deleted file mode 100644 index 7847c76e8692..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ReconcileTagsResponse.php +++ /dev/null @@ -1,137 +0,0 @@ -google.cloud.datacatalog.v1.ReconcileTagsResponse - */ -class ReconcileTagsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Number of tags created in the request. - * - * Generated from protobuf field int64 created_tags_count = 1; - */ - protected $created_tags_count = 0; - /** - * Number of tags updated in the request. - * - * Generated from protobuf field int64 updated_tags_count = 2; - */ - protected $updated_tags_count = 0; - /** - * Number of tags deleted in the request. - * - * Generated from protobuf field int64 deleted_tags_count = 3; - */ - protected $deleted_tags_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $created_tags_count - * Number of tags created in the request. - * @type int|string $updated_tags_count - * Number of tags updated in the request. - * @type int|string $deleted_tags_count - * Number of tags deleted in the request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * Number of tags created in the request. - * - * Generated from protobuf field int64 created_tags_count = 1; - * @return int|string - */ - public function getCreatedTagsCount() - { - return $this->created_tags_count; - } - - /** - * Number of tags created in the request. - * - * Generated from protobuf field int64 created_tags_count = 1; - * @param int|string $var - * @return $this - */ - public function setCreatedTagsCount($var) - { - GPBUtil::checkInt64($var); - $this->created_tags_count = $var; - - return $this; - } - - /** - * Number of tags updated in the request. - * - * Generated from protobuf field int64 updated_tags_count = 2; - * @return int|string - */ - public function getUpdatedTagsCount() - { - return $this->updated_tags_count; - } - - /** - * Number of tags updated in the request. - * - * Generated from protobuf field int64 updated_tags_count = 2; - * @param int|string $var - * @return $this - */ - public function setUpdatedTagsCount($var) - { - GPBUtil::checkInt64($var); - $this->updated_tags_count = $var; - - return $this; - } - - /** - * Number of tags deleted in the request. - * - * Generated from protobuf field int64 deleted_tags_count = 3; - * @return int|string - */ - public function getDeletedTagsCount() - { - return $this->deleted_tags_count; - } - - /** - * Number of tags deleted in the request. - * - * Generated from protobuf field int64 deleted_tags_count = 3; - * @param int|string $var - * @return $this - */ - public function setDeletedTagsCount($var) - { - GPBUtil::checkInt64($var); - $this->deleted_tags_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/RenameTagTemplateFieldEnumValueRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/RenameTagTemplateFieldEnumValueRequest.php deleted file mode 100644 index 2356d1f0e0a7..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/RenameTagTemplateFieldEnumValueRequest.php +++ /dev/null @@ -1,123 +0,0 @@ -google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest - */ -class RenameTagTemplateFieldEnumValueRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the enum field value. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The new display name of the enum value. For example, - * `my_new_enum_value`. - * - * Generated from protobuf field string new_enum_value_display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $new_enum_value_display_name = ''; - - /** - * @param string $name Required. The name of the enum field value. Please see - * {@see DataCatalogClient::tagTemplateFieldEnumValueName()} for help formatting this field. - * @param string $newEnumValueDisplayName Required. The new display name of the enum value. For example, - * `my_new_enum_value`. - * - * @return \Google\Cloud\DataCatalog\V1\RenameTagTemplateFieldEnumValueRequest - * - * @experimental - */ - public static function build(string $name, string $newEnumValueDisplayName): self - { - return (new self()) - ->setName($name) - ->setNewEnumValueDisplayName($newEnumValueDisplayName); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the enum field value. - * @type string $new_enum_value_display_name - * Required. The new display name of the enum value. For example, - * `my_new_enum_value`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the enum field value. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the enum field value. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The new display name of the enum value. For example, - * `my_new_enum_value`. - * - * Generated from protobuf field string new_enum_value_display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getNewEnumValueDisplayName() - { - return $this->new_enum_value_display_name; - } - - /** - * Required. The new display name of the enum value. For example, - * `my_new_enum_value`. - * - * Generated from protobuf field string new_enum_value_display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setNewEnumValueDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->new_enum_value_display_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/RenameTagTemplateFieldRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/RenameTagTemplateFieldRequest.php deleted file mode 100644 index 385fb3e2b59c..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/RenameTagTemplateFieldRequest.php +++ /dev/null @@ -1,123 +0,0 @@ -google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest - */ -class RenameTagTemplateFieldRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the tag template field. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The new ID of this tag template field. For example, - * `my_new_field`. - * - * Generated from protobuf field string new_tag_template_field_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $new_tag_template_field_id = ''; - - /** - * @param string $name Required. The name of the tag template field. Please see - * {@see DataCatalogClient::tagTemplateFieldName()} for help formatting this field. - * @param string $newTagTemplateFieldId Required. The new ID of this tag template field. For example, - * `my_new_field`. - * - * @return \Google\Cloud\DataCatalog\V1\RenameTagTemplateFieldRequest - * - * @experimental - */ - public static function build(string $name, string $newTagTemplateFieldId): self - { - return (new self()) - ->setName($name) - ->setNewTagTemplateFieldId($newTagTemplateFieldId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the tag template field. - * @type string $new_tag_template_field_id - * Required. The new ID of this tag template field. For example, - * `my_new_field`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the tag template field. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the tag template field. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The new ID of this tag template field. For example, - * `my_new_field`. - * - * Generated from protobuf field string new_tag_template_field_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getNewTagTemplateFieldId() - { - return $this->new_tag_template_field_id; - } - - /** - * Required. The new ID of this tag template field. For example, - * `my_new_field`. - * - * Generated from protobuf field string new_tag_template_field_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setNewTagTemplateFieldId($var) - { - GPBUtil::checkString($var, True); - $this->new_tag_template_field_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ReplaceTaxonomyRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ReplaceTaxonomyRequest.php deleted file mode 100644 index 67350fac7799..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ReplaceTaxonomyRequest.php +++ /dev/null @@ -1,112 +0,0 @@ -google.cloud.datacatalog.v1.ReplaceTaxonomyRequest - */ -class ReplaceTaxonomyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the taxonomy to update. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. Taxonomy to update along with its child policy tags. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.SerializedTaxonomy serialized_taxonomy = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $serialized_taxonomy = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Resource name of the taxonomy to update. - * @type \Google\Cloud\DataCatalog\V1\SerializedTaxonomy $serialized_taxonomy - * Required. Taxonomy to update along with its child policy tags. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Policytagmanagerserialization::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the taxonomy to update. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Resource name of the taxonomy to update. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. Taxonomy to update along with its child policy tags. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.SerializedTaxonomy serialized_taxonomy = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\DataCatalog\V1\SerializedTaxonomy|null - */ - public function getSerializedTaxonomy() - { - return $this->serialized_taxonomy; - } - - public function hasSerializedTaxonomy() - { - return isset($this->serialized_taxonomy); - } - - public function clearSerializedTaxonomy() - { - unset($this->serialized_taxonomy); - } - - /** - * Required. Taxonomy to update along with its child policy tags. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.SerializedTaxonomy serialized_taxonomy = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\DataCatalog\V1\SerializedTaxonomy $var - * @return $this - */ - public function setSerializedTaxonomy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\SerializedTaxonomy::class); - $this->serialized_taxonomy = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/RoutineSpec.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/RoutineSpec.php deleted file mode 100644 index 8c71b088c8ba..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/RoutineSpec.php +++ /dev/null @@ -1,262 +0,0 @@ -google.cloud.datacatalog.v1.RoutineSpec - */ -class RoutineSpec extends \Google\Protobuf\Internal\Message -{ - /** - * The type of the routine. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.RoutineSpec.RoutineType routine_type = 1; - */ - protected $routine_type = 0; - /** - * The language the routine is written in. The exact value depends on the - * source system. For BigQuery routines, possible values are: - * * `SQL` - * * `JAVASCRIPT` - * - * Generated from protobuf field string language = 2; - */ - protected $language = ''; - /** - * Arguments of the routine. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.RoutineSpec.Argument routine_arguments = 3; - */ - private $routine_arguments; - /** - * Return type of the argument. The exact value depends on the source system - * and the language. - * - * Generated from protobuf field string return_type = 4; - */ - protected $return_type = ''; - /** - * The body of the routine. - * - * Generated from protobuf field string definition_body = 5; - */ - protected $definition_body = ''; - protected $system_spec; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $routine_type - * The type of the routine. - * @type string $language - * The language the routine is written in. The exact value depends on the - * source system. For BigQuery routines, possible values are: - * * `SQL` - * * `JAVASCRIPT` - * @type array<\Google\Cloud\DataCatalog\V1\RoutineSpec\Argument>|\Google\Protobuf\Internal\RepeatedField $routine_arguments - * Arguments of the routine. - * @type string $return_type - * Return type of the argument. The exact value depends on the source system - * and the language. - * @type string $definition_body - * The body of the routine. - * @type \Google\Cloud\DataCatalog\V1\BigQueryRoutineSpec $bigquery_routine_spec - * Fields specific for BigQuery routines. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * The type of the routine. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.RoutineSpec.RoutineType routine_type = 1; - * @return int - */ - public function getRoutineType() - { - return $this->routine_type; - } - - /** - * The type of the routine. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.RoutineSpec.RoutineType routine_type = 1; - * @param int $var - * @return $this - */ - public function setRoutineType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\DataCatalog\V1\RoutineSpec\RoutineType::class); - $this->routine_type = $var; - - return $this; - } - - /** - * The language the routine is written in. The exact value depends on the - * source system. For BigQuery routines, possible values are: - * * `SQL` - * * `JAVASCRIPT` - * - * Generated from protobuf field string language = 2; - * @return string - */ - public function getLanguage() - { - return $this->language; - } - - /** - * The language the routine is written in. The exact value depends on the - * source system. For BigQuery routines, possible values are: - * * `SQL` - * * `JAVASCRIPT` - * - * Generated from protobuf field string language = 2; - * @param string $var - * @return $this - */ - public function setLanguage($var) - { - GPBUtil::checkString($var, True); - $this->language = $var; - - return $this; - } - - /** - * Arguments of the routine. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.RoutineSpec.Argument routine_arguments = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRoutineArguments() - { - return $this->routine_arguments; - } - - /** - * Arguments of the routine. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.RoutineSpec.Argument routine_arguments = 3; - * @param array<\Google\Cloud\DataCatalog\V1\RoutineSpec\Argument>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRoutineArguments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DataCatalog\V1\RoutineSpec\Argument::class); - $this->routine_arguments = $arr; - - return $this; - } - - /** - * Return type of the argument. The exact value depends on the source system - * and the language. - * - * Generated from protobuf field string return_type = 4; - * @return string - */ - public function getReturnType() - { - return $this->return_type; - } - - /** - * Return type of the argument. The exact value depends on the source system - * and the language. - * - * Generated from protobuf field string return_type = 4; - * @param string $var - * @return $this - */ - public function setReturnType($var) - { - GPBUtil::checkString($var, True); - $this->return_type = $var; - - return $this; - } - - /** - * The body of the routine. - * - * Generated from protobuf field string definition_body = 5; - * @return string - */ - public function getDefinitionBody() - { - return $this->definition_body; - } - - /** - * The body of the routine. - * - * Generated from protobuf field string definition_body = 5; - * @param string $var - * @return $this - */ - public function setDefinitionBody($var) - { - GPBUtil::checkString($var, True); - $this->definition_body = $var; - - return $this; - } - - /** - * Fields specific for BigQuery routines. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.BigQueryRoutineSpec bigquery_routine_spec = 6; - * @return \Google\Cloud\DataCatalog\V1\BigQueryRoutineSpec|null - */ - public function getBigqueryRoutineSpec() - { - return $this->readOneof(6); - } - - public function hasBigqueryRoutineSpec() - { - return $this->hasOneof(6); - } - - /** - * Fields specific for BigQuery routines. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.BigQueryRoutineSpec bigquery_routine_spec = 6; - * @param \Google\Cloud\DataCatalog\V1\BigQueryRoutineSpec $var - * @return $this - */ - public function setBigqueryRoutineSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\BigQueryRoutineSpec::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * @return string - */ - public function getSystemSpec() - { - return $this->whichOneof("system_spec"); - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/RoutineSpec/Argument.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/RoutineSpec/Argument.php deleted file mode 100644 index 8abcca2b8441..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/RoutineSpec/Argument.php +++ /dev/null @@ -1,146 +0,0 @@ -google.cloud.datacatalog.v1.RoutineSpec.Argument - */ -class Argument extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the argument. A return argument of a function might not have - * a name. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Specifies whether the argument is input or output. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.RoutineSpec.Argument.Mode mode = 2; - */ - protected $mode = 0; - /** - * Type of the argument. The exact value depends on the source system and - * the language. - * - * Generated from protobuf field string type = 3; - */ - protected $type = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the argument. A return argument of a function might not have - * a name. - * @type int $mode - * Specifies whether the argument is input or output. - * @type string $type - * Type of the argument. The exact value depends on the source system and - * the language. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * The name of the argument. A return argument of a function might not have - * a name. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the argument. A return argument of a function might not have - * a name. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Specifies whether the argument is input or output. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.RoutineSpec.Argument.Mode mode = 2; - * @return int - */ - public function getMode() - { - return $this->mode; - } - - /** - * Specifies whether the argument is input or output. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.RoutineSpec.Argument.Mode mode = 2; - * @param int $var - * @return $this - */ - public function setMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\DataCatalog\V1\RoutineSpec\Argument\Mode::class); - $this->mode = $var; - - return $this; - } - - /** - * Type of the argument. The exact value depends on the source system and - * the language. - * - * Generated from protobuf field string type = 3; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * Type of the argument. The exact value depends on the source system and - * the language. - * - * Generated from protobuf field string type = 3; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Argument::class, \Google\Cloud\DataCatalog\V1\RoutineSpec_Argument::class); - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/RoutineSpec/Argument/Mode.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/RoutineSpec/Argument/Mode.php deleted file mode 100644 index 894ff07fc297..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/RoutineSpec/Argument/Mode.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.datacatalog.v1.RoutineSpec.Argument.Mode - */ -class Mode -{ - /** - * Unspecified mode. - * - * Generated from protobuf enum MODE_UNSPECIFIED = 0; - */ - const MODE_UNSPECIFIED = 0; - /** - * The argument is input-only. - * - * Generated from protobuf enum IN = 1; - */ - const IN = 1; - /** - * The argument is output-only. - * - * Generated from protobuf enum OUT = 2; - */ - const OUT = 2; - /** - * The argument is both an input and an output. - * - * Generated from protobuf enum INOUT = 3; - */ - const INOUT = 3; - - private static $valueToName = [ - self::MODE_UNSPECIFIED => 'MODE_UNSPECIFIED', - self::IN => 'IN', - self::OUT => 'OUT', - self::INOUT => 'INOUT', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Mode::class, \Google\Cloud\DataCatalog\V1\RoutineSpec_Argument_Mode::class); - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/RoutineSpec/RoutineType.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/RoutineSpec/RoutineType.php deleted file mode 100644 index 8778af7e281d..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/RoutineSpec/RoutineType.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.datacatalog.v1.RoutineSpec.RoutineType - */ -class RoutineType -{ - /** - * Unspecified type. - * - * Generated from protobuf enum ROUTINE_TYPE_UNSPECIFIED = 0; - */ - const ROUTINE_TYPE_UNSPECIFIED = 0; - /** - * Non-builtin permanent scalar function. - * - * Generated from protobuf enum SCALAR_FUNCTION = 1; - */ - const SCALAR_FUNCTION = 1; - /** - * Stored procedure. - * - * Generated from protobuf enum PROCEDURE = 2; - */ - const PROCEDURE = 2; - - private static $valueToName = [ - self::ROUTINE_TYPE_UNSPECIFIED => 'ROUTINE_TYPE_UNSPECIFIED', - self::SCALAR_FUNCTION => 'SCALAR_FUNCTION', - self::PROCEDURE => 'PROCEDURE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RoutineType::class, \Google\Cloud\DataCatalog\V1\RoutineSpec_RoutineType::class); - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Schema.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Schema.php deleted file mode 100644 index 6596e4bdfdf4..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Schema.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.datacatalog.v1.Schema - */ -class Schema extends \Google\Protobuf\Internal\Message -{ - /** - * The unified GoogleSQL-like schema of columns. - * The overall maximum number of columns and nested columns is 10,000. - * The maximum nested depth is 15 levels. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2; - */ - private $columns; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\DataCatalog\V1\ColumnSchema>|\Google\Protobuf\Internal\RepeatedField $columns - * The unified GoogleSQL-like schema of columns. - * The overall maximum number of columns and nested columns is 10,000. - * The maximum nested depth is 15 levels. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Schema::initOnce(); - parent::__construct($data); - } - - /** - * The unified GoogleSQL-like schema of columns. - * The overall maximum number of columns and nested columns is 10,000. - * The maximum nested depth is 15 levels. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getColumns() - { - return $this->columns; - } - - /** - * The unified GoogleSQL-like schema of columns. - * The overall maximum number of columns and nested columns is 10,000. - * The maximum nested depth is 15 levels. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2; - * @param array<\Google\Cloud\DataCatalog\V1\ColumnSchema>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setColumns($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DataCatalog\V1\ColumnSchema::class); - $this->columns = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SearchCatalogRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SearchCatalogRequest.php deleted file mode 100644 index 9e519a7c2943..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SearchCatalogRequest.php +++ /dev/null @@ -1,368 +0,0 @@ -google.cloud.datacatalog.v1.SearchCatalogRequest - */ -class SearchCatalogRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The scope of this search request. - * The `scope` is invalid if `include_org_ids`, `include_project_ids` are - * empty AND `include_gcp_public_datasets` is set to `false`. In this case, - * the request returns an error. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.SearchCatalogRequest.Scope scope = 6 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $scope = null; - /** - * Optional. The query string with a minimum of 3 characters and specific - * syntax. For more information, see [Data Catalog search - * syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference). - * An empty query string returns all data assets (in the specified scope) - * that you have access to. - * A query string can be a simple `xyz` or qualified by predicates: - * * `name:x` - * * `column:y` - * * `description:z` - * - * Generated from protobuf field string query = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $query = ''; - /** - * Upper bound on the number of results you can get in a single response. - * Can't be negative or 0, defaults to 10 in this case. - * The maximum number is 1000. If exceeded, throws an "invalid argument" - * exception. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * Optional. Pagination token that, if specified, returns the next page of - * search results. If empty, returns the first page. - * This token is returned in the - * [SearchCatalogResponse.next_page_token][google.cloud.datacatalog.v1.SearchCatalogResponse.next_page_token] - * field of the response to a previous - * [SearchCatalogRequest][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog] - * call. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Specifies the order of results. - * Currently supported case-sensitive values are: - * * `relevance` that can only be descending - * * `last_modified_timestamp [asc|desc]` with descending (`desc`) as default - * * `default` that can only be descending - * Search queries don't guarantee full recall. Results that match your query - * might not be returned, even in subsequent result pages. Additionally, - * returned (and not returned) results can vary if you repeat search queries. - * If you are experiencing recall issues and you don't have to fetch the - * results in any specific order, consider setting this parameter to - * `default`. - * If this parameter is omitted, it defaults to the descending `relevance`. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param \Google\Cloud\DataCatalog\V1\SearchCatalogRequest\Scope $scope Required. The scope of this search request. - * - * The `scope` is invalid if `include_org_ids`, `include_project_ids` are - * empty AND `include_gcp_public_datasets` is set to `false`. In this case, - * the request returns an error. - * @param string $query Optional. The query string with a minimum of 3 characters and specific - * syntax. For more information, see [Data Catalog search - * syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference). - * - * An empty query string returns all data assets (in the specified scope) - * that you have access to. - * - * A query string can be a simple `xyz` or qualified by predicates: - * - * * `name:x` - * * `column:y` - * * `description:z` - * - * @return \Google\Cloud\DataCatalog\V1\SearchCatalogRequest - * - * @experimental - */ - public static function build(\Google\Cloud\DataCatalog\V1\SearchCatalogRequest\Scope $scope, string $query): self - { - return (new self()) - ->setScope($scope) - ->setQuery($query); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DataCatalog\V1\SearchCatalogRequest\Scope $scope - * Required. The scope of this search request. - * The `scope` is invalid if `include_org_ids`, `include_project_ids` are - * empty AND `include_gcp_public_datasets` is set to `false`. In this case, - * the request returns an error. - * @type string $query - * Optional. The query string with a minimum of 3 characters and specific - * syntax. For more information, see [Data Catalog search - * syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference). - * An empty query string returns all data assets (in the specified scope) - * that you have access to. - * A query string can be a simple `xyz` or qualified by predicates: - * * `name:x` - * * `column:y` - * * `description:z` - * @type int $page_size - * Upper bound on the number of results you can get in a single response. - * Can't be negative or 0, defaults to 10 in this case. - * The maximum number is 1000. If exceeded, throws an "invalid argument" - * exception. - * @type string $page_token - * Optional. Pagination token that, if specified, returns the next page of - * search results. If empty, returns the first page. - * This token is returned in the - * [SearchCatalogResponse.next_page_token][google.cloud.datacatalog.v1.SearchCatalogResponse.next_page_token] - * field of the response to a previous - * [SearchCatalogRequest][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog] - * call. - * @type string $order_by - * Specifies the order of results. - * Currently supported case-sensitive values are: - * * `relevance` that can only be descending - * * `last_modified_timestamp [asc|desc]` with descending (`desc`) as default - * * `default` that can only be descending - * Search queries don't guarantee full recall. Results that match your query - * might not be returned, even in subsequent result pages. Additionally, - * returned (and not returned) results can vary if you repeat search queries. - * If you are experiencing recall issues and you don't have to fetch the - * results in any specific order, consider setting this parameter to - * `default`. - * If this parameter is omitted, it defaults to the descending `relevance`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * Required. The scope of this search request. - * The `scope` is invalid if `include_org_ids`, `include_project_ids` are - * empty AND `include_gcp_public_datasets` is set to `false`. In this case, - * the request returns an error. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.SearchCatalogRequest.Scope scope = 6 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\DataCatalog\V1\SearchCatalogRequest\Scope|null - */ - public function getScope() - { - return $this->scope; - } - - public function hasScope() - { - return isset($this->scope); - } - - public function clearScope() - { - unset($this->scope); - } - - /** - * Required. The scope of this search request. - * The `scope` is invalid if `include_org_ids`, `include_project_ids` are - * empty AND `include_gcp_public_datasets` is set to `false`. In this case, - * the request returns an error. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.SearchCatalogRequest.Scope scope = 6 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\DataCatalog\V1\SearchCatalogRequest\Scope $var - * @return $this - */ - public function setScope($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\SearchCatalogRequest\Scope::class); - $this->scope = $var; - - return $this; - } - - /** - * Optional. The query string with a minimum of 3 characters and specific - * syntax. For more information, see [Data Catalog search - * syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference). - * An empty query string returns all data assets (in the specified scope) - * that you have access to. - * A query string can be a simple `xyz` or qualified by predicates: - * * `name:x` - * * `column:y` - * * `description:z` - * - * Generated from protobuf field string query = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getQuery() - { - return $this->query; - } - - /** - * Optional. The query string with a minimum of 3 characters and specific - * syntax. For more information, see [Data Catalog search - * syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference). - * An empty query string returns all data assets (in the specified scope) - * that you have access to. - * A query string can be a simple `xyz` or qualified by predicates: - * * `name:x` - * * `column:y` - * * `description:z` - * - * Generated from protobuf field string query = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setQuery($var) - { - GPBUtil::checkString($var, True); - $this->query = $var; - - return $this; - } - - /** - * Upper bound on the number of results you can get in a single response. - * Can't be negative or 0, defaults to 10 in this case. - * The maximum number is 1000. If exceeded, throws an "invalid argument" - * exception. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Upper bound on the number of results you can get in a single response. - * Can't be negative or 0, defaults to 10 in this case. - * The maximum number is 1000. If exceeded, throws an "invalid argument" - * exception. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. Pagination token that, if specified, returns the next page of - * search results. If empty, returns the first page. - * This token is returned in the - * [SearchCatalogResponse.next_page_token][google.cloud.datacatalog.v1.SearchCatalogResponse.next_page_token] - * field of the response to a previous - * [SearchCatalogRequest][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog] - * call. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. Pagination token that, if specified, returns the next page of - * search results. If empty, returns the first page. - * This token is returned in the - * [SearchCatalogResponse.next_page_token][google.cloud.datacatalog.v1.SearchCatalogResponse.next_page_token] - * field of the response to a previous - * [SearchCatalogRequest][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog] - * call. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Specifies the order of results. - * Currently supported case-sensitive values are: - * * `relevance` that can only be descending - * * `last_modified_timestamp [asc|desc]` with descending (`desc`) as default - * * `default` that can only be descending - * Search queries don't guarantee full recall. Results that match your query - * might not be returned, even in subsequent result pages. Additionally, - * returned (and not returned) results can vary if you repeat search queries. - * If you are experiencing recall issues and you don't have to fetch the - * results in any specific order, consider setting this parameter to - * `default`. - * If this parameter is omitted, it defaults to the descending `relevance`. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Specifies the order of results. - * Currently supported case-sensitive values are: - * * `relevance` that can only be descending - * * `last_modified_timestamp [asc|desc]` with descending (`desc`) as default - * * `default` that can only be descending - * Search queries don't guarantee full recall. Results that match your query - * might not be returned, even in subsequent result pages. Additionally, - * returned (and not returned) results can vary if you repeat search queries. - * If you are experiencing recall issues and you don't have to fetch the - * results in any specific order, consider setting this parameter to - * `default`. - * If this parameter is omitted, it defaults to the descending `relevance`. - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SearchCatalogRequest/Scope.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SearchCatalogRequest/Scope.php deleted file mode 100644 index a35f47cccbff..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SearchCatalogRequest/Scope.php +++ /dev/null @@ -1,313 +0,0 @@ -google.cloud.datacatalog.v1.SearchCatalogRequest.Scope - */ -class Scope extends \Google\Protobuf\Internal\Message -{ - /** - * The list of organization IDs to search within. - * To find your organization ID, follow the steps from - * [Creating and managing organizations] - * (/resource-manager/docs/creating-managing-organization). - * - * Generated from protobuf field repeated string include_org_ids = 2; - */ - private $include_org_ids; - /** - * The list of project IDs to search within. - * For more information on the distinction between project names, IDs, and - * numbers, see [Projects](/docs/overview/#projects). - * - * Generated from protobuf field repeated string include_project_ids = 3; - */ - private $include_project_ids; - /** - * If `true`, include Google Cloud public datasets in - * search results. By default, they are excluded. - * See [Google Cloud Public Datasets](/public-datasets) for more - * information. - * - * Generated from protobuf field bool include_gcp_public_datasets = 7; - */ - protected $include_gcp_public_datasets = false; - /** - * Optional. The list of locations to search within. If empty, all locations - * are searched. - * Returns an error if any location in the list isn't one of the [Supported - * regions](https://cloud.google.com/data-catalog/docs/concepts/regions#supported_regions). - * If a location is unreachable, its name is returned in the - * `SearchCatalogResponse.unreachable` field. To get additional information - * on the error, repeat the search request and set the location name as the - * value of this parameter. - * - * Generated from protobuf field repeated string restricted_locations = 16 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $restricted_locations; - /** - * Optional. If `true`, search only among starred entries. - * By default, all results are returned, starred or not. - * - * Generated from protobuf field bool starred_only = 18 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $starred_only = false; - /** - * Optional. This field is deprecated. The search mechanism for public and - * private tag templates is the same. - * - * Generated from protobuf field bool include_public_tag_templates = 19 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @deprecated - */ - protected $include_public_tag_templates = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $include_org_ids - * The list of organization IDs to search within. - * To find your organization ID, follow the steps from - * [Creating and managing organizations] - * (/resource-manager/docs/creating-managing-organization). - * @type array|\Google\Protobuf\Internal\RepeatedField $include_project_ids - * The list of project IDs to search within. - * For more information on the distinction between project names, IDs, and - * numbers, see [Projects](/docs/overview/#projects). - * @type bool $include_gcp_public_datasets - * If `true`, include Google Cloud public datasets in - * search results. By default, they are excluded. - * See [Google Cloud Public Datasets](/public-datasets) for more - * information. - * @type array|\Google\Protobuf\Internal\RepeatedField $restricted_locations - * Optional. The list of locations to search within. If empty, all locations - * are searched. - * Returns an error if any location in the list isn't one of the [Supported - * regions](https://cloud.google.com/data-catalog/docs/concepts/regions#supported_regions). - * If a location is unreachable, its name is returned in the - * `SearchCatalogResponse.unreachable` field. To get additional information - * on the error, repeat the search request and set the location name as the - * value of this parameter. - * @type bool $starred_only - * Optional. If `true`, search only among starred entries. - * By default, all results are returned, starred or not. - * @type bool $include_public_tag_templates - * Optional. This field is deprecated. The search mechanism for public and - * private tag templates is the same. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * The list of organization IDs to search within. - * To find your organization ID, follow the steps from - * [Creating and managing organizations] - * (/resource-manager/docs/creating-managing-organization). - * - * Generated from protobuf field repeated string include_org_ids = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIncludeOrgIds() - { - return $this->include_org_ids; - } - - /** - * The list of organization IDs to search within. - * To find your organization ID, follow the steps from - * [Creating and managing organizations] - * (/resource-manager/docs/creating-managing-organization). - * - * Generated from protobuf field repeated string include_org_ids = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIncludeOrgIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->include_org_ids = $arr; - - return $this; - } - - /** - * The list of project IDs to search within. - * For more information on the distinction between project names, IDs, and - * numbers, see [Projects](/docs/overview/#projects). - * - * Generated from protobuf field repeated string include_project_ids = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIncludeProjectIds() - { - return $this->include_project_ids; - } - - /** - * The list of project IDs to search within. - * For more information on the distinction between project names, IDs, and - * numbers, see [Projects](/docs/overview/#projects). - * - * Generated from protobuf field repeated string include_project_ids = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIncludeProjectIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->include_project_ids = $arr; - - return $this; - } - - /** - * If `true`, include Google Cloud public datasets in - * search results. By default, they are excluded. - * See [Google Cloud Public Datasets](/public-datasets) for more - * information. - * - * Generated from protobuf field bool include_gcp_public_datasets = 7; - * @return bool - */ - public function getIncludeGcpPublicDatasets() - { - return $this->include_gcp_public_datasets; - } - - /** - * If `true`, include Google Cloud public datasets in - * search results. By default, they are excluded. - * See [Google Cloud Public Datasets](/public-datasets) for more - * information. - * - * Generated from protobuf field bool include_gcp_public_datasets = 7; - * @param bool $var - * @return $this - */ - public function setIncludeGcpPublicDatasets($var) - { - GPBUtil::checkBool($var); - $this->include_gcp_public_datasets = $var; - - return $this; - } - - /** - * Optional. The list of locations to search within. If empty, all locations - * are searched. - * Returns an error if any location in the list isn't one of the [Supported - * regions](https://cloud.google.com/data-catalog/docs/concepts/regions#supported_regions). - * If a location is unreachable, its name is returned in the - * `SearchCatalogResponse.unreachable` field. To get additional information - * on the error, repeat the search request and set the location name as the - * value of this parameter. - * - * Generated from protobuf field repeated string restricted_locations = 16 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRestrictedLocations() - { - return $this->restricted_locations; - } - - /** - * Optional. The list of locations to search within. If empty, all locations - * are searched. - * Returns an error if any location in the list isn't one of the [Supported - * regions](https://cloud.google.com/data-catalog/docs/concepts/regions#supported_regions). - * If a location is unreachable, its name is returned in the - * `SearchCatalogResponse.unreachable` field. To get additional information - * on the error, repeat the search request and set the location name as the - * value of this parameter. - * - * Generated from protobuf field repeated string restricted_locations = 16 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRestrictedLocations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->restricted_locations = $arr; - - return $this; - } - - /** - * Optional. If `true`, search only among starred entries. - * By default, all results are returned, starred or not. - * - * Generated from protobuf field bool starred_only = 18 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getStarredOnly() - { - return $this->starred_only; - } - - /** - * Optional. If `true`, search only among starred entries. - * By default, all results are returned, starred or not. - * - * Generated from protobuf field bool starred_only = 18 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setStarredOnly($var) - { - GPBUtil::checkBool($var); - $this->starred_only = $var; - - return $this; - } - - /** - * Optional. This field is deprecated. The search mechanism for public and - * private tag templates is the same. - * - * Generated from protobuf field bool include_public_tag_templates = 19 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @return bool - * @deprecated - */ - public function getIncludePublicTagTemplates() - { - @trigger_error('include_public_tag_templates is deprecated.', E_USER_DEPRECATED); - return $this->include_public_tag_templates; - } - - /** - * Optional. This field is deprecated. The search mechanism for public and - * private tag templates is the same. - * - * Generated from protobuf field bool include_public_tag_templates = 19 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - * @deprecated - */ - public function setIncludePublicTagTemplates($var) - { - @trigger_error('include_public_tag_templates is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkBool($var); - $this->include_public_tag_templates = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Scope::class, \Google\Cloud\DataCatalog\V1\SearchCatalogRequest_Scope::class); - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SearchCatalogResponse.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SearchCatalogResponse.php deleted file mode 100644 index bb2e4e0c3c8a..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SearchCatalogResponse.php +++ /dev/null @@ -1,190 +0,0 @@ -google.cloud.datacatalog.v1.SearchCatalogResponse - */ -class SearchCatalogResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Search results. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.SearchCatalogResult results = 1; - */ - private $results; - /** - * The approximate total number of entries matched by the query. - * - * Generated from protobuf field int32 total_size = 2; - */ - protected $total_size = 0; - /** - * Pagination token that can be used in subsequent calls to retrieve the next - * page of results. - * - * Generated from protobuf field string next_page_token = 3; - */ - protected $next_page_token = ''; - /** - * Unreachable locations. Search results don't include data from those - * locations. - * To get additional information on an error, repeat the search request and - * restrict it to specific locations by setting the - * `SearchCatalogRequest.scope.restricted_locations` parameter. - * - * Generated from protobuf field repeated string unreachable = 6; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\DataCatalog\V1\SearchCatalogResult>|\Google\Protobuf\Internal\RepeatedField $results - * Search results. - * @type int $total_size - * The approximate total number of entries matched by the query. - * @type string $next_page_token - * Pagination token that can be used in subsequent calls to retrieve the next - * page of results. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Unreachable locations. Search results don't include data from those - * locations. - * To get additional information on an error, repeat the search request and - * restrict it to specific locations by setting the - * `SearchCatalogRequest.scope.restricted_locations` parameter. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * Search results. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.SearchCatalogResult results = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getResults() - { - return $this->results; - } - - /** - * Search results. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.SearchCatalogResult results = 1; - * @param array<\Google\Cloud\DataCatalog\V1\SearchCatalogResult>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DataCatalog\V1\SearchCatalogResult::class); - $this->results = $arr; - - return $this; - } - - /** - * The approximate total number of entries matched by the query. - * - * Generated from protobuf field int32 total_size = 2; - * @return int - */ - public function getTotalSize() - { - return $this->total_size; - } - - /** - * The approximate total number of entries matched by the query. - * - * Generated from protobuf field int32 total_size = 2; - * @param int $var - * @return $this - */ - public function setTotalSize($var) - { - GPBUtil::checkInt32($var); - $this->total_size = $var; - - return $this; - } - - /** - * Pagination token that can be used in subsequent calls to retrieve the next - * page of results. - * - * Generated from protobuf field string next_page_token = 3; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Pagination token that can be used in subsequent calls to retrieve the next - * page of results. - * - * Generated from protobuf field string next_page_token = 3; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Unreachable locations. Search results don't include data from those - * locations. - * To get additional information on an error, repeat the search request and - * restrict it to specific locations by setting the - * `SearchCatalogRequest.scope.restricted_locations` parameter. - * - * Generated from protobuf field repeated string unreachable = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Unreachable locations. Search results don't include data from those - * locations. - * To get additional information on an error, repeat the search request and - * restrict it to specific locations by setting the - * `SearchCatalogRequest.scope.restricted_locations` parameter. - * - * Generated from protobuf field repeated string unreachable = 6; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SearchCatalogResult.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SearchCatalogResult.php deleted file mode 100644 index 3e4c505fd6a7..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SearchCatalogResult.php +++ /dev/null @@ -1,474 +0,0 @@ -google.cloud.datacatalog.v1.SearchCatalogResult - */ -class SearchCatalogResult extends \Google\Protobuf\Internal\Message -{ - /** - * Type of the search result. - * You can use this field to determine which get method to call to fetch the - * full resource. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.SearchResultType search_result_type = 1; - */ - protected $search_result_type = 0; - /** - * Sub-type of the search result. - * A dot-delimited full type of the resource. The same type you - * specify in the `type` search predicate. - * Examples: `entry.table`, `entry.dataStream`, `tagTemplate`. - * - * Generated from protobuf field string search_result_subtype = 2; - */ - protected $search_result_subtype = ''; - /** - * The relative name of the resource in URL format. - * Examples: - * * `projects/{PROJECT_ID}/locations/{LOCATION_ID}/entryGroups/{ENTRY_GROUP_ID}/entries/{ENTRY_ID}` - * * `projects/{PROJECT_ID}/tagTemplates/{TAG_TEMPLATE_ID}` - * - * Generated from protobuf field string relative_resource_name = 3; - */ - protected $relative_resource_name = ''; - /** - * The full name of the Google Cloud resource the entry belongs to. - * For more information, see [Full Resource Name] - * (/apis/design/resource_names#full_resource_name). - * Example: - * `//bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID` - * - * Generated from protobuf field string linked_resource = 4; - */ - protected $linked_resource = ''; - /** - * The last modification timestamp of the entry in the source system. - * - * Generated from protobuf field .google.protobuf.Timestamp modify_time = 7; - */ - protected $modify_time = null; - /** - * Fully qualified name (FQN) of the resource. - * FQNs take two forms: - * * For non-regionalized resources: - * `{SYSTEM}:{PROJECT}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}` - * * For regionalized resources: - * `{SYSTEM}:{PROJECT}.{LOCATION_ID}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}` - * Example for a DPMS table: - * `dataproc_metastore:PROJECT_ID.LOCATION_ID.INSTANCE_ID.DATABASE_ID.TABLE_ID` - * - * Generated from protobuf field string fully_qualified_name = 10; - */ - protected $fully_qualified_name = ''; - /** - * The display name of the result. - * - * Generated from protobuf field string display_name = 12; - */ - protected $display_name = ''; - /** - * Entry description that can consist of several sentences or paragraphs that - * describe entry contents. - * - * Generated from protobuf field string description = 13; - */ - protected $description = ''; - protected $system; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $search_result_type - * Type of the search result. - * You can use this field to determine which get method to call to fetch the - * full resource. - * @type string $search_result_subtype - * Sub-type of the search result. - * A dot-delimited full type of the resource. The same type you - * specify in the `type` search predicate. - * Examples: `entry.table`, `entry.dataStream`, `tagTemplate`. - * @type string $relative_resource_name - * The relative name of the resource in URL format. - * Examples: - * * `projects/{PROJECT_ID}/locations/{LOCATION_ID}/entryGroups/{ENTRY_GROUP_ID}/entries/{ENTRY_ID}` - * * `projects/{PROJECT_ID}/tagTemplates/{TAG_TEMPLATE_ID}` - * @type string $linked_resource - * The full name of the Google Cloud resource the entry belongs to. - * For more information, see [Full Resource Name] - * (/apis/design/resource_names#full_resource_name). - * Example: - * `//bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID` - * @type \Google\Protobuf\Timestamp $modify_time - * The last modification timestamp of the entry in the source system. - * @type int $integrated_system - * Output only. The source system that Data Catalog automatically integrates - * with, such as BigQuery, Cloud Pub/Sub, or Dataproc Metastore. - * @type string $user_specified_system - * Custom source system that you can manually integrate Data Catalog with. - * @type string $fully_qualified_name - * Fully qualified name (FQN) of the resource. - * FQNs take two forms: - * * For non-regionalized resources: - * `{SYSTEM}:{PROJECT}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}` - * * For regionalized resources: - * `{SYSTEM}:{PROJECT}.{LOCATION_ID}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}` - * Example for a DPMS table: - * `dataproc_metastore:PROJECT_ID.LOCATION_ID.INSTANCE_ID.DATABASE_ID.TABLE_ID` - * @type string $display_name - * The display name of the result. - * @type string $description - * Entry description that can consist of several sentences or paragraphs that - * describe entry contents. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Search::initOnce(); - parent::__construct($data); - } - - /** - * Type of the search result. - * You can use this field to determine which get method to call to fetch the - * full resource. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.SearchResultType search_result_type = 1; - * @return int - */ - public function getSearchResultType() - { - return $this->search_result_type; - } - - /** - * Type of the search result. - * You can use this field to determine which get method to call to fetch the - * full resource. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.SearchResultType search_result_type = 1; - * @param int $var - * @return $this - */ - public function setSearchResultType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\DataCatalog\V1\SearchResultType::class); - $this->search_result_type = $var; - - return $this; - } - - /** - * Sub-type of the search result. - * A dot-delimited full type of the resource. The same type you - * specify in the `type` search predicate. - * Examples: `entry.table`, `entry.dataStream`, `tagTemplate`. - * - * Generated from protobuf field string search_result_subtype = 2; - * @return string - */ - public function getSearchResultSubtype() - { - return $this->search_result_subtype; - } - - /** - * Sub-type of the search result. - * A dot-delimited full type of the resource. The same type you - * specify in the `type` search predicate. - * Examples: `entry.table`, `entry.dataStream`, `tagTemplate`. - * - * Generated from protobuf field string search_result_subtype = 2; - * @param string $var - * @return $this - */ - public function setSearchResultSubtype($var) - { - GPBUtil::checkString($var, True); - $this->search_result_subtype = $var; - - return $this; - } - - /** - * The relative name of the resource in URL format. - * Examples: - * * `projects/{PROJECT_ID}/locations/{LOCATION_ID}/entryGroups/{ENTRY_GROUP_ID}/entries/{ENTRY_ID}` - * * `projects/{PROJECT_ID}/tagTemplates/{TAG_TEMPLATE_ID}` - * - * Generated from protobuf field string relative_resource_name = 3; - * @return string - */ - public function getRelativeResourceName() - { - return $this->relative_resource_name; - } - - /** - * The relative name of the resource in URL format. - * Examples: - * * `projects/{PROJECT_ID}/locations/{LOCATION_ID}/entryGroups/{ENTRY_GROUP_ID}/entries/{ENTRY_ID}` - * * `projects/{PROJECT_ID}/tagTemplates/{TAG_TEMPLATE_ID}` - * - * Generated from protobuf field string relative_resource_name = 3; - * @param string $var - * @return $this - */ - public function setRelativeResourceName($var) - { - GPBUtil::checkString($var, True); - $this->relative_resource_name = $var; - - return $this; - } - - /** - * The full name of the Google Cloud resource the entry belongs to. - * For more information, see [Full Resource Name] - * (/apis/design/resource_names#full_resource_name). - * Example: - * `//bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID` - * - * Generated from protobuf field string linked_resource = 4; - * @return string - */ - public function getLinkedResource() - { - return $this->linked_resource; - } - - /** - * The full name of the Google Cloud resource the entry belongs to. - * For more information, see [Full Resource Name] - * (/apis/design/resource_names#full_resource_name). - * Example: - * `//bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID` - * - * Generated from protobuf field string linked_resource = 4; - * @param string $var - * @return $this - */ - public function setLinkedResource($var) - { - GPBUtil::checkString($var, True); - $this->linked_resource = $var; - - return $this; - } - - /** - * The last modification timestamp of the entry in the source system. - * - * Generated from protobuf field .google.protobuf.Timestamp modify_time = 7; - * @return \Google\Protobuf\Timestamp|null - */ - public function getModifyTime() - { - return $this->modify_time; - } - - public function hasModifyTime() - { - return isset($this->modify_time); - } - - public function clearModifyTime() - { - unset($this->modify_time); - } - - /** - * The last modification timestamp of the entry in the source system. - * - * Generated from protobuf field .google.protobuf.Timestamp modify_time = 7; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setModifyTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->modify_time = $var; - - return $this; - } - - /** - * Output only. The source system that Data Catalog automatically integrates - * with, such as BigQuery, Cloud Pub/Sub, or Dataproc Metastore. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.IntegratedSystem integrated_system = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getIntegratedSystem() - { - return $this->readOneof(8); - } - - public function hasIntegratedSystem() - { - return $this->hasOneof(8); - } - - /** - * Output only. The source system that Data Catalog automatically integrates - * with, such as BigQuery, Cloud Pub/Sub, or Dataproc Metastore. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.IntegratedSystem integrated_system = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setIntegratedSystem($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\DataCatalog\V1\IntegratedSystem::class); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * Custom source system that you can manually integrate Data Catalog with. - * - * Generated from protobuf field string user_specified_system = 9; - * @return string - */ - public function getUserSpecifiedSystem() - { - return $this->readOneof(9); - } - - public function hasUserSpecifiedSystem() - { - return $this->hasOneof(9); - } - - /** - * Custom source system that you can manually integrate Data Catalog with. - * - * Generated from protobuf field string user_specified_system = 9; - * @param string $var - * @return $this - */ - public function setUserSpecifiedSystem($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * Fully qualified name (FQN) of the resource. - * FQNs take two forms: - * * For non-regionalized resources: - * `{SYSTEM}:{PROJECT}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}` - * * For regionalized resources: - * `{SYSTEM}:{PROJECT}.{LOCATION_ID}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}` - * Example for a DPMS table: - * `dataproc_metastore:PROJECT_ID.LOCATION_ID.INSTANCE_ID.DATABASE_ID.TABLE_ID` - * - * Generated from protobuf field string fully_qualified_name = 10; - * @return string - */ - public function getFullyQualifiedName() - { - return $this->fully_qualified_name; - } - - /** - * Fully qualified name (FQN) of the resource. - * FQNs take two forms: - * * For non-regionalized resources: - * `{SYSTEM}:{PROJECT}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}` - * * For regionalized resources: - * `{SYSTEM}:{PROJECT}.{LOCATION_ID}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}` - * Example for a DPMS table: - * `dataproc_metastore:PROJECT_ID.LOCATION_ID.INSTANCE_ID.DATABASE_ID.TABLE_ID` - * - * Generated from protobuf field string fully_qualified_name = 10; - * @param string $var - * @return $this - */ - public function setFullyQualifiedName($var) - { - GPBUtil::checkString($var, True); - $this->fully_qualified_name = $var; - - return $this; - } - - /** - * The display name of the result. - * - * Generated from protobuf field string display_name = 12; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The display name of the result. - * - * Generated from protobuf field string display_name = 12; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Entry description that can consist of several sentences or paragraphs that - * describe entry contents. - * - * Generated from protobuf field string description = 13; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Entry description that can consist of several sentences or paragraphs that - * describe entry contents. - * - * Generated from protobuf field string description = 13; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * @return string - */ - public function getSystem() - { - return $this->whichOneof("system"); - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SearchResultType.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SearchResultType.php deleted file mode 100644 index e388bd8d63d1..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SearchResultType.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.datacatalog.v1.SearchResultType - */ -class SearchResultType -{ - /** - * Default unknown type. - * - * Generated from protobuf enum SEARCH_RESULT_TYPE_UNSPECIFIED = 0; - */ - const SEARCH_RESULT_TYPE_UNSPECIFIED = 0; - /** - * An [Entry][google.cloud.datacatalog.v1.Entry]. - * - * Generated from protobuf enum ENTRY = 1; - */ - const ENTRY = 1; - /** - * A [TagTemplate][google.cloud.datacatalog.v1.TagTemplate]. - * - * Generated from protobuf enum TAG_TEMPLATE = 2; - */ - const TAG_TEMPLATE = 2; - /** - * An [EntryGroup][google.cloud.datacatalog.v1.EntryGroup]. - * - * Generated from protobuf enum ENTRY_GROUP = 3; - */ - const ENTRY_GROUP = 3; - - private static $valueToName = [ - self::SEARCH_RESULT_TYPE_UNSPECIFIED => 'SEARCH_RESULT_TYPE_UNSPECIFIED', - self::ENTRY => 'ENTRY', - self::TAG_TEMPLATE => 'TAG_TEMPLATE', - self::ENTRY_GROUP => 'ENTRY_GROUP', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SerializedPolicyTag.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SerializedPolicyTag.php deleted file mode 100644 index aeeefe02d21f..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SerializedPolicyTag.php +++ /dev/null @@ -1,186 +0,0 @@ -google.cloud.datacatalog.v1.SerializedPolicyTag - */ -class SerializedPolicyTag extends \Google\Protobuf\Internal\Message -{ - /** - * Resource name of the policy tag. - * This field is ignored when calling `ImportTaxonomies`. - * - * Generated from protobuf field string policy_tag = 1; - */ - protected $policy_tag = ''; - /** - * Required. Display name of the policy tag. At most 200 bytes when encoded - * in UTF-8. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $display_name = ''; - /** - * Description of the serialized policy tag. At most - * 2000 bytes when encoded in UTF-8. If not set, defaults to an - * empty description. - * - * Generated from protobuf field string description = 3; - */ - protected $description = ''; - /** - * Children of the policy tag, if any. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.SerializedPolicyTag child_policy_tags = 4; - */ - private $child_policy_tags; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $policy_tag - * Resource name of the policy tag. - * This field is ignored when calling `ImportTaxonomies`. - * @type string $display_name - * Required. Display name of the policy tag. At most 200 bytes when encoded - * in UTF-8. - * @type string $description - * Description of the serialized policy tag. At most - * 2000 bytes when encoded in UTF-8. If not set, defaults to an - * empty description. - * @type array<\Google\Cloud\DataCatalog\V1\SerializedPolicyTag>|\Google\Protobuf\Internal\RepeatedField $child_policy_tags - * Children of the policy tag, if any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Policytagmanagerserialization::initOnce(); - parent::__construct($data); - } - - /** - * Resource name of the policy tag. - * This field is ignored when calling `ImportTaxonomies`. - * - * Generated from protobuf field string policy_tag = 1; - * @return string - */ - public function getPolicyTag() - { - return $this->policy_tag; - } - - /** - * Resource name of the policy tag. - * This field is ignored when calling `ImportTaxonomies`. - * - * Generated from protobuf field string policy_tag = 1; - * @param string $var - * @return $this - */ - public function setPolicyTag($var) - { - GPBUtil::checkString($var, True); - $this->policy_tag = $var; - - return $this; - } - - /** - * Required. Display name of the policy tag. At most 200 bytes when encoded - * in UTF-8. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Required. Display name of the policy tag. At most 200 bytes when encoded - * in UTF-8. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Description of the serialized policy tag. At most - * 2000 bytes when encoded in UTF-8. If not set, defaults to an - * empty description. - * - * Generated from protobuf field string description = 3; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Description of the serialized policy tag. At most - * 2000 bytes when encoded in UTF-8. If not set, defaults to an - * empty description. - * - * Generated from protobuf field string description = 3; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Children of the policy tag, if any. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.SerializedPolicyTag child_policy_tags = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getChildPolicyTags() - { - return $this->child_policy_tags; - } - - /** - * Children of the policy tag, if any. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.SerializedPolicyTag child_policy_tags = 4; - * @param array<\Google\Cloud\DataCatalog\V1\SerializedPolicyTag>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setChildPolicyTags($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DataCatalog\V1\SerializedPolicyTag::class); - $this->child_policy_tags = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SerializedTaxonomy.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SerializedTaxonomy.php deleted file mode 100644 index f8186a5ec8bb..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SerializedTaxonomy.php +++ /dev/null @@ -1,179 +0,0 @@ -google.cloud.datacatalog.v1.SerializedTaxonomy - */ -class SerializedTaxonomy extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Display name of the taxonomy. At most 200 bytes when encoded in - * UTF-8. - * - * Generated from protobuf field string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $display_name = ''; - /** - * Description of the serialized taxonomy. At most 2000 bytes when - * encoded in UTF-8. If not set, defaults to an empty description. - * - * Generated from protobuf field string description = 2; - */ - protected $description = ''; - /** - * Top level policy tags associated with the taxonomy, if any. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.SerializedPolicyTag policy_tags = 3; - */ - private $policy_tags; - /** - * A list of policy types that are activated per taxonomy. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 4; - */ - private $activated_policy_types; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * Required. Display name of the taxonomy. At most 200 bytes when encoded in - * UTF-8. - * @type string $description - * Description of the serialized taxonomy. At most 2000 bytes when - * encoded in UTF-8. If not set, defaults to an empty description. - * @type array<\Google\Cloud\DataCatalog\V1\SerializedPolicyTag>|\Google\Protobuf\Internal\RepeatedField $policy_tags - * Top level policy tags associated with the taxonomy, if any. - * @type array|\Google\Protobuf\Internal\RepeatedField $activated_policy_types - * A list of policy types that are activated per taxonomy. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Policytagmanagerserialization::initOnce(); - parent::__construct($data); - } - - /** - * Required. Display name of the taxonomy. At most 200 bytes when encoded in - * UTF-8. - * - * Generated from protobuf field string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Required. Display name of the taxonomy. At most 200 bytes when encoded in - * UTF-8. - * - * Generated from protobuf field string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Description of the serialized taxonomy. At most 2000 bytes when - * encoded in UTF-8. If not set, defaults to an empty description. - * - * Generated from protobuf field string description = 2; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Description of the serialized taxonomy. At most 2000 bytes when - * encoded in UTF-8. If not set, defaults to an empty description. - * - * Generated from protobuf field string description = 2; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Top level policy tags associated with the taxonomy, if any. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.SerializedPolicyTag policy_tags = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPolicyTags() - { - return $this->policy_tags; - } - - /** - * Top level policy tags associated with the taxonomy, if any. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.SerializedPolicyTag policy_tags = 3; - * @param array<\Google\Cloud\DataCatalog\V1\SerializedPolicyTag>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPolicyTags($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DataCatalog\V1\SerializedPolicyTag::class); - $this->policy_tags = $arr; - - return $this; - } - - /** - * A list of policy types that are activated per taxonomy. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getActivatedPolicyTypes() - { - return $this->activated_policy_types; - } - - /** - * A list of policy types that are activated per taxonomy. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setActivatedPolicyTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\DataCatalog\V1\Taxonomy\PolicyType::class); - $this->activated_policy_types = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ServiceSpec.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ServiceSpec.php deleted file mode 100644 index 8fbbf96c1866..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ServiceSpec.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.datacatalog.v1.ServiceSpec - */ -class ServiceSpec extends \Google\Protobuf\Internal\Message -{ - protected $system_spec; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DataCatalog\V1\CloudBigtableInstanceSpec $cloud_bigtable_instance_spec - * Specification that applies to Instance entries of `CLOUD_BIGTABLE` - * system. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * Specification that applies to Instance entries of `CLOUD_BIGTABLE` - * system. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.CloudBigtableInstanceSpec cloud_bigtable_instance_spec = 1; - * @return \Google\Cloud\DataCatalog\V1\CloudBigtableInstanceSpec|null - */ - public function getCloudBigtableInstanceSpec() - { - return $this->readOneof(1); - } - - public function hasCloudBigtableInstanceSpec() - { - return $this->hasOneof(1); - } - - /** - * Specification that applies to Instance entries of `CLOUD_BIGTABLE` - * system. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.CloudBigtableInstanceSpec cloud_bigtable_instance_spec = 1; - * @param \Google\Cloud\DataCatalog\V1\CloudBigtableInstanceSpec $var - * @return $this - */ - public function setCloudBigtableInstanceSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\CloudBigtableInstanceSpec::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * @return string - */ - public function getSystemSpec() - { - return $this->whichOneof("system_spec"); - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SqlDatabaseSystemSpec.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SqlDatabaseSystemSpec.php deleted file mode 100644 index 86661c30183d..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SqlDatabaseSystemSpec.php +++ /dev/null @@ -1,197 +0,0 @@ -google.cloud.datacatalog.v1.SqlDatabaseSystemSpec - */ -class SqlDatabaseSystemSpec extends \Google\Protobuf\Internal\Message -{ - /** - * SQL Database Engine. - * enum SqlEngine { - * UNDEFINED = 0; - * MY_SQL = 1; - * POSTGRE_SQL = 2; - * SQL_SERVER = 3; - * } - * Engine of the enclosing database instance. - * - * Generated from protobuf field string sql_engine = 1; - */ - protected $sql_engine = ''; - /** - * Version of the database engine. - * - * Generated from protobuf field string database_version = 2; - */ - protected $database_version = ''; - /** - * Host of the SQL database - * enum InstanceHost { - * UNDEFINED = 0; - * SELF_HOSTED = 1; - * CLOUD_SQL = 2; - * AMAZON_RDS = 3; - * AZURE_SQL = 4; - * } - * Host of the enclousing database instance. - * - * Generated from protobuf field string instance_host = 3; - */ - protected $instance_host = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $sql_engine - * SQL Database Engine. - * enum SqlEngine { - * UNDEFINED = 0; - * MY_SQL = 1; - * POSTGRE_SQL = 2; - * SQL_SERVER = 3; - * } - * Engine of the enclosing database instance. - * @type string $database_version - * Version of the database engine. - * @type string $instance_host - * Host of the SQL database - * enum InstanceHost { - * UNDEFINED = 0; - * SELF_HOSTED = 1; - * CLOUD_SQL = 2; - * AMAZON_RDS = 3; - * AZURE_SQL = 4; - * } - * Host of the enclousing database instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * SQL Database Engine. - * enum SqlEngine { - * UNDEFINED = 0; - * MY_SQL = 1; - * POSTGRE_SQL = 2; - * SQL_SERVER = 3; - * } - * Engine of the enclosing database instance. - * - * Generated from protobuf field string sql_engine = 1; - * @return string - */ - public function getSqlEngine() - { - return $this->sql_engine; - } - - /** - * SQL Database Engine. - * enum SqlEngine { - * UNDEFINED = 0; - * MY_SQL = 1; - * POSTGRE_SQL = 2; - * SQL_SERVER = 3; - * } - * Engine of the enclosing database instance. - * - * Generated from protobuf field string sql_engine = 1; - * @param string $var - * @return $this - */ - public function setSqlEngine($var) - { - GPBUtil::checkString($var, True); - $this->sql_engine = $var; - - return $this; - } - - /** - * Version of the database engine. - * - * Generated from protobuf field string database_version = 2; - * @return string - */ - public function getDatabaseVersion() - { - return $this->database_version; - } - - /** - * Version of the database engine. - * - * Generated from protobuf field string database_version = 2; - * @param string $var - * @return $this - */ - public function setDatabaseVersion($var) - { - GPBUtil::checkString($var, True); - $this->database_version = $var; - - return $this; - } - - /** - * Host of the SQL database - * enum InstanceHost { - * UNDEFINED = 0; - * SELF_HOSTED = 1; - * CLOUD_SQL = 2; - * AMAZON_RDS = 3; - * AZURE_SQL = 4; - * } - * Host of the enclousing database instance. - * - * Generated from protobuf field string instance_host = 3; - * @return string - */ - public function getInstanceHost() - { - return $this->instance_host; - } - - /** - * Host of the SQL database - * enum InstanceHost { - * UNDEFINED = 0; - * SELF_HOSTED = 1; - * CLOUD_SQL = 2; - * AMAZON_RDS = 3; - * AZURE_SQL = 4; - * } - * Host of the enclousing database instance. - * - * Generated from protobuf field string instance_host = 3; - * @param string $var - * @return $this - */ - public function setInstanceHost($var) - { - GPBUtil::checkString($var, True); - $this->instance_host = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/StarEntryRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/StarEntryRequest.php deleted file mode 100644 index 53f0422fc6a5..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/StarEntryRequest.php +++ /dev/null @@ -1,82 +0,0 @@ -google.cloud.datacatalog.v1.StarEntryRequest - */ -class StarEntryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the entry to mark as starred. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the entry to mark as starred. Please see - * {@see DataCatalogClient::entryName()} for help formatting this field. - * - * @return \Google\Cloud\DataCatalog\V1\StarEntryRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the entry to mark as starred. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the entry to mark as starred. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the entry to mark as starred. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/StarEntryResponse.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/StarEntryResponse.php deleted file mode 100644 index b54212bdfbf4..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/StarEntryResponse.php +++ /dev/null @@ -1,35 +0,0 @@ -google.cloud.datacatalog.v1.StarEntryResponse - */ -class StarEntryResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/StorageProperties.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/StorageProperties.php deleted file mode 100644 index f750dbc3b49a..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/StorageProperties.php +++ /dev/null @@ -1,169 +0,0 @@ -google.cloud.datacatalog.v1.StorageProperties - */ -class StorageProperties extends \Google\Protobuf\Internal\Message -{ - /** - * Patterns to identify a set of files for this fileset. - * Examples of a valid `file_pattern`: - * * `gs://bucket_name/dir/*`: matches all files in the `bucket_name/dir` - * directory - * * `gs://bucket_name/dir/**`: matches all files in the `bucket_name/dir` - * and all subdirectories recursively - * * `gs://bucket_name/file*`: matches files prefixed by `file` in - * `bucket_name` - * * `gs://bucket_name/??.txt`: matches files with two characters followed by - * `.txt` in `bucket_name` - * * `gs://bucket_name/[aeiou].txt`: matches files that contain a single - * vowel character followed by `.txt` in - * `bucket_name` - * * `gs://bucket_name/[a-m].txt`: matches files that contain `a`, `b`, ... - * or `m` followed by `.txt` in `bucket_name` - * * `gs://bucket_name/a/*/b`: matches all files in `bucket_name` that match - * the `a/*/b` pattern, such as `a/c/b`, `a/d/b` - * * `gs://another_bucket/a.txt`: matches `gs://another_bucket/a.txt` - * - * Generated from protobuf field repeated string file_pattern = 1; - */ - private $file_pattern; - /** - * File type in MIME format, for example, `text/plain`. - * - * Generated from protobuf field string file_type = 2; - */ - protected $file_type = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $file_pattern - * Patterns to identify a set of files for this fileset. - * Examples of a valid `file_pattern`: - * * `gs://bucket_name/dir/*`: matches all files in the `bucket_name/dir` - * directory - * * `gs://bucket_name/dir/**`: matches all files in the `bucket_name/dir` - * and all subdirectories recursively - * * `gs://bucket_name/file*`: matches files prefixed by `file` in - * `bucket_name` - * * `gs://bucket_name/??.txt`: matches files with two characters followed by - * `.txt` in `bucket_name` - * * `gs://bucket_name/[aeiou].txt`: matches files that contain a single - * vowel character followed by `.txt` in - * `bucket_name` - * * `gs://bucket_name/[a-m].txt`: matches files that contain `a`, `b`, ... - * or `m` followed by `.txt` in `bucket_name` - * * `gs://bucket_name/a/*/b`: matches all files in `bucket_name` that match - * the `a/*/b` pattern, such as `a/c/b`, `a/d/b` - * * `gs://another_bucket/a.txt`: matches `gs://another_bucket/a.txt` - * @type string $file_type - * File type in MIME format, for example, `text/plain`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\DataSource::initOnce(); - parent::__construct($data); - } - - /** - * Patterns to identify a set of files for this fileset. - * Examples of a valid `file_pattern`: - * * `gs://bucket_name/dir/*`: matches all files in the `bucket_name/dir` - * directory - * * `gs://bucket_name/dir/**`: matches all files in the `bucket_name/dir` - * and all subdirectories recursively - * * `gs://bucket_name/file*`: matches files prefixed by `file` in - * `bucket_name` - * * `gs://bucket_name/??.txt`: matches files with two characters followed by - * `.txt` in `bucket_name` - * * `gs://bucket_name/[aeiou].txt`: matches files that contain a single - * vowel character followed by `.txt` in - * `bucket_name` - * * `gs://bucket_name/[a-m].txt`: matches files that contain `a`, `b`, ... - * or `m` followed by `.txt` in `bucket_name` - * * `gs://bucket_name/a/*/b`: matches all files in `bucket_name` that match - * the `a/*/b` pattern, such as `a/c/b`, `a/d/b` - * * `gs://another_bucket/a.txt`: matches `gs://another_bucket/a.txt` - * - * Generated from protobuf field repeated string file_pattern = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFilePattern() - { - return $this->file_pattern; - } - - /** - * Patterns to identify a set of files for this fileset. - * Examples of a valid `file_pattern`: - * * `gs://bucket_name/dir/*`: matches all files in the `bucket_name/dir` - * directory - * * `gs://bucket_name/dir/**`: matches all files in the `bucket_name/dir` - * and all subdirectories recursively - * * `gs://bucket_name/file*`: matches files prefixed by `file` in - * `bucket_name` - * * `gs://bucket_name/??.txt`: matches files with two characters followed by - * `.txt` in `bucket_name` - * * `gs://bucket_name/[aeiou].txt`: matches files that contain a single - * vowel character followed by `.txt` in - * `bucket_name` - * * `gs://bucket_name/[a-m].txt`: matches files that contain `a`, `b`, ... - * or `m` followed by `.txt` in `bucket_name` - * * `gs://bucket_name/a/*/b`: matches all files in `bucket_name` that match - * the `a/*/b` pattern, such as `a/c/b`, `a/d/b` - * * `gs://another_bucket/a.txt`: matches `gs://another_bucket/a.txt` - * - * Generated from protobuf field repeated string file_pattern = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFilePattern($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->file_pattern = $arr; - - return $this; - } - - /** - * File type in MIME format, for example, `text/plain`. - * - * Generated from protobuf field string file_type = 2; - * @return string - */ - public function getFileType() - { - return $this->file_type; - } - - /** - * File type in MIME format, for example, `text/plain`. - * - * Generated from protobuf field string file_type = 2; - * @param string $var - * @return $this - */ - public function setFileType($var) - { - GPBUtil::checkString($var, True); - $this->file_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SystemTimestamps.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SystemTimestamps.php deleted file mode 100644 index bdc1c3c65b38..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/SystemTimestamps.php +++ /dev/null @@ -1,189 +0,0 @@ -google.cloud.datacatalog.v1.SystemTimestamps - */ -class SystemTimestamps extends \Google\Protobuf\Internal\Message -{ - /** - * Creation timestamp of the resource within the given system. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - */ - protected $create_time = null; - /** - * Timestamp of the last modification of the resource or its metadata within - * a given system. - * Note: Depending on the source system, not every modification updates this - * timestamp. - * For example, BigQuery timestamps every metadata modification but not data - * or permission changes. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; - */ - protected $update_time = null; - /** - * Output only. Expiration timestamp of the resource within the given system. - * Currently only applicable to BigQuery resources. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $expire_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * Creation timestamp of the resource within the given system. - * @type \Google\Protobuf\Timestamp $update_time - * Timestamp of the last modification of the resource or its metadata within - * a given system. - * Note: Depending on the source system, not every modification updates this - * timestamp. - * For example, BigQuery timestamps every metadata modification but not data - * or permission changes. - * @type \Google\Protobuf\Timestamp $expire_time - * Output only. Expiration timestamp of the resource within the given system. - * Currently only applicable to BigQuery resources. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Timestamps::initOnce(); - parent::__construct($data); - } - - /** - * Creation timestamp of the resource within the given system. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Creation timestamp of the resource within the given system. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Timestamp of the last modification of the resource or its metadata within - * a given system. - * Note: Depending on the source system, not every modification updates this - * timestamp. - * For example, BigQuery timestamps every metadata modification but not data - * or permission changes. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Timestamp of the last modification of the resource or its metadata within - * a given system. - * Note: Depending on the source system, not every modification updates this - * timestamp. - * For example, BigQuery timestamps every metadata modification but not data - * or permission changes. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. Expiration timestamp of the resource within the given system. - * Currently only applicable to BigQuery resources. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getExpireTime() - { - return $this->expire_time; - } - - public function hasExpireTime() - { - return isset($this->expire_time); - } - - public function clearExpireTime() - { - unset($this->expire_time); - } - - /** - * Output only. Expiration timestamp of the resource within the given system. - * Currently only applicable to BigQuery resources. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setExpireTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->expire_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/TableSourceType.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/TableSourceType.php deleted file mode 100644 index 071a61c144cd..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/TableSourceType.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.datacatalog.v1.TableSourceType - */ -class TableSourceType -{ - /** - * Default unknown type. - * - * Generated from protobuf enum TABLE_SOURCE_TYPE_UNSPECIFIED = 0; - */ - const TABLE_SOURCE_TYPE_UNSPECIFIED = 0; - /** - * Table view. - * - * Generated from protobuf enum BIGQUERY_VIEW = 2; - */ - const BIGQUERY_VIEW = 2; - /** - * BigQuery native table. - * - * Generated from protobuf enum BIGQUERY_TABLE = 5; - */ - const BIGQUERY_TABLE = 5; - /** - * BigQuery materialized view. - * - * Generated from protobuf enum BIGQUERY_MATERIALIZED_VIEW = 7; - */ - const BIGQUERY_MATERIALIZED_VIEW = 7; - - private static $valueToName = [ - self::TABLE_SOURCE_TYPE_UNSPECIFIED => 'TABLE_SOURCE_TYPE_UNSPECIFIED', - self::BIGQUERY_VIEW => 'BIGQUERY_VIEW', - self::BIGQUERY_TABLE => 'BIGQUERY_TABLE', - self::BIGQUERY_MATERIALIZED_VIEW => 'BIGQUERY_MATERIALIZED_VIEW', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/TableSpec.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/TableSpec.php deleted file mode 100644 index 79f7f99856fc..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/TableSpec.php +++ /dev/null @@ -1,83 +0,0 @@ -google.cloud.datacatalog.v1.TableSpec - */ -class TableSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. If the table is date-sharded, that is, it matches the - * `[prefix]YYYYMMDD` name pattern, this field is the Data Catalog resource - * name of the date-sharded grouped entry. For example: - * `projects/{PROJECT_ID}/locations/{LOCATION}/entrygroups/{ENTRY_GROUP_ID}/entries/{ENTRY_ID}`. - * Otherwise, `grouped_entry` is empty. - * - * Generated from protobuf field string grouped_entry = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $grouped_entry = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $grouped_entry - * Output only. If the table is date-sharded, that is, it matches the - * `[prefix]YYYYMMDD` name pattern, this field is the Data Catalog resource - * name of the date-sharded grouped entry. For example: - * `projects/{PROJECT_ID}/locations/{LOCATION}/entrygroups/{ENTRY_GROUP_ID}/entries/{ENTRY_ID}`. - * Otherwise, `grouped_entry` is empty. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\TableSpec::initOnce(); - parent::__construct($data); - } - - /** - * Output only. If the table is date-sharded, that is, it matches the - * `[prefix]YYYYMMDD` name pattern, this field is the Data Catalog resource - * name of the date-sharded grouped entry. For example: - * `projects/{PROJECT_ID}/locations/{LOCATION}/entrygroups/{ENTRY_GROUP_ID}/entries/{ENTRY_ID}`. - * Otherwise, `grouped_entry` is empty. - * - * Generated from protobuf field string grouped_entry = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getGroupedEntry() - { - return $this->grouped_entry; - } - - /** - * Output only. If the table is date-sharded, that is, it matches the - * `[prefix]YYYYMMDD` name pattern, this field is the Data Catalog resource - * name of the date-sharded grouped entry. For example: - * `projects/{PROJECT_ID}/locations/{LOCATION}/entrygroups/{ENTRY_GROUP_ID}/entries/{ENTRY_ID}`. - * Otherwise, `grouped_entry` is empty. - * - * Generated from protobuf field string grouped_entry = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setGroupedEntry($var) - { - GPBUtil::checkString($var, True); - $this->grouped_entry = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Tag.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Tag.php deleted file mode 100644 index 54e7f6197639..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Tag.php +++ /dev/null @@ -1,256 +0,0 @@ -google.cloud.datacatalog.v1.Tag - */ -class Tag extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the tag in URL format where tag ID is a - * system-generated identifier. - * Note: The tag itself might not be stored in the location specified in its - * name. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Required. The resource name of the tag template this tag uses. Example: - * `projects/{PROJECT_ID}/locations/{LOCATION}/tagTemplates/{TAG_TEMPLATE_ID}` - * This field cannot be modified after creation. - * - * Generated from protobuf field string template = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $template = ''; - /** - * Output only. The display name of the tag template. - * - * Generated from protobuf field string template_display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $template_display_name = ''; - /** - * Required. Maps the ID of a tag field to its value and additional - * information about that field. - * Tag template defines valid field IDs. A tag - * must have at least 1 field and at most 500 fields. - * - * Generated from protobuf field map fields = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - private $fields; - protected $scope; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the tag in URL format where tag ID is a - * system-generated identifier. - * Note: The tag itself might not be stored in the location specified in its - * name. - * @type string $template - * Required. The resource name of the tag template this tag uses. Example: - * `projects/{PROJECT_ID}/locations/{LOCATION}/tagTemplates/{TAG_TEMPLATE_ID}` - * This field cannot be modified after creation. - * @type string $template_display_name - * Output only. The display name of the tag template. - * @type string $column - * Resources like entry can have schemas associated with them. This scope - * allows you to attach tags to an individual column based on that schema. - * To attach a tag to a nested column, separate column names with a dot - * (`.`). Example: `column.nested_column`. - * @type array|\Google\Protobuf\Internal\MapField $fields - * Required. Maps the ID of a tag field to its value and additional - * information about that field. - * Tag template defines valid field IDs. A tag - * must have at least 1 field and at most 500 fields. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Tags::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the tag in URL format where tag ID is a - * system-generated identifier. - * Note: The tag itself might not be stored in the location specified in its - * name. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the tag in URL format where tag ID is a - * system-generated identifier. - * Note: The tag itself might not be stored in the location specified in its - * name. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The resource name of the tag template this tag uses. Example: - * `projects/{PROJECT_ID}/locations/{LOCATION}/tagTemplates/{TAG_TEMPLATE_ID}` - * This field cannot be modified after creation. - * - * Generated from protobuf field string template = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTemplate() - { - return $this->template; - } - - /** - * Required. The resource name of the tag template this tag uses. Example: - * `projects/{PROJECT_ID}/locations/{LOCATION}/tagTemplates/{TAG_TEMPLATE_ID}` - * This field cannot be modified after creation. - * - * Generated from protobuf field string template = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTemplate($var) - { - GPBUtil::checkString($var, True); - $this->template = $var; - - return $this; - } - - /** - * Output only. The display name of the tag template. - * - * Generated from protobuf field string template_display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getTemplateDisplayName() - { - return $this->template_display_name; - } - - /** - * Output only. The display name of the tag template. - * - * Generated from protobuf field string template_display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setTemplateDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->template_display_name = $var; - - return $this; - } - - /** - * Resources like entry can have schemas associated with them. This scope - * allows you to attach tags to an individual column based on that schema. - * To attach a tag to a nested column, separate column names with a dot - * (`.`). Example: `column.nested_column`. - * - * Generated from protobuf field string column = 4; - * @return string - */ - public function getColumn() - { - return $this->readOneof(4); - } - - public function hasColumn() - { - return $this->hasOneof(4); - } - - /** - * Resources like entry can have schemas associated with them. This scope - * allows you to attach tags to an individual column based on that schema. - * To attach a tag to a nested column, separate column names with a dot - * (`.`). Example: `column.nested_column`. - * - * Generated from protobuf field string column = 4; - * @param string $var - * @return $this - */ - public function setColumn($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Required. Maps the ID of a tag field to its value and additional - * information about that field. - * Tag template defines valid field IDs. A tag - * must have at least 1 field and at most 500 fields. - * - * Generated from protobuf field map fields = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getFields() - { - return $this->fields; - } - - /** - * Required. Maps the ID of a tag field to its value and additional - * information about that field. - * Tag template defines valid field IDs. A tag - * must have at least 1 field and at most 500 fields. - * - * Generated from protobuf field map fields = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setFields($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DataCatalog\V1\TagField::class); - $this->fields = $arr; - - return $this; - } - - /** - * @return string - */ - public function getScope() - { - return $this->whichOneof("scope"); - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/TagField.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/TagField.php deleted file mode 100644 index 560ede287e87..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/TagField.php +++ /dev/null @@ -1,344 +0,0 @@ -google.cloud.datacatalog.v1.TagField - */ -class TagField extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The display name of this field. - * - * Generated from protobuf field string display_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $display_name = ''; - /** - * Output only. The order of this field with respect to other fields in this - * tag. Can be set by - * [Tag][google.cloud.datacatalog.v1.TagTemplateField.order]. - * For example, a higher value can indicate a more important field. - * The value can be negative. Multiple fields can have the same order, and - * field orders within a tag don't have to be sequential. - * - * Generated from protobuf field int32 order = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $order = 0; - protected $kind; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * Output only. The display name of this field. - * @type float $double_value - * The value of a tag field with a double type. - * @type string $string_value - * The value of a tag field with a string type. - * The maximum length is 2000 UTF-8 characters. - * @type bool $bool_value - * The value of a tag field with a boolean type. - * @type \Google\Protobuf\Timestamp $timestamp_value - * The value of a tag field with a timestamp type. - * @type \Google\Cloud\DataCatalog\V1\TagField\EnumValue $enum_value - * The value of a tag field with an enum type. - * This value must be one of the allowed values listed in this enum. - * @type string $richtext_value - * The value of a tag field with a rich text type. - * The maximum length is 10 MiB as this value holds HTML descriptions - * including encoded images. The maximum length of the text without images - * is 100 KiB. - * @type int $order - * Output only. The order of this field with respect to other fields in this - * tag. Can be set by - * [Tag][google.cloud.datacatalog.v1.TagTemplateField.order]. - * For example, a higher value can indicate a more important field. - * The value can be negative. Multiple fields can have the same order, and - * field orders within a tag don't have to be sequential. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Tags::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The display name of this field. - * - * Generated from protobuf field string display_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Output only. The display name of this field. - * - * Generated from protobuf field string display_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * The value of a tag field with a double type. - * - * Generated from protobuf field double double_value = 2; - * @return float - */ - public function getDoubleValue() - { - return $this->readOneof(2); - } - - public function hasDoubleValue() - { - return $this->hasOneof(2); - } - - /** - * The value of a tag field with a double type. - * - * Generated from protobuf field double double_value = 2; - * @param float $var - * @return $this - */ - public function setDoubleValue($var) - { - GPBUtil::checkDouble($var); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The value of a tag field with a string type. - * The maximum length is 2000 UTF-8 characters. - * - * Generated from protobuf field string string_value = 3; - * @return string - */ - public function getStringValue() - { - return $this->readOneof(3); - } - - public function hasStringValue() - { - return $this->hasOneof(3); - } - - /** - * The value of a tag field with a string type. - * The maximum length is 2000 UTF-8 characters. - * - * Generated from protobuf field string string_value = 3; - * @param string $var - * @return $this - */ - public function setStringValue($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * The value of a tag field with a boolean type. - * - * Generated from protobuf field bool bool_value = 4; - * @return bool - */ - public function getBoolValue() - { - return $this->readOneof(4); - } - - public function hasBoolValue() - { - return $this->hasOneof(4); - } - - /** - * The value of a tag field with a boolean type. - * - * Generated from protobuf field bool bool_value = 4; - * @param bool $var - * @return $this - */ - public function setBoolValue($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * The value of a tag field with a timestamp type. - * - * Generated from protobuf field .google.protobuf.Timestamp timestamp_value = 5; - * @return \Google\Protobuf\Timestamp|null - */ - public function getTimestampValue() - { - return $this->readOneof(5); - } - - public function hasTimestampValue() - { - return $this->hasOneof(5); - } - - /** - * The value of a tag field with a timestamp type. - * - * Generated from protobuf field .google.protobuf.Timestamp timestamp_value = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setTimestampValue($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * The value of a tag field with an enum type. - * This value must be one of the allowed values listed in this enum. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.TagField.EnumValue enum_value = 6; - * @return \Google\Cloud\DataCatalog\V1\TagField\EnumValue|null - */ - public function getEnumValue() - { - return $this->readOneof(6); - } - - public function hasEnumValue() - { - return $this->hasOneof(6); - } - - /** - * The value of a tag field with an enum type. - * This value must be one of the allowed values listed in this enum. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.TagField.EnumValue enum_value = 6; - * @param \Google\Cloud\DataCatalog\V1\TagField\EnumValue $var - * @return $this - */ - public function setEnumValue($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\TagField\EnumValue::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * The value of a tag field with a rich text type. - * The maximum length is 10 MiB as this value holds HTML descriptions - * including encoded images. The maximum length of the text without images - * is 100 KiB. - * - * Generated from protobuf field string richtext_value = 8; - * @return string - */ - public function getRichtextValue() - { - return $this->readOneof(8); - } - - public function hasRichtextValue() - { - return $this->hasOneof(8); - } - - /** - * The value of a tag field with a rich text type. - * The maximum length is 10 MiB as this value holds HTML descriptions - * including encoded images. The maximum length of the text without images - * is 100 KiB. - * - * Generated from protobuf field string richtext_value = 8; - * @param string $var - * @return $this - */ - public function setRichtextValue($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * Output only. The order of this field with respect to other fields in this - * tag. Can be set by - * [Tag][google.cloud.datacatalog.v1.TagTemplateField.order]. - * For example, a higher value can indicate a more important field. - * The value can be negative. Multiple fields can have the same order, and - * field orders within a tag don't have to be sequential. - * - * Generated from protobuf field int32 order = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getOrder() - { - return $this->order; - } - - /** - * Output only. The order of this field with respect to other fields in this - * tag. Can be set by - * [Tag][google.cloud.datacatalog.v1.TagTemplateField.order]. - * For example, a higher value can indicate a more important field. - * The value can be negative. Multiple fields can have the same order, and - * field orders within a tag don't have to be sequential. - * - * Generated from protobuf field int32 order = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setOrder($var) - { - GPBUtil::checkInt32($var); - $this->order = $var; - - return $this; - } - - /** - * @return string - */ - public function getKind() - { - return $this->whichOneof("kind"); - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/TagField/EnumValue.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/TagField/EnumValue.php deleted file mode 100644 index e2a3a5f748aa..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/TagField/EnumValue.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.datacatalog.v1.TagField.EnumValue - */ -class EnumValue extends \Google\Protobuf\Internal\Message -{ - /** - * The display name of the enum value. - * - * Generated from protobuf field string display_name = 1; - */ - protected $display_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * The display name of the enum value. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Tags::initOnce(); - parent::__construct($data); - } - - /** - * The display name of the enum value. - * - * Generated from protobuf field string display_name = 1; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The display name of the enum value. - * - * Generated from protobuf field string display_name = 1; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(EnumValue::class, \Google\Cloud\DataCatalog\V1\TagField_EnumValue::class); - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/TagTemplate.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/TagTemplate.php deleted file mode 100644 index af1412783557..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/TagTemplate.php +++ /dev/null @@ -1,244 +0,0 @@ -google.cloud.datacatalog.v1.TagTemplate - */ -class TagTemplate extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the tag template in URL format. - * Note: The tag template itself and its child resources might not be - * stored in the location specified in its name. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Display name for this template. Defaults to an empty string. - * The name must contain only Unicode letters, numbers (0-9), underscores (_), - * dashes (-), spaces ( ), and can't start or end with spaces. - * The maximum length is 200 characters. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - /** - * Indicates whether tags created with this template are public. Public tags - * do not require tag template access to appear in - * [ListTags][google.cloud.datacatalog.v1.ListTags] API response. - * Additionally, you can search for a public tag by value with a - * simple search query in addition to using a ``tag:`` predicate. - * - * Generated from protobuf field bool is_publicly_readable = 5; - */ - protected $is_publicly_readable = false; - /** - * Required. Map of tag template field IDs to the settings for the field. - * This map is an exhaustive list of the allowed fields. The map must contain - * at least one field and at most 500 fields. - * The keys to this map are tag template field IDs. The IDs have the - * following limitations: - * * Can contain uppercase and lowercase letters, numbers (0-9) and - * underscores (_). - * * Must be at least 1 character and at most 64 characters long. - * * Must start with a letter or underscore. - * - * Generated from protobuf field map fields = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - private $fields; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the tag template in URL format. - * Note: The tag template itself and its child resources might not be - * stored in the location specified in its name. - * @type string $display_name - * Display name for this template. Defaults to an empty string. - * The name must contain only Unicode letters, numbers (0-9), underscores (_), - * dashes (-), spaces ( ), and can't start or end with spaces. - * The maximum length is 200 characters. - * @type bool $is_publicly_readable - * Indicates whether tags created with this template are public. Public tags - * do not require tag template access to appear in - * [ListTags][google.cloud.datacatalog.v1.ListTags] API response. - * Additionally, you can search for a public tag by value with a - * simple search query in addition to using a ``tag:`` predicate. - * @type array|\Google\Protobuf\Internal\MapField $fields - * Required. Map of tag template field IDs to the settings for the field. - * This map is an exhaustive list of the allowed fields. The map must contain - * at least one field and at most 500 fields. - * The keys to this map are tag template field IDs. The IDs have the - * following limitations: - * * Can contain uppercase and lowercase letters, numbers (0-9) and - * underscores (_). - * * Must be at least 1 character and at most 64 characters long. - * * Must start with a letter or underscore. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Tags::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the tag template in URL format. - * Note: The tag template itself and its child resources might not be - * stored in the location specified in its name. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the tag template in URL format. - * Note: The tag template itself and its child resources might not be - * stored in the location specified in its name. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Display name for this template. Defaults to an empty string. - * The name must contain only Unicode letters, numbers (0-9), underscores (_), - * dashes (-), spaces ( ), and can't start or end with spaces. - * The maximum length is 200 characters. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Display name for this template. Defaults to an empty string. - * The name must contain only Unicode letters, numbers (0-9), underscores (_), - * dashes (-), spaces ( ), and can't start or end with spaces. - * The maximum length is 200 characters. - * - * Generated from protobuf field string display_name = 2; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Indicates whether tags created with this template are public. Public tags - * do not require tag template access to appear in - * [ListTags][google.cloud.datacatalog.v1.ListTags] API response. - * Additionally, you can search for a public tag by value with a - * simple search query in addition to using a ``tag:`` predicate. - * - * Generated from protobuf field bool is_publicly_readable = 5; - * @return bool - */ - public function getIsPubliclyReadable() - { - return $this->is_publicly_readable; - } - - /** - * Indicates whether tags created with this template are public. Public tags - * do not require tag template access to appear in - * [ListTags][google.cloud.datacatalog.v1.ListTags] API response. - * Additionally, you can search for a public tag by value with a - * simple search query in addition to using a ``tag:`` predicate. - * - * Generated from protobuf field bool is_publicly_readable = 5; - * @param bool $var - * @return $this - */ - public function setIsPubliclyReadable($var) - { - GPBUtil::checkBool($var); - $this->is_publicly_readable = $var; - - return $this; - } - - /** - * Required. Map of tag template field IDs to the settings for the field. - * This map is an exhaustive list of the allowed fields. The map must contain - * at least one field and at most 500 fields. - * The keys to this map are tag template field IDs. The IDs have the - * following limitations: - * * Can contain uppercase and lowercase letters, numbers (0-9) and - * underscores (_). - * * Must be at least 1 character and at most 64 characters long. - * * Must start with a letter or underscore. - * - * Generated from protobuf field map fields = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getFields() - { - return $this->fields; - } - - /** - * Required. Map of tag template field IDs to the settings for the field. - * This map is an exhaustive list of the allowed fields. The map must contain - * at least one field and at most 500 fields. - * The keys to this map are tag template field IDs. The IDs have the - * following limitations: - * * Can contain uppercase and lowercase letters, numbers (0-9) and - * underscores (_). - * * Must be at least 1 character and at most 64 characters long. - * * Must start with a letter or underscore. - * - * Generated from protobuf field map fields = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setFields($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DataCatalog\V1\TagTemplateField::class); - $this->fields = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/TagTemplateField.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/TagTemplateField.php deleted file mode 100644 index 679ab457c1d9..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/TagTemplateField.php +++ /dev/null @@ -1,303 +0,0 @@ -google.cloud.datacatalog.v1.TagTemplateField - */ -class TagTemplateField extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of the tag template field in URL format. - * Example: - * `projects/{PROJECT_ID}/locations/{LOCATION}/tagTemplates/{TAG_TEMPLATE}/fields/{FIELD}` - * Note: The tag template field itself might not be stored in the location - * specified in its name. - * The name must contain only letters (a-z, A-Z), numbers (0-9), - * or underscores (_), and must start with a letter or underscore. - * The maximum length is 64 characters. - * - * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * The display name for this field. Defaults to an empty string. - * The name must contain only Unicode letters, numbers (0-9), underscores (_), - * dashes (-), spaces ( ), and can't start or end with spaces. - * The maximum length is 200 characters. - * - * Generated from protobuf field string display_name = 1; - */ - protected $display_name = ''; - /** - * Required. The type of value this tag field can contain. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.FieldType type = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $type = null; - /** - * If true, this field is required. Defaults to false. - * - * Generated from protobuf field bool is_required = 3; - */ - protected $is_required = false; - /** - * The description for this field. Defaults to an empty string. - * - * Generated from protobuf field string description = 4; - */ - protected $description = ''; - /** - * The order of this field with respect to other fields in this tag - * template. - * For example, a higher value can indicate a more important field. - * The value can be negative. Multiple fields can have the same order and - * field orders within a tag don't have to be sequential. - * - * Generated from protobuf field int32 order = 5; - */ - protected $order = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name of the tag template field in URL format. - * Example: - * `projects/{PROJECT_ID}/locations/{LOCATION}/tagTemplates/{TAG_TEMPLATE}/fields/{FIELD}` - * Note: The tag template field itself might not be stored in the location - * specified in its name. - * The name must contain only letters (a-z, A-Z), numbers (0-9), - * or underscores (_), and must start with a letter or underscore. - * The maximum length is 64 characters. - * @type string $display_name - * The display name for this field. Defaults to an empty string. - * The name must contain only Unicode letters, numbers (0-9), underscores (_), - * dashes (-), spaces ( ), and can't start or end with spaces. - * The maximum length is 200 characters. - * @type \Google\Cloud\DataCatalog\V1\FieldType $type - * Required. The type of value this tag field can contain. - * @type bool $is_required - * If true, this field is required. Defaults to false. - * @type string $description - * The description for this field. Defaults to an empty string. - * @type int $order - * The order of this field with respect to other fields in this tag - * template. - * For example, a higher value can indicate a more important field. - * The value can be negative. Multiple fields can have the same order and - * field orders within a tag don't have to be sequential. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Tags::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name of the tag template field in URL format. - * Example: - * `projects/{PROJECT_ID}/locations/{LOCATION}/tagTemplates/{TAG_TEMPLATE}/fields/{FIELD}` - * Note: The tag template field itself might not be stored in the location - * specified in its name. - * The name must contain only letters (a-z, A-Z), numbers (0-9), - * or underscores (_), and must start with a letter or underscore. - * The maximum length is 64 characters. - * - * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The resource name of the tag template field in URL format. - * Example: - * `projects/{PROJECT_ID}/locations/{LOCATION}/tagTemplates/{TAG_TEMPLATE}/fields/{FIELD}` - * Note: The tag template field itself might not be stored in the location - * specified in its name. - * The name must contain only letters (a-z, A-Z), numbers (0-9), - * or underscores (_), and must start with a letter or underscore. - * The maximum length is 64 characters. - * - * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The display name for this field. Defaults to an empty string. - * The name must contain only Unicode letters, numbers (0-9), underscores (_), - * dashes (-), spaces ( ), and can't start or end with spaces. - * The maximum length is 200 characters. - * - * Generated from protobuf field string display_name = 1; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The display name for this field. Defaults to an empty string. - * The name must contain only Unicode letters, numbers (0-9), underscores (_), - * dashes (-), spaces ( ), and can't start or end with spaces. - * The maximum length is 200 characters. - * - * Generated from protobuf field string display_name = 1; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Required. The type of value this tag field can contain. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.FieldType type = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\DataCatalog\V1\FieldType|null - */ - public function getType() - { - return $this->type; - } - - public function hasType() - { - return isset($this->type); - } - - public function clearType() - { - unset($this->type); - } - - /** - * Required. The type of value this tag field can contain. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.FieldType type = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\DataCatalog\V1\FieldType $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\FieldType::class); - $this->type = $var; - - return $this; - } - - /** - * If true, this field is required. Defaults to false. - * - * Generated from protobuf field bool is_required = 3; - * @return bool - */ - public function getIsRequired() - { - return $this->is_required; - } - - /** - * If true, this field is required. Defaults to false. - * - * Generated from protobuf field bool is_required = 3; - * @param bool $var - * @return $this - */ - public function setIsRequired($var) - { - GPBUtil::checkBool($var); - $this->is_required = $var; - - return $this; - } - - /** - * The description for this field. Defaults to an empty string. - * - * Generated from protobuf field string description = 4; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * The description for this field. Defaults to an empty string. - * - * Generated from protobuf field string description = 4; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * The order of this field with respect to other fields in this tag - * template. - * For example, a higher value can indicate a more important field. - * The value can be negative. Multiple fields can have the same order and - * field orders within a tag don't have to be sequential. - * - * Generated from protobuf field int32 order = 5; - * @return int - */ - public function getOrder() - { - return $this->order; - } - - /** - * The order of this field with respect to other fields in this tag - * template. - * For example, a higher value can indicate a more important field. - * The value can be negative. Multiple fields can have the same order and - * field orders within a tag don't have to be sequential. - * - * Generated from protobuf field int32 order = 5; - * @param int $var - * @return $this - */ - public function setOrder($var) - { - GPBUtil::checkInt32($var); - $this->order = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/TaggedEntry.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/TaggedEntry.php deleted file mode 100644 index 4145479ad46e..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/TaggedEntry.php +++ /dev/null @@ -1,152 +0,0 @@ -google.cloud.datacatalog.v1.TaggedEntry - */ -class TaggedEntry extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Tags that should be ingested into the Data Catalog. - * Caller should populate template name, column and fields. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Tag present_tags = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $present_tags; - /** - * Optional. Tags that should be deleted from the Data Catalog. - * Caller should populate template name and column only. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Tag absent_tags = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $absent_tags; - protected $entry; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DataCatalog\V1\Entry $v1_entry - * Non-encrypted Data Catalog v1 Entry. - * @type array<\Google\Cloud\DataCatalog\V1\Tag>|\Google\Protobuf\Internal\RepeatedField $present_tags - * Optional. Tags that should be ingested into the Data Catalog. - * Caller should populate template name, column and fields. - * @type array<\Google\Cloud\DataCatalog\V1\Tag>|\Google\Protobuf\Internal\RepeatedField $absent_tags - * Optional. Tags that should be deleted from the Data Catalog. - * Caller should populate template name and column only. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\DumpContent::initOnce(); - parent::__construct($data); - } - - /** - * Non-encrypted Data Catalog v1 Entry. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.Entry v1_entry = 1; - * @return \Google\Cloud\DataCatalog\V1\Entry|null - */ - public function getV1Entry() - { - return $this->readOneof(1); - } - - public function hasV1Entry() - { - return $this->hasOneof(1); - } - - /** - * Non-encrypted Data Catalog v1 Entry. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.Entry v1_entry = 1; - * @param \Google\Cloud\DataCatalog\V1\Entry $var - * @return $this - */ - public function setV1Entry($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\Entry::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Optional. Tags that should be ingested into the Data Catalog. - * Caller should populate template name, column and fields. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Tag present_tags = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPresentTags() - { - return $this->present_tags; - } - - /** - * Optional. Tags that should be ingested into the Data Catalog. - * Caller should populate template name, column and fields. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Tag present_tags = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\DataCatalog\V1\Tag>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPresentTags($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DataCatalog\V1\Tag::class); - $this->present_tags = $arr; - - return $this; - } - - /** - * Optional. Tags that should be deleted from the Data Catalog. - * Caller should populate template name and column only. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Tag absent_tags = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAbsentTags() - { - return $this->absent_tags; - } - - /** - * Optional. Tags that should be deleted from the Data Catalog. - * Caller should populate template name and column only. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Tag absent_tags = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\DataCatalog\V1\Tag>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAbsentTags($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DataCatalog\V1\Tag::class); - $this->absent_tags = $arr; - - return $this; - } - - /** - * @return string - */ - public function getEntry() - { - return $this->whichOneof("entry"); - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Taxonomy.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Taxonomy.php deleted file mode 100644 index 681ffc410af8..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Taxonomy.php +++ /dev/null @@ -1,354 +0,0 @@ -google.cloud.datacatalog.v1.Taxonomy - */ -class Taxonomy extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Resource name of this taxonomy in URL format. - * Note: Policy tag manager generates unique taxonomy IDs. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Required. User-defined name of this taxonomy. - * The name can't start or end with spaces, must contain only Unicode letters, - * numbers, underscores, dashes, and spaces, and be at most 200 bytes long - * when encoded in UTF-8. - * The taxonomy display name must be unique within an organization. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $display_name = ''; - /** - * Optional. Description of this taxonomy. If not set, defaults to empty. - * The description must contain only Unicode characters, tabs, newlines, - * carriage returns, and page breaks, and be at most 2000 bytes long when - * encoded in UTF-8. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Output only. Number of policy tags in this taxonomy. - * - * Generated from protobuf field int32 policy_tag_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $policy_tag_count = 0; - /** - * Output only. Creation and modification timestamps of this taxonomy. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.SystemTimestamps taxonomy_timestamps = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $taxonomy_timestamps = null; - /** - * Optional. A list of policy types that are activated for this taxonomy. If - * not set, defaults to an empty list. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $activated_policy_types; - /** - * Output only. Identity of the service which owns the Taxonomy. This field is - * only populated when the taxonomy is created by a Google Cloud service. - * Currently only 'DATAPLEX' is supported. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.Taxonomy.Service service = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $service = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. Resource name of this taxonomy in URL format. - * Note: Policy tag manager generates unique taxonomy IDs. - * @type string $display_name - * Required. User-defined name of this taxonomy. - * The name can't start or end with spaces, must contain only Unicode letters, - * numbers, underscores, dashes, and spaces, and be at most 200 bytes long - * when encoded in UTF-8. - * The taxonomy display name must be unique within an organization. - * @type string $description - * Optional. Description of this taxonomy. If not set, defaults to empty. - * The description must contain only Unicode characters, tabs, newlines, - * carriage returns, and page breaks, and be at most 2000 bytes long when - * encoded in UTF-8. - * @type int $policy_tag_count - * Output only. Number of policy tags in this taxonomy. - * @type \Google\Cloud\DataCatalog\V1\SystemTimestamps $taxonomy_timestamps - * Output only. Creation and modification timestamps of this taxonomy. - * @type array|\Google\Protobuf\Internal\RepeatedField $activated_policy_types - * Optional. A list of policy types that are activated for this taxonomy. If - * not set, defaults to an empty list. - * @type \Google\Cloud\DataCatalog\V1\Taxonomy\Service $service - * Output only. Identity of the service which owns the Taxonomy. This field is - * only populated when the taxonomy is created by a Google Cloud service. - * Currently only 'DATAPLEX' is supported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Policytagmanager::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Resource name of this taxonomy in URL format. - * Note: Policy tag manager generates unique taxonomy IDs. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. Resource name of this taxonomy in URL format. - * Note: Policy tag manager generates unique taxonomy IDs. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. User-defined name of this taxonomy. - * The name can't start or end with spaces, must contain only Unicode letters, - * numbers, underscores, dashes, and spaces, and be at most 200 bytes long - * when encoded in UTF-8. - * The taxonomy display name must be unique within an organization. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Required. User-defined name of this taxonomy. - * The name can't start or end with spaces, must contain only Unicode letters, - * numbers, underscores, dashes, and spaces, and be at most 200 bytes long - * when encoded in UTF-8. - * The taxonomy display name must be unique within an organization. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Optional. Description of this taxonomy. If not set, defaults to empty. - * The description must contain only Unicode characters, tabs, newlines, - * carriage returns, and page breaks, and be at most 2000 bytes long when - * encoded in UTF-8. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. Description of this taxonomy. If not set, defaults to empty. - * The description must contain only Unicode characters, tabs, newlines, - * carriage returns, and page breaks, and be at most 2000 bytes long when - * encoded in UTF-8. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. Number of policy tags in this taxonomy. - * - * Generated from protobuf field int32 policy_tag_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getPolicyTagCount() - { - return $this->policy_tag_count; - } - - /** - * Output only. Number of policy tags in this taxonomy. - * - * Generated from protobuf field int32 policy_tag_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setPolicyTagCount($var) - { - GPBUtil::checkInt32($var); - $this->policy_tag_count = $var; - - return $this; - } - - /** - * Output only. Creation and modification timestamps of this taxonomy. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.SystemTimestamps taxonomy_timestamps = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\DataCatalog\V1\SystemTimestamps|null - */ - public function getTaxonomyTimestamps() - { - return $this->taxonomy_timestamps; - } - - public function hasTaxonomyTimestamps() - { - return isset($this->taxonomy_timestamps); - } - - public function clearTaxonomyTimestamps() - { - unset($this->taxonomy_timestamps); - } - - /** - * Output only. Creation and modification timestamps of this taxonomy. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.SystemTimestamps taxonomy_timestamps = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\DataCatalog\V1\SystemTimestamps $var - * @return $this - */ - public function setTaxonomyTimestamps($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\SystemTimestamps::class); - $this->taxonomy_timestamps = $var; - - return $this; - } - - /** - * Optional. A list of policy types that are activated for this taxonomy. If - * not set, defaults to an empty list. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getActivatedPolicyTypes() - { - return $this->activated_policy_types; - } - - /** - * Optional. A list of policy types that are activated for this taxonomy. If - * not set, defaults to an empty list. - * - * Generated from protobuf field repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setActivatedPolicyTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\DataCatalog\V1\Taxonomy\PolicyType::class); - $this->activated_policy_types = $arr; - - return $this; - } - - /** - * Output only. Identity of the service which owns the Taxonomy. This field is - * only populated when the taxonomy is created by a Google Cloud service. - * Currently only 'DATAPLEX' is supported. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.Taxonomy.Service service = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\DataCatalog\V1\Taxonomy\Service|null - */ - public function getService() - { - return $this->service; - } - - public function hasService() - { - return isset($this->service); - } - - public function clearService() - { - unset($this->service); - } - - /** - * Output only. Identity of the service which owns the Taxonomy. This field is - * only populated when the taxonomy is created by a Google Cloud service. - * Currently only 'DATAPLEX' is supported. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.Taxonomy.Service service = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\DataCatalog\V1\Taxonomy\Service $var - * @return $this - */ - public function setService($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\Taxonomy\Service::class); - $this->service = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Taxonomy/PolicyType.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Taxonomy/PolicyType.php deleted file mode 100644 index 45ad29d6aeac..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Taxonomy/PolicyType.php +++ /dev/null @@ -1,58 +0,0 @@ -google.cloud.datacatalog.v1.Taxonomy.PolicyType - */ -class PolicyType -{ - /** - * Unspecified policy type. - * - * Generated from protobuf enum POLICY_TYPE_UNSPECIFIED = 0; - */ - const POLICY_TYPE_UNSPECIFIED = 0; - /** - * Fine-grained access control policy that enables access control on - * tagged sub-resources. - * - * Generated from protobuf enum FINE_GRAINED_ACCESS_CONTROL = 1; - */ - const FINE_GRAINED_ACCESS_CONTROL = 1; - - private static $valueToName = [ - self::POLICY_TYPE_UNSPECIFIED => 'POLICY_TYPE_UNSPECIFIED', - self::FINE_GRAINED_ACCESS_CONTROL => 'FINE_GRAINED_ACCESS_CONTROL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PolicyType::class, \Google\Cloud\DataCatalog\V1\Taxonomy_PolicyType::class); - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Taxonomy/Service.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Taxonomy/Service.php deleted file mode 100644 index e7f275427ed8..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/Taxonomy/Service.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.datacatalog.v1.Taxonomy.Service - */ -class Service extends \Google\Protobuf\Internal\Message -{ - /** - * The Google Cloud service name. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.ManagingSystem name = 1; - */ - protected $name = 0; - /** - * The service agent for the service. - * - * Generated from protobuf field string identity = 2; - */ - protected $identity = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $name - * The Google Cloud service name. - * @type string $identity - * The service agent for the service. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Policytagmanager::initOnce(); - parent::__construct($data); - } - - /** - * The Google Cloud service name. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.ManagingSystem name = 1; - * @return int - */ - public function getName() - { - return $this->name; - } - - /** - * The Google Cloud service name. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.ManagingSystem name = 1; - * @param int $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\DataCatalog\V1\ManagingSystem::class); - $this->name = $var; - - return $this; - } - - /** - * The service agent for the service. - * - * Generated from protobuf field string identity = 2; - * @return string - */ - public function getIdentity() - { - return $this->identity; - } - - /** - * The service agent for the service. - * - * Generated from protobuf field string identity = 2; - * @param string $var - * @return $this - */ - public function setIdentity($var) - { - GPBUtil::checkString($var, True); - $this->identity = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Service::class, \Google\Cloud\DataCatalog\V1\Taxonomy_Service::class); - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UnstarEntryRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UnstarEntryRequest.php deleted file mode 100644 index df58071e2146..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UnstarEntryRequest.php +++ /dev/null @@ -1,82 +0,0 @@ -google.cloud.datacatalog.v1.UnstarEntryRequest - */ -class UnstarEntryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the entry to mark as **not** starred. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the entry to mark as **not** starred. Please see - * {@see DataCatalogClient::entryName()} for help formatting this field. - * - * @return \Google\Cloud\DataCatalog\V1\UnstarEntryRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the entry to mark as **not** starred. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the entry to mark as **not** starred. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the entry to mark as **not** starred. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UnstarEntryResponse.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UnstarEntryResponse.php deleted file mode 100644 index e3dd7087e4f6..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UnstarEntryResponse.php +++ /dev/null @@ -1,35 +0,0 @@ -google.cloud.datacatalog.v1.UnstarEntryResponse - */ -class UnstarEntryResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UpdateEntryGroupRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UpdateEntryGroupRequest.php deleted file mode 100644 index 153557fc00c0..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UpdateEntryGroupRequest.php +++ /dev/null @@ -1,166 +0,0 @@ -google.cloud.datacatalog.v1.UpdateEntryGroupRequest - */ -class UpdateEntryGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Updates for the entry group. The `name` field must be set. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.EntryGroup entry_group = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $entry_group = null; - /** - * Names of fields whose values to overwrite on an entry group. - * If this parameter is absent or empty, all modifiable fields - * are overwritten. If such fields are non-required and omitted in the - * request body, their values are emptied. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\DataCatalog\V1\EntryGroup $entryGroup Required. Updates for the entry group. The `name` field must be set. - * - * @return \Google\Cloud\DataCatalog\V1\UpdateEntryGroupRequest - * - * @experimental - */ - public static function build(\Google\Cloud\DataCatalog\V1\EntryGroup $entryGroup): self - { - return (new self()) - ->setEntryGroup($entryGroup); - } - - /** - * @param \Google\Cloud\DataCatalog\V1\EntryGroup $entryGroup Required. Updates for the entry group. The `name` field must be set. - * @param \Google\Protobuf\FieldMask $updateMask Names of fields whose values to overwrite on an entry group. - * - * If this parameter is absent or empty, all modifiable fields - * are overwritten. If such fields are non-required and omitted in the - * request body, their values are emptied. - * - * @return \Google\Cloud\DataCatalog\V1\UpdateEntryGroupRequest - * - * @experimental - */ - public static function buildFromEntryGroupUpdateMask(\Google\Cloud\DataCatalog\V1\EntryGroup $entryGroup, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setEntryGroup($entryGroup) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DataCatalog\V1\EntryGroup $entry_group - * Required. Updates for the entry group. The `name` field must be set. - * @type \Google\Protobuf\FieldMask $update_mask - * Names of fields whose values to overwrite on an entry group. - * If this parameter is absent or empty, all modifiable fields - * are overwritten. If such fields are non-required and omitted in the - * request body, their values are emptied. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * Required. Updates for the entry group. The `name` field must be set. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.EntryGroup entry_group = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\DataCatalog\V1\EntryGroup|null - */ - public function getEntryGroup() - { - return $this->entry_group; - } - - public function hasEntryGroup() - { - return isset($this->entry_group); - } - - public function clearEntryGroup() - { - unset($this->entry_group); - } - - /** - * Required. Updates for the entry group. The `name` field must be set. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.EntryGroup entry_group = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\DataCatalog\V1\EntryGroup $var - * @return $this - */ - public function setEntryGroup($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\EntryGroup::class); - $this->entry_group = $var; - - return $this; - } - - /** - * Names of fields whose values to overwrite on an entry group. - * If this parameter is absent or empty, all modifiable fields - * are overwritten. If such fields are non-required and omitted in the - * request body, their values are emptied. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Names of fields whose values to overwrite on an entry group. - * If this parameter is absent or empty, all modifiable fields - * are overwritten. If such fields are non-required and omitted in the - * request body, their values are emptied. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UpdateEntryRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UpdateEntryRequest.php deleted file mode 100644 index c70ab4025380..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UpdateEntryRequest.php +++ /dev/null @@ -1,258 +0,0 @@ -google.cloud.datacatalog.v1.UpdateEntryRequest - */ -class UpdateEntryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Updates for the entry. The `name` field must be set. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.Entry entry = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $entry = null; - /** - * Names of fields whose values to overwrite on an entry. - * If this parameter is absent or empty, all modifiable fields - * are overwritten. If such fields are non-required and omitted in the - * request body, their values are emptied. - * You can modify only the fields listed below. - * For entries with type `DATA_STREAM`: - * * `schema` - * For entries with type `FILESET`: - * * `schema` - * * `display_name` - * * `description` - * * `gcs_fileset_spec` - * * `gcs_fileset_spec.file_patterns` - * For entries with `user_specified_type`: - * * `schema` - * * `display_name` - * * `description` - * * `user_specified_type` - * * `user_specified_system` - * * `linked_resource` - * * `source_system_timestamps` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\DataCatalog\V1\Entry $entry Required. Updates for the entry. The `name` field must be set. - * - * @return \Google\Cloud\DataCatalog\V1\UpdateEntryRequest - * - * @experimental - */ - public static function build(\Google\Cloud\DataCatalog\V1\Entry $entry): self - { - return (new self()) - ->setEntry($entry); - } - - /** - * @param \Google\Cloud\DataCatalog\V1\Entry $entry Required. Updates for the entry. The `name` field must be set. - * @param \Google\Protobuf\FieldMask $updateMask Names of fields whose values to overwrite on an entry. - * - * If this parameter is absent or empty, all modifiable fields - * are overwritten. If such fields are non-required and omitted in the - * request body, their values are emptied. - * - * You can modify only the fields listed below. - * - * For entries with type `DATA_STREAM`: - * - * * `schema` - * - * For entries with type `FILESET`: - * - * * `schema` - * * `display_name` - * * `description` - * * `gcs_fileset_spec` - * * `gcs_fileset_spec.file_patterns` - * - * For entries with `user_specified_type`: - * - * * `schema` - * * `display_name` - * * `description` - * * `user_specified_type` - * * `user_specified_system` - * * `linked_resource` - * * `source_system_timestamps` - * - * @return \Google\Cloud\DataCatalog\V1\UpdateEntryRequest - * - * @experimental - */ - public static function buildFromEntryUpdateMask(\Google\Cloud\DataCatalog\V1\Entry $entry, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setEntry($entry) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DataCatalog\V1\Entry $entry - * Required. Updates for the entry. The `name` field must be set. - * @type \Google\Protobuf\FieldMask $update_mask - * Names of fields whose values to overwrite on an entry. - * If this parameter is absent or empty, all modifiable fields - * are overwritten. If such fields are non-required and omitted in the - * request body, their values are emptied. - * You can modify only the fields listed below. - * For entries with type `DATA_STREAM`: - * * `schema` - * For entries with type `FILESET`: - * * `schema` - * * `display_name` - * * `description` - * * `gcs_fileset_spec` - * * `gcs_fileset_spec.file_patterns` - * For entries with `user_specified_type`: - * * `schema` - * * `display_name` - * * `description` - * * `user_specified_type` - * * `user_specified_system` - * * `linked_resource` - * * `source_system_timestamps` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * Required. Updates for the entry. The `name` field must be set. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.Entry entry = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\DataCatalog\V1\Entry|null - */ - public function getEntry() - { - return $this->entry; - } - - public function hasEntry() - { - return isset($this->entry); - } - - public function clearEntry() - { - unset($this->entry); - } - - /** - * Required. Updates for the entry. The `name` field must be set. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.Entry entry = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\DataCatalog\V1\Entry $var - * @return $this - */ - public function setEntry($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\Entry::class); - $this->entry = $var; - - return $this; - } - - /** - * Names of fields whose values to overwrite on an entry. - * If this parameter is absent or empty, all modifiable fields - * are overwritten. If such fields are non-required and omitted in the - * request body, their values are emptied. - * You can modify only the fields listed below. - * For entries with type `DATA_STREAM`: - * * `schema` - * For entries with type `FILESET`: - * * `schema` - * * `display_name` - * * `description` - * * `gcs_fileset_spec` - * * `gcs_fileset_spec.file_patterns` - * For entries with `user_specified_type`: - * * `schema` - * * `display_name` - * * `description` - * * `user_specified_type` - * * `user_specified_system` - * * `linked_resource` - * * `source_system_timestamps` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Names of fields whose values to overwrite on an entry. - * If this parameter is absent or empty, all modifiable fields - * are overwritten. If such fields are non-required and omitted in the - * request body, their values are emptied. - * You can modify only the fields listed below. - * For entries with type `DATA_STREAM`: - * * `schema` - * For entries with type `FILESET`: - * * `schema` - * * `display_name` - * * `description` - * * `gcs_fileset_spec` - * * `gcs_fileset_spec.file_patterns` - * For entries with `user_specified_type`: - * * `schema` - * * `display_name` - * * `description` - * * `user_specified_type` - * * `user_specified_system` - * * `linked_resource` - * * `source_system_timestamps` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UpdatePolicyTagRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UpdatePolicyTagRequest.php deleted file mode 100644 index a51c4f876e53..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UpdatePolicyTagRequest.php +++ /dev/null @@ -1,156 +0,0 @@ -google.cloud.datacatalog.v1.UpdatePolicyTagRequest - */ -class UpdatePolicyTagRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The policy tag to update. You can update only its description, display - * name, and parent policy tag fields. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.PolicyTag policy_tag = 1; - */ - protected $policy_tag = null; - /** - * Specifies the fields to update. - * You can update only display name, description, and parent policy tag. - * If not set, defaults to all updatable fields. - * For more information, see [FieldMask] - * (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask). - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\DataCatalog\V1\PolicyTag $policyTag The policy tag to update. You can update only its description, display - * name, and parent policy tag fields. - * - * @return \Google\Cloud\DataCatalog\V1\UpdatePolicyTagRequest - * - * @experimental - */ - public static function build(\Google\Cloud\DataCatalog\V1\PolicyTag $policyTag): self - { - return (new self()) - ->setPolicyTag($policyTag); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DataCatalog\V1\PolicyTag $policy_tag - * The policy tag to update. You can update only its description, display - * name, and parent policy tag fields. - * @type \Google\Protobuf\FieldMask $update_mask - * Specifies the fields to update. - * You can update only display name, description, and parent policy tag. - * If not set, defaults to all updatable fields. - * For more information, see [FieldMask] - * (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Policytagmanager::initOnce(); - parent::__construct($data); - } - - /** - * The policy tag to update. You can update only its description, display - * name, and parent policy tag fields. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.PolicyTag policy_tag = 1; - * @return \Google\Cloud\DataCatalog\V1\PolicyTag|null - */ - public function getPolicyTag() - { - return $this->policy_tag; - } - - public function hasPolicyTag() - { - return isset($this->policy_tag); - } - - public function clearPolicyTag() - { - unset($this->policy_tag); - } - - /** - * The policy tag to update. You can update only its description, display - * name, and parent policy tag fields. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.PolicyTag policy_tag = 1; - * @param \Google\Cloud\DataCatalog\V1\PolicyTag $var - * @return $this - */ - public function setPolicyTag($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\PolicyTag::class); - $this->policy_tag = $var; - - return $this; - } - - /** - * Specifies the fields to update. - * You can update only display name, description, and parent policy tag. - * If not set, defaults to all updatable fields. - * For more information, see [FieldMask] - * (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask). - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Specifies the fields to update. - * You can update only display name, description, and parent policy tag. - * If not set, defaults to all updatable fields. - * For more information, see [FieldMask] - * (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask). - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UpdateTagRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UpdateTagRequest.php deleted file mode 100644 index 3be100dbab9f..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UpdateTagRequest.php +++ /dev/null @@ -1,171 +0,0 @@ -google.cloud.datacatalog.v1.UpdateTagRequest - */ -class UpdateTagRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The updated tag. The "name" field must be set. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.Tag tag = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $tag = null; - /** - * Names of fields whose values to overwrite on a tag. Currently, a tag has - * the only modifiable field with the name `fields`. - * In general, if this parameter is absent or empty, all modifiable fields - * are overwritten. If such fields are non-required and omitted in the - * request body, their values are emptied. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\DataCatalog\V1\Tag $tag Required. The updated tag. The "name" field must be set. - * - * @return \Google\Cloud\DataCatalog\V1\UpdateTagRequest - * - * @experimental - */ - public static function build(\Google\Cloud\DataCatalog\V1\Tag $tag): self - { - return (new self()) - ->setTag($tag); - } - - /** - * @param \Google\Cloud\DataCatalog\V1\Tag $tag Required. The updated tag. The "name" field must be set. - * @param \Google\Protobuf\FieldMask $updateMask Names of fields whose values to overwrite on a tag. Currently, a tag has - * the only modifiable field with the name `fields`. - * - * In general, if this parameter is absent or empty, all modifiable fields - * are overwritten. If such fields are non-required and omitted in the - * request body, their values are emptied. - * - * @return \Google\Cloud\DataCatalog\V1\UpdateTagRequest - * - * @experimental - */ - public static function buildFromTagUpdateMask(\Google\Cloud\DataCatalog\V1\Tag $tag, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setTag($tag) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DataCatalog\V1\Tag $tag - * Required. The updated tag. The "name" field must be set. - * @type \Google\Protobuf\FieldMask $update_mask - * Names of fields whose values to overwrite on a tag. Currently, a tag has - * the only modifiable field with the name `fields`. - * In general, if this parameter is absent or empty, all modifiable fields - * are overwritten. If such fields are non-required and omitted in the - * request body, their values are emptied. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * Required. The updated tag. The "name" field must be set. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.Tag tag = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\DataCatalog\V1\Tag|null - */ - public function getTag() - { - return $this->tag; - } - - public function hasTag() - { - return isset($this->tag); - } - - public function clearTag() - { - unset($this->tag); - } - - /** - * Required. The updated tag. The "name" field must be set. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.Tag tag = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\DataCatalog\V1\Tag $var - * @return $this - */ - public function setTag($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\Tag::class); - $this->tag = $var; - - return $this; - } - - /** - * Names of fields whose values to overwrite on a tag. Currently, a tag has - * the only modifiable field with the name `fields`. - * In general, if this parameter is absent or empty, all modifiable fields - * are overwritten. If such fields are non-required and omitted in the - * request body, their values are emptied. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Names of fields whose values to overwrite on a tag. Currently, a tag has - * the only modifiable field with the name `fields`. - * In general, if this parameter is absent or empty, all modifiable fields - * are overwritten. If such fields are non-required and omitted in the - * request body, their values are emptied. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UpdateTagTemplateFieldRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UpdateTagTemplateFieldRequest.php deleted file mode 100644 index 2886ab41f940..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UpdateTagTemplateFieldRequest.php +++ /dev/null @@ -1,253 +0,0 @@ -google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest - */ -class UpdateTagTemplateFieldRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the tag template field. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The template to update. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.TagTemplateField tag_template_field = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $tag_template_field = null; - /** - * Optional. Names of fields whose values to overwrite on an individual field - * of a tag template. The following fields are modifiable: - * * `display_name` - * * `type.enum_type` - * * `is_required` - * If this parameter is absent or empty, all modifiable fields - * are overwritten. If such fields are non-required and omitted in the request - * body, their values are emptied with one exception: when updating an enum - * type, the provided values are merged with the existing values. Therefore, - * enum values can only be added, existing enum values cannot be deleted or - * renamed. - * Additionally, updating a template field from optional to required is - * *not* allowed. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - - /** - * @param string $name Required. The name of the tag template field. Please see - * {@see DataCatalogClient::tagTemplateFieldName()} for help formatting this field. - * @param \Google\Cloud\DataCatalog\V1\TagTemplateField $tagTemplateField Required. The template to update. - * - * @return \Google\Cloud\DataCatalog\V1\UpdateTagTemplateFieldRequest - * - * @experimental - */ - public static function build(string $name, \Google\Cloud\DataCatalog\V1\TagTemplateField $tagTemplateField): self - { - return (new self()) - ->setName($name) - ->setTagTemplateField($tagTemplateField); - } - - /** - * @param string $name Required. The name of the tag template field. Please see - * {@see DataCatalogClient::tagTemplateFieldName()} for help formatting this field. - * @param \Google\Cloud\DataCatalog\V1\TagTemplateField $tagTemplateField Required. The template to update. - * @param \Google\Protobuf\FieldMask $updateMask Optional. Names of fields whose values to overwrite on an individual field - * of a tag template. The following fields are modifiable: - * - * * `display_name` - * * `type.enum_type` - * * `is_required` - * - * If this parameter is absent or empty, all modifiable fields - * are overwritten. If such fields are non-required and omitted in the request - * body, their values are emptied with one exception: when updating an enum - * type, the provided values are merged with the existing values. Therefore, - * enum values can only be added, existing enum values cannot be deleted or - * renamed. - * - * Additionally, updating a template field from optional to required is - * *not* allowed. - * - * @return \Google\Cloud\DataCatalog\V1\UpdateTagTemplateFieldRequest - * - * @experimental - */ - public static function buildFromNameTagTemplateFieldUpdateMask(string $name, \Google\Cloud\DataCatalog\V1\TagTemplateField $tagTemplateField, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setName($name) - ->setTagTemplateField($tagTemplateField) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the tag template field. - * @type \Google\Cloud\DataCatalog\V1\TagTemplateField $tag_template_field - * Required. The template to update. - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. Names of fields whose values to overwrite on an individual field - * of a tag template. The following fields are modifiable: - * * `display_name` - * * `type.enum_type` - * * `is_required` - * If this parameter is absent or empty, all modifiable fields - * are overwritten. If such fields are non-required and omitted in the request - * body, their values are emptied with one exception: when updating an enum - * type, the provided values are merged with the existing values. Therefore, - * enum values can only be added, existing enum values cannot be deleted or - * renamed. - * Additionally, updating a template field from optional to required is - * *not* allowed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the tag template field. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the tag template field. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The template to update. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.TagTemplateField tag_template_field = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\DataCatalog\V1\TagTemplateField|null - */ - public function getTagTemplateField() - { - return $this->tag_template_field; - } - - public function hasTagTemplateField() - { - return isset($this->tag_template_field); - } - - public function clearTagTemplateField() - { - unset($this->tag_template_field); - } - - /** - * Required. The template to update. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.TagTemplateField tag_template_field = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\DataCatalog\V1\TagTemplateField $var - * @return $this - */ - public function setTagTemplateField($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\TagTemplateField::class); - $this->tag_template_field = $var; - - return $this; - } - - /** - * Optional. Names of fields whose values to overwrite on an individual field - * of a tag template. The following fields are modifiable: - * * `display_name` - * * `type.enum_type` - * * `is_required` - * If this parameter is absent or empty, all modifiable fields - * are overwritten. If such fields are non-required and omitted in the request - * body, their values are emptied with one exception: when updating an enum - * type, the provided values are merged with the existing values. Therefore, - * enum values can only be added, existing enum values cannot be deleted or - * renamed. - * Additionally, updating a template field from optional to required is - * *not* allowed. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Optional. Names of fields whose values to overwrite on an individual field - * of a tag template. The following fields are modifiable: - * * `display_name` - * * `type.enum_type` - * * `is_required` - * If this parameter is absent or empty, all modifiable fields - * are overwritten. If such fields are non-required and omitted in the request - * body, their values are emptied with one exception: when updating an enum - * type, the provided values are merged with the existing values. Therefore, - * enum values can only be added, existing enum values cannot be deleted or - * renamed. - * Additionally, updating a template field from optional to required is - * *not* allowed. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UpdateTagTemplateRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UpdateTagTemplateRequest.php deleted file mode 100644 index 8fe3da4bcd3b..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UpdateTagTemplateRequest.php +++ /dev/null @@ -1,182 +0,0 @@ -google.cloud.datacatalog.v1.UpdateTagTemplateRequest - */ -class UpdateTagTemplateRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The template to update. The `name` field must be set. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.TagTemplate tag_template = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $tag_template = null; - /** - * Names of fields whose values to overwrite on a tag template. Currently, - * only `display_name` and `is_publicly_readable` can be overwritten. - * If this parameter is absent or empty, all modifiable fields - * are overwritten. If such fields are non-required and omitted in the - * request body, their values are emptied. - * Note: Updating the `is_publicly_readable` field may require up to 12 - * hours to take effect in search results. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\DataCatalog\V1\TagTemplate $tagTemplate Required. The template to update. The `name` field must be set. - * - * @return \Google\Cloud\DataCatalog\V1\UpdateTagTemplateRequest - * - * @experimental - */ - public static function build(\Google\Cloud\DataCatalog\V1\TagTemplate $tagTemplate): self - { - return (new self()) - ->setTagTemplate($tagTemplate); - } - - /** - * @param \Google\Cloud\DataCatalog\V1\TagTemplate $tagTemplate Required. The template to update. The `name` field must be set. - * @param \Google\Protobuf\FieldMask $updateMask Names of fields whose values to overwrite on a tag template. Currently, - * only `display_name` and `is_publicly_readable` can be overwritten. - * - * If this parameter is absent or empty, all modifiable fields - * are overwritten. If such fields are non-required and omitted in the - * request body, their values are emptied. - * - * Note: Updating the `is_publicly_readable` field may require up to 12 - * hours to take effect in search results. - * - * @return \Google\Cloud\DataCatalog\V1\UpdateTagTemplateRequest - * - * @experimental - */ - public static function buildFromTagTemplateUpdateMask(\Google\Cloud\DataCatalog\V1\TagTemplate $tagTemplate, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setTagTemplate($tagTemplate) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DataCatalog\V1\TagTemplate $tag_template - * Required. The template to update. The `name` field must be set. - * @type \Google\Protobuf\FieldMask $update_mask - * Names of fields whose values to overwrite on a tag template. Currently, - * only `display_name` and `is_publicly_readable` can be overwritten. - * If this parameter is absent or empty, all modifiable fields - * are overwritten. If such fields are non-required and omitted in the - * request body, their values are emptied. - * Note: Updating the `is_publicly_readable` field may require up to 12 - * hours to take effect in search results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce(); - parent::__construct($data); - } - - /** - * Required. The template to update. The `name` field must be set. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.TagTemplate tag_template = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\DataCatalog\V1\TagTemplate|null - */ - public function getTagTemplate() - { - return $this->tag_template; - } - - public function hasTagTemplate() - { - return isset($this->tag_template); - } - - public function clearTagTemplate() - { - unset($this->tag_template); - } - - /** - * Required. The template to update. The `name` field must be set. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.TagTemplate tag_template = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\DataCatalog\V1\TagTemplate $var - * @return $this - */ - public function setTagTemplate($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\TagTemplate::class); - $this->tag_template = $var; - - return $this; - } - - /** - * Names of fields whose values to overwrite on a tag template. Currently, - * only `display_name` and `is_publicly_readable` can be overwritten. - * If this parameter is absent or empty, all modifiable fields - * are overwritten. If such fields are non-required and omitted in the - * request body, their values are emptied. - * Note: Updating the `is_publicly_readable` field may require up to 12 - * hours to take effect in search results. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Names of fields whose values to overwrite on a tag template. Currently, - * only `display_name` and `is_publicly_readable` can be overwritten. - * If this parameter is absent or empty, all modifiable fields - * are overwritten. If such fields are non-required and omitted in the - * request body, their values are emptied. - * Note: Updating the `is_publicly_readable` field may require up to 12 - * hours to take effect in search results. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UpdateTaxonomyRequest.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UpdateTaxonomyRequest.php deleted file mode 100644 index ce0a2830e873..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UpdateTaxonomyRequest.php +++ /dev/null @@ -1,152 +0,0 @@ -google.cloud.datacatalog.v1.UpdateTaxonomyRequest - */ -class UpdateTaxonomyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The taxonomy to update. You can update only its description, display name, - * and activated policy types. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.Taxonomy taxonomy = 1; - */ - protected $taxonomy = null; - /** - * Specifies fields to update. If not set, defaults to all fields you can - * update. - * For more information, see [FieldMask] - * (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask). - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\DataCatalog\V1\Taxonomy $taxonomy The taxonomy to update. You can update only its description, display name, - * and activated policy types. - * - * @return \Google\Cloud\DataCatalog\V1\UpdateTaxonomyRequest - * - * @experimental - */ - public static function build(\Google\Cloud\DataCatalog\V1\Taxonomy $taxonomy): self - { - return (new self()) - ->setTaxonomy($taxonomy); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\DataCatalog\V1\Taxonomy $taxonomy - * The taxonomy to update. You can update only its description, display name, - * and activated policy types. - * @type \Google\Protobuf\FieldMask $update_mask - * Specifies fields to update. If not set, defaults to all fields you can - * update. - * For more information, see [FieldMask] - * (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Policytagmanager::initOnce(); - parent::__construct($data); - } - - /** - * The taxonomy to update. You can update only its description, display name, - * and activated policy types. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.Taxonomy taxonomy = 1; - * @return \Google\Cloud\DataCatalog\V1\Taxonomy|null - */ - public function getTaxonomy() - { - return $this->taxonomy; - } - - public function hasTaxonomy() - { - return isset($this->taxonomy); - } - - public function clearTaxonomy() - { - unset($this->taxonomy); - } - - /** - * The taxonomy to update. You can update only its description, display name, - * and activated policy types. - * - * Generated from protobuf field .google.cloud.datacatalog.v1.Taxonomy taxonomy = 1; - * @param \Google\Cloud\DataCatalog\V1\Taxonomy $var - * @return $this - */ - public function setTaxonomy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\Taxonomy::class); - $this->taxonomy = $var; - - return $this; - } - - /** - * Specifies fields to update. If not set, defaults to all fields you can - * update. - * For more information, see [FieldMask] - * (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask). - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Specifies fields to update. If not set, defaults to all fields you can - * update. - * For more information, see [FieldMask] - * (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask). - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UsageSignal.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UsageSignal.php deleted file mode 100644 index 55f5ad1161dd..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UsageSignal.php +++ /dev/null @@ -1,203 +0,0 @@ -google.cloud.datacatalog.v1.UsageSignal - */ -class UsageSignal extends \Google\Protobuf\Internal\Message -{ - /** - * The end timestamp of the duration of usage statistics. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 1; - */ - protected $update_time = null; - /** - * Output only. BigQuery usage statistics over each of the predefined time - * ranges. - * Supported time ranges are `{"24H", "7D", "30D"}`. - * - * Generated from protobuf field map usage_within_time_range = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $usage_within_time_range; - /** - * Common usage statistics over each of the predefined time ranges. - * Supported time ranges are `{"24H", "7D", "30D", "Lifetime"}`. - * - * Generated from protobuf field map common_usage_within_time_range = 3; - */ - private $common_usage_within_time_range; - /** - * Favorite count in the source system. - * - * Generated from protobuf field optional int64 favorite_count = 4; - */ - protected $favorite_count = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $update_time - * The end timestamp of the duration of usage statistics. - * @type array|\Google\Protobuf\Internal\MapField $usage_within_time_range - * Output only. BigQuery usage statistics over each of the predefined time - * ranges. - * Supported time ranges are `{"24H", "7D", "30D"}`. - * @type array|\Google\Protobuf\Internal\MapField $common_usage_within_time_range - * Common usage statistics over each of the predefined time ranges. - * Supported time ranges are `{"24H", "7D", "30D", "Lifetime"}`. - * @type int|string $favorite_count - * Favorite count in the source system. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Usage::initOnce(); - parent::__construct($data); - } - - /** - * The end timestamp of the duration of usage statistics. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * The end timestamp of the duration of usage statistics. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. BigQuery usage statistics over each of the predefined time - * ranges. - * Supported time ranges are `{"24H", "7D", "30D"}`. - * - * Generated from protobuf field map usage_within_time_range = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getUsageWithinTimeRange() - { - return $this->usage_within_time_range; - } - - /** - * Output only. BigQuery usage statistics over each of the predefined time - * ranges. - * Supported time ranges are `{"24H", "7D", "30D"}`. - * - * Generated from protobuf field map usage_within_time_range = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setUsageWithinTimeRange($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DataCatalog\V1\UsageStats::class); - $this->usage_within_time_range = $arr; - - return $this; - } - - /** - * Common usage statistics over each of the predefined time ranges. - * Supported time ranges are `{"24H", "7D", "30D", "Lifetime"}`. - * - * Generated from protobuf field map common_usage_within_time_range = 3; - * @return \Google\Protobuf\Internal\MapField - */ - public function getCommonUsageWithinTimeRange() - { - return $this->common_usage_within_time_range; - } - - /** - * Common usage statistics over each of the predefined time ranges. - * Supported time ranges are `{"24H", "7D", "30D", "Lifetime"}`. - * - * Generated from protobuf field map common_usage_within_time_range = 3; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setCommonUsageWithinTimeRange($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DataCatalog\V1\CommonUsageStats::class); - $this->common_usage_within_time_range = $arr; - - return $this; - } - - /** - * Favorite count in the source system. - * - * Generated from protobuf field optional int64 favorite_count = 4; - * @return int|string - */ - public function getFavoriteCount() - { - return isset($this->favorite_count) ? $this->favorite_count : 0; - } - - public function hasFavoriteCount() - { - return isset($this->favorite_count); - } - - public function clearFavoriteCount() - { - unset($this->favorite_count); - } - - /** - * Favorite count in the source system. - * - * Generated from protobuf field optional int64 favorite_count = 4; - * @param int|string $var - * @return $this - */ - public function setFavoriteCount($var) - { - GPBUtil::checkInt64($var); - $this->favorite_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UsageStats.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UsageStats.php deleted file mode 100644 index c98875850054..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/UsageStats.php +++ /dev/null @@ -1,176 +0,0 @@ -google.cloud.datacatalog.v1.UsageStats - */ -class UsageStats extends \Google\Protobuf\Internal\Message -{ - /** - * The number of successful uses of the underlying entry. - * - * Generated from protobuf field float total_completions = 1; - */ - protected $total_completions = 0.0; - /** - * The number of failed attempts to use the underlying entry. - * - * Generated from protobuf field float total_failures = 2; - */ - protected $total_failures = 0.0; - /** - * The number of cancelled attempts to use the underlying entry. - * - * Generated from protobuf field float total_cancellations = 3; - */ - protected $total_cancellations = 0.0; - /** - * Total time spent only on successful uses, in milliseconds. - * - * Generated from protobuf field float total_execution_time_for_completions_millis = 4; - */ - protected $total_execution_time_for_completions_millis = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $total_completions - * The number of successful uses of the underlying entry. - * @type float $total_failures - * The number of failed attempts to use the underlying entry. - * @type float $total_cancellations - * The number of cancelled attempts to use the underlying entry. - * @type float $total_execution_time_for_completions_millis - * Total time spent only on successful uses, in milliseconds. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\Usage::initOnce(); - parent::__construct($data); - } - - /** - * The number of successful uses of the underlying entry. - * - * Generated from protobuf field float total_completions = 1; - * @return float - */ - public function getTotalCompletions() - { - return $this->total_completions; - } - - /** - * The number of successful uses of the underlying entry. - * - * Generated from protobuf field float total_completions = 1; - * @param float $var - * @return $this - */ - public function setTotalCompletions($var) - { - GPBUtil::checkFloat($var); - $this->total_completions = $var; - - return $this; - } - - /** - * The number of failed attempts to use the underlying entry. - * - * Generated from protobuf field float total_failures = 2; - * @return float - */ - public function getTotalFailures() - { - return $this->total_failures; - } - - /** - * The number of failed attempts to use the underlying entry. - * - * Generated from protobuf field float total_failures = 2; - * @param float $var - * @return $this - */ - public function setTotalFailures($var) - { - GPBUtil::checkFloat($var); - $this->total_failures = $var; - - return $this; - } - - /** - * The number of cancelled attempts to use the underlying entry. - * - * Generated from protobuf field float total_cancellations = 3; - * @return float - */ - public function getTotalCancellations() - { - return $this->total_cancellations; - } - - /** - * The number of cancelled attempts to use the underlying entry. - * - * Generated from protobuf field float total_cancellations = 3; - * @param float $var - * @return $this - */ - public function setTotalCancellations($var) - { - GPBUtil::checkFloat($var); - $this->total_cancellations = $var; - - return $this; - } - - /** - * Total time spent only on successful uses, in milliseconds. - * - * Generated from protobuf field float total_execution_time_for_completions_millis = 4; - * @return float - */ - public function getTotalExecutionTimeForCompletionsMillis() - { - return $this->total_execution_time_for_completions_millis; - } - - /** - * Total time spent only on successful uses, in milliseconds. - * - * Generated from protobuf field float total_execution_time_for_completions_millis = 4; - * @param float $var - * @return $this - */ - public function setTotalExecutionTimeForCompletionsMillis($var) - { - GPBUtil::checkFloat($var); - $this->total_execution_time_for_completions_millis = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ViewSpec.php b/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ViewSpec.php deleted file mode 100644 index 644575cef61f..000000000000 --- a/owl-bot-staging/DataCatalog/v1/proto/src/Google/Cloud/DataCatalog/V1/ViewSpec.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.datacatalog.v1.ViewSpec - */ -class ViewSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The query that defines the table view. - * - * Generated from protobuf field string view_query = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $view_query = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $view_query - * Output only. The query that defines the table view. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datacatalog\V1\TableSpec::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The query that defines the table view. - * - * Generated from protobuf field string view_query = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getViewQuery() - { - return $this->view_query; - } - - /** - * Output only. The query that defines the table view. - * - * Generated from protobuf field string view_query = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setViewQuery($var) - { - GPBUtil::checkString($var, True); - $this->view_query = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/create_entry.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/create_entry.php deleted file mode 100644 index 9695f495325e..000000000000 --- a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/create_entry.php +++ /dev/null @@ -1,88 +0,0 @@ -createEntry($formattedParent, $entryId, $entry); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DataCatalogClient::entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - $entryId = '[ENTRY_ID]'; - - create_entry_sample($formattedParent, $entryId); -} -// [END datacatalog_v1_generated_DataCatalog_CreateEntry_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/create_entry_group.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/create_entry_group.php deleted file mode 100644 index 59a912c5d33e..000000000000 --- a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/create_entry_group.php +++ /dev/null @@ -1,102 +0,0 @@ -createEntryGroup($formattedParent, $entryGroupId); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DataCatalogClient::locationName('[PROJECT]', '[LOCATION]'); - $entryGroupId = '[ENTRY_GROUP_ID]'; - - create_entry_group_sample($formattedParent, $entryGroupId); -} -// [END datacatalog_v1_generated_DataCatalog_CreateEntryGroup_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/create_tag.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/create_tag.php deleted file mode 100644 index e0d7686f5bf8..000000000000 --- a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/create_tag.php +++ /dev/null @@ -1,100 +0,0 @@ -setTemplate($tagTemplate) - ->setFields($tagFields); - - // Call the API and handle any network failures. - try { - /** @var Tag $response */ - $response = $dataCatalogClient->createTag($formattedParent, $tag); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DataCatalogClient::entryName( - '[PROJECT]', - '[LOCATION]', - '[ENTRY_GROUP]', - '[ENTRY]' - ); - $tagTemplate = '[TEMPLATE]'; - - create_tag_sample($formattedParent, $tagTemplate); -} -// [END datacatalog_v1_generated_DataCatalog_CreateTag_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/create_tag_template.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/create_tag_template.php deleted file mode 100644 index 3460e8651733..000000000000 --- a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/create_tag_template.php +++ /dev/null @@ -1,83 +0,0 @@ -setFields($tagTemplateFields); - - // Call the API and handle any network failures. - try { - /** @var TagTemplate $response */ - $response = $dataCatalogClient->createTagTemplate($formattedParent, $tagTemplateId, $tagTemplate); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DataCatalogClient::locationName('[PROJECT]', '[LOCATION]'); - $tagTemplateId = '[TAG_TEMPLATE_ID]'; - - create_tag_template_sample($formattedParent, $tagTemplateId); -} -// [END datacatalog_v1_generated_DataCatalog_CreateTagTemplate_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/create_tag_template_field.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/create_tag_template_field.php deleted file mode 100644 index caae5df9d504..000000000000 --- a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/create_tag_template_field.php +++ /dev/null @@ -1,92 +0,0 @@ -setType($tagTemplateFieldType); - - // Call the API and handle any network failures. - try { - /** @var TagTemplateField $response */ - $response = $dataCatalogClient->createTagTemplateField( - $formattedParent, - $tagTemplateFieldId, - $tagTemplateField - ); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DataCatalogClient::tagTemplateName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); - $tagTemplateFieldId = '[TAG_TEMPLATE_FIELD_ID]'; - - create_tag_template_field_sample($formattedParent, $tagTemplateFieldId); -} -// [END datacatalog_v1_generated_DataCatalog_CreateTagTemplateField_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/delete_entry.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/delete_entry.php deleted file mode 100644 index 2be4ef57eca0..000000000000 --- a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/delete_entry.php +++ /dev/null @@ -1,78 +0,0 @@ -deleteEntry($formattedName); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DataCatalogClient::entryName( - '[PROJECT]', - '[LOCATION]', - '[ENTRY_GROUP]', - '[ENTRY]' - ); - - delete_entry_sample($formattedName); -} -// [END datacatalog_v1_generated_DataCatalog_DeleteEntry_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/delete_entry_group.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/delete_entry_group.php deleted file mode 100644 index 112609c5c1a8..000000000000 --- a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/delete_entry_group.php +++ /dev/null @@ -1,69 +0,0 @@ -deleteEntryGroup($formattedName); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DataCatalogClient::entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - - delete_entry_group_sample($formattedName); -} -// [END datacatalog_v1_generated_DataCatalog_DeleteEntryGroup_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/delete_tag.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/delete_tag.php deleted file mode 100644 index 3a40f9298d1c..000000000000 --- a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/delete_tag.php +++ /dev/null @@ -1,69 +0,0 @@ -deleteTag($formattedName); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DataCatalogClient::entryName( - '[PROJECT]', - '[LOCATION]', - '[ENTRY_GROUP]', - '[ENTRY]' - ); - - delete_tag_sample($formattedName); -} -// [END datacatalog_v1_generated_DataCatalog_DeleteTag_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/delete_tag_template.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/delete_tag_template.php deleted file mode 100644 index eca7b827157c..000000000000 --- a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/delete_tag_template.php +++ /dev/null @@ -1,72 +0,0 @@ -deleteTagTemplate($formattedName, $force); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DataCatalogClient::tagTemplateName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); - $force = false; - - delete_tag_template_sample($formattedName, $force); -} -// [END datacatalog_v1_generated_DataCatalog_DeleteTagTemplate_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/delete_tag_template_field.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/delete_tag_template_field.php deleted file mode 100644 index d2bd25e428ab..000000000000 --- a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/delete_tag_template_field.php +++ /dev/null @@ -1,78 +0,0 @@ -deleteTagTemplateField($formattedName, $force); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DataCatalogClient::tagTemplateFieldName( - '[PROJECT]', - '[LOCATION]', - '[TAG_TEMPLATE]', - '[FIELD]' - ); - $force = false; - - delete_tag_template_field_sample($formattedName, $force); -} -// [END datacatalog_v1_generated_DataCatalog_DeleteTagTemplateField_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/get_entry.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/get_entry.php deleted file mode 100644 index 2fb6eb852c11..000000000000 --- a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/get_entry.php +++ /dev/null @@ -1,71 +0,0 @@ -getEntry($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DataCatalogClient::entryName( - '[PROJECT]', - '[LOCATION]', - '[ENTRY_GROUP]', - '[ENTRY]' - ); - - get_entry_sample($formattedName); -} -// [END datacatalog_v1_generated_DataCatalog_GetEntry_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/get_entry_group.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/get_entry_group.php deleted file mode 100644 index 78b8604dec01..000000000000 --- a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/get_entry_group.php +++ /dev/null @@ -1,66 +0,0 @@ -getEntryGroup($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DataCatalogClient::entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - - get_entry_group_sample($formattedName); -} -// [END datacatalog_v1_generated_DataCatalog_GetEntryGroup_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/get_iam_policy.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/get_iam_policy.php deleted file mode 100644 index 060035aedbd9..000000000000 --- a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/get_iam_policy.php +++ /dev/null @@ -1,86 +0,0 @@ -getIamPolicy($resource); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END datacatalog_v1_generated_DataCatalog_GetIamPolicy_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/get_tag_template.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/get_tag_template.php deleted file mode 100644 index ed766c8720ea..000000000000 --- a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/get_tag_template.php +++ /dev/null @@ -1,66 +0,0 @@ -getTagTemplate($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DataCatalogClient::tagTemplateName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); - - get_tag_template_sample($formattedName); -} -// [END datacatalog_v1_generated_DataCatalog_GetTagTemplate_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/import_entries.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/import_entries.php deleted file mode 100644 index 94a000392f4e..000000000000 --- a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/import_entries.php +++ /dev/null @@ -1,95 +0,0 @@ -importEntries($formattedParent); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ImportEntriesResponse $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DataCatalogClient::entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - - import_entries_sample($formattedParent); -} -// [END datacatalog_v1_generated_DataCatalog_ImportEntries_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/list_entries.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/list_entries.php deleted file mode 100644 index 8c358d13d4a2..000000000000 --- a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/list_entries.php +++ /dev/null @@ -1,77 +0,0 @@ -listEntries($formattedParent); - - /** @var Entry $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DataCatalogClient::entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - - list_entries_sample($formattedParent); -} -// [END datacatalog_v1_generated_DataCatalog_ListEntries_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/list_entry_groups.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/list_entry_groups.php deleted file mode 100644 index ade5eda60c52..000000000000 --- a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/list_entry_groups.php +++ /dev/null @@ -1,73 +0,0 @@ -listEntryGroups($formattedParent); - - /** @var EntryGroup $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DataCatalogClient::locationName('[PROJECT]', '[LOCATION]'); - - list_entry_groups_sample($formattedParent); -} -// [END datacatalog_v1_generated_DataCatalog_ListEntryGroups_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/list_tags.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/list_tags.php deleted file mode 100644 index ccf773edf1a5..000000000000 --- a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/list_tags.php +++ /dev/null @@ -1,82 +0,0 @@ -listTags($formattedParent); - - /** @var Tag $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DataCatalogClient::entryName( - '[PROJECT]', - '[LOCATION]', - '[ENTRY_GROUP]', - '[ENTRY]' - ); - - list_tags_sample($formattedParent); -} -// [END datacatalog_v1_generated_DataCatalog_ListTags_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/lookup_entry.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/lookup_entry.php deleted file mode 100644 index a546498d5c0d..000000000000 --- a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/lookup_entry.php +++ /dev/null @@ -1,55 +0,0 @@ -lookupEntry(); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END datacatalog_v1_generated_DataCatalog_LookupEntry_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/modify_entry_contacts.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/modify_entry_contacts.php deleted file mode 100644 index 580e479630d0..000000000000 --- a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/modify_entry_contacts.php +++ /dev/null @@ -1,78 +0,0 @@ -modifyEntryContacts($formattedName, $contacts); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DataCatalogClient::entryName( - '[PROJECT]', - '[LOCATION]', - '[ENTRY_GROUP]', - '[ENTRY]' - ); - - modify_entry_contacts_sample($formattedName); -} -// [END datacatalog_v1_generated_DataCatalog_ModifyEntryContacts_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/modify_entry_overview.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/modify_entry_overview.php deleted file mode 100644 index 6f7a84bd4372..000000000000 --- a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/modify_entry_overview.php +++ /dev/null @@ -1,78 +0,0 @@ -modifyEntryOverview($formattedName, $entryOverview); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DataCatalogClient::entryName( - '[PROJECT]', - '[LOCATION]', - '[ENTRY_GROUP]', - '[ENTRY]' - ); - - modify_entry_overview_sample($formattedName); -} -// [END datacatalog_v1_generated_DataCatalog_ModifyEntryOverview_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/reconcile_tags.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/reconcile_tags.php deleted file mode 100644 index 0900df2c689d..000000000000 --- a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/reconcile_tags.php +++ /dev/null @@ -1,102 +0,0 @@ -reconcileTags($formattedParent, $formattedTagTemplate); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ReconcileTagsResponse $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DataCatalogClient::entryName( - '[PROJECT]', - '[LOCATION]', - '[ENTRY_GROUP]', - '[ENTRY]' - ); - $formattedTagTemplate = DataCatalogClient::tagTemplateName( - '[PROJECT]', - '[LOCATION]', - '[TAG_TEMPLATE]' - ); - - reconcile_tags_sample($formattedParent, $formattedTagTemplate); -} -// [END datacatalog_v1_generated_DataCatalog_ReconcileTags_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/rename_tag_template_field.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/rename_tag_template_field.php deleted file mode 100644 index 79b9b5b2962a..000000000000 --- a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/rename_tag_template_field.php +++ /dev/null @@ -1,80 +0,0 @@ -renameTagTemplateField($formattedName, $newTagTemplateFieldId); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DataCatalogClient::tagTemplateFieldName( - '[PROJECT]', - '[LOCATION]', - '[TAG_TEMPLATE]', - '[FIELD]' - ); - $newTagTemplateFieldId = '[NEW_TAG_TEMPLATE_FIELD_ID]'; - - rename_tag_template_field_sample($formattedName, $newTagTemplateFieldId); -} -// [END datacatalog_v1_generated_DataCatalog_RenameTagTemplateField_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/rename_tag_template_field_enum_value.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/rename_tag_template_field_enum_value.php deleted file mode 100644 index 714e1a74ff73..000000000000 --- a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/rename_tag_template_field_enum_value.php +++ /dev/null @@ -1,82 +0,0 @@ -renameTagTemplateFieldEnumValue( - $formattedName, - $newEnumValueDisplayName - ); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DataCatalogClient::tagTemplateFieldEnumValueName( - '[PROJECT]', - '[LOCATION]', - '[TAG_TEMPLATE]', - '[TAG_TEMPLATE_FIELD_ID]', - '[ENUM_VALUE_DISPLAY_NAME]' - ); - $newEnumValueDisplayName = '[NEW_ENUM_VALUE_DISPLAY_NAME]'; - - rename_tag_template_field_enum_value_sample($formattedName, $newEnumValueDisplayName); -} -// [END datacatalog_v1_generated_DataCatalog_RenameTagTemplateFieldEnumValue_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/search_catalog.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/search_catalog.php deleted file mode 100644 index dbd30970e2a3..000000000000 --- a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/search_catalog.php +++ /dev/null @@ -1,99 +0,0 @@ -searchCatalog($scope, $query); - - /** @var SearchCatalogResult $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $query = '[QUERY]'; - - search_catalog_sample($query); -} -// [END datacatalog_v1_generated_DataCatalog_SearchCatalog_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/set_iam_policy.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/set_iam_policy.php deleted file mode 100644 index 6d634c4abab8..000000000000 --- a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/set_iam_policy.php +++ /dev/null @@ -1,85 +0,0 @@ -setIamPolicy($resource, $policy); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END datacatalog_v1_generated_DataCatalog_SetIamPolicy_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/star_entry.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/star_entry.php deleted file mode 100644 index cde2dfdf98f7..000000000000 --- a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/star_entry.php +++ /dev/null @@ -1,72 +0,0 @@ -starEntry($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DataCatalogClient::entryName( - '[PROJECT]', - '[LOCATION]', - '[ENTRY_GROUP]', - '[ENTRY]' - ); - - star_entry_sample($formattedName); -} -// [END datacatalog_v1_generated_DataCatalog_StarEntry_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/test_iam_permissions.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/test_iam_permissions.php deleted file mode 100644 index b4ddbe2bcddc..000000000000 --- a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/test_iam_permissions.php +++ /dev/null @@ -1,87 +0,0 @@ -testIamPermissions($resource, $permissions); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END datacatalog_v1_generated_DataCatalog_TestIamPermissions_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/unstar_entry.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/unstar_entry.php deleted file mode 100644 index 6d56fee6bf99..000000000000 --- a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/unstar_entry.php +++ /dev/null @@ -1,72 +0,0 @@ -unstarEntry($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DataCatalogClient::entryName( - '[PROJECT]', - '[LOCATION]', - '[ENTRY_GROUP]', - '[ENTRY]' - ); - - unstar_entry_sample($formattedName); -} -// [END datacatalog_v1_generated_DataCatalog_UnstarEntry_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/update_entry.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/update_entry.php deleted file mode 100644 index 294a32f6ad75..000000000000 --- a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/update_entry.php +++ /dev/null @@ -1,61 +0,0 @@ -updateEntry($entry); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END datacatalog_v1_generated_DataCatalog_UpdateEntry_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/update_entry_group.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/update_entry_group.php deleted file mode 100644 index 0b1c47b16911..000000000000 --- a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/update_entry_group.php +++ /dev/null @@ -1,61 +0,0 @@ -updateEntryGroup($entryGroup); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END datacatalog_v1_generated_DataCatalog_UpdateEntryGroup_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/update_tag.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/update_tag.php deleted file mode 100644 index 034230c40220..000000000000 --- a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/update_tag.php +++ /dev/null @@ -1,75 +0,0 @@ -setTemplate($tagTemplate) - ->setFields($tagFields); - - // Call the API and handle any network failures. - try { - /** @var Tag $response */ - $response = $dataCatalogClient->updateTag($tag); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $tagTemplate = '[TEMPLATE]'; - - update_tag_sample($tagTemplate); -} -// [END datacatalog_v1_generated_DataCatalog_UpdateTag_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/update_tag_template.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/update_tag_template.php deleted file mode 100644 index a10591068f93..000000000000 --- a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/update_tag_template.php +++ /dev/null @@ -1,66 +0,0 @@ -setFields($tagTemplateFields); - - // Call the API and handle any network failures. - try { - /** @var TagTemplate $response */ - $response = $dataCatalogClient->updateTagTemplate($tagTemplate); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END datacatalog_v1_generated_DataCatalog_UpdateTagTemplate_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/update_tag_template_field.php b/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/update_tag_template_field.php deleted file mode 100644 index 99bb55622559..000000000000 --- a/owl-bot-staging/DataCatalog/v1/samples/V1/DataCatalogClient/update_tag_template_field.php +++ /dev/null @@ -1,84 +0,0 @@ -setType($tagTemplateFieldType); - - // Call the API and handle any network failures. - try { - /** @var TagTemplateField $response */ - $response = $dataCatalogClient->updateTagTemplateField($formattedName, $tagTemplateField); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DataCatalogClient::tagTemplateFieldName( - '[PROJECT]', - '[LOCATION]', - '[TAG_TEMPLATE]', - '[FIELD]' - ); - - update_tag_template_field_sample($formattedName); -} -// [END datacatalog_v1_generated_DataCatalog_UpdateTagTemplateField_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/create_policy_tag.php b/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/create_policy_tag.php deleted file mode 100644 index 526b33b0f7e5..000000000000 --- a/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/create_policy_tag.php +++ /dev/null @@ -1,66 +0,0 @@ -createPolicyTag($formattedParent); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = PolicyTagManagerClient::taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); - - create_policy_tag_sample($formattedParent); -} -// [END datacatalog_v1_generated_PolicyTagManager_CreatePolicyTag_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/create_taxonomy.php b/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/create_taxonomy.php deleted file mode 100644 index 076db6ba9b63..000000000000 --- a/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/create_taxonomy.php +++ /dev/null @@ -1,68 +0,0 @@ -createTaxonomy($formattedParent); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = PolicyTagManagerClient::locationName('[PROJECT]', '[LOCATION]'); - - create_taxonomy_sample($formattedParent); -} -// [END datacatalog_v1_generated_PolicyTagManager_CreateTaxonomy_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/delete_policy_tag.php b/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/delete_policy_tag.php deleted file mode 100644 index 03235d25e593..000000000000 --- a/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/delete_policy_tag.php +++ /dev/null @@ -1,76 +0,0 @@ -deletePolicyTag($formattedName); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = PolicyTagManagerClient::policyTagName( - '[PROJECT]', - '[LOCATION]', - '[TAXONOMY]', - '[POLICY_TAG]' - ); - - delete_policy_tag_sample($formattedName); -} -// [END datacatalog_v1_generated_PolicyTagManager_DeletePolicyTag_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/delete_taxonomy.php b/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/delete_taxonomy.php deleted file mode 100644 index f89844fa179b..000000000000 --- a/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/delete_taxonomy.php +++ /dev/null @@ -1,68 +0,0 @@ -deleteTaxonomy($formattedName); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = PolicyTagManagerClient::taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); - - delete_taxonomy_sample($formattedName); -} -// [END datacatalog_v1_generated_PolicyTagManager_DeleteTaxonomy_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/get_iam_policy.php b/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/get_iam_policy.php deleted file mode 100644 index 8b7fa0e75ded..000000000000 --- a/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/get_iam_policy.php +++ /dev/null @@ -1,66 +0,0 @@ -getIamPolicy($resource); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END datacatalog_v1_generated_PolicyTagManager_GetIamPolicy_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/get_policy_tag.php b/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/get_policy_tag.php deleted file mode 100644 index 8674cac4dd1e..000000000000 --- a/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/get_policy_tag.php +++ /dev/null @@ -1,71 +0,0 @@ -getPolicyTag($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = PolicyTagManagerClient::policyTagName( - '[PROJECT]', - '[LOCATION]', - '[TAXONOMY]', - '[POLICY_TAG]' - ); - - get_policy_tag_sample($formattedName); -} -// [END datacatalog_v1_generated_PolicyTagManager_GetPolicyTag_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/get_taxonomy.php b/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/get_taxonomy.php deleted file mode 100644 index 1b35aaeb8373..000000000000 --- a/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/get_taxonomy.php +++ /dev/null @@ -1,66 +0,0 @@ -getTaxonomy($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = PolicyTagManagerClient::taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); - - get_taxonomy_sample($formattedName); -} -// [END datacatalog_v1_generated_PolicyTagManager_GetTaxonomy_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/list_policy_tags.php b/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/list_policy_tags.php deleted file mode 100644 index 05e83b592c6e..000000000000 --- a/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/list_policy_tags.php +++ /dev/null @@ -1,71 +0,0 @@ -listPolicyTags($formattedParent); - - /** @var PolicyTag $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = PolicyTagManagerClient::taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); - - list_policy_tags_sample($formattedParent); -} -// [END datacatalog_v1_generated_PolicyTagManager_ListPolicyTags_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/list_taxonomies.php b/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/list_taxonomies.php deleted file mode 100644 index 31b81e47831b..000000000000 --- a/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/list_taxonomies.php +++ /dev/null @@ -1,72 +0,0 @@ -listTaxonomies($formattedParent); - - /** @var Taxonomy $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = PolicyTagManagerClient::locationName('[PROJECT]', '[LOCATION]'); - - list_taxonomies_sample($formattedParent); -} -// [END datacatalog_v1_generated_PolicyTagManager_ListTaxonomies_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/set_iam_policy.php b/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/set_iam_policy.php deleted file mode 100644 index 7e733c6784fc..000000000000 --- a/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/set_iam_policy.php +++ /dev/null @@ -1,69 +0,0 @@ -setIamPolicy($resource, $policy); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END datacatalog_v1_generated_PolicyTagManager_SetIamPolicy_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/test_iam_permissions.php b/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/test_iam_permissions.php deleted file mode 100644 index 984a6a592ea4..000000000000 --- a/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/test_iam_permissions.php +++ /dev/null @@ -1,75 +0,0 @@ -testIamPermissions($resource, $permissions); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END datacatalog_v1_generated_PolicyTagManager_TestIamPermissions_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/update_policy_tag.php b/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/update_policy_tag.php deleted file mode 100644 index 24a5d6a75d87..000000000000 --- a/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/update_policy_tag.php +++ /dev/null @@ -1,54 +0,0 @@ -updatePolicyTag(); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END datacatalog_v1_generated_PolicyTagManager_UpdatePolicyTag_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/update_taxonomy.php b/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/update_taxonomy.php deleted file mode 100644 index 943874d7fa25..000000000000 --- a/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerClient/update_taxonomy.php +++ /dev/null @@ -1,54 +0,0 @@ -updateTaxonomy(); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END datacatalog_v1_generated_PolicyTagManager_UpdateTaxonomy_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerSerializationClient/export_taxonomies.php b/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerSerializationClient/export_taxonomies.php deleted file mode 100644 index 32660a18abe0..000000000000 --- a/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerSerializationClient/export_taxonomies.php +++ /dev/null @@ -1,87 +0,0 @@ -exportTaxonomies( - $formattedParent, - $formattedTaxonomies - ); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = PolicyTagManagerSerializationClient::locationName('[PROJECT]', '[LOCATION]'); - $formattedTaxonomiesElement = PolicyTagManagerSerializationClient::taxonomyName( - '[PROJECT]', - '[LOCATION]', - '[TAXONOMY]' - ); - - export_taxonomies_sample($formattedParent, $formattedTaxonomiesElement); -} -// [END datacatalog_v1_generated_PolicyTagManagerSerialization_ExportTaxonomies_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerSerializationClient/import_taxonomies.php b/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerSerializationClient/import_taxonomies.php deleted file mode 100644 index e99730726d0c..000000000000 --- a/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerSerializationClient/import_taxonomies.php +++ /dev/null @@ -1,74 +0,0 @@ -importTaxonomies($formattedParent); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = PolicyTagManagerSerializationClient::locationName('[PROJECT]', '[LOCATION]'); - - import_taxonomies_sample($formattedParent); -} -// [END datacatalog_v1_generated_PolicyTagManagerSerialization_ImportTaxonomies_sync] diff --git a/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerSerializationClient/replace_taxonomy.php b/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerSerializationClient/replace_taxonomy.php deleted file mode 100644 index 224490c6bea2..000000000000 --- a/owl-bot-staging/DataCatalog/v1/samples/V1/PolicyTagManagerSerializationClient/replace_taxonomy.php +++ /dev/null @@ -1,95 +0,0 @@ -setDisplayName($serializedTaxonomyDisplayName); - - // Call the API and handle any network failures. - try { - /** @var Taxonomy $response */ - $response = $policyTagManagerSerializationClient->replaceTaxonomy( - $formattedName, - $serializedTaxonomy - ); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = PolicyTagManagerSerializationClient::taxonomyName( - '[PROJECT]', - '[LOCATION]', - '[TAXONOMY]' - ); - $serializedTaxonomyDisplayName = '[DISPLAY_NAME]'; - - replace_taxonomy_sample($formattedName, $serializedTaxonomyDisplayName); -} -// [END datacatalog_v1_generated_PolicyTagManagerSerialization_ReplaceTaxonomy_sync] diff --git a/owl-bot-staging/DataCatalog/v1/src/V1/Client/BaseClient/DataCatalogBaseClient.php b/owl-bot-staging/DataCatalog/v1/src/V1/Client/BaseClient/DataCatalogBaseClient.php deleted file mode 100644 index 164ca86e5467..000000000000 --- a/owl-bot-staging/DataCatalog/v1/src/V1/Client/BaseClient/DataCatalogBaseClient.php +++ /dev/null @@ -1,1486 +0,0 @@ - self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../../resources/data_catalog_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../../resources/data_catalog_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../../resources/data_catalog_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../../resources/data_catalog_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Formats a string containing the fully-qualified path to represent a entry - * resource. - * - * @param string $project - * @param string $location - * @param string $entryGroup - * @param string $entry - * - * @return string The formatted entry resource. - */ - public static function entryName(string $project, string $location, string $entryGroup, string $entry): string - { - return self::getPathTemplate('entry')->render([ - 'project' => $project, - 'location' => $location, - 'entry_group' => $entryGroup, - 'entry' => $entry, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a entry_group - * resource. - * - * @param string $project - * @param string $location - * @param string $entryGroup - * - * @return string The formatted entry_group resource. - */ - public static function entryGroupName(string $project, string $location, string $entryGroup): string - { - return self::getPathTemplate('entryGroup')->render([ - 'project' => $project, - 'location' => $location, - 'entry_group' => $entryGroup, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName(string $project, string $location): string - { - return self::getPathTemplate('location')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a tag - * resource. - * - * @param string $project - * @param string $location - * @param string $entryGroup - * @param string $entry - * @param string $tag - * - * @return string The formatted tag resource. - */ - public static function tagName(string $project, string $location, string $entryGroup, string $entry, string $tag): string - { - return self::getPathTemplate('tag')->render([ - 'project' => $project, - 'location' => $location, - 'entry_group' => $entryGroup, - 'entry' => $entry, - 'tag' => $tag, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a tag_template - * resource. - * - * @param string $project - * @param string $location - * @param string $tagTemplate - * - * @return string The formatted tag_template resource. - */ - public static function tagTemplateName(string $project, string $location, string $tagTemplate): string - { - return self::getPathTemplate('tagTemplate')->render([ - 'project' => $project, - 'location' => $location, - 'tag_template' => $tagTemplate, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * tag_template_field resource. - * - * @param string $project - * @param string $location - * @param string $tagTemplate - * @param string $field - * - * @return string The formatted tag_template_field resource. - */ - public static function tagTemplateFieldName(string $project, string $location, string $tagTemplate, string $field): string - { - return self::getPathTemplate('tagTemplateField')->render([ - 'project' => $project, - 'location' => $location, - 'tag_template' => $tagTemplate, - 'field' => $field, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * tag_template_field_enum_value resource. - * - * @param string $project - * @param string $location - * @param string $tagTemplate - * @param string $tagTemplateFieldId - * @param string $enumValueDisplayName - * - * @return string The formatted tag_template_field_enum_value resource. - */ - public static function tagTemplateFieldEnumValueName(string $project, string $location, string $tagTemplate, string $tagTemplateFieldId, string $enumValueDisplayName): string - { - return self::getPathTemplate('tagTemplateFieldEnumValue')->render([ - 'project' => $project, - 'location' => $location, - 'tag_template' => $tagTemplate, - 'tag_template_field_id' => $tagTemplateFieldId, - 'enum_value_display_name' => $enumValueDisplayName, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - entry: projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry} - * - entryGroup: projects/{project}/locations/{location}/entryGroups/{entry_group} - * - location: projects/{project}/locations/{location} - * - tag: projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}/tags/{tag} - * - tagTemplate: projects/{project}/locations/{location}/tagTemplates/{tag_template} - * - tagTemplateField: projects/{project}/locations/{location}/tagTemplates/{tag_template}/fields/{field} - * - tagTemplateFieldEnumValue: projects/{project}/locations/{location}/tagTemplates/{tag_template}/fields/{tag_template_field_id}/enumValues/{enum_value_display_name} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'datacatalog.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates an entry. - * - * You can create entries only with 'FILESET', 'CLUSTER', 'DATA_STREAM', - * or custom types. Data Catalog automatically creates entries with other - * types during metadata ingestion from integrated systems. - * - * You must enable the Data Catalog API in the project identified by - * the `parent` parameter. For more information, see [Data Catalog resource - * project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). - * - * An entry group can have a maximum of 100,000 entries. - * - * The async variant is {@see self::createEntryAsync()} . - * - * @param CreateEntryRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Entry - * - * @throws ApiException Thrown if the API call fails. - */ - public function createEntry(CreateEntryRequest $request, array $callOptions = []): Entry - { - return $this->startApiCall('CreateEntry', $request, $callOptions)->wait(); - } - - /** - * Creates an entry group. - * - * An entry group contains logically related entries together with [Cloud - * Identity and Access Management](/data-catalog/docs/concepts/iam) policies. - * These policies specify users who can create, edit, and view entries - * within entry groups. - * - * Data Catalog automatically creates entry groups with names that start with - * the `@` symbol for the following resources: - * - * * BigQuery entries (`@bigquery`) - * * Pub/Sub topics (`@pubsub`) - * * Dataproc Metastore services (`@dataproc_metastore_{SERVICE_NAME_HASH}`) - * - * You can create your own entry groups for Cloud Storage fileset entries - * and custom entries together with the corresponding IAM policies. - * User-created entry groups can't contain the `@` symbol, it is reserved - * for automatically created groups. - * - * Entry groups, like entries, can be searched. - * - * A maximum of 10,000 entry groups may be created per organization across all - * locations. - * - * You must enable the Data Catalog API in the project identified by - * the `parent` parameter. For more information, see [Data Catalog resource - * project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). - * - * The async variant is {@see self::createEntryGroupAsync()} . - * - * @param CreateEntryGroupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return EntryGroup - * - * @throws ApiException Thrown if the API call fails. - */ - public function createEntryGroup(CreateEntryGroupRequest $request, array $callOptions = []): EntryGroup - { - return $this->startApiCall('CreateEntryGroup', $request, $callOptions)->wait(); - } - - /** - * Creates a tag and assigns it to: - * - * * An [Entry][google.cloud.datacatalog.v1.Entry] if the method name is - * `projects.locations.entryGroups.entries.tags.create`. - * * Or [EntryGroup][google.cloud.datacatalog.v1.EntryGroup]if the method - * name is `projects.locations.entryGroups.tags.create`. - * - * Note: The project identified by the `parent` parameter for the [tag] - * (https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.entryGroups.entries.tags/create#path-parameters) - * and the [tag template] - * (https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.tagTemplates/create#path-parameters) - * used to create the tag must be in the same organization. - * - * The async variant is {@see self::createTagAsync()} . - * - * @param CreateTagRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Tag - * - * @throws ApiException Thrown if the API call fails. - */ - public function createTag(CreateTagRequest $request, array $callOptions = []): Tag - { - return $this->startApiCall('CreateTag', $request, $callOptions)->wait(); - } - - /** - * Creates a tag template. - * - * You must enable the Data Catalog API in the project identified by the - * `parent` parameter. - * For more information, see [Data Catalog resource project] - * (https://cloud.google.com/data-catalog/docs/concepts/resource-project). - * - * The async variant is {@see self::createTagTemplateAsync()} . - * - * @param CreateTagTemplateRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TagTemplate - * - * @throws ApiException Thrown if the API call fails. - */ - public function createTagTemplate(CreateTagTemplateRequest $request, array $callOptions = []): TagTemplate - { - return $this->startApiCall('CreateTagTemplate', $request, $callOptions)->wait(); - } - - /** - * Creates a field in a tag template. - * - * You must enable the Data Catalog API in the project identified by - * the `parent` parameter. For more information, see [Data Catalog resource - * project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). - * - * The async variant is {@see self::createTagTemplateFieldAsync()} . - * - * @param CreateTagTemplateFieldRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TagTemplateField - * - * @throws ApiException Thrown if the API call fails. - */ - public function createTagTemplateField(CreateTagTemplateFieldRequest $request, array $callOptions = []): TagTemplateField - { - return $this->startApiCall('CreateTagTemplateField', $request, $callOptions)->wait(); - } - - /** - * Deletes an existing entry. - * - * You can delete only the entries created by the - * [CreateEntry][google.cloud.datacatalog.v1.DataCatalog.CreateEntry] - * method. - * - * You must enable the Data Catalog API in the project identified by - * the `name` parameter. For more information, see [Data Catalog - * resource - * project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). - * - * The async variant is {@see self::deleteEntryAsync()} . - * - * @param DeleteEntryRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteEntry(DeleteEntryRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteEntry', $request, $callOptions)->wait(); - } - - /** - * Deletes an entry group. - * - * You must enable the Data Catalog API in the project - * identified by the `name` parameter. For more information, see [Data Catalog - * resource - * project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). - * - * The async variant is {@see self::deleteEntryGroupAsync()} . - * - * @param DeleteEntryGroupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteEntryGroup(DeleteEntryGroupRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteEntryGroup', $request, $callOptions)->wait(); - } - - /** - * Deletes a tag. - * - * The async variant is {@see self::deleteTagAsync()} . - * - * @param DeleteTagRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteTag(DeleteTagRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteTag', $request, $callOptions)->wait(); - } - - /** - * Deletes a tag template and all tags that use it. - * - * You must enable the Data Catalog API in the project identified by - * the `name` parameter. For more information, see [Data Catalog resource - * project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). - * - * The async variant is {@see self::deleteTagTemplateAsync()} . - * - * @param DeleteTagTemplateRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteTagTemplate(DeleteTagTemplateRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteTagTemplate', $request, $callOptions)->wait(); - } - - /** - * Deletes a field in a tag template and all uses of this field from the tags - * based on this template. - * - * You must enable the Data Catalog API in the project identified by - * the `name` parameter. For more information, see [Data Catalog resource - * project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). - * - * The async variant is {@see self::deleteTagTemplateFieldAsync()} . - * - * @param DeleteTagTemplateFieldRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteTagTemplateField(DeleteTagTemplateFieldRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteTagTemplateField', $request, $callOptions)->wait(); - } - - /** - * Gets an entry. - * - * The async variant is {@see self::getEntryAsync()} . - * - * @param GetEntryRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Entry - * - * @throws ApiException Thrown if the API call fails. - */ - public function getEntry(GetEntryRequest $request, array $callOptions = []): Entry - { - return $this->startApiCall('GetEntry', $request, $callOptions)->wait(); - } - - /** - * Gets an entry group. - * - * The async variant is {@see self::getEntryGroupAsync()} . - * - * @param GetEntryGroupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return EntryGroup - * - * @throws ApiException Thrown if the API call fails. - */ - public function getEntryGroup(GetEntryGroupRequest $request, array $callOptions = []): EntryGroup - { - return $this->startApiCall('GetEntryGroup', $request, $callOptions)->wait(); - } - - /** - * Gets the access control policy for a resource. - * - * May return: - * - * * A`NOT_FOUND` error if the resource doesn't exist or you don't have the - * permission to view it. - * * An empty policy if the resource exists but doesn't have a set policy. - * - * Supported resources are: - * - * - Tag templates - * - Entry groups - * - * Note: This method doesn't get policies from Google Cloud Platform - * resources ingested into Data Catalog. - * - * To call this method, you must have the following Google IAM permissions: - * - * - `datacatalog.tagTemplates.getIamPolicy` to get policies on tag - * templates. - * - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups. - * - * The async variant is {@see self::getIamPolicyAsync()} . - * - * @param GetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Gets a tag template. - * - * The async variant is {@see self::getTagTemplateAsync()} . - * - * @param GetTagTemplateRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TagTemplate - * - * @throws ApiException Thrown if the API call fails. - */ - public function getTagTemplate(GetTagTemplateRequest $request, array $callOptions = []): TagTemplate - { - return $this->startApiCall('GetTagTemplate', $request, $callOptions)->wait(); - } - - /** - * Imports entries from a source, such as data previously dumped into a - * Cloud Storage bucket, into Data Catalog. Import of entries - * is a sync operation that reconciles the state of the third-party system - * with the Data Catalog. - * - * `ImportEntries` accepts source data snapshots of a third-party system. - * Snapshot should be delivered as a .wire or base65-encoded .txt file - * containing a sequence of Protocol Buffer messages of - * [DumpItem][google.cloud.datacatalog.v1.DumpItem] type. - * - * `ImportEntries` returns a [long-running operation] - * [google.longrunning.Operation] resource that can be queried with - * [Operations.GetOperation][google.longrunning.Operations.GetOperation] - * to return - * [ImportEntriesMetadata][google.cloud.datacatalog.v1.ImportEntriesMetadata] - * and an - * [ImportEntriesResponse][google.cloud.datacatalog.v1.ImportEntriesResponse] - * message. - * - * The async variant is {@see self::importEntriesAsync()} . - * - * @param ImportEntriesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function importEntries(ImportEntriesRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ImportEntries', $request, $callOptions)->wait(); - } - - /** - * Lists entries. - * - * Note: Currently, this method can list only custom entries. - * To get a list of both custom and automatically created entries, use - * [SearchCatalog][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog]. - * - * The async variant is {@see self::listEntriesAsync()} . - * - * @param ListEntriesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listEntries(ListEntriesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListEntries', $request, $callOptions); - } - - /** - * Lists entry groups. - * - * The async variant is {@see self::listEntryGroupsAsync()} . - * - * @param ListEntryGroupsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listEntryGroups(ListEntryGroupsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListEntryGroups', $request, $callOptions); - } - - /** - * Lists tags assigned to an [Entry][google.cloud.datacatalog.v1.Entry]. - * The [columns][google.cloud.datacatalog.v1.Tag.column] in the response are - * lowercased. - * - * The async variant is {@see self::listTagsAsync()} . - * - * @param ListTagsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listTags(ListTagsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListTags', $request, $callOptions); - } - - /** - * Gets an entry by its target resource name. - * - * The resource name comes from the source Google Cloud Platform service. - * - * The async variant is {@see self::lookupEntryAsync()} . - * - * @param LookupEntryRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Entry - * - * @throws ApiException Thrown if the API call fails. - */ - public function lookupEntry(LookupEntryRequest $request, array $callOptions = []): Entry - { - return $this->startApiCall('LookupEntry', $request, $callOptions)->wait(); - } - - /** - * Modifies contacts, part of the business context of an - * [Entry][google.cloud.datacatalog.v1.Entry]. - * - * To call this method, you must have the `datacatalog.entries.updateContacts` - * IAM permission on the corresponding project. - * - * The async variant is {@see self::modifyEntryContactsAsync()} . - * - * @param ModifyEntryContactsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Contacts - * - * @throws ApiException Thrown if the API call fails. - */ - public function modifyEntryContacts(ModifyEntryContactsRequest $request, array $callOptions = []): Contacts - { - return $this->startApiCall('ModifyEntryContacts', $request, $callOptions)->wait(); - } - - /** - * Modifies entry overview, part of the business context of an - * [Entry][google.cloud.datacatalog.v1.Entry]. - * - * To call this method, you must have the `datacatalog.entries.updateOverview` - * IAM permission on the corresponding project. - * - * The async variant is {@see self::modifyEntryOverviewAsync()} . - * - * @param ModifyEntryOverviewRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return EntryOverview - * - * @throws ApiException Thrown if the API call fails. - */ - public function modifyEntryOverview(ModifyEntryOverviewRequest $request, array $callOptions = []): EntryOverview - { - return $this->startApiCall('ModifyEntryOverview', $request, $callOptions)->wait(); - } - - /** - * `ReconcileTags` creates or updates a list of tags on the entry. - * If the - * [ReconcileTagsRequest.force_delete_missing][google.cloud.datacatalog.v1.ReconcileTagsRequest.force_delete_missing] - * parameter is set, the operation deletes tags not included in the input tag - * list. - * - * `ReconcileTags` returns a [long-running operation] - * [google.longrunning.Operation] resource that can be queried with - * [Operations.GetOperation][google.longrunning.Operations.GetOperation] - * to return [ReconcileTagsMetadata] - * [google.cloud.datacatalog.v1.ReconcileTagsMetadata] and - * a [ReconcileTagsResponse] - * [google.cloud.datacatalog.v1.ReconcileTagsResponse] message. - * - * The async variant is {@see self::reconcileTagsAsync()} . - * - * @param ReconcileTagsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function reconcileTags(ReconcileTagsRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ReconcileTags', $request, $callOptions)->wait(); - } - - /** - * Renames a field in a tag template. - * - * You must enable the Data Catalog API in the project identified by the - * `name` parameter. For more information, see [Data Catalog resource project] - * (https://cloud.google.com/data-catalog/docs/concepts/resource-project). - * - * The async variant is {@see self::renameTagTemplateFieldAsync()} . - * - * @param RenameTagTemplateFieldRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TagTemplateField - * - * @throws ApiException Thrown if the API call fails. - */ - public function renameTagTemplateField(RenameTagTemplateFieldRequest $request, array $callOptions = []): TagTemplateField - { - return $this->startApiCall('RenameTagTemplateField', $request, $callOptions)->wait(); - } - - /** - * Renames an enum value in a tag template. - * - * Within a single enum field, enum values must be unique. - * - * The async variant is {@see self::renameTagTemplateFieldEnumValueAsync()} . - * - * @param RenameTagTemplateFieldEnumValueRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TagTemplateField - * - * @throws ApiException Thrown if the API call fails. - */ - public function renameTagTemplateFieldEnumValue(RenameTagTemplateFieldEnumValueRequest $request, array $callOptions = []): TagTemplateField - { - return $this->startApiCall('RenameTagTemplateFieldEnumValue', $request, $callOptions)->wait(); - } - - /** - * Searches Data Catalog for multiple resources like entries and tags that - * match a query. - * - * This is a [Custom Method] - * (https://cloud.google.com/apis/design/custom_methods) that doesn't return - * all information on a resource, only its ID and high level fields. To get - * more information, you can subsequently call specific get methods. - * - * Note: Data Catalog search queries don't guarantee full recall. Results - * that match your query might not be returned, even in subsequent - * result pages. Additionally, returned (and not returned) results can vary - * if you repeat search queries. - * - * For more information, see [Data Catalog search syntax] - * (https://cloud.google.com/data-catalog/docs/how-to/search-reference). - * - * The async variant is {@see self::searchCatalogAsync()} . - * - * @param SearchCatalogRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function searchCatalog(SearchCatalogRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('SearchCatalog', $request, $callOptions); - } - - /** - * Sets an access control policy for a resource. Replaces any existing - * policy. - * - * Supported resources are: - * - * - Tag templates - * - Entry groups - * - * Note: This method sets policies only within Data Catalog and can't be - * used to manage policies in BigQuery, Pub/Sub, Dataproc Metastore, and any - * external Google Cloud Platform resources synced with the Data Catalog. - * - * To call this method, you must have the following Google IAM permissions: - * - * - `datacatalog.tagTemplates.setIamPolicy` to set policies on tag - * templates. - * - `datacatalog.entryGroups.setIamPolicy` to set policies on entry groups. - * - * The async variant is {@see self::setIamPolicyAsync()} . - * - * @param SetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Marks an [Entry][google.cloud.datacatalog.v1.Entry] as starred by - * the current user. Starring information is private to each user. - * - * The async variant is {@see self::starEntryAsync()} . - * - * @param StarEntryRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return StarEntryResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function starEntry(StarEntryRequest $request, array $callOptions = []): StarEntryResponse - { - return $this->startApiCall('StarEntry', $request, $callOptions)->wait(); - } - - /** - * Gets your permissions on a resource. - * - * Returns an empty set of permissions if the resource doesn't exist. - * - * Supported resources are: - * - * - Tag templates - * - Entry groups - * - * Note: This method gets policies only within Data Catalog and can't be - * used to get policies from BigQuery, Pub/Sub, Dataproc Metastore, and any - * external Google Cloud Platform resources ingested into Data Catalog. - * - * No Google IAM permissions are required to call this method. - * - * The async variant is {@see self::testIamPermissionsAsync()} . - * - * @param TestIamPermissionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TestIamPermissionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); - } - - /** - * Marks an [Entry][google.cloud.datacatalog.v1.Entry] as NOT starred by - * the current user. Starring information is private to each user. - * - * The async variant is {@see self::unstarEntryAsync()} . - * - * @param UnstarEntryRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return UnstarEntryResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function unstarEntry(UnstarEntryRequest $request, array $callOptions = []): UnstarEntryResponse - { - return $this->startApiCall('UnstarEntry', $request, $callOptions)->wait(); - } - - /** - * Updates an existing entry. - * - * You must enable the Data Catalog API in the project identified by - * the `entry.name` parameter. For more information, see [Data Catalog - * resource - * project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). - * - * The async variant is {@see self::updateEntryAsync()} . - * - * @param UpdateEntryRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Entry - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateEntry(UpdateEntryRequest $request, array $callOptions = []): Entry - { - return $this->startApiCall('UpdateEntry', $request, $callOptions)->wait(); - } - - /** - * Updates an entry group. - * - * You must enable the Data Catalog API in the project identified by - * the `entry_group.name` parameter. For more information, see [Data Catalog - * resource - * project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). - * - * The async variant is {@see self::updateEntryGroupAsync()} . - * - * @param UpdateEntryGroupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return EntryGroup - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateEntryGroup(UpdateEntryGroupRequest $request, array $callOptions = []): EntryGroup - { - return $this->startApiCall('UpdateEntryGroup', $request, $callOptions)->wait(); - } - - /** - * Updates an existing tag. - * - * The async variant is {@see self::updateTagAsync()} . - * - * @param UpdateTagRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Tag - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateTag(UpdateTagRequest $request, array $callOptions = []): Tag - { - return $this->startApiCall('UpdateTag', $request, $callOptions)->wait(); - } - - /** - * Updates a tag template. - * - * You can't update template fields with this method. These fields are - * separate resources with their own create, update, and delete methods. - * - * You must enable the Data Catalog API in the project identified by - * the `tag_template.name` parameter. For more information, see [Data Catalog - * resource - * project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). - * - * The async variant is {@see self::updateTagTemplateAsync()} . - * - * @param UpdateTagTemplateRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TagTemplate - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateTagTemplate(UpdateTagTemplateRequest $request, array $callOptions = []): TagTemplate - { - return $this->startApiCall('UpdateTagTemplate', $request, $callOptions)->wait(); - } - - /** - * Updates a field in a tag template. - * - * You can't update the field type with this method. - * - * You must enable the Data Catalog API in the project - * identified by the `name` parameter. For more information, see [Data Catalog - * resource - * project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). - * - * The async variant is {@see self::updateTagTemplateFieldAsync()} . - * - * @param UpdateTagTemplateFieldRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TagTemplateField - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateTagTemplateField(UpdateTagTemplateFieldRequest $request, array $callOptions = []): TagTemplateField - { - return $this->startApiCall('UpdateTagTemplateField', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/DataCatalog/v1/src/V1/Client/BaseClient/PolicyTagManagerBaseClient.php b/owl-bot-staging/DataCatalog/v1/src/V1/Client/BaseClient/PolicyTagManagerBaseClient.php deleted file mode 100644 index 6d3d6f53bdd9..000000000000 --- a/owl-bot-staging/DataCatalog/v1/src/V1/Client/BaseClient/PolicyTagManagerBaseClient.php +++ /dev/null @@ -1,608 +0,0 @@ - self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../../resources/policy_tag_manager_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../../resources/policy_tag_manager_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../../resources/policy_tag_manager_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../../resources/policy_tag_manager_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName(string $project, string $location): string - { - return self::getPathTemplate('location')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a policy_tag - * resource. - * - * @param string $project - * @param string $location - * @param string $taxonomy - * @param string $policyTag - * - * @return string The formatted policy_tag resource. - */ - public static function policyTagName(string $project, string $location, string $taxonomy, string $policyTag): string - { - return self::getPathTemplate('policyTag')->render([ - 'project' => $project, - 'location' => $location, - 'taxonomy' => $taxonomy, - 'policy_tag' => $policyTag, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a taxonomy - * resource. - * - * @param string $project - * @param string $location - * @param string $taxonomy - * - * @return string The formatted taxonomy resource. - */ - public static function taxonomyName(string $project, string $location, string $taxonomy): string - { - return self::getPathTemplate('taxonomy')->render([ - 'project' => $project, - 'location' => $location, - 'taxonomy' => $taxonomy, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - location: projects/{project}/locations/{location} - * - policyTag: projects/{project}/locations/{location}/taxonomies/{taxonomy}/policyTags/{policy_tag} - * - taxonomy: projects/{project}/locations/{location}/taxonomies/{taxonomy} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'datacatalog.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a policy tag in a taxonomy. - * - * The async variant is {@see self::createPolicyTagAsync()} . - * - * @param CreatePolicyTagRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PolicyTag - * - * @throws ApiException Thrown if the API call fails. - */ - public function createPolicyTag(CreatePolicyTagRequest $request, array $callOptions = []): PolicyTag - { - return $this->startApiCall('CreatePolicyTag', $request, $callOptions)->wait(); - } - - /** - * Creates a taxonomy in a specified project. - * - * The taxonomy is initially empty, that is, it doesn't contain policy tags. - * - * The async variant is {@see self::createTaxonomyAsync()} . - * - * @param CreateTaxonomyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Taxonomy - * - * @throws ApiException Thrown if the API call fails. - */ - public function createTaxonomy(CreateTaxonomyRequest $request, array $callOptions = []): Taxonomy - { - return $this->startApiCall('CreateTaxonomy', $request, $callOptions)->wait(); - } - - /** - * Deletes a policy tag together with the following: - * - * * All of its descendant policy tags, if any - * * Policies associated with the policy tag and its descendants - * * References from BigQuery table schema of the policy tag and its - * descendants - * - * The async variant is {@see self::deletePolicyTagAsync()} . - * - * @param DeletePolicyTagRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deletePolicyTag(DeletePolicyTagRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeletePolicyTag', $request, $callOptions)->wait(); - } - - /** - * Deletes a taxonomy, including all policy tags in this - * taxonomy, their associated policies, and the policy tags references from - * BigQuery columns. - * - * The async variant is {@see self::deleteTaxonomyAsync()} . - * - * @param DeleteTaxonomyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteTaxonomy(DeleteTaxonomyRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteTaxonomy', $request, $callOptions)->wait(); - } - - /** - * Gets the IAM policy for a policy tag or a taxonomy. - * - * The async variant is {@see self::getIamPolicyAsync()} . - * - * @param GetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Gets a policy tag. - * - * The async variant is {@see self::getPolicyTagAsync()} . - * - * @param GetPolicyTagRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PolicyTag - * - * @throws ApiException Thrown if the API call fails. - */ - public function getPolicyTag(GetPolicyTagRequest $request, array $callOptions = []): PolicyTag - { - return $this->startApiCall('GetPolicyTag', $request, $callOptions)->wait(); - } - - /** - * Gets a taxonomy. - * - * The async variant is {@see self::getTaxonomyAsync()} . - * - * @param GetTaxonomyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Taxonomy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getTaxonomy(GetTaxonomyRequest $request, array $callOptions = []): Taxonomy - { - return $this->startApiCall('GetTaxonomy', $request, $callOptions)->wait(); - } - - /** - * Lists all policy tags in a taxonomy. - * - * The async variant is {@see self::listPolicyTagsAsync()} . - * - * @param ListPolicyTagsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listPolicyTags(ListPolicyTagsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListPolicyTags', $request, $callOptions); - } - - /** - * Lists all taxonomies in a project in a particular location that you - * have a permission to view. - * - * The async variant is {@see self::listTaxonomiesAsync()} . - * - * @param ListTaxonomiesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listTaxonomies(ListTaxonomiesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListTaxonomies', $request, $callOptions); - } - - /** - * Sets the IAM policy for a policy tag or a taxonomy. - * - * The async variant is {@see self::setIamPolicyAsync()} . - * - * @param SetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Returns your permissions on a specified policy tag or - * taxonomy. - * - * The async variant is {@see self::testIamPermissionsAsync()} . - * - * @param TestIamPermissionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TestIamPermissionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); - } - - /** - * Updates a policy tag, including its display - * name, description, and parent policy tag. - * - * The async variant is {@see self::updatePolicyTagAsync()} . - * - * @param UpdatePolicyTagRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PolicyTag - * - * @throws ApiException Thrown if the API call fails. - */ - public function updatePolicyTag(UpdatePolicyTagRequest $request, array $callOptions = []): PolicyTag - { - return $this->startApiCall('UpdatePolicyTag', $request, $callOptions)->wait(); - } - - /** - * Updates a taxonomy, including its display name, - * description, and activated policy types. - * - * The async variant is {@see self::updateTaxonomyAsync()} . - * - * @param UpdateTaxonomyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Taxonomy - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateTaxonomy(UpdateTaxonomyRequest $request, array $callOptions = []): Taxonomy - { - return $this->startApiCall('UpdateTaxonomy', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/DataCatalog/v1/src/V1/Client/BaseClient/PolicyTagManagerSerializationBaseClient.php b/owl-bot-staging/DataCatalog/v1/src/V1/Client/BaseClient/PolicyTagManagerSerializationBaseClient.php deleted file mode 100644 index 4b73e10d1806..000000000000 --- a/owl-bot-staging/DataCatalog/v1/src/V1/Client/BaseClient/PolicyTagManagerSerializationBaseClient.php +++ /dev/null @@ -1,337 +0,0 @@ - self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../../resources/policy_tag_manager_serialization_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../../resources/policy_tag_manager_serialization_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../../resources/policy_tag_manager_serialization_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../../resources/policy_tag_manager_serialization_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName(string $project, string $location): string - { - return self::getPathTemplate('location')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a taxonomy - * resource. - * - * @param string $project - * @param string $location - * @param string $taxonomy - * - * @return string The formatted taxonomy resource. - */ - public static function taxonomyName(string $project, string $location, string $taxonomy): string - { - return self::getPathTemplate('taxonomy')->render([ - 'project' => $project, - 'location' => $location, - 'taxonomy' => $taxonomy, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - location: projects/{project}/locations/{location} - * - taxonomy: projects/{project}/locations/{location}/taxonomies/{taxonomy} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'datacatalog.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Exports taxonomies in the requested type and returns them, - * including their policy tags. The requested taxonomies must belong to the - * same project. - * - * This method generates `SerializedTaxonomy` protocol buffers with nested - * policy tags that can be used as input for `ImportTaxonomies` calls. - * - * The async variant is {@see self::exportTaxonomiesAsync()} . - * - * @param ExportTaxonomiesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ExportTaxonomiesResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function exportTaxonomies(ExportTaxonomiesRequest $request, array $callOptions = []): ExportTaxonomiesResponse - { - return $this->startApiCall('ExportTaxonomies', $request, $callOptions)->wait(); - } - - /** - * Creates new taxonomies (including their policy tags) in a given project - * by importing from inlined or cross-regional sources. - * - * For a cross-regional source, new taxonomies are created by copying - * from a source in another region. - * - * For an inlined source, taxonomies and policy tags are created in bulk using - * nested protocol buffer structures. - * - * The async variant is {@see self::importTaxonomiesAsync()} . - * - * @param ImportTaxonomiesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ImportTaxonomiesResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function importTaxonomies(ImportTaxonomiesRequest $request, array $callOptions = []): ImportTaxonomiesResponse - { - return $this->startApiCall('ImportTaxonomies', $request, $callOptions)->wait(); - } - - /** - * Replaces (updates) a taxonomy and all its policy tags. - * - * The taxonomy and its entire hierarchy of policy tags must be - * represented literally by `SerializedTaxonomy` and the nested - * `SerializedPolicyTag` messages. - * - * This operation automatically does the following: - * - * - Deletes the existing policy tags that are missing from the - * `SerializedPolicyTag`. - * - Creates policy tags that don't have resource names. They are considered - * new. - * - Updates policy tags with valid resources names accordingly. - * - * The async variant is {@see self::replaceTaxonomyAsync()} . - * - * @param ReplaceTaxonomyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Taxonomy - * - * @throws ApiException Thrown if the API call fails. - */ - public function replaceTaxonomy(ReplaceTaxonomyRequest $request, array $callOptions = []): Taxonomy - { - return $this->startApiCall('ReplaceTaxonomy', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/DataCatalog/v1/src/V1/Client/DataCatalogClient.php b/owl-bot-staging/DataCatalog/v1/src/V1/Client/DataCatalogClient.php deleted file mode 100644 index 04907de0eb1e..000000000000 --- a/owl-bot-staging/DataCatalog/v1/src/V1/Client/DataCatalogClient.php +++ /dev/null @@ -1,40 +0,0 @@ -entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - * $entryId = 'entry_id'; - * $entry = new Entry(); - * $response = $dataCatalogClient->createEntry($formattedParent, $entryId, $entry); - * } finally { - * $dataCatalogClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * This service has a new (beta) implementation. See {@see - * \Google\Cloud\DataCatalog\V1\Client\DataCatalogClient} to use the new surface. - */ -class DataCatalogGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.datacatalog.v1.DataCatalog'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'datacatalog.googleapis.com'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static $entryNameTemplate; - - private static $entryGroupNameTemplate; - - private static $locationNameTemplate; - - private static $tagNameTemplate; - - private static $tagTemplateNameTemplate; - - private static $tagTemplateFieldNameTemplate; - - private static $tagTemplateFieldEnumValueNameTemplate; - - private static $pathTemplateMap; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/data_catalog_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/data_catalog_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/data_catalog_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/data_catalog_rest_client_config.php', - ], - ], - ]; - } - - private static function getEntryNameTemplate() - { - if (self::$entryNameTemplate == null) { - self::$entryNameTemplate = new PathTemplate('projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}'); - } - - return self::$entryNameTemplate; - } - - private static function getEntryGroupNameTemplate() - { - if (self::$entryGroupNameTemplate == null) { - self::$entryGroupNameTemplate = new PathTemplate('projects/{project}/locations/{location}/entryGroups/{entry_group}'); - } - - return self::$entryGroupNameTemplate; - } - - private static function getLocationNameTemplate() - { - if (self::$locationNameTemplate == null) { - self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); - } - - return self::$locationNameTemplate; - } - - private static function getTagNameTemplate() - { - if (self::$tagNameTemplate == null) { - self::$tagNameTemplate = new PathTemplate('projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}/tags/{tag}'); - } - - return self::$tagNameTemplate; - } - - private static function getTagTemplateNameTemplate() - { - if (self::$tagTemplateNameTemplate == null) { - self::$tagTemplateNameTemplate = new PathTemplate('projects/{project}/locations/{location}/tagTemplates/{tag_template}'); - } - - return self::$tagTemplateNameTemplate; - } - - private static function getTagTemplateFieldNameTemplate() - { - if (self::$tagTemplateFieldNameTemplate == null) { - self::$tagTemplateFieldNameTemplate = new PathTemplate('projects/{project}/locations/{location}/tagTemplates/{tag_template}/fields/{field}'); - } - - return self::$tagTemplateFieldNameTemplate; - } - - private static function getTagTemplateFieldEnumValueNameTemplate() - { - if (self::$tagTemplateFieldEnumValueNameTemplate == null) { - self::$tagTemplateFieldEnumValueNameTemplate = new PathTemplate('projects/{project}/locations/{location}/tagTemplates/{tag_template}/fields/{tag_template_field_id}/enumValues/{enum_value_display_name}'); - } - - return self::$tagTemplateFieldEnumValueNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'entry' => self::getEntryNameTemplate(), - 'entryGroup' => self::getEntryGroupNameTemplate(), - 'location' => self::getLocationNameTemplate(), - 'tag' => self::getTagNameTemplate(), - 'tagTemplate' => self::getTagTemplateNameTemplate(), - 'tagTemplateField' => self::getTagTemplateFieldNameTemplate(), - 'tagTemplateFieldEnumValue' => self::getTagTemplateFieldEnumValueNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a entry - * resource. - * - * @param string $project - * @param string $location - * @param string $entryGroup - * @param string $entry - * - * @return string The formatted entry resource. - */ - public static function entryName($project, $location, $entryGroup, $entry) - { - return self::getEntryNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'entry_group' => $entryGroup, - 'entry' => $entry, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a entry_group - * resource. - * - * @param string $project - * @param string $location - * @param string $entryGroup - * - * @return string The formatted entry_group resource. - */ - public static function entryGroupName($project, $location, $entryGroup) - { - return self::getEntryGroupNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'entry_group' => $entryGroup, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName($project, $location) - { - return self::getLocationNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a tag - * resource. - * - * @param string $project - * @param string $location - * @param string $entryGroup - * @param string $entry - * @param string $tag - * - * @return string The formatted tag resource. - */ - public static function tagName($project, $location, $entryGroup, $entry, $tag) - { - return self::getTagNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'entry_group' => $entryGroup, - 'entry' => $entry, - 'tag' => $tag, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a tag_template - * resource. - * - * @param string $project - * @param string $location - * @param string $tagTemplate - * - * @return string The formatted tag_template resource. - */ - public static function tagTemplateName($project, $location, $tagTemplate) - { - return self::getTagTemplateNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'tag_template' => $tagTemplate, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * tag_template_field resource. - * - * @param string $project - * @param string $location - * @param string $tagTemplate - * @param string $field - * - * @return string The formatted tag_template_field resource. - */ - public static function tagTemplateFieldName($project, $location, $tagTemplate, $field) - { - return self::getTagTemplateFieldNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'tag_template' => $tagTemplate, - 'field' => $field, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * tag_template_field_enum_value resource. - * - * @param string $project - * @param string $location - * @param string $tagTemplate - * @param string $tagTemplateFieldId - * @param string $enumValueDisplayName - * - * @return string The formatted tag_template_field_enum_value resource. - */ - public static function tagTemplateFieldEnumValueName($project, $location, $tagTemplate, $tagTemplateFieldId, $enumValueDisplayName) - { - return self::getTagTemplateFieldEnumValueNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'tag_template' => $tagTemplate, - 'tag_template_field_id' => $tagTemplateFieldId, - 'enum_value_display_name' => $enumValueDisplayName, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - entry: projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry} - * - entryGroup: projects/{project}/locations/{location}/entryGroups/{entry_group} - * - location: projects/{project}/locations/{location} - * - tag: projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}/tags/{tag} - * - tagTemplate: projects/{project}/locations/{location}/tagTemplates/{tag_template} - * - tagTemplateField: projects/{project}/locations/{location}/tagTemplates/{tag_template}/fields/{field} - * - tagTemplateFieldEnumValue: projects/{project}/locations/{location}/tagTemplates/{tag_template}/fields/{tag_template_field_id}/enumValues/{enum_value_display_name} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'datacatalog.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** - * Creates an entry. - * - * You can create entries only with 'FILESET', 'CLUSTER', 'DATA_STREAM', - * or custom types. Data Catalog automatically creates entries with other - * types during metadata ingestion from integrated systems. - * - * You must enable the Data Catalog API in the project identified by - * the `parent` parameter. For more information, see [Data Catalog resource - * project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). - * - * An entry group can have a maximum of 100,000 entries. - * - * Sample code: - * ``` - * $dataCatalogClient = new DataCatalogClient(); - * try { - * $formattedParent = $dataCatalogClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - * $entryId = 'entry_id'; - * $entry = new Entry(); - * $response = $dataCatalogClient->createEntry($formattedParent, $entryId, $entry); - * } finally { - * $dataCatalogClient->close(); - * } - * ``` - * - * @param string $parent Required. The name of the entry group this entry belongs to. - * - * Note: The entry itself and its child resources might not be stored in - * the location specified in its name. - * @param string $entryId Required. The ID of the entry to create. - * - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * and underscores (_). - * The maximum size is 64 bytes when encoded in UTF-8. - * @param Entry $entry Required. The entry to create. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\DataCatalog\V1\Entry - * - * @throws ApiException if the remote call fails - */ - public function createEntry($parent, $entryId, $entry, array $optionalArgs = []) - { - $request = new CreateEntryRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setEntryId($entryId); - $request->setEntry($entry); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateEntry', Entry::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates an entry group. - * - * An entry group contains logically related entries together with [Cloud - * Identity and Access Management](/data-catalog/docs/concepts/iam) policies. - * These policies specify users who can create, edit, and view entries - * within entry groups. - * - * Data Catalog automatically creates entry groups with names that start with - * the `@` symbol for the following resources: - * - * * BigQuery entries (`@bigquery`) - * * Pub/Sub topics (`@pubsub`) - * * Dataproc Metastore services (`@dataproc_metastore_{SERVICE_NAME_HASH}`) - * - * You can create your own entry groups for Cloud Storage fileset entries - * and custom entries together with the corresponding IAM policies. - * User-created entry groups can't contain the `@` symbol, it is reserved - * for automatically created groups. - * - * Entry groups, like entries, can be searched. - * - * A maximum of 10,000 entry groups may be created per organization across all - * locations. - * - * You must enable the Data Catalog API in the project identified by - * the `parent` parameter. For more information, see [Data Catalog resource - * project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). - * - * Sample code: - * ``` - * $dataCatalogClient = new DataCatalogClient(); - * try { - * $formattedParent = $dataCatalogClient->locationName('[PROJECT]', '[LOCATION]'); - * $entryGroupId = 'entry_group_id'; - * $response = $dataCatalogClient->createEntryGroup($formattedParent, $entryGroupId); - * } finally { - * $dataCatalogClient->close(); - * } - * ``` - * - * @param string $parent Required. The names of the project and location that the new entry group - * belongs to. - * - * Note: The entry group itself and its child resources might not be - * stored in the location specified in its name. - * @param string $entryGroupId Required. The ID of the entry group to create. - * - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and must start with a letter or underscore. - * The maximum size is 64 bytes when encoded in UTF-8. - * @param array $optionalArgs { - * Optional. - * - * @type EntryGroup $entryGroup - * The entry group to create. Defaults to empty. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\DataCatalog\V1\EntryGroup - * - * @throws ApiException if the remote call fails - */ - public function createEntryGroup($parent, $entryGroupId, array $optionalArgs = []) - { - $request = new CreateEntryGroupRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setEntryGroupId($entryGroupId); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['entryGroup'])) { - $request->setEntryGroup($optionalArgs['entryGroup']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateEntryGroup', EntryGroup::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a tag and assigns it to: - * - * * An [Entry][google.cloud.datacatalog.v1.Entry] if the method name is - * `projects.locations.entryGroups.entries.tags.create`. - * * Or [EntryGroup][google.cloud.datacatalog.v1.EntryGroup]if the method - * name is `projects.locations.entryGroups.tags.create`. - * - * Note: The project identified by the `parent` parameter for the [tag] - * (https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.entryGroups.entries.tags/create#path-parameters) - * and the [tag template] - * (https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.tagTemplates/create#path-parameters) - * used to create the tag must be in the same organization. - * - * Sample code: - * ``` - * $dataCatalogClient = new DataCatalogClient(); - * try { - * $formattedParent = $dataCatalogClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - * $tag = new Tag(); - * $response = $dataCatalogClient->createTag($formattedParent, $tag); - * } finally { - * $dataCatalogClient->close(); - * } - * ``` - * - * @param string $parent Required. The name of the resource to attach this tag to. - * - * Tags can be attached to entries or entry groups. An entry can have up to - * 1000 attached tags. - * - * Note: The tag and its child resources might not be stored in - * the location specified in its name. - * @param Tag $tag Required. The tag to create. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\DataCatalog\V1\Tag - * - * @throws ApiException if the remote call fails - */ - public function createTag($parent, $tag, array $optionalArgs = []) - { - $request = new CreateTagRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setTag($tag); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateTag', Tag::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a tag template. - * - * You must enable the Data Catalog API in the project identified by the - * `parent` parameter. - * For more information, see [Data Catalog resource project] - * (https://cloud.google.com/data-catalog/docs/concepts/resource-project). - * - * Sample code: - * ``` - * $dataCatalogClient = new DataCatalogClient(); - * try { - * $formattedParent = $dataCatalogClient->locationName('[PROJECT]', '[LOCATION]'); - * $tagTemplateId = 'tag_template_id'; - * $tagTemplate = new TagTemplate(); - * $response = $dataCatalogClient->createTagTemplate($formattedParent, $tagTemplateId, $tagTemplate); - * } finally { - * $dataCatalogClient->close(); - * } - * ``` - * - * @param string $parent Required. The name of the project and the template location - * [region](https://cloud.google.com/data-catalog/docs/concepts/regions). - * @param string $tagTemplateId Required. The ID of the tag template to create. - * - * The ID must contain only lowercase letters (a-z), numbers (0-9), - * or underscores (_), and must start with a letter or underscore. - * The maximum size is 64 bytes when encoded in UTF-8. - * @param TagTemplate $tagTemplate Required. The tag template to create. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\DataCatalog\V1\TagTemplate - * - * @throws ApiException if the remote call fails - */ - public function createTagTemplate($parent, $tagTemplateId, $tagTemplate, array $optionalArgs = []) - { - $request = new CreateTagTemplateRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setTagTemplateId($tagTemplateId); - $request->setTagTemplate($tagTemplate); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateTagTemplate', TagTemplate::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a field in a tag template. - * - * You must enable the Data Catalog API in the project identified by - * the `parent` parameter. For more information, see [Data Catalog resource - * project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). - * - * Sample code: - * ``` - * $dataCatalogClient = new DataCatalogClient(); - * try { - * $formattedParent = $dataCatalogClient->tagTemplateName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); - * $tagTemplateFieldId = 'tag_template_field_id'; - * $tagTemplateField = new TagTemplateField(); - * $response = $dataCatalogClient->createTagTemplateField($formattedParent, $tagTemplateFieldId, $tagTemplateField); - * } finally { - * $dataCatalogClient->close(); - * } - * ``` - * - * @param string $parent Required. The name of the project and the template location - * [region](https://cloud.google.com/data-catalog/docs/concepts/regions). - * @param string $tagTemplateFieldId Required. The ID of the tag template field to create. - * - * Note: Adding a required field to an existing template is *not* allowed. - * - * Field IDs can contain letters (both uppercase and lowercase), numbers - * (0-9), underscores (_) and dashes (-). Field IDs must be at least 1 - * character long and at most 128 characters long. Field IDs must also be - * unique within their template. - * @param TagTemplateField $tagTemplateField Required. The tag template field to create. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\DataCatalog\V1\TagTemplateField - * - * @throws ApiException if the remote call fails - */ - public function createTagTemplateField($parent, $tagTemplateFieldId, $tagTemplateField, array $optionalArgs = []) - { - $request = new CreateTagTemplateFieldRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setTagTemplateFieldId($tagTemplateFieldId); - $request->setTagTemplateField($tagTemplateField); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateTagTemplateField', TagTemplateField::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes an existing entry. - * - * You can delete only the entries created by the - * [CreateEntry][google.cloud.datacatalog.v1.DataCatalog.CreateEntry] - * method. - * - * You must enable the Data Catalog API in the project identified by - * the `name` parameter. For more information, see [Data Catalog - * resource - * project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). - * - * Sample code: - * ``` - * $dataCatalogClient = new DataCatalogClient(); - * try { - * $formattedName = $dataCatalogClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - * $dataCatalogClient->deleteEntry($formattedName); - * } finally { - * $dataCatalogClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the entry to delete. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - */ - public function deleteEntry($name, array $optionalArgs = []) - { - $request = new DeleteEntryRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteEntry', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes an entry group. - * - * You must enable the Data Catalog API in the project - * identified by the `name` parameter. For more information, see [Data Catalog - * resource - * project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). - * - * Sample code: - * ``` - * $dataCatalogClient = new DataCatalogClient(); - * try { - * $formattedName = $dataCatalogClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - * $dataCatalogClient->deleteEntryGroup($formattedName); - * } finally { - * $dataCatalogClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the entry group to delete. - * @param array $optionalArgs { - * Optional. - * - * @type bool $force - * Optional. If true, deletes all entries in the entry group. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - */ - public function deleteEntryGroup($name, array $optionalArgs = []) - { - $request = new DeleteEntryGroupRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['force'])) { - $request->setForce($optionalArgs['force']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteEntryGroup', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes a tag. - * - * Sample code: - * ``` - * $dataCatalogClient = new DataCatalogClient(); - * try { - * $formattedName = $dataCatalogClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - * $dataCatalogClient->deleteTag($formattedName); - * } finally { - * $dataCatalogClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the tag to delete. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - */ - public function deleteTag($name, array $optionalArgs = []) - { - $request = new DeleteTagRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteTag', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes a tag template and all tags that use it. - * - * You must enable the Data Catalog API in the project identified by - * the `name` parameter. For more information, see [Data Catalog resource - * project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). - * - * Sample code: - * ``` - * $dataCatalogClient = new DataCatalogClient(); - * try { - * $formattedName = $dataCatalogClient->tagTemplateName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); - * $force = false; - * $dataCatalogClient->deleteTagTemplate($formattedName, $force); - * } finally { - * $dataCatalogClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the tag template to delete. - * @param bool $force Required. If true, deletes all tags that use this template. - * - * Currently, `true` is the only supported value. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - */ - public function deleteTagTemplate($name, $force, array $optionalArgs = []) - { - $request = new DeleteTagTemplateRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setForce($force); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteTagTemplate', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes a field in a tag template and all uses of this field from the tags - * based on this template. - * - * You must enable the Data Catalog API in the project identified by - * the `name` parameter. For more information, see [Data Catalog resource - * project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). - * - * Sample code: - * ``` - * $dataCatalogClient = new DataCatalogClient(); - * try { - * $formattedName = $dataCatalogClient->tagTemplateFieldName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]', '[FIELD]'); - * $force = false; - * $dataCatalogClient->deleteTagTemplateField($formattedName, $force); - * } finally { - * $dataCatalogClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the tag template field to delete. - * @param bool $force Required. If true, deletes this field from any tags that use it. - * - * Currently, `true` is the only supported value. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - */ - public function deleteTagTemplateField($name, $force, array $optionalArgs = []) - { - $request = new DeleteTagTemplateFieldRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setForce($force); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteTagTemplateField', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets an entry. - * - * Sample code: - * ``` - * $dataCatalogClient = new DataCatalogClient(); - * try { - * $formattedName = $dataCatalogClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - * $response = $dataCatalogClient->getEntry($formattedName); - * } finally { - * $dataCatalogClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the entry to get. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\DataCatalog\V1\Entry - * - * @throws ApiException if the remote call fails - */ - public function getEntry($name, array $optionalArgs = []) - { - $request = new GetEntryRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetEntry', Entry::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets an entry group. - * - * Sample code: - * ``` - * $dataCatalogClient = new DataCatalogClient(); - * try { - * $formattedName = $dataCatalogClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - * $response = $dataCatalogClient->getEntryGroup($formattedName); - * } finally { - * $dataCatalogClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the entry group to get. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $readMask - * The fields to return. If empty or omitted, all fields are returned. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\DataCatalog\V1\EntryGroup - * - * @throws ApiException if the remote call fails - */ - public function getEntryGroup($name, array $optionalArgs = []) - { - $request = new GetEntryGroupRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['readMask'])) { - $request->setReadMask($optionalArgs['readMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetEntryGroup', EntryGroup::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets the access control policy for a resource. - * - * May return: - * - * * A`NOT_FOUND` error if the resource doesn't exist or you don't have the - * permission to view it. - * * An empty policy if the resource exists but doesn't have a set policy. - * - * Supported resources are: - * - * - Tag templates - * - Entry groups - * - * Note: This method doesn't get policies from Google Cloud Platform - * resources ingested into Data Catalog. - * - * To call this method, you must have the following Google IAM permissions: - * - * - `datacatalog.tagTemplates.getIamPolicy` to get policies on tag - * templates. - * - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups. - * - * Sample code: - * ``` - * $dataCatalogClient = new DataCatalogClient(); - * try { - * $resource = 'resource'; - * $response = $dataCatalogClient->getIamPolicy($resource); - * } finally { - * $dataCatalogClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * @param array $optionalArgs { - * Optional. - * - * @type GetPolicyOptions $options - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function getIamPolicy($resource, array $optionalArgs = []) - { - $request = new GetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['options'])) { - $request->setOptions($optionalArgs['options']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets a tag template. - * - * Sample code: - * ``` - * $dataCatalogClient = new DataCatalogClient(); - * try { - * $formattedName = $dataCatalogClient->tagTemplateName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); - * $response = $dataCatalogClient->getTagTemplate($formattedName); - * } finally { - * $dataCatalogClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the tag template to get. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\DataCatalog\V1\TagTemplate - * - * @throws ApiException if the remote call fails - */ - public function getTagTemplate($name, array $optionalArgs = []) - { - $request = new GetTagTemplateRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetTagTemplate', TagTemplate::class, $optionalArgs, $request)->wait(); - } - - /** - * Imports entries from a source, such as data previously dumped into a - * Cloud Storage bucket, into Data Catalog. Import of entries - * is a sync operation that reconciles the state of the third-party system - * with the Data Catalog. - * - * `ImportEntries` accepts source data snapshots of a third-party system. - * Snapshot should be delivered as a .wire or base65-encoded .txt file - * containing a sequence of Protocol Buffer messages of - * [DumpItem][google.cloud.datacatalog.v1.DumpItem] type. - * - * `ImportEntries` returns a [long-running operation] - * [google.longrunning.Operation] resource that can be queried with - * [Operations.GetOperation][google.longrunning.Operations.GetOperation] - * to return - * [ImportEntriesMetadata][google.cloud.datacatalog.v1.ImportEntriesMetadata] - * and an - * [ImportEntriesResponse][google.cloud.datacatalog.v1.ImportEntriesResponse] - * message. - * - * Sample code: - * ``` - * $dataCatalogClient = new DataCatalogClient(); - * try { - * $formattedParent = $dataCatalogClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - * $operationResponse = $dataCatalogClient->importEntries($formattedParent); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataCatalogClient->importEntries($formattedParent); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataCatalogClient->resumeOperation($operationName, 'importEntries'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataCatalogClient->close(); - * } - * ``` - * - * @param string $parent Required. Target entry group for ingested entries. - * @param array $optionalArgs { - * Optional. - * - * @type string $gcsBucketPath - * Path to a Cloud Storage bucket that contains a dump ready for ingestion. - * @type string $jobId - * Optional. (Optional) Dataplex task job id, if specified will be used as - * part of ImportEntries LRO ID - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function importEntries($parent, array $optionalArgs = []) - { - $request = new ImportEntriesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['gcsBucketPath'])) { - $request->setGcsBucketPath($optionalArgs['gcsBucketPath']); - } - - if (isset($optionalArgs['jobId'])) { - $request->setJobId($optionalArgs['jobId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('ImportEntries', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Lists entries. - * - * Note: Currently, this method can list only custom entries. - * To get a list of both custom and automatically created entries, use - * [SearchCatalog][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog]. - * - * Sample code: - * ``` - * $dataCatalogClient = new DataCatalogClient(); - * try { - * $formattedParent = $dataCatalogClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - * // Iterate over pages of elements - * $pagedResponse = $dataCatalogClient->listEntries($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $dataCatalogClient->listEntries($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $dataCatalogClient->close(); - * } - * ``` - * - * @param string $parent Required. The name of the entry group that contains the entries to list. - * - * Can be provided in URL format. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type FieldMask $readMask - * The fields to return for each entry. If empty or omitted, all - * fields are returned. - * - * For example, to return a list of entries with only the `name` field, - * set `read_mask` to only one path with the `name` value. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listEntries($parent, array $optionalArgs = []) - { - $request = new ListEntriesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['readMask'])) { - $request->setReadMask($optionalArgs['readMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListEntries', $optionalArgs, ListEntriesResponse::class, $request); - } - - /** - * Lists entry groups. - * - * Sample code: - * ``` - * $dataCatalogClient = new DataCatalogClient(); - * try { - * $formattedParent = $dataCatalogClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $dataCatalogClient->listEntryGroups($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $dataCatalogClient->listEntryGroups($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $dataCatalogClient->close(); - * } - * ``` - * - * @param string $parent Required. The name of the location that contains the entry groups to list. - * - * Can be provided as a URL. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listEntryGroups($parent, array $optionalArgs = []) - { - $request = new ListEntryGroupsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListEntryGroups', $optionalArgs, ListEntryGroupsResponse::class, $request); - } - - /** - * Lists tags assigned to an [Entry][google.cloud.datacatalog.v1.Entry]. - * The [columns][google.cloud.datacatalog.v1.Tag.column] in the response are - * lowercased. - * - * Sample code: - * ``` - * $dataCatalogClient = new DataCatalogClient(); - * try { - * $formattedParent = $dataCatalogClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - * // Iterate over pages of elements - * $pagedResponse = $dataCatalogClient->listTags($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $dataCatalogClient->listTags($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $dataCatalogClient->close(); - * } - * ``` - * - * @param string $parent Required. The name of the Data Catalog resource to list the tags of. - * - * The resource can be an [Entry][google.cloud.datacatalog.v1.Entry] - * or an [EntryGroup][google.cloud.datacatalog.v1.EntryGroup] - * (without `/entries/{entries}` at the end). - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listTags($parent, array $optionalArgs = []) - { - $request = new ListTagsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListTags', $optionalArgs, ListTagsResponse::class, $request); - } - - /** - * Gets an entry by its target resource name. - * - * The resource name comes from the source Google Cloud Platform service. - * - * Sample code: - * ``` - * $dataCatalogClient = new DataCatalogClient(); - * try { - * $response = $dataCatalogClient->lookupEntry(); - * } finally { - * $dataCatalogClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $linkedResource - * The full name of the Google Cloud Platform resource the Data Catalog - * entry represents. For more information, see [Full Resource Name] - * (https://cloud.google.com/apis/design/resource_names#full_resource_name). - * - * Full names are case-sensitive. For example: - * - * * `//bigquery.googleapis.com/projects/{PROJECT_ID}/datasets/{DATASET_ID}/tables/{TABLE_ID}` - * * `//pubsub.googleapis.com/projects/{PROJECT_ID}/topics/{TOPIC_ID}` - * @type string $sqlResource - * The SQL name of the entry. SQL names are case-sensitive. - * - * Examples: - * - * * `pubsub.topic.{PROJECT_ID}.{TOPIC_ID}` - * * `pubsub.topic.{PROJECT_ID}.`\``{TOPIC.ID.SEPARATED.WITH.DOTS}`\` - * * `bigquery.table.{PROJECT_ID}.{DATASET_ID}.{TABLE_ID}` - * * `bigquery.dataset.{PROJECT_ID}.{DATASET_ID}` - * * `datacatalog.entry.{PROJECT_ID}.{LOCATION_ID}.{ENTRY_GROUP_ID}.{ENTRY_ID}` - * - * Identifiers (`*_ID`) should comply with the - * [Lexical structure in Standard SQL] - * (https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical). - * @type string $fullyQualifiedName - * [Fully Qualified Name - * (FQN)](https://cloud.google.com//data-catalog/docs/fully-qualified-names) - * of the resource. - * - * FQNs take two forms: - * - * * For non-regionalized resources: - * - * `{SYSTEM}:{PROJECT}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}` - * - * * For regionalized resources: - * - * `{SYSTEM}:{PROJECT}.{LOCATION_ID}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}` - * - * Example for a DPMS table: - * - * `dataproc_metastore:{PROJECT_ID}.{LOCATION_ID}.{INSTANCE_ID}.{DATABASE_ID}.{TABLE_ID}` - * @type string $project - * Project where the lookup should be performed. Required to lookup - * entry that is not a part of `DPMS` or `DATAPLEX` `integrated_system` - * using its `fully_qualified_name`. Ignored in other cases. - * @type string $location - * Location where the lookup should be performed. Required to lookup - * entry that is not a part of `DPMS` or `DATAPLEX` `integrated_system` - * using its `fully_qualified_name`. Ignored in other cases. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\DataCatalog\V1\Entry - * - * @throws ApiException if the remote call fails - */ - public function lookupEntry(array $optionalArgs = []) - { - $request = new LookupEntryRequest(); - if (isset($optionalArgs['linkedResource'])) { - $request->setLinkedResource($optionalArgs['linkedResource']); - } - - if (isset($optionalArgs['sqlResource'])) { - $request->setSqlResource($optionalArgs['sqlResource']); - } - - if (isset($optionalArgs['fullyQualifiedName'])) { - $request->setFullyQualifiedName($optionalArgs['fullyQualifiedName']); - } - - if (isset($optionalArgs['project'])) { - $request->setProject($optionalArgs['project']); - } - - if (isset($optionalArgs['location'])) { - $request->setLocation($optionalArgs['location']); - } - - return $this->startCall('LookupEntry', Entry::class, $optionalArgs, $request)->wait(); - } - - /** - * Modifies contacts, part of the business context of an - * [Entry][google.cloud.datacatalog.v1.Entry]. - * - * To call this method, you must have the `datacatalog.entries.updateContacts` - * IAM permission on the corresponding project. - * - * Sample code: - * ``` - * $dataCatalogClient = new DataCatalogClient(); - * try { - * $formattedName = $dataCatalogClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - * $contacts = new Contacts(); - * $response = $dataCatalogClient->modifyEntryContacts($formattedName, $contacts); - * } finally { - * $dataCatalogClient->close(); - * } - * ``` - * - * @param string $name Required. The full resource name of the entry. - * @param Contacts $contacts Required. The new value for the Contacts. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\DataCatalog\V1\Contacts - * - * @throws ApiException if the remote call fails - */ - public function modifyEntryContacts($name, $contacts, array $optionalArgs = []) - { - $request = new ModifyEntryContactsRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setContacts($contacts); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('ModifyEntryContacts', Contacts::class, $optionalArgs, $request)->wait(); - } - - /** - * Modifies entry overview, part of the business context of an - * [Entry][google.cloud.datacatalog.v1.Entry]. - * - * To call this method, you must have the `datacatalog.entries.updateOverview` - * IAM permission on the corresponding project. - * - * Sample code: - * ``` - * $dataCatalogClient = new DataCatalogClient(); - * try { - * $formattedName = $dataCatalogClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - * $entryOverview = new EntryOverview(); - * $response = $dataCatalogClient->modifyEntryOverview($formattedName, $entryOverview); - * } finally { - * $dataCatalogClient->close(); - * } - * ``` - * - * @param string $name Required. The full resource name of the entry. - * @param EntryOverview $entryOverview Required. The new value for the Entry Overview. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\DataCatalog\V1\EntryOverview - * - * @throws ApiException if the remote call fails - */ - public function modifyEntryOverview($name, $entryOverview, array $optionalArgs = []) - { - $request = new ModifyEntryOverviewRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setEntryOverview($entryOverview); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('ModifyEntryOverview', EntryOverview::class, $optionalArgs, $request)->wait(); - } - - /** - * `ReconcileTags` creates or updates a list of tags on the entry. - * If the - * [ReconcileTagsRequest.force_delete_missing][google.cloud.datacatalog.v1.ReconcileTagsRequest.force_delete_missing] - * parameter is set, the operation deletes tags not included in the input tag - * list. - * - * `ReconcileTags` returns a [long-running operation] - * [google.longrunning.Operation] resource that can be queried with - * [Operations.GetOperation][google.longrunning.Operations.GetOperation] - * to return [ReconcileTagsMetadata] - * [google.cloud.datacatalog.v1.ReconcileTagsMetadata] and - * a [ReconcileTagsResponse] - * [google.cloud.datacatalog.v1.ReconcileTagsResponse] message. - * - * Sample code: - * ``` - * $dataCatalogClient = new DataCatalogClient(); - * try { - * $formattedParent = $dataCatalogClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - * $formattedTagTemplate = $dataCatalogClient->tagTemplateName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); - * $operationResponse = $dataCatalogClient->reconcileTags($formattedParent, $formattedTagTemplate); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataCatalogClient->reconcileTags($formattedParent, $formattedTagTemplate); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataCatalogClient->resumeOperation($operationName, 'reconcileTags'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataCatalogClient->close(); - * } - * ``` - * - * @param string $parent Required. Name of [Entry][google.cloud.datacatalog.v1.Entry] to be tagged. - * @param string $tagTemplate Required. The name of the tag template, which is used for reconciliation. - * @param array $optionalArgs { - * Optional. - * - * @type bool $forceDeleteMissing - * If set to `true`, deletes entry tags related to a tag template - * not listed in the tags source from an entry. If set to `false`, - * unlisted tags are retained. - * @type Tag[] $tags - * A list of tags to apply to an entry. A tag can specify a - * tag template, which must be the template specified in the - * `ReconcileTagsRequest`. - * The sole entry and each of its columns must be mentioned at most once. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function reconcileTags($parent, $tagTemplate, array $optionalArgs = []) - { - $request = new ReconcileTagsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setTagTemplate($tagTemplate); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['forceDeleteMissing'])) { - $request->setForceDeleteMissing($optionalArgs['forceDeleteMissing']); - } - - if (isset($optionalArgs['tags'])) { - $request->setTags($optionalArgs['tags']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('ReconcileTags', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Renames a field in a tag template. - * - * You must enable the Data Catalog API in the project identified by the - * `name` parameter. For more information, see [Data Catalog resource project] - * (https://cloud.google.com/data-catalog/docs/concepts/resource-project). - * - * Sample code: - * ``` - * $dataCatalogClient = new DataCatalogClient(); - * try { - * $formattedName = $dataCatalogClient->tagTemplateFieldName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]', '[FIELD]'); - * $newTagTemplateFieldId = 'new_tag_template_field_id'; - * $response = $dataCatalogClient->renameTagTemplateField($formattedName, $newTagTemplateFieldId); - * } finally { - * $dataCatalogClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the tag template field. - * @param string $newTagTemplateFieldId Required. The new ID of this tag template field. For example, - * `my_new_field`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\DataCatalog\V1\TagTemplateField - * - * @throws ApiException if the remote call fails - */ - public function renameTagTemplateField($name, $newTagTemplateFieldId, array $optionalArgs = []) - { - $request = new RenameTagTemplateFieldRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setNewTagTemplateFieldId($newTagTemplateFieldId); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('RenameTagTemplateField', TagTemplateField::class, $optionalArgs, $request)->wait(); - } - - /** - * Renames an enum value in a tag template. - * - * Within a single enum field, enum values must be unique. - * - * Sample code: - * ``` - * $dataCatalogClient = new DataCatalogClient(); - * try { - * $formattedName = $dataCatalogClient->tagTemplateFieldEnumValueName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]', '[TAG_TEMPLATE_FIELD_ID]', '[ENUM_VALUE_DISPLAY_NAME]'); - * $newEnumValueDisplayName = 'new_enum_value_display_name'; - * $response = $dataCatalogClient->renameTagTemplateFieldEnumValue($formattedName, $newEnumValueDisplayName); - * } finally { - * $dataCatalogClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the enum field value. - * @param string $newEnumValueDisplayName Required. The new display name of the enum value. For example, - * `my_new_enum_value`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\DataCatalog\V1\TagTemplateField - * - * @throws ApiException if the remote call fails - */ - public function renameTagTemplateFieldEnumValue($name, $newEnumValueDisplayName, array $optionalArgs = []) - { - $request = new RenameTagTemplateFieldEnumValueRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setNewEnumValueDisplayName($newEnumValueDisplayName); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('RenameTagTemplateFieldEnumValue', TagTemplateField::class, $optionalArgs, $request)->wait(); - } - - /** - * Searches Data Catalog for multiple resources like entries and tags that - * match a query. - * - * This is a [Custom Method] - * (https://cloud.google.com/apis/design/custom_methods) that doesn't return - * all information on a resource, only its ID and high level fields. To get - * more information, you can subsequently call specific get methods. - * - * Note: Data Catalog search queries don't guarantee full recall. Results - * that match your query might not be returned, even in subsequent - * result pages. Additionally, returned (and not returned) results can vary - * if you repeat search queries. - * - * For more information, see [Data Catalog search syntax] - * (https://cloud.google.com/data-catalog/docs/how-to/search-reference). - * - * Sample code: - * ``` - * $dataCatalogClient = new DataCatalogClient(); - * try { - * $scope = new Scope(); - * $query = 'query'; - * // Iterate over pages of elements - * $pagedResponse = $dataCatalogClient->searchCatalog($scope, $query); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $dataCatalogClient->searchCatalog($scope, $query); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $dataCatalogClient->close(); - * } - * ``` - * - * @param Scope $scope Required. The scope of this search request. - * - * The `scope` is invalid if `include_org_ids`, `include_project_ids` are - * empty AND `include_gcp_public_datasets` is set to `false`. In this case, - * the request returns an error. - * @param string $query Optional. The query string with a minimum of 3 characters and specific - * syntax. For more information, see [Data Catalog search - * syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference). - * - * An empty query string returns all data assets (in the specified scope) - * that you have access to. - * - * A query string can be a simple `xyz` or qualified by predicates: - * - * * `name:x` - * * `column:y` - * * `description:z` - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $orderBy - * Specifies the order of results. - * - * Currently supported case-sensitive values are: - * - * * `relevance` that can only be descending - * * `last_modified_timestamp [asc|desc]` with descending (`desc`) as default - * * `default` that can only be descending - * - * Search queries don't guarantee full recall. Results that match your query - * might not be returned, even in subsequent result pages. Additionally, - * returned (and not returned) results can vary if you repeat search queries. - * If you are experiencing recall issues and you don't have to fetch the - * results in any specific order, consider setting this parameter to - * `default`. - * - * If this parameter is omitted, it defaults to the descending `relevance`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function searchCatalog($scope, $query, array $optionalArgs = []) - { - $request = new SearchCatalogRequest(); - $request->setScope($scope); - $request->setQuery($query); - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - return $this->getPagedListResponse('SearchCatalog', $optionalArgs, SearchCatalogResponse::class, $request); - } - - /** - * Sets an access control policy for a resource. Replaces any existing - * policy. - * - * Supported resources are: - * - * - Tag templates - * - Entry groups - * - * Note: This method sets policies only within Data Catalog and can't be - * used to manage policies in BigQuery, Pub/Sub, Dataproc Metastore, and any - * external Google Cloud Platform resources synced with the Data Catalog. - * - * To call this method, you must have the following Google IAM permissions: - * - * - `datacatalog.tagTemplates.setIamPolicy` to set policies on tag - * templates. - * - `datacatalog.entryGroups.setIamPolicy` to set policies on entry groups. - * - * Sample code: - * ``` - * $dataCatalogClient = new DataCatalogClient(); - * try { - * $resource = 'resource'; - * $policy = new Policy(); - * $response = $dataCatalogClient->setIamPolicy($resource, $policy); - * } finally { - * $dataCatalogClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being specified. - * See the operation documentation for the appropriate value for this field. - * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of - * the policy is limited to a few 10s of KB. An empty policy is a - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - * the fields in the mask will be modified. If no mask is provided, the - * following default mask is used: - * - * `paths: "bindings, etag"` - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function setIamPolicy($resource, $policy, array $optionalArgs = []) - { - $request = new SetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPolicy($policy); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('SetIamPolicy', Policy::class, $optionalArgs, $request)->wait(); - } - - /** - * Marks an [Entry][google.cloud.datacatalog.v1.Entry] as starred by - * the current user. Starring information is private to each user. - * - * Sample code: - * ``` - * $dataCatalogClient = new DataCatalogClient(); - * try { - * $formattedName = $dataCatalogClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - * $response = $dataCatalogClient->starEntry($formattedName); - * } finally { - * $dataCatalogClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the entry to mark as starred. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\DataCatalog\V1\StarEntryResponse - * - * @throws ApiException if the remote call fails - */ - public function starEntry($name, array $optionalArgs = []) - { - $request = new StarEntryRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('StarEntry', StarEntryResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets your permissions on a resource. - * - * Returns an empty set of permissions if the resource doesn't exist. - * - * Supported resources are: - * - * - Tag templates - * - Entry groups - * - * Note: This method gets policies only within Data Catalog and can't be - * used to get policies from BigQuery, Pub/Sub, Dataproc Metastore, and any - * external Google Cloud Platform resources ingested into Data Catalog. - * - * No Google IAM permissions are required to call this method. - * - * Sample code: - * ``` - * $dataCatalogClient = new DataCatalogClient(); - * try { - * $resource = 'resource'; - * $permissions = []; - * $response = $dataCatalogClient->testIamPermissions($resource, $permissions); - * } finally { - * $dataCatalogClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\TestIamPermissionsResponse - * - * @throws ApiException if the remote call fails - */ - public function testIamPermissions($resource, $permissions, array $optionalArgs = []) - { - $request = new TestIamPermissionsRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPermissions($permissions); - $requestParamHeaders['resource'] = $resource; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Marks an [Entry][google.cloud.datacatalog.v1.Entry] as NOT starred by - * the current user. Starring information is private to each user. - * - * Sample code: - * ``` - * $dataCatalogClient = new DataCatalogClient(); - * try { - * $formattedName = $dataCatalogClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - * $response = $dataCatalogClient->unstarEntry($formattedName); - * } finally { - * $dataCatalogClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the entry to mark as **not** starred. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\DataCatalog\V1\UnstarEntryResponse - * - * @throws ApiException if the remote call fails - */ - public function unstarEntry($name, array $optionalArgs = []) - { - $request = new UnstarEntryRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UnstarEntry', UnstarEntryResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates an existing entry. - * - * You must enable the Data Catalog API in the project identified by - * the `entry.name` parameter. For more information, see [Data Catalog - * resource - * project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). - * - * Sample code: - * ``` - * $dataCatalogClient = new DataCatalogClient(); - * try { - * $entry = new Entry(); - * $response = $dataCatalogClient->updateEntry($entry); - * } finally { - * $dataCatalogClient->close(); - * } - * ``` - * - * @param Entry $entry Required. Updates for the entry. The `name` field must be set. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * Names of fields whose values to overwrite on an entry. - * - * If this parameter is absent or empty, all modifiable fields - * are overwritten. If such fields are non-required and omitted in the - * request body, their values are emptied. - * - * You can modify only the fields listed below. - * - * For entries with type `DATA_STREAM`: - * - * * `schema` - * - * For entries with type `FILESET`: - * - * * `schema` - * * `display_name` - * * `description` - * * `gcs_fileset_spec` - * * `gcs_fileset_spec.file_patterns` - * - * For entries with `user_specified_type`: - * - * * `schema` - * * `display_name` - * * `description` - * * `user_specified_type` - * * `user_specified_system` - * * `linked_resource` - * * `source_system_timestamps` - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\DataCatalog\V1\Entry - * - * @throws ApiException if the remote call fails - */ - public function updateEntry($entry, array $optionalArgs = []) - { - $request = new UpdateEntryRequest(); - $requestParamHeaders = []; - $request->setEntry($entry); - $requestParamHeaders['entry.name'] = $entry->getName(); - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateEntry', Entry::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates an entry group. - * - * You must enable the Data Catalog API in the project identified by - * the `entry_group.name` parameter. For more information, see [Data Catalog - * resource - * project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). - * - * Sample code: - * ``` - * $dataCatalogClient = new DataCatalogClient(); - * try { - * $entryGroup = new EntryGroup(); - * $response = $dataCatalogClient->updateEntryGroup($entryGroup); - * } finally { - * $dataCatalogClient->close(); - * } - * ``` - * - * @param EntryGroup $entryGroup Required. Updates for the entry group. The `name` field must be set. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * Names of fields whose values to overwrite on an entry group. - * - * If this parameter is absent or empty, all modifiable fields - * are overwritten. If such fields are non-required and omitted in the - * request body, their values are emptied. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\DataCatalog\V1\EntryGroup - * - * @throws ApiException if the remote call fails - */ - public function updateEntryGroup($entryGroup, array $optionalArgs = []) - { - $request = new UpdateEntryGroupRequest(); - $requestParamHeaders = []; - $request->setEntryGroup($entryGroup); - $requestParamHeaders['entry_group.name'] = $entryGroup->getName(); - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateEntryGroup', EntryGroup::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates an existing tag. - * - * Sample code: - * ``` - * $dataCatalogClient = new DataCatalogClient(); - * try { - * $tag = new Tag(); - * $response = $dataCatalogClient->updateTag($tag); - * } finally { - * $dataCatalogClient->close(); - * } - * ``` - * - * @param Tag $tag Required. The updated tag. The "name" field must be set. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * Names of fields whose values to overwrite on a tag. Currently, a tag has - * the only modifiable field with the name `fields`. - * - * In general, if this parameter is absent or empty, all modifiable fields - * are overwritten. If such fields are non-required and omitted in the - * request body, their values are emptied. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\DataCatalog\V1\Tag - * - * @throws ApiException if the remote call fails - */ - public function updateTag($tag, array $optionalArgs = []) - { - $request = new UpdateTagRequest(); - $requestParamHeaders = []; - $request->setTag($tag); - $requestParamHeaders['tag.name'] = $tag->getName(); - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateTag', Tag::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates a tag template. - * - * You can't update template fields with this method. These fields are - * separate resources with their own create, update, and delete methods. - * - * You must enable the Data Catalog API in the project identified by - * the `tag_template.name` parameter. For more information, see [Data Catalog - * resource - * project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). - * - * Sample code: - * ``` - * $dataCatalogClient = new DataCatalogClient(); - * try { - * $tagTemplate = new TagTemplate(); - * $response = $dataCatalogClient->updateTagTemplate($tagTemplate); - * } finally { - * $dataCatalogClient->close(); - * } - * ``` - * - * @param TagTemplate $tagTemplate Required. The template to update. The `name` field must be set. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * Names of fields whose values to overwrite on a tag template. Currently, - * only `display_name` and `is_publicly_readable` can be overwritten. - * - * If this parameter is absent or empty, all modifiable fields - * are overwritten. If such fields are non-required and omitted in the - * request body, their values are emptied. - * - * Note: Updating the `is_publicly_readable` field may require up to 12 - * hours to take effect in search results. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\DataCatalog\V1\TagTemplate - * - * @throws ApiException if the remote call fails - */ - public function updateTagTemplate($tagTemplate, array $optionalArgs = []) - { - $request = new UpdateTagTemplateRequest(); - $requestParamHeaders = []; - $request->setTagTemplate($tagTemplate); - $requestParamHeaders['tag_template.name'] = $tagTemplate->getName(); - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateTagTemplate', TagTemplate::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates a field in a tag template. - * - * You can't update the field type with this method. - * - * You must enable the Data Catalog API in the project - * identified by the `name` parameter. For more information, see [Data Catalog - * resource - * project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). - * - * Sample code: - * ``` - * $dataCatalogClient = new DataCatalogClient(); - * try { - * $formattedName = $dataCatalogClient->tagTemplateFieldName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]', '[FIELD]'); - * $tagTemplateField = new TagTemplateField(); - * $response = $dataCatalogClient->updateTagTemplateField($formattedName, $tagTemplateField); - * } finally { - * $dataCatalogClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the tag template field. - * @param TagTemplateField $tagTemplateField Required. The template to update. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * Optional. Names of fields whose values to overwrite on an individual field - * of a tag template. The following fields are modifiable: - * - * * `display_name` - * * `type.enum_type` - * * `is_required` - * - * If this parameter is absent or empty, all modifiable fields - * are overwritten. If such fields are non-required and omitted in the request - * body, their values are emptied with one exception: when updating an enum - * type, the provided values are merged with the existing values. Therefore, - * enum values can only be added, existing enum values cannot be deleted or - * renamed. - * - * Additionally, updating a template field from optional to required is - * *not* allowed. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\DataCatalog\V1\TagTemplateField - * - * @throws ApiException if the remote call fails - */ - public function updateTagTemplateField($name, $tagTemplateField, array $optionalArgs = []) - { - $request = new UpdateTagTemplateFieldRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setTagTemplateField($tagTemplateField); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateTagTemplateField', TagTemplateField::class, $optionalArgs, $request)->wait(); - } -} diff --git a/owl-bot-staging/DataCatalog/v1/src/V1/Gapic/PolicyTagManagerGapicClient.php b/owl-bot-staging/DataCatalog/v1/src/V1/Gapic/PolicyTagManagerGapicClient.php deleted file mode 100644 index d76c7e3d43ca..000000000000 --- a/owl-bot-staging/DataCatalog/v1/src/V1/Gapic/PolicyTagManagerGapicClient.php +++ /dev/null @@ -1,992 +0,0 @@ -taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); - * $response = $policyTagManagerClient->createPolicyTag($formattedParent); - * } finally { - * $policyTagManagerClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * This service has a new (beta) implementation. See {@see - * \Google\Cloud\DataCatalog\V1\Client\PolicyTagManagerClient} to use the new - * surface. - */ -class PolicyTagManagerGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.datacatalog.v1.PolicyTagManager'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'datacatalog.googleapis.com'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static $locationNameTemplate; - - private static $policyTagNameTemplate; - - private static $taxonomyNameTemplate; - - private static $pathTemplateMap; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/policy_tag_manager_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/policy_tag_manager_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/policy_tag_manager_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/policy_tag_manager_rest_client_config.php', - ], - ], - ]; - } - - private static function getLocationNameTemplate() - { - if (self::$locationNameTemplate == null) { - self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); - } - - return self::$locationNameTemplate; - } - - private static function getPolicyTagNameTemplate() - { - if (self::$policyTagNameTemplate == null) { - self::$policyTagNameTemplate = new PathTemplate('projects/{project}/locations/{location}/taxonomies/{taxonomy}/policyTags/{policy_tag}'); - } - - return self::$policyTagNameTemplate; - } - - private static function getTaxonomyNameTemplate() - { - if (self::$taxonomyNameTemplate == null) { - self::$taxonomyNameTemplate = new PathTemplate('projects/{project}/locations/{location}/taxonomies/{taxonomy}'); - } - - return self::$taxonomyNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'location' => self::getLocationNameTemplate(), - 'policyTag' => self::getPolicyTagNameTemplate(), - 'taxonomy' => self::getTaxonomyNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName($project, $location) - { - return self::getLocationNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a policy_tag - * resource. - * - * @param string $project - * @param string $location - * @param string $taxonomy - * @param string $policyTag - * - * @return string The formatted policy_tag resource. - */ - public static function policyTagName($project, $location, $taxonomy, $policyTag) - { - return self::getPolicyTagNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'taxonomy' => $taxonomy, - 'policy_tag' => $policyTag, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a taxonomy - * resource. - * - * @param string $project - * @param string $location - * @param string $taxonomy - * - * @return string The formatted taxonomy resource. - */ - public static function taxonomyName($project, $location, $taxonomy) - { - return self::getTaxonomyNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'taxonomy' => $taxonomy, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - location: projects/{project}/locations/{location} - * - policyTag: projects/{project}/locations/{location}/taxonomies/{taxonomy}/policyTags/{policy_tag} - * - taxonomy: projects/{project}/locations/{location}/taxonomies/{taxonomy} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'datacatalog.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** - * Creates a policy tag in a taxonomy. - * - * Sample code: - * ``` - * $policyTagManagerClient = new PolicyTagManagerClient(); - * try { - * $formattedParent = $policyTagManagerClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); - * $response = $policyTagManagerClient->createPolicyTag($formattedParent); - * } finally { - * $policyTagManagerClient->close(); - * } - * ``` - * - * @param string $parent Required. Resource name of the taxonomy that the policy tag will belong to. - * @param array $optionalArgs { - * Optional. - * - * @type PolicyTag $policyTag - * The policy tag to create. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\DataCatalog\V1\PolicyTag - * - * @throws ApiException if the remote call fails - */ - public function createPolicyTag($parent, array $optionalArgs = []) - { - $request = new CreatePolicyTagRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['policyTag'])) { - $request->setPolicyTag($optionalArgs['policyTag']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreatePolicyTag', PolicyTag::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a taxonomy in a specified project. - * - * The taxonomy is initially empty, that is, it doesn't contain policy tags. - * - * Sample code: - * ``` - * $policyTagManagerClient = new PolicyTagManagerClient(); - * try { - * $formattedParent = $policyTagManagerClient->locationName('[PROJECT]', '[LOCATION]'); - * $response = $policyTagManagerClient->createTaxonomy($formattedParent); - * } finally { - * $policyTagManagerClient->close(); - * } - * ``` - * - * @param string $parent Required. Resource name of the project that the taxonomy will belong to. - * @param array $optionalArgs { - * Optional. - * - * @type Taxonomy $taxonomy - * The taxonomy to create. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\DataCatalog\V1\Taxonomy - * - * @throws ApiException if the remote call fails - */ - public function createTaxonomy($parent, array $optionalArgs = []) - { - $request = new CreateTaxonomyRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['taxonomy'])) { - $request->setTaxonomy($optionalArgs['taxonomy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateTaxonomy', Taxonomy::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes a policy tag together with the following: - * - * * All of its descendant policy tags, if any - * * Policies associated with the policy tag and its descendants - * * References from BigQuery table schema of the policy tag and its - * descendants - * - * Sample code: - * ``` - * $policyTagManagerClient = new PolicyTagManagerClient(); - * try { - * $formattedName = $policyTagManagerClient->policyTagName('[PROJECT]', '[LOCATION]', '[TAXONOMY]', '[POLICY_TAG]'); - * $policyTagManagerClient->deletePolicyTag($formattedName); - * } finally { - * $policyTagManagerClient->close(); - * } - * ``` - * - * @param string $name Required. Resource name of the policy tag to delete. - * - * Note: All of its descendant policy tags are also deleted. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - */ - public function deletePolicyTag($name, array $optionalArgs = []) - { - $request = new DeletePolicyTagRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeletePolicyTag', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes a taxonomy, including all policy tags in this - * taxonomy, their associated policies, and the policy tags references from - * BigQuery columns. - * - * Sample code: - * ``` - * $policyTagManagerClient = new PolicyTagManagerClient(); - * try { - * $formattedName = $policyTagManagerClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); - * $policyTagManagerClient->deleteTaxonomy($formattedName); - * } finally { - * $policyTagManagerClient->close(); - * } - * ``` - * - * @param string $name Required. Resource name of the taxonomy to delete. - * - * Note: All policy tags in this taxonomy are also deleted. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - */ - public function deleteTaxonomy($name, array $optionalArgs = []) - { - $request = new DeleteTaxonomyRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteTaxonomy', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets the IAM policy for a policy tag or a taxonomy. - * - * Sample code: - * ``` - * $policyTagManagerClient = new PolicyTagManagerClient(); - * try { - * $resource = 'resource'; - * $response = $policyTagManagerClient->getIamPolicy($resource); - * } finally { - * $policyTagManagerClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * @param array $optionalArgs { - * Optional. - * - * @type GetPolicyOptions $options - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function getIamPolicy($resource, array $optionalArgs = []) - { - $request = new GetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['options'])) { - $request->setOptions($optionalArgs['options']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets a policy tag. - * - * Sample code: - * ``` - * $policyTagManagerClient = new PolicyTagManagerClient(); - * try { - * $formattedName = $policyTagManagerClient->policyTagName('[PROJECT]', '[LOCATION]', '[TAXONOMY]', '[POLICY_TAG]'); - * $response = $policyTagManagerClient->getPolicyTag($formattedName); - * } finally { - * $policyTagManagerClient->close(); - * } - * ``` - * - * @param string $name Required. Resource name of the policy tag. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\DataCatalog\V1\PolicyTag - * - * @throws ApiException if the remote call fails - */ - public function getPolicyTag($name, array $optionalArgs = []) - { - $request = new GetPolicyTagRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetPolicyTag', PolicyTag::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets a taxonomy. - * - * Sample code: - * ``` - * $policyTagManagerClient = new PolicyTagManagerClient(); - * try { - * $formattedName = $policyTagManagerClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); - * $response = $policyTagManagerClient->getTaxonomy($formattedName); - * } finally { - * $policyTagManagerClient->close(); - * } - * ``` - * - * @param string $name Required. Resource name of the taxonomy to get. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\DataCatalog\V1\Taxonomy - * - * @throws ApiException if the remote call fails - */ - public function getTaxonomy($name, array $optionalArgs = []) - { - $request = new GetTaxonomyRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetTaxonomy', Taxonomy::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists all policy tags in a taxonomy. - * - * Sample code: - * ``` - * $policyTagManagerClient = new PolicyTagManagerClient(); - * try { - * $formattedParent = $policyTagManagerClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); - * // Iterate over pages of elements - * $pagedResponse = $policyTagManagerClient->listPolicyTags($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $policyTagManagerClient->listPolicyTags($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $policyTagManagerClient->close(); - * } - * ``` - * - * @param string $parent Required. Resource name of the taxonomy to list the policy tags of. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listPolicyTags($parent, array $optionalArgs = []) - { - $request = new ListPolicyTagsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListPolicyTags', $optionalArgs, ListPolicyTagsResponse::class, $request); - } - - /** - * Lists all taxonomies in a project in a particular location that you - * have a permission to view. - * - * Sample code: - * ``` - * $policyTagManagerClient = new PolicyTagManagerClient(); - * try { - * $formattedParent = $policyTagManagerClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $policyTagManagerClient->listTaxonomies($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $policyTagManagerClient->listTaxonomies($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $policyTagManagerClient->close(); - * } - * ``` - * - * @param string $parent Required. Resource name of the project to list the taxonomies of. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * Supported field for filter is 'service' and value is 'dataplex'. - * Eg: service=dataplex. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listTaxonomies($parent, array $optionalArgs = []) - { - $request = new ListTaxonomiesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListTaxonomies', $optionalArgs, ListTaxonomiesResponse::class, $request); - } - - /** - * Sets the IAM policy for a policy tag or a taxonomy. - * - * Sample code: - * ``` - * $policyTagManagerClient = new PolicyTagManagerClient(); - * try { - * $resource = 'resource'; - * $policy = new Policy(); - * $response = $policyTagManagerClient->setIamPolicy($resource, $policy); - * } finally { - * $policyTagManagerClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being specified. - * See the operation documentation for the appropriate value for this field. - * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of - * the policy is limited to a few 10s of KB. An empty policy is a - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - * the fields in the mask will be modified. If no mask is provided, the - * following default mask is used: - * - * `paths: "bindings, etag"` - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function setIamPolicy($resource, $policy, array $optionalArgs = []) - { - $request = new SetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPolicy($policy); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('SetIamPolicy', Policy::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns your permissions on a specified policy tag or - * taxonomy. - * - * Sample code: - * ``` - * $policyTagManagerClient = new PolicyTagManagerClient(); - * try { - * $resource = 'resource'; - * $permissions = []; - * $response = $policyTagManagerClient->testIamPermissions($resource, $permissions); - * } finally { - * $policyTagManagerClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\TestIamPermissionsResponse - * - * @throws ApiException if the remote call fails - */ - public function testIamPermissions($resource, $permissions, array $optionalArgs = []) - { - $request = new TestIamPermissionsRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPermissions($permissions); - $requestParamHeaders['resource'] = $resource; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates a policy tag, including its display - * name, description, and parent policy tag. - * - * Sample code: - * ``` - * $policyTagManagerClient = new PolicyTagManagerClient(); - * try { - * $response = $policyTagManagerClient->updatePolicyTag(); - * } finally { - * $policyTagManagerClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type PolicyTag $policyTag - * The policy tag to update. You can update only its description, display - * name, and parent policy tag fields. - * @type FieldMask $updateMask - * Specifies the fields to update. - * - * You can update only display name, description, and parent policy tag. - * If not set, defaults to all updatable fields. - * For more information, see [FieldMask] - * (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask). - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\DataCatalog\V1\PolicyTag - * - * @throws ApiException if the remote call fails - */ - public function updatePolicyTag(array $optionalArgs = []) - { - $request = new UpdatePolicyTagRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['policyTag'])) { - $request->setPolicyTag($optionalArgs['policyTag']); - } - - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdatePolicyTag', PolicyTag::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates a taxonomy, including its display name, - * description, and activated policy types. - * - * Sample code: - * ``` - * $policyTagManagerClient = new PolicyTagManagerClient(); - * try { - * $response = $policyTagManagerClient->updateTaxonomy(); - * } finally { - * $policyTagManagerClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type Taxonomy $taxonomy - * The taxonomy to update. You can update only its description, display name, - * and activated policy types. - * @type FieldMask $updateMask - * Specifies fields to update. If not set, defaults to all fields you can - * update. - * - * For more information, see [FieldMask] - * (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask). - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\DataCatalog\V1\Taxonomy - * - * @throws ApiException if the remote call fails - */ - public function updateTaxonomy(array $optionalArgs = []) - { - $request = new UpdateTaxonomyRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['taxonomy'])) { - $request->setTaxonomy($optionalArgs['taxonomy']); - } - - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateTaxonomy', Taxonomy::class, $optionalArgs, $request)->wait(); - } -} diff --git a/owl-bot-staging/DataCatalog/v1/src/V1/Gapic/PolicyTagManagerSerializationGapicClient.php b/owl-bot-staging/DataCatalog/v1/src/V1/Gapic/PolicyTagManagerSerializationGapicClient.php deleted file mode 100644 index a08abdc29714..000000000000 --- a/owl-bot-staging/DataCatalog/v1/src/V1/Gapic/PolicyTagManagerSerializationGapicClient.php +++ /dev/null @@ -1,460 +0,0 @@ -locationName('[PROJECT]', '[LOCATION]'); - * $formattedTaxonomies = [ - * $policyTagManagerSerializationClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'), - * ]; - * $response = $policyTagManagerSerializationClient->exportTaxonomies($formattedParent, $formattedTaxonomies); - * } finally { - * $policyTagManagerSerializationClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * This service has a new (beta) implementation. See {@see - * \Google\Cloud\DataCatalog\V1\Client\PolicyTagManagerSerializationClient} to use - * the new surface. - */ -class PolicyTagManagerSerializationGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.datacatalog.v1.PolicyTagManagerSerialization'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'datacatalog.googleapis.com'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static $locationNameTemplate; - - private static $taxonomyNameTemplate; - - private static $pathTemplateMap; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/policy_tag_manager_serialization_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/policy_tag_manager_serialization_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/policy_tag_manager_serialization_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/policy_tag_manager_serialization_rest_client_config.php', - ], - ], - ]; - } - - private static function getLocationNameTemplate() - { - if (self::$locationNameTemplate == null) { - self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); - } - - return self::$locationNameTemplate; - } - - private static function getTaxonomyNameTemplate() - { - if (self::$taxonomyNameTemplate == null) { - self::$taxonomyNameTemplate = new PathTemplate('projects/{project}/locations/{location}/taxonomies/{taxonomy}'); - } - - return self::$taxonomyNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'location' => self::getLocationNameTemplate(), - 'taxonomy' => self::getTaxonomyNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName($project, $location) - { - return self::getLocationNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a taxonomy - * resource. - * - * @param string $project - * @param string $location - * @param string $taxonomy - * - * @return string The formatted taxonomy resource. - */ - public static function taxonomyName($project, $location, $taxonomy) - { - return self::getTaxonomyNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'taxonomy' => $taxonomy, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - location: projects/{project}/locations/{location} - * - taxonomy: projects/{project}/locations/{location}/taxonomies/{taxonomy} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'datacatalog.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** - * Exports taxonomies in the requested type and returns them, - * including their policy tags. The requested taxonomies must belong to the - * same project. - * - * This method generates `SerializedTaxonomy` protocol buffers with nested - * policy tags that can be used as input for `ImportTaxonomies` calls. - * - * Sample code: - * ``` - * $policyTagManagerSerializationClient = new PolicyTagManagerSerializationClient(); - * try { - * $formattedParent = $policyTagManagerSerializationClient->locationName('[PROJECT]', '[LOCATION]'); - * $formattedTaxonomies = [ - * $policyTagManagerSerializationClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'), - * ]; - * $response = $policyTagManagerSerializationClient->exportTaxonomies($formattedParent, $formattedTaxonomies); - * } finally { - * $policyTagManagerSerializationClient->close(); - * } - * ``` - * - * @param string $parent Required. Resource name of the project that the exported taxonomies belong - * to. - * @param string[] $taxonomies Required. Resource names of the taxonomies to export. - * @param array $optionalArgs { - * Optional. - * - * @type bool $serializedTaxonomies - * Serialized export taxonomies that contain all the policy - * tags as nested protocol buffers. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\DataCatalog\V1\ExportTaxonomiesResponse - * - * @throws ApiException if the remote call fails - */ - public function exportTaxonomies($parent, $taxonomies, array $optionalArgs = []) - { - $request = new ExportTaxonomiesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setTaxonomies($taxonomies); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['serializedTaxonomies'])) { - $request->setSerializedTaxonomies($optionalArgs['serializedTaxonomies']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('ExportTaxonomies', ExportTaxonomiesResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates new taxonomies (including their policy tags) in a given project - * by importing from inlined or cross-regional sources. - * - * For a cross-regional source, new taxonomies are created by copying - * from a source in another region. - * - * For an inlined source, taxonomies and policy tags are created in bulk using - * nested protocol buffer structures. - * - * Sample code: - * ``` - * $policyTagManagerSerializationClient = new PolicyTagManagerSerializationClient(); - * try { - * $formattedParent = $policyTagManagerSerializationClient->locationName('[PROJECT]', '[LOCATION]'); - * $response = $policyTagManagerSerializationClient->importTaxonomies($formattedParent); - * } finally { - * $policyTagManagerSerializationClient->close(); - * } - * ``` - * - * @param string $parent Required. Resource name of project that the imported taxonomies will belong - * to. - * @param array $optionalArgs { - * Optional. - * - * @type InlineSource $inlineSource - * Inline source taxonomy to import. - * @type CrossRegionalSource $crossRegionalSource - * Cross-regional source taxonomy to import. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\DataCatalog\V1\ImportTaxonomiesResponse - * - * @throws ApiException if the remote call fails - */ - public function importTaxonomies($parent, array $optionalArgs = []) - { - $request = new ImportTaxonomiesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['inlineSource'])) { - $request->setInlineSource($optionalArgs['inlineSource']); - } - - if (isset($optionalArgs['crossRegionalSource'])) { - $request->setCrossRegionalSource($optionalArgs['crossRegionalSource']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('ImportTaxonomies', ImportTaxonomiesResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Replaces (updates) a taxonomy and all its policy tags. - * - * The taxonomy and its entire hierarchy of policy tags must be - * represented literally by `SerializedTaxonomy` and the nested - * `SerializedPolicyTag` messages. - * - * This operation automatically does the following: - * - * - Deletes the existing policy tags that are missing from the - * `SerializedPolicyTag`. - * - Creates policy tags that don't have resource names. They are considered - * new. - * - Updates policy tags with valid resources names accordingly. - * - * Sample code: - * ``` - * $policyTagManagerSerializationClient = new PolicyTagManagerSerializationClient(); - * try { - * $formattedName = $policyTagManagerSerializationClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); - * $serializedTaxonomy = new SerializedTaxonomy(); - * $response = $policyTagManagerSerializationClient->replaceTaxonomy($formattedName, $serializedTaxonomy); - * } finally { - * $policyTagManagerSerializationClient->close(); - * } - * ``` - * - * @param string $name Required. Resource name of the taxonomy to update. - * @param SerializedTaxonomy $serializedTaxonomy Required. Taxonomy to update along with its child policy tags. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\DataCatalog\V1\Taxonomy - * - * @throws ApiException if the remote call fails - */ - public function replaceTaxonomy($name, $serializedTaxonomy, array $optionalArgs = []) - { - $request = new ReplaceTaxonomyRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setSerializedTaxonomy($serializedTaxonomy); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('ReplaceTaxonomy', Taxonomy::class, $optionalArgs, $request)->wait(); - } -} diff --git a/owl-bot-staging/DataCatalog/v1/src/V1/PolicyTagManagerClient.php b/owl-bot-staging/DataCatalog/v1/src/V1/PolicyTagManagerClient.php deleted file mode 100644 index 1aa4c6fe1b31..000000000000 --- a/owl-bot-staging/DataCatalog/v1/src/V1/PolicyTagManagerClient.php +++ /dev/null @@ -1,34 +0,0 @@ - [ - 'google.cloud.datacatalog.v1.DataCatalog' => [ - 'ImportEntries' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\DataCatalog\V1\ImportEntriesResponse', - 'metadataReturnType' => '\Google\Cloud\DataCatalog\V1\ImportEntriesMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ReconcileTags' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\DataCatalog\V1\ReconcileTagsResponse', - 'metadataReturnType' => '\Google\Cloud\DataCatalog\V1\ReconcileTagsMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateEntry' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\DataCatalog\V1\Entry', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateEntryGroup' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\DataCatalog\V1\EntryGroup', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateTag' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\DataCatalog\V1\Tag', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateTagTemplate' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\DataCatalog\V1\TagTemplate', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateTagTemplateField' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\DataCatalog\V1\TagTemplateField', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteEntry' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteEntryGroup' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteTag' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteTagTemplate' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteTagTemplateField' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetEntry' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\DataCatalog\V1\Entry', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetEntryGroup' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\DataCatalog\V1\EntryGroup', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - ], - 'GetTagTemplate' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\DataCatalog\V1\TagTemplate', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListEntries' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getEntries', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\DataCatalog\V1\ListEntriesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListEntryGroups' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getEntryGroups', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\DataCatalog\V1\ListEntryGroupsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListTags' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getTags', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\DataCatalog\V1\ListTagsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'LookupEntry' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\DataCatalog\V1\Entry', - ], - 'ModifyEntryContacts' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\DataCatalog\V1\Contacts', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ModifyEntryOverview' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\DataCatalog\V1\EntryOverview', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'RenameTagTemplateField' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\DataCatalog\V1\TagTemplateField', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'RenameTagTemplateFieldEnumValue' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\DataCatalog\V1\TagTemplateField', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'SearchCatalog' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getResults', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\DataCatalog\V1\SearchCatalogResponse', - ], - 'SetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - ], - 'StarEntry' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\DataCatalog\V1\StarEntryResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - ], - 'UnstarEntry' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\DataCatalog\V1\UnstarEntryResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateEntry' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\DataCatalog\V1\Entry', - 'headerParams' => [ - [ - 'keyName' => 'entry.name', - 'fieldAccessors' => [ - 'getEntry', - 'getName', - ], - ], - ], - ], - 'UpdateEntryGroup' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\DataCatalog\V1\EntryGroup', - 'headerParams' => [ - [ - 'keyName' => 'entry_group.name', - 'fieldAccessors' => [ - 'getEntryGroup', - 'getName', - ], - ], - ], - ], - 'UpdateTag' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\DataCatalog\V1\Tag', - 'headerParams' => [ - [ - 'keyName' => 'tag.name', - 'fieldAccessors' => [ - 'getTag', - 'getName', - ], - ], - ], - ], - 'UpdateTagTemplate' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\DataCatalog\V1\TagTemplate', - 'headerParams' => [ - [ - 'keyName' => 'tag_template.name', - 'fieldAccessors' => [ - 'getTagTemplate', - 'getName', - ], - ], - ], - ], - 'UpdateTagTemplateField' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\DataCatalog\V1\TagTemplateField', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'entry' => 'projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}', - 'entryGroup' => 'projects/{project}/locations/{location}/entryGroups/{entry_group}', - 'location' => 'projects/{project}/locations/{location}', - 'tag' => 'projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}/tags/{tag}', - 'tagTemplate' => 'projects/{project}/locations/{location}/tagTemplates/{tag_template}', - 'tagTemplateField' => 'projects/{project}/locations/{location}/tagTemplates/{tag_template}/fields/{field}', - 'tagTemplateFieldEnumValue' => 'projects/{project}/locations/{location}/tagTemplates/{tag_template}/fields/{tag_template_field_id}/enumValues/{enum_value_display_name}', - ], - ], - ], -]; diff --git a/owl-bot-staging/DataCatalog/v1/src/V1/resources/data_catalog_rest_client_config.php b/owl-bot-staging/DataCatalog/v1/src/V1/resources/data_catalog_rest_client_config.php deleted file mode 100644 index e88d57fa1ed3..000000000000 --- a/owl-bot-staging/DataCatalog/v1/src/V1/resources/data_catalog_rest_client_config.php +++ /dev/null @@ -1,515 +0,0 @@ - [ - 'google.cloud.datacatalog.v1.DataCatalog' => [ - 'CreateEntry' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/entryGroups/*}/entries', - 'body' => 'entry', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'entry_id', - ], - ], - 'CreateEntryGroup' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/entryGroups', - 'body' => 'entry_group', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'entry_group_id', - ], - ], - 'CreateTag' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/entryGroups/*/entries/*}/tags', - 'body' => 'tag', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/entryGroups/*}/tags', - 'body' => 'tag', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateTagTemplate' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/tagTemplates', - 'body' => 'tag_template', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'tag_template_id', - ], - ], - 'CreateTagTemplateField' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/tagTemplates/*}/fields', - 'body' => 'tag_template_field', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'tag_template_field_id', - ], - ], - 'DeleteEntry' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteEntryGroup' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/entryGroups/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteTag' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/entryGroups/*/entries/*/tags/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/entryGroups/*/tags/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteTagTemplate' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/tagTemplates/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - 'queryParams' => [ - 'force', - ], - ], - 'DeleteTagTemplateField' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/tagTemplates/*/fields/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - 'queryParams' => [ - 'force', - ], - ], - 'GetEntry' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetEntryGroup' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/entryGroups/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/tagTemplates/*}:getIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*}:getIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*/entries/*}:getIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'GetTagTemplate' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/tagTemplates/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ImportEntries' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/entryGroups/*}/entries:import', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListEntries' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/entryGroups/*}/entries', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListEntryGroups' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/entryGroups', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListTags' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/entryGroups/*/entries/*}/tags', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/entryGroups/*}/tags', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'LookupEntry' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/entries:lookup', - ], - 'ModifyEntryContacts' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}:modifyEntryContacts', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ModifyEntryOverview' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}:modifyEntryOverview', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ReconcileTags' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/entryGroups/*/entries/*}/tags:reconcile', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'RenameTagTemplateField' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/tagTemplates/*/fields/*}:rename', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'RenameTagTemplateFieldEnumValue' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/tagTemplates/*/fields/*/enumValues/*}:rename', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'SearchCatalog' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/catalog:search', - 'body' => '*', - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/tagTemplates/*}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'StarEntry' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}:star', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/tagTemplates/*}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*/entries/*}:testIamPermissions', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'UnstarEntry' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}:unstar', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateEntry' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{entry.name=projects/*/locations/*/entryGroups/*/entries/*}', - 'body' => 'entry', - 'placeholders' => [ - 'entry.name' => [ - 'getters' => [ - 'getEntry', - 'getName', - ], - ], - ], - ], - 'UpdateEntryGroup' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{entry_group.name=projects/*/locations/*/entryGroups/*}', - 'body' => 'entry_group', - 'placeholders' => [ - 'entry_group.name' => [ - 'getters' => [ - 'getEntryGroup', - 'getName', - ], - ], - ], - ], - 'UpdateTag' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{tag.name=projects/*/locations/*/entryGroups/*/entries/*/tags/*}', - 'body' => 'tag', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{tag.name=projects/*/locations/*/entryGroups/*/tags/*}', - 'body' => 'tag', - ], - ], - 'placeholders' => [ - 'tag.name' => [ - 'getters' => [ - 'getTag', - 'getName', - ], - ], - ], - ], - 'UpdateTagTemplate' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{tag_template.name=projects/*/locations/*/tagTemplates/*}', - 'body' => 'tag_template', - 'placeholders' => [ - 'tag_template.name' => [ - 'getters' => [ - 'getTagTemplate', - 'getName', - ], - ], - ], - ], - 'UpdateTagTemplateField' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/tagTemplates/*/fields/*}', - 'body' => 'tag_template_field', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/DataCatalog/v1/src/V1/resources/policy_tag_manager_client_config.json b/owl-bot-staging/DataCatalog/v1/src/V1/resources/policy_tag_manager_client_config.json deleted file mode 100644 index 748b34c429bd..000000000000 --- a/owl-bot-staging/DataCatalog/v1/src/V1/resources/policy_tag_manager_client_config.json +++ /dev/null @@ -1,107 +0,0 @@ -{ - "interfaces": { - "google.cloud.datacatalog.v1.PolicyTagManager": { - "retry_codes": { - "no_retry_codes": [], - "no_retry_1_codes": [], - "no_retry_2_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "no_retry_2_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CreatePolicyTag": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateTaxonomy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeletePolicyTag": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteTaxonomy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetPolicyTag": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetTaxonomy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListPolicyTags": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListTaxonomies": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdatePolicyTag": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateTaxonomy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/DataCatalog/v1/src/V1/resources/policy_tag_manager_descriptor_config.php b/owl-bot-staging/DataCatalog/v1/src/V1/resources/policy_tag_manager_descriptor_config.php deleted file mode 100644 index 9c3137a11bbb..000000000000 --- a/owl-bot-staging/DataCatalog/v1/src/V1/resources/policy_tag_manager_descriptor_config.php +++ /dev/null @@ -1,187 +0,0 @@ - [ - 'google.cloud.datacatalog.v1.PolicyTagManager' => [ - 'CreatePolicyTag' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\DataCatalog\V1\PolicyTag', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateTaxonomy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\DataCatalog\V1\Taxonomy', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeletePolicyTag' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteTaxonomy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - ], - 'GetPolicyTag' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\DataCatalog\V1\PolicyTag', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetTaxonomy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\DataCatalog\V1\Taxonomy', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListPolicyTags' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getPolicyTags', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\DataCatalog\V1\ListPolicyTagsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListTaxonomies' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getTaxonomies', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\DataCatalog\V1\ListTaxonomiesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - ], - 'UpdatePolicyTag' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\DataCatalog\V1\PolicyTag', - 'headerParams' => [ - [ - 'keyName' => 'policy_tag.name', - 'fieldAccessors' => [ - 'getPolicyTag', - 'getName', - ], - ], - ], - ], - 'UpdateTaxonomy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\DataCatalog\V1\Taxonomy', - 'headerParams' => [ - [ - 'keyName' => 'taxonomy.name', - 'fieldAccessors' => [ - 'getTaxonomy', - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'location' => 'projects/{project}/locations/{location}', - 'policyTag' => 'projects/{project}/locations/{location}/taxonomies/{taxonomy}/policyTags/{policy_tag}', - 'taxonomy' => 'projects/{project}/locations/{location}/taxonomies/{taxonomy}', - ], - ], - ], -]; diff --git a/owl-bot-staging/DataCatalog/v1/src/V1/resources/policy_tag_manager_rest_client_config.php b/owl-bot-staging/DataCatalog/v1/src/V1/resources/policy_tag_manager_rest_client_config.php deleted file mode 100644 index 994ba95e96aa..000000000000 --- a/owl-bot-staging/DataCatalog/v1/src/V1/resources/policy_tag_manager_rest_client_config.php +++ /dev/null @@ -1,227 +0,0 @@ - [ - 'google.cloud.datacatalog.v1.PolicyTagManager' => [ - 'CreatePolicyTag' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/taxonomies/*}/policyTags', - 'body' => 'policy_tag', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateTaxonomy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/taxonomies', - 'body' => 'taxonomy', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeletePolicyTag' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/taxonomies/*/policyTags/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteTaxonomy' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/taxonomies/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/taxonomies/*}:getIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/taxonomies/*/policyTags/*}:getIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'GetPolicyTag' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/taxonomies/*/policyTags/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetTaxonomy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/taxonomies/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListPolicyTags' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/taxonomies/*}/policyTags', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListTaxonomies' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/taxonomies', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/taxonomies/*}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/taxonomies/*/policyTags/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/taxonomies/*}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/taxonomies/*/policyTags/*}:testIamPermissions', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'UpdatePolicyTag' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{policy_tag.name=projects/*/locations/*/taxonomies/*/policyTags/*}', - 'body' => 'policy_tag', - 'placeholders' => [ - 'policy_tag.name' => [ - 'getters' => [ - 'getPolicyTag', - 'getName', - ], - ], - ], - ], - 'UpdateTaxonomy' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{taxonomy.name=projects/*/locations/*/taxonomies/*}', - 'body' => 'taxonomy', - 'placeholders' => [ - 'taxonomy.name' => [ - 'getters' => [ - 'getTaxonomy', - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/DataCatalog/v1/src/V1/resources/policy_tag_manager_serialization_client_config.json b/owl-bot-staging/DataCatalog/v1/src/V1/resources/policy_tag_manager_serialization_client_config.json deleted file mode 100644 index 0777dd90f04d..000000000000 --- a/owl-bot-staging/DataCatalog/v1/src/V1/resources/policy_tag_manager_serialization_client_config.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "interfaces": { - "google.cloud.datacatalog.v1.PolicyTagManagerSerialization": { - "retry_codes": { - "no_retry_codes": [], - "no_retry_2_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "no_retry_2_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "ExportTaxonomies": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "ImportTaxonomies": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "ReplaceTaxonomy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - } - } - } - } -} diff --git a/owl-bot-staging/DataCatalog/v1/src/V1/resources/policy_tag_manager_serialization_descriptor_config.php b/owl-bot-staging/DataCatalog/v1/src/V1/resources/policy_tag_manager_serialization_descriptor_config.php deleted file mode 100644 index 6ba1c5da19f6..000000000000 --- a/owl-bot-staging/DataCatalog/v1/src/V1/resources/policy_tag_manager_serialization_descriptor_config.php +++ /dev/null @@ -1,48 +0,0 @@ - [ - 'google.cloud.datacatalog.v1.PolicyTagManagerSerialization' => [ - 'ExportTaxonomies' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\DataCatalog\V1\ExportTaxonomiesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ImportTaxonomies' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\DataCatalog\V1\ImportTaxonomiesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ReplaceTaxonomy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\DataCatalog\V1\Taxonomy', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'location' => 'projects/{project}/locations/{location}', - 'taxonomy' => 'projects/{project}/locations/{location}/taxonomies/{taxonomy}', - ], - ], - ], -]; diff --git a/owl-bot-staging/DataCatalog/v1/src/V1/resources/policy_tag_manager_serialization_rest_client_config.php b/owl-bot-staging/DataCatalog/v1/src/V1/resources/policy_tag_manager_serialization_rest_client_config.php deleted file mode 100644 index ec08adc7e22f..000000000000 --- a/owl-bot-staging/DataCatalog/v1/src/V1/resources/policy_tag_manager_serialization_rest_client_config.php +++ /dev/null @@ -1,89 +0,0 @@ - [ - 'google.cloud.datacatalog.v1.PolicyTagManagerSerialization' => [ - 'ExportTaxonomies' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/taxonomies:export', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ImportTaxonomies' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/taxonomies:import', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ReplaceTaxonomy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/taxonomies/*}:replace', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/DataCatalog/v1/tests/Unit/V1/Client/DataCatalogClientTest.php b/owl-bot-staging/DataCatalog/v1/tests/Unit/V1/Client/DataCatalogClientTest.php deleted file mode 100644 index 4ca2efaf6725..000000000000 --- a/owl-bot-staging/DataCatalog/v1/tests/Unit/V1/Client/DataCatalogClientTest.php +++ /dev/null @@ -1,2770 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return DataCatalogClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new DataCatalogClient($options); - } - - /** @test */ - public function createEntryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $linkedResource = 'linkedResource1544625012'; - $fullyQualifiedName = 'fullyQualifiedName338146659'; - $userSpecifiedType = 'userSpecifiedType-940364963'; - $userSpecifiedSystem = 'userSpecifiedSystem-1776119406'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new Entry(); - $expectedResponse->setName($name); - $expectedResponse->setLinkedResource($linkedResource); - $expectedResponse->setFullyQualifiedName($fullyQualifiedName); - $expectedResponse->setUserSpecifiedType($userSpecifiedType); - $expectedResponse->setUserSpecifiedSystem($userSpecifiedSystem); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - $entryId = 'entryId-2093663224'; - $entry = new Entry(); - $request = (new CreateEntryRequest()) - ->setParent($formattedParent) - ->setEntryId($entryId) - ->setEntry($entry); - $response = $gapicClient->createEntry($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/CreateEntry', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getEntryId(); - $this->assertProtobufEquals($entryId, $actualValue); - $actualValue = $actualRequestObject->getEntry(); - $this->assertProtobufEquals($entry, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createEntryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - $entryId = 'entryId-2093663224'; - $entry = new Entry(); - $request = (new CreateEntryRequest()) - ->setParent($formattedParent) - ->setEntryId($entryId) - ->setEntry($entry); - try { - $gapicClient->createEntry($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createEntryGroupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new EntryGroup(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $entryGroupId = 'entryGroupId-43122680'; - $request = (new CreateEntryGroupRequest()) - ->setParent($formattedParent) - ->setEntryGroupId($entryGroupId); - $response = $gapicClient->createEntryGroup($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/CreateEntryGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getEntryGroupId(); - $this->assertProtobufEquals($entryGroupId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createEntryGroupExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $entryGroupId = 'entryGroupId-43122680'; - $request = (new CreateEntryGroupRequest()) - ->setParent($formattedParent) - ->setEntryGroupId($entryGroupId); - try { - $gapicClient->createEntryGroup($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createTagTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $template = 'template-1321546630'; - $templateDisplayName = 'templateDisplayName-532252787'; - $column = 'column-1354837162'; - $expectedResponse = new Tag(); - $expectedResponse->setName($name); - $expectedResponse->setTemplate($template); - $expectedResponse->setTemplateDisplayName($templateDisplayName); - $expectedResponse->setColumn($column); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - $tag = new Tag(); - $tagTemplate = 'tagTemplate1678947892'; - $tag->setTemplate($tagTemplate); - $fieldsValue = new TagField(); - $tagFields = [ - 'fieldsKey' => $fieldsValue, - ]; - $tag->setFields($tagFields); - $request = (new CreateTagRequest()) - ->setParent($formattedParent) - ->setTag($tag); - $response = $gapicClient->createTag($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/CreateTag', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getTag(); - $this->assertProtobufEquals($tag, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createTagExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - $tag = new Tag(); - $tagTemplate = 'tagTemplate1678947892'; - $tag->setTemplate($tagTemplate); - $fieldsValue = new TagField(); - $tagFields = [ - 'fieldsKey' => $fieldsValue, - ]; - $tag->setFields($tagFields); - $request = (new CreateTagRequest()) - ->setParent($formattedParent) - ->setTag($tag); - try { - $gapicClient->createTag($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createTagTemplateTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $isPubliclyReadable = true; - $expectedResponse = new TagTemplate(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setIsPubliclyReadable($isPubliclyReadable); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $tagTemplateId = 'tagTemplateId-2020335141'; - $tagTemplate = new TagTemplate(); - $fieldsValue = new TagTemplateField(); - $valueType = new FieldType(); - $fieldsValue->setType($valueType); - $tagTemplateFields = [ - 'fieldsKey' => $fieldsValue, - ]; - $tagTemplate->setFields($tagTemplateFields); - $request = (new CreateTagTemplateRequest()) - ->setParent($formattedParent) - ->setTagTemplateId($tagTemplateId) - ->setTagTemplate($tagTemplate); - $response = $gapicClient->createTagTemplate($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/CreateTagTemplate', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getTagTemplateId(); - $this->assertProtobufEquals($tagTemplateId, $actualValue); - $actualValue = $actualRequestObject->getTagTemplate(); - $this->assertProtobufEquals($tagTemplate, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createTagTemplateExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $tagTemplateId = 'tagTemplateId-2020335141'; - $tagTemplate = new TagTemplate(); - $fieldsValue = new TagTemplateField(); - $valueType = new FieldType(); - $fieldsValue->setType($valueType); - $tagTemplateFields = [ - 'fieldsKey' => $fieldsValue, - ]; - $tagTemplate->setFields($tagTemplateFields); - $request = (new CreateTagTemplateRequest()) - ->setParent($formattedParent) - ->setTagTemplateId($tagTemplateId) - ->setTagTemplate($tagTemplate); - try { - $gapicClient->createTagTemplate($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createTagTemplateFieldTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $isRequired = true; - $description = 'description-1724546052'; - $order = 106006350; - $expectedResponse = new TagTemplateField(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setIsRequired($isRequired); - $expectedResponse->setDescription($description); - $expectedResponse->setOrder($order); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->tagTemplateName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); - $tagTemplateFieldId = 'tagTemplateFieldId-92144832'; - $tagTemplateField = new TagTemplateField(); - $tagTemplateFieldType = new FieldType(); - $tagTemplateField->setType($tagTemplateFieldType); - $request = (new CreateTagTemplateFieldRequest()) - ->setParent($formattedParent) - ->setTagTemplateFieldId($tagTemplateFieldId) - ->setTagTemplateField($tagTemplateField); - $response = $gapicClient->createTagTemplateField($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/CreateTagTemplateField', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getTagTemplateFieldId(); - $this->assertProtobufEquals($tagTemplateFieldId, $actualValue); - $actualValue = $actualRequestObject->getTagTemplateField(); - $this->assertProtobufEquals($tagTemplateField, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createTagTemplateFieldExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->tagTemplateName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); - $tagTemplateFieldId = 'tagTemplateFieldId-92144832'; - $tagTemplateField = new TagTemplateField(); - $tagTemplateFieldType = new FieldType(); - $tagTemplateField->setType($tagTemplateFieldType); - $request = (new CreateTagTemplateFieldRequest()) - ->setParent($formattedParent) - ->setTagTemplateFieldId($tagTemplateFieldId) - ->setTagTemplateField($tagTemplateField); - try { - $gapicClient->createTagTemplateField($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteEntryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - $request = (new DeleteEntryRequest()) - ->setName($formattedName); - $gapicClient->deleteEntry($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/DeleteEntry', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteEntryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - $request = (new DeleteEntryRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteEntry($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteEntryGroupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - $request = (new DeleteEntryGroupRequest()) - ->setName($formattedName); - $gapicClient->deleteEntryGroup($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/DeleteEntryGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteEntryGroupExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - $request = (new DeleteEntryGroupRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteEntryGroup($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteTagTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - $request = (new DeleteTagRequest()) - ->setName($formattedName); - $gapicClient->deleteTag($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/DeleteTag', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteTagExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - $request = (new DeleteTagRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteTag($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteTagTemplateTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->tagTemplateName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); - $force = false; - $request = (new DeleteTagTemplateRequest()) - ->setName($formattedName) - ->setForce($force); - $gapicClient->deleteTagTemplate($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/DeleteTagTemplate', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getForce(); - $this->assertProtobufEquals($force, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteTagTemplateExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->tagTemplateName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); - $force = false; - $request = (new DeleteTagTemplateRequest()) - ->setName($formattedName) - ->setForce($force); - try { - $gapicClient->deleteTagTemplate($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteTagTemplateFieldTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->tagTemplateFieldName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]', '[FIELD]'); - $force = false; - $request = (new DeleteTagTemplateFieldRequest()) - ->setName($formattedName) - ->setForce($force); - $gapicClient->deleteTagTemplateField($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/DeleteTagTemplateField', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getForce(); - $this->assertProtobufEquals($force, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteTagTemplateFieldExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->tagTemplateFieldName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]', '[FIELD]'); - $force = false; - $request = (new DeleteTagTemplateFieldRequest()) - ->setName($formattedName) - ->setForce($force); - try { - $gapicClient->deleteTagTemplateField($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEntryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $linkedResource = 'linkedResource1544625012'; - $fullyQualifiedName = 'fullyQualifiedName338146659'; - $userSpecifiedType = 'userSpecifiedType-940364963'; - $userSpecifiedSystem = 'userSpecifiedSystem-1776119406'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new Entry(); - $expectedResponse->setName($name2); - $expectedResponse->setLinkedResource($linkedResource); - $expectedResponse->setFullyQualifiedName($fullyQualifiedName); - $expectedResponse->setUserSpecifiedType($userSpecifiedType); - $expectedResponse->setUserSpecifiedSystem($userSpecifiedSystem); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - $request = (new GetEntryRequest()) - ->setName($formattedName); - $response = $gapicClient->getEntry($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/GetEntry', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEntryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - $request = (new GetEntryRequest()) - ->setName($formattedName); - try { - $gapicClient->getEntry($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEntryGroupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new EntryGroup(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - $request = (new GetEntryGroupRequest()) - ->setName($formattedName); - $response = $gapicClient->getEntryGroup($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/GetEntryGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEntryGroupExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - $request = (new GetEntryGroupRequest()) - ->setName($formattedName); - try { - $gapicClient->getEntryGroup($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - $response = $gapicClient->getIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - try { - $gapicClient->getIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTagTemplateTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $isPubliclyReadable = true; - $expectedResponse = new TagTemplate(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setIsPubliclyReadable($isPubliclyReadable); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->tagTemplateName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); - $request = (new GetTagTemplateRequest()) - ->setName($formattedName); - $response = $gapicClient->getTagTemplate($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/GetTagTemplate', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTagTemplateExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->tagTemplateName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); - $request = (new GetTagTemplateRequest()) - ->setName($formattedName); - try { - $gapicClient->getTagTemplate($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function importEntriesTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/importEntriesTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $upsertedEntriesCount = 250168367; - $deletedEntriesCount = 167383302; - $expectedResponse = new ImportEntriesResponse(); - $expectedResponse->setUpsertedEntriesCount($upsertedEntriesCount); - $expectedResponse->setDeletedEntriesCount($deletedEntriesCount); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/importEntriesTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - $request = (new ImportEntriesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->importEntries($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/ImportEntries', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importEntriesTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function importEntriesExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/importEntriesTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - $request = (new ImportEntriesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->importEntries($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importEntriesTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function listEntriesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $entriesElement = new Entry(); - $entries = [ - $entriesElement, - ]; - $expectedResponse = new ListEntriesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setEntries($entries); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - $request = (new ListEntriesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listEntries($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getEntries()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/ListEntries', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEntriesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - $request = (new ListEntriesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listEntries($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEntryGroupsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $entryGroupsElement = new EntryGroup(); - $entryGroups = [ - $entryGroupsElement, - ]; - $expectedResponse = new ListEntryGroupsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setEntryGroups($entryGroups); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListEntryGroupsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listEntryGroups($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getEntryGroups()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/ListEntryGroups', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEntryGroupsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListEntryGroupsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listEntryGroups($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTagsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $tagsElement = new Tag(); - $tags = [ - $tagsElement, - ]; - $expectedResponse = new ListTagsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTags($tags); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - $request = (new ListTagsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listTags($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getTags()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/ListTags', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTagsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - $request = (new ListTagsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listTags($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function lookupEntryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $linkedResource2 = 'linkedResource2-1674044889'; - $fullyQualifiedName = 'fullyQualifiedName338146659'; - $userSpecifiedType = 'userSpecifiedType-940364963'; - $userSpecifiedSystem = 'userSpecifiedSystem-1776119406'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new Entry(); - $expectedResponse->setName($name); - $expectedResponse->setLinkedResource($linkedResource2); - $expectedResponse->setFullyQualifiedName($fullyQualifiedName); - $expectedResponse->setUserSpecifiedType($userSpecifiedType); - $expectedResponse->setUserSpecifiedSystem($userSpecifiedSystem); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - $request = new LookupEntryRequest(); - $response = $gapicClient->lookupEntry($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/LookupEntry', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function lookupEntryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new LookupEntryRequest(); - try { - $gapicClient->lookupEntry($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function modifyEntryContactsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new Contacts(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - $contacts = new Contacts(); - $request = (new ModifyEntryContactsRequest()) - ->setName($formattedName) - ->setContacts($contacts); - $response = $gapicClient->modifyEntryContacts($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/ModifyEntryContacts', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getContacts(); - $this->assertProtobufEquals($contacts, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function modifyEntryContactsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - $contacts = new Contacts(); - $request = (new ModifyEntryContactsRequest()) - ->setName($formattedName) - ->setContacts($contacts); - try { - $gapicClient->modifyEntryContacts($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function modifyEntryOverviewTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $overview = 'overview530115961'; - $expectedResponse = new EntryOverview(); - $expectedResponse->setOverview($overview); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - $entryOverview = new EntryOverview(); - $request = (new ModifyEntryOverviewRequest()) - ->setName($formattedName) - ->setEntryOverview($entryOverview); - $response = $gapicClient->modifyEntryOverview($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/ModifyEntryOverview', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getEntryOverview(); - $this->assertProtobufEquals($entryOverview, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function modifyEntryOverviewExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - $entryOverview = new EntryOverview(); - $request = (new ModifyEntryOverviewRequest()) - ->setName($formattedName) - ->setEntryOverview($entryOverview); - try { - $gapicClient->modifyEntryOverview($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function reconcileTagsTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/reconcileTagsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $createdTagsCount = 986601696; - $updatedTagsCount = 344847213; - $deletedTagsCount = 59637071; - $expectedResponse = new ReconcileTagsResponse(); - $expectedResponse->setCreatedTagsCount($createdTagsCount); - $expectedResponse->setUpdatedTagsCount($updatedTagsCount); - $expectedResponse->setDeletedTagsCount($deletedTagsCount); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/reconcileTagsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - $formattedTagTemplate = $gapicClient->tagTemplateName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); - $request = (new ReconcileTagsRequest()) - ->setParent($formattedParent) - ->setTagTemplate($formattedTagTemplate); - $response = $gapicClient->reconcileTags($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/ReconcileTags', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getTagTemplate(); - $this->assertProtobufEquals($formattedTagTemplate, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/reconcileTagsTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function reconcileTagsExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/reconcileTagsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - $formattedTagTemplate = $gapicClient->tagTemplateName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); - $request = (new ReconcileTagsRequest()) - ->setParent($formattedParent) - ->setTagTemplate($formattedTagTemplate); - $response = $gapicClient->reconcileTags($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/reconcileTagsTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function renameTagTemplateFieldTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $isRequired = true; - $description = 'description-1724546052'; - $order = 106006350; - $expectedResponse = new TagTemplateField(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setIsRequired($isRequired); - $expectedResponse->setDescription($description); - $expectedResponse->setOrder($order); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->tagTemplateFieldName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]', '[FIELD]'); - $newTagTemplateFieldId = 'newTagTemplateFieldId-1668354591'; - $request = (new RenameTagTemplateFieldRequest()) - ->setName($formattedName) - ->setNewTagTemplateFieldId($newTagTemplateFieldId); - $response = $gapicClient->renameTagTemplateField($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/RenameTagTemplateField', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getNewTagTemplateFieldId(); - $this->assertProtobufEquals($newTagTemplateFieldId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function renameTagTemplateFieldExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->tagTemplateFieldName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]', '[FIELD]'); - $newTagTemplateFieldId = 'newTagTemplateFieldId-1668354591'; - $request = (new RenameTagTemplateFieldRequest()) - ->setName($formattedName) - ->setNewTagTemplateFieldId($newTagTemplateFieldId); - try { - $gapicClient->renameTagTemplateField($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function renameTagTemplateFieldEnumValueTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $isRequired = true; - $description = 'description-1724546052'; - $order = 106006350; - $expectedResponse = new TagTemplateField(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setIsRequired($isRequired); - $expectedResponse->setDescription($description); - $expectedResponse->setOrder($order); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->tagTemplateFieldEnumValueName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]', '[TAG_TEMPLATE_FIELD_ID]', '[ENUM_VALUE_DISPLAY_NAME]'); - $newEnumValueDisplayName = 'newEnumValueDisplayName2138960469'; - $request = (new RenameTagTemplateFieldEnumValueRequest()) - ->setName($formattedName) - ->setNewEnumValueDisplayName($newEnumValueDisplayName); - $response = $gapicClient->renameTagTemplateFieldEnumValue($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/RenameTagTemplateFieldEnumValue', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getNewEnumValueDisplayName(); - $this->assertProtobufEquals($newEnumValueDisplayName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function renameTagTemplateFieldEnumValueExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->tagTemplateFieldEnumValueName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]', '[TAG_TEMPLATE_FIELD_ID]', '[ENUM_VALUE_DISPLAY_NAME]'); - $newEnumValueDisplayName = 'newEnumValueDisplayName2138960469'; - $request = (new RenameTagTemplateFieldEnumValueRequest()) - ->setName($formattedName) - ->setNewEnumValueDisplayName($newEnumValueDisplayName); - try { - $gapicClient->renameTagTemplateFieldEnumValue($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchCatalogTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $totalSize = 705419236; - $nextPageToken = ''; - $resultsElement = new SearchCatalogResult(); - $results = [ - $resultsElement, - ]; - $expectedResponse = new SearchCatalogResponse(); - $expectedResponse->setTotalSize($totalSize); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setResults($results); - $transport->addResponse($expectedResponse); - // Mock request - $scope = new Scope(); - $query = 'query107944136'; - $request = (new SearchCatalogRequest()) - ->setScope($scope) - ->setQuery($query); - $response = $gapicClient->searchCatalog($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getResults()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/SearchCatalog', $actualFuncCall); - $actualValue = $actualRequestObject->getScope(); - $this->assertProtobufEquals($scope, $actualValue); - $actualValue = $actualRequestObject->getQuery(); - $this->assertProtobufEquals($query, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchCatalogExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $scope = new Scope(); - $query = 'query107944136'; - $request = (new SearchCatalogRequest()) - ->setScope($scope) - ->setQuery($query); - try { - $gapicClient->searchCatalog($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - $response = $gapicClient->setIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - try { - $gapicClient->setIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function starEntryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new StarEntryResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - $request = (new StarEntryRequest()) - ->setName($formattedName); - $response = $gapicClient->starEntry($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/StarEntry', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function starEntryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - $request = (new StarEntryRequest()) - ->setName($formattedName); - try { - $gapicClient->starEntry($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - $response = $gapicClient->testIamPermissions($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - try { - $gapicClient->testIamPermissions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function unstarEntryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new UnstarEntryResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - $request = (new UnstarEntryRequest()) - ->setName($formattedName); - $response = $gapicClient->unstarEntry($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/UnstarEntry', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function unstarEntryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - $request = (new UnstarEntryRequest()) - ->setName($formattedName); - try { - $gapicClient->unstarEntry($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateEntryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $linkedResource = 'linkedResource1544625012'; - $fullyQualifiedName = 'fullyQualifiedName338146659'; - $userSpecifiedType = 'userSpecifiedType-940364963'; - $userSpecifiedSystem = 'userSpecifiedSystem-1776119406'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new Entry(); - $expectedResponse->setName($name); - $expectedResponse->setLinkedResource($linkedResource); - $expectedResponse->setFullyQualifiedName($fullyQualifiedName); - $expectedResponse->setUserSpecifiedType($userSpecifiedType); - $expectedResponse->setUserSpecifiedSystem($userSpecifiedSystem); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $entry = new Entry(); - $request = (new UpdateEntryRequest()) - ->setEntry($entry); - $response = $gapicClient->updateEntry($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/UpdateEntry', $actualFuncCall); - $actualValue = $actualRequestObject->getEntry(); - $this->assertProtobufEquals($entry, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateEntryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $entry = new Entry(); - $request = (new UpdateEntryRequest()) - ->setEntry($entry); - try { - $gapicClient->updateEntry($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateEntryGroupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new EntryGroup(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $entryGroup = new EntryGroup(); - $request = (new UpdateEntryGroupRequest()) - ->setEntryGroup($entryGroup); - $response = $gapicClient->updateEntryGroup($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/UpdateEntryGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getEntryGroup(); - $this->assertProtobufEquals($entryGroup, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateEntryGroupExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $entryGroup = new EntryGroup(); - $request = (new UpdateEntryGroupRequest()) - ->setEntryGroup($entryGroup); - try { - $gapicClient->updateEntryGroup($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateTagTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $template = 'template-1321546630'; - $templateDisplayName = 'templateDisplayName-532252787'; - $column = 'column-1354837162'; - $expectedResponse = new Tag(); - $expectedResponse->setName($name); - $expectedResponse->setTemplate($template); - $expectedResponse->setTemplateDisplayName($templateDisplayName); - $expectedResponse->setColumn($column); - $transport->addResponse($expectedResponse); - // Mock request - $tag = new Tag(); - $tagTemplate = 'tagTemplate1678947892'; - $tag->setTemplate($tagTemplate); - $fieldsValue = new TagField(); - $tagFields = [ - 'fieldsKey' => $fieldsValue, - ]; - $tag->setFields($tagFields); - $request = (new UpdateTagRequest()) - ->setTag($tag); - $response = $gapicClient->updateTag($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/UpdateTag', $actualFuncCall); - $actualValue = $actualRequestObject->getTag(); - $this->assertProtobufEquals($tag, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateTagExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $tag = new Tag(); - $tagTemplate = 'tagTemplate1678947892'; - $tag->setTemplate($tagTemplate); - $fieldsValue = new TagField(); - $tagFields = [ - 'fieldsKey' => $fieldsValue, - ]; - $tag->setFields($tagFields); - $request = (new UpdateTagRequest()) - ->setTag($tag); - try { - $gapicClient->updateTag($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateTagTemplateTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $isPubliclyReadable = true; - $expectedResponse = new TagTemplate(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setIsPubliclyReadable($isPubliclyReadable); - $transport->addResponse($expectedResponse); - // Mock request - $tagTemplate = new TagTemplate(); - $fieldsValue = new TagTemplateField(); - $valueType = new FieldType(); - $fieldsValue->setType($valueType); - $tagTemplateFields = [ - 'fieldsKey' => $fieldsValue, - ]; - $tagTemplate->setFields($tagTemplateFields); - $request = (new UpdateTagTemplateRequest()) - ->setTagTemplate($tagTemplate); - $response = $gapicClient->updateTagTemplate($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/UpdateTagTemplate', $actualFuncCall); - $actualValue = $actualRequestObject->getTagTemplate(); - $this->assertProtobufEquals($tagTemplate, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateTagTemplateExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $tagTemplate = new TagTemplate(); - $fieldsValue = new TagTemplateField(); - $valueType = new FieldType(); - $fieldsValue->setType($valueType); - $tagTemplateFields = [ - 'fieldsKey' => $fieldsValue, - ]; - $tagTemplate->setFields($tagTemplateFields); - $request = (new UpdateTagTemplateRequest()) - ->setTagTemplate($tagTemplate); - try { - $gapicClient->updateTagTemplate($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateTagTemplateFieldTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $isRequired = true; - $description = 'description-1724546052'; - $order = 106006350; - $expectedResponse = new TagTemplateField(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setIsRequired($isRequired); - $expectedResponse->setDescription($description); - $expectedResponse->setOrder($order); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->tagTemplateFieldName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]', '[FIELD]'); - $tagTemplateField = new TagTemplateField(); - $tagTemplateFieldType = new FieldType(); - $tagTemplateField->setType($tagTemplateFieldType); - $request = (new UpdateTagTemplateFieldRequest()) - ->setName($formattedName) - ->setTagTemplateField($tagTemplateField); - $response = $gapicClient->updateTagTemplateField($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/UpdateTagTemplateField', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getTagTemplateField(); - $this->assertProtobufEquals($tagTemplateField, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateTagTemplateFieldExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->tagTemplateFieldName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]', '[FIELD]'); - $tagTemplateField = new TagTemplateField(); - $tagTemplateFieldType = new FieldType(); - $tagTemplateField->setType($tagTemplateFieldType); - $request = (new UpdateTagTemplateFieldRequest()) - ->setName($formattedName) - ->setTagTemplateField($tagTemplateField); - try { - $gapicClient->updateTagTemplateField($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createEntryAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $linkedResource = 'linkedResource1544625012'; - $fullyQualifiedName = 'fullyQualifiedName338146659'; - $userSpecifiedType = 'userSpecifiedType-940364963'; - $userSpecifiedSystem = 'userSpecifiedSystem-1776119406'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new Entry(); - $expectedResponse->setName($name); - $expectedResponse->setLinkedResource($linkedResource); - $expectedResponse->setFullyQualifiedName($fullyQualifiedName); - $expectedResponse->setUserSpecifiedType($userSpecifiedType); - $expectedResponse->setUserSpecifiedSystem($userSpecifiedSystem); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - $entryId = 'entryId-2093663224'; - $entry = new Entry(); - $request = (new CreateEntryRequest()) - ->setParent($formattedParent) - ->setEntryId($entryId) - ->setEntry($entry); - $response = $gapicClient->createEntryAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/CreateEntry', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getEntryId(); - $this->assertProtobufEquals($entryId, $actualValue); - $actualValue = $actualRequestObject->getEntry(); - $this->assertProtobufEquals($entry, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/DataCatalog/v1/tests/Unit/V1/Client/PolicyTagManagerClientTest.php b/owl-bot-staging/DataCatalog/v1/tests/Unit/V1/Client/PolicyTagManagerClientTest.php deleted file mode 100644 index 45dd9eece522..000000000000 --- a/owl-bot-staging/DataCatalog/v1/tests/Unit/V1/Client/PolicyTagManagerClientTest.php +++ /dev/null @@ -1,991 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return PolicyTagManagerClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new PolicyTagManagerClient($options); - } - - /** @test */ - public function createPolicyTagTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $parentPolicyTag = 'parentPolicyTag2071382466'; - $expectedResponse = new PolicyTag(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setParentPolicyTag($parentPolicyTag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); - $request = (new CreatePolicyTagRequest()) - ->setParent($formattedParent); - $response = $gapicClient->createPolicyTag($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManager/CreatePolicyTag', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createPolicyTagExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); - $request = (new CreatePolicyTagRequest()) - ->setParent($formattedParent); - try { - $gapicClient->createPolicyTag($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createTaxonomyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $policyTagCount = 1074340189; - $expectedResponse = new Taxonomy(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setPolicyTagCount($policyTagCount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new CreateTaxonomyRequest()) - ->setParent($formattedParent); - $response = $gapicClient->createTaxonomy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManager/CreateTaxonomy', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createTaxonomyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new CreateTaxonomyRequest()) - ->setParent($formattedParent); - try { - $gapicClient->createTaxonomy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deletePolicyTagTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->policyTagName('[PROJECT]', '[LOCATION]', '[TAXONOMY]', '[POLICY_TAG]'); - $request = (new DeletePolicyTagRequest()) - ->setName($formattedName); - $gapicClient->deletePolicyTag($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManager/DeletePolicyTag', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deletePolicyTagExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->policyTagName('[PROJECT]', '[LOCATION]', '[TAXONOMY]', '[POLICY_TAG]'); - $request = (new DeletePolicyTagRequest()) - ->setName($formattedName); - try { - $gapicClient->deletePolicyTag($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteTaxonomyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); - $request = (new DeleteTaxonomyRequest()) - ->setName($formattedName); - $gapicClient->deleteTaxonomy($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManager/DeleteTaxonomy', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteTaxonomyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); - $request = (new DeleteTaxonomyRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteTaxonomy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - $response = $gapicClient->getIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManager/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - try { - $gapicClient->getIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getPolicyTagTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $parentPolicyTag = 'parentPolicyTag2071382466'; - $expectedResponse = new PolicyTag(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setParentPolicyTag($parentPolicyTag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->policyTagName('[PROJECT]', '[LOCATION]', '[TAXONOMY]', '[POLICY_TAG]'); - $request = (new GetPolicyTagRequest()) - ->setName($formattedName); - $response = $gapicClient->getPolicyTag($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManager/GetPolicyTag', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getPolicyTagExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->policyTagName('[PROJECT]', '[LOCATION]', '[TAXONOMY]', '[POLICY_TAG]'); - $request = (new GetPolicyTagRequest()) - ->setName($formattedName); - try { - $gapicClient->getPolicyTag($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTaxonomyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $policyTagCount = 1074340189; - $expectedResponse = new Taxonomy(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setPolicyTagCount($policyTagCount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); - $request = (new GetTaxonomyRequest()) - ->setName($formattedName); - $response = $gapicClient->getTaxonomy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManager/GetTaxonomy', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTaxonomyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); - $request = (new GetTaxonomyRequest()) - ->setName($formattedName); - try { - $gapicClient->getTaxonomy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPolicyTagsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $policyTagsElement = new PolicyTag(); - $policyTags = [ - $policyTagsElement, - ]; - $expectedResponse = new ListPolicyTagsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setPolicyTags($policyTags); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); - $request = (new ListPolicyTagsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listPolicyTags($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getPolicyTags()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManager/ListPolicyTags', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPolicyTagsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); - $request = (new ListPolicyTagsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listPolicyTags($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTaxonomiesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $taxonomiesElement = new Taxonomy(); - $taxonomies = [ - $taxonomiesElement, - ]; - $expectedResponse = new ListTaxonomiesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTaxonomies($taxonomies); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListTaxonomiesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listTaxonomies($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getTaxonomies()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManager/ListTaxonomies', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTaxonomiesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListTaxonomiesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listTaxonomies($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - $response = $gapicClient->setIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManager/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - try { - $gapicClient->setIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - $response = $gapicClient->testIamPermissions($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManager/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - try { - $gapicClient->testIamPermissions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updatePolicyTagTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $parentPolicyTag = 'parentPolicyTag2071382466'; - $expectedResponse = new PolicyTag(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setParentPolicyTag($parentPolicyTag); - $transport->addResponse($expectedResponse); - $request = new UpdatePolicyTagRequest(); - $response = $gapicClient->updatePolicyTag($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManager/UpdatePolicyTag', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updatePolicyTagExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new UpdatePolicyTagRequest(); - try { - $gapicClient->updatePolicyTag($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateTaxonomyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $policyTagCount = 1074340189; - $expectedResponse = new Taxonomy(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setPolicyTagCount($policyTagCount); - $transport->addResponse($expectedResponse); - $request = new UpdateTaxonomyRequest(); - $response = $gapicClient->updateTaxonomy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManager/UpdateTaxonomy', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateTaxonomyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new UpdateTaxonomyRequest(); - try { - $gapicClient->updateTaxonomy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createPolicyTagAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $parentPolicyTag = 'parentPolicyTag2071382466'; - $expectedResponse = new PolicyTag(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setParentPolicyTag($parentPolicyTag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); - $request = (new CreatePolicyTagRequest()) - ->setParent($formattedParent); - $response = $gapicClient->createPolicyTagAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManager/CreatePolicyTag', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/DataCatalog/v1/tests/Unit/V1/Client/PolicyTagManagerSerializationClientTest.php b/owl-bot-staging/DataCatalog/v1/tests/Unit/V1/Client/PolicyTagManagerSerializationClientTest.php deleted file mode 100644 index a9fa090478d9..000000000000 --- a/owl-bot-staging/DataCatalog/v1/tests/Unit/V1/Client/PolicyTagManagerSerializationClientTest.php +++ /dev/null @@ -1,314 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return PolicyTagManagerSerializationClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new PolicyTagManagerSerializationClient($options); - } - - /** @test */ - public function exportTaxonomiesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ExportTaxonomiesResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $formattedTaxonomies = [ - $gapicClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'), - ]; - $request = (new ExportTaxonomiesRequest()) - ->setParent($formattedParent) - ->setTaxonomies($formattedTaxonomies); - $response = $gapicClient->exportTaxonomies($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManagerSerialization/ExportTaxonomies', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getTaxonomies(); - $this->assertProtobufEquals($formattedTaxonomies, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function exportTaxonomiesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $formattedTaxonomies = [ - $gapicClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'), - ]; - $request = (new ExportTaxonomiesRequest()) - ->setParent($formattedParent) - ->setTaxonomies($formattedTaxonomies); - try { - $gapicClient->exportTaxonomies($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function importTaxonomiesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ImportTaxonomiesResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ImportTaxonomiesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->importTaxonomies($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManagerSerialization/ImportTaxonomies', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function importTaxonomiesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ImportTaxonomiesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->importTaxonomies($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function replaceTaxonomyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $policyTagCount = 1074340189; - $expectedResponse = new Taxonomy(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setPolicyTagCount($policyTagCount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); - $serializedTaxonomy = new SerializedTaxonomy(); - $serializedTaxonomyDisplayName = 'serializedTaxonomyDisplayName1493662264'; - $serializedTaxonomy->setDisplayName($serializedTaxonomyDisplayName); - $request = (new ReplaceTaxonomyRequest()) - ->setName($formattedName) - ->setSerializedTaxonomy($serializedTaxonomy); - $response = $gapicClient->replaceTaxonomy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManagerSerialization/ReplaceTaxonomy', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getSerializedTaxonomy(); - $this->assertProtobufEquals($serializedTaxonomy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function replaceTaxonomyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); - $serializedTaxonomy = new SerializedTaxonomy(); - $serializedTaxonomyDisplayName = 'serializedTaxonomyDisplayName1493662264'; - $serializedTaxonomy->setDisplayName($serializedTaxonomyDisplayName); - $request = (new ReplaceTaxonomyRequest()) - ->setName($formattedName) - ->setSerializedTaxonomy($serializedTaxonomy); - try { - $gapicClient->replaceTaxonomy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function exportTaxonomiesAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ExportTaxonomiesResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $formattedTaxonomies = [ - $gapicClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'), - ]; - $request = (new ExportTaxonomiesRequest()) - ->setParent($formattedParent) - ->setTaxonomies($formattedTaxonomies); - $response = $gapicClient->exportTaxonomiesAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManagerSerialization/ExportTaxonomies', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getTaxonomies(); - $this->assertProtobufEquals($formattedTaxonomies, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/DataCatalog/v1/tests/Unit/V1/DataCatalogClientTest.php b/owl-bot-staging/DataCatalog/v1/tests/Unit/V1/DataCatalogClientTest.php deleted file mode 100644 index 8e57110c879e..000000000000 --- a/owl-bot-staging/DataCatalog/v1/tests/Unit/V1/DataCatalogClientTest.php +++ /dev/null @@ -1,2515 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return DataCatalogClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new DataCatalogClient($options); - } - - /** @test */ - public function createEntryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $linkedResource = 'linkedResource1544625012'; - $fullyQualifiedName = 'fullyQualifiedName338146659'; - $userSpecifiedType = 'userSpecifiedType-940364963'; - $userSpecifiedSystem = 'userSpecifiedSystem-1776119406'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new Entry(); - $expectedResponse->setName($name); - $expectedResponse->setLinkedResource($linkedResource); - $expectedResponse->setFullyQualifiedName($fullyQualifiedName); - $expectedResponse->setUserSpecifiedType($userSpecifiedType); - $expectedResponse->setUserSpecifiedSystem($userSpecifiedSystem); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - $entryId = 'entryId-2093663224'; - $entry = new Entry(); - $response = $gapicClient->createEntry($formattedParent, $entryId, $entry); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/CreateEntry', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getEntryId(); - $this->assertProtobufEquals($entryId, $actualValue); - $actualValue = $actualRequestObject->getEntry(); - $this->assertProtobufEquals($entry, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createEntryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - $entryId = 'entryId-2093663224'; - $entry = new Entry(); - try { - $gapicClient->createEntry($formattedParent, $entryId, $entry); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createEntryGroupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new EntryGroup(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $entryGroupId = 'entryGroupId-43122680'; - $response = $gapicClient->createEntryGroup($formattedParent, $entryGroupId); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/CreateEntryGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getEntryGroupId(); - $this->assertProtobufEquals($entryGroupId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createEntryGroupExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $entryGroupId = 'entryGroupId-43122680'; - try { - $gapicClient->createEntryGroup($formattedParent, $entryGroupId); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createTagTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $template = 'template-1321546630'; - $templateDisplayName = 'templateDisplayName-532252787'; - $column = 'column-1354837162'; - $expectedResponse = new Tag(); - $expectedResponse->setName($name); - $expectedResponse->setTemplate($template); - $expectedResponse->setTemplateDisplayName($templateDisplayName); - $expectedResponse->setColumn($column); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - $tag = new Tag(); - $tagTemplate = 'tagTemplate1678947892'; - $tag->setTemplate($tagTemplate); - $fieldsValue = new TagField(); - $tagFields = [ - 'fieldsKey' => $fieldsValue, - ]; - $tag->setFields($tagFields); - $response = $gapicClient->createTag($formattedParent, $tag); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/CreateTag', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getTag(); - $this->assertProtobufEquals($tag, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createTagExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - $tag = new Tag(); - $tagTemplate = 'tagTemplate1678947892'; - $tag->setTemplate($tagTemplate); - $fieldsValue = new TagField(); - $tagFields = [ - 'fieldsKey' => $fieldsValue, - ]; - $tag->setFields($tagFields); - try { - $gapicClient->createTag($formattedParent, $tag); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createTagTemplateTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $isPubliclyReadable = true; - $expectedResponse = new TagTemplate(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setIsPubliclyReadable($isPubliclyReadable); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $tagTemplateId = 'tagTemplateId-2020335141'; - $tagTemplate = new TagTemplate(); - $fieldsValue = new TagTemplateField(); - $valueType = new FieldType(); - $fieldsValue->setType($valueType); - $tagTemplateFields = [ - 'fieldsKey' => $fieldsValue, - ]; - $tagTemplate->setFields($tagTemplateFields); - $response = $gapicClient->createTagTemplate($formattedParent, $tagTemplateId, $tagTemplate); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/CreateTagTemplate', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getTagTemplateId(); - $this->assertProtobufEquals($tagTemplateId, $actualValue); - $actualValue = $actualRequestObject->getTagTemplate(); - $this->assertProtobufEquals($tagTemplate, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createTagTemplateExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $tagTemplateId = 'tagTemplateId-2020335141'; - $tagTemplate = new TagTemplate(); - $fieldsValue = new TagTemplateField(); - $valueType = new FieldType(); - $fieldsValue->setType($valueType); - $tagTemplateFields = [ - 'fieldsKey' => $fieldsValue, - ]; - $tagTemplate->setFields($tagTemplateFields); - try { - $gapicClient->createTagTemplate($formattedParent, $tagTemplateId, $tagTemplate); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createTagTemplateFieldTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $isRequired = true; - $description = 'description-1724546052'; - $order = 106006350; - $expectedResponse = new TagTemplateField(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setIsRequired($isRequired); - $expectedResponse->setDescription($description); - $expectedResponse->setOrder($order); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->tagTemplateName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); - $tagTemplateFieldId = 'tagTemplateFieldId-92144832'; - $tagTemplateField = new TagTemplateField(); - $tagTemplateFieldType = new FieldType(); - $tagTemplateField->setType($tagTemplateFieldType); - $response = $gapicClient->createTagTemplateField($formattedParent, $tagTemplateFieldId, $tagTemplateField); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/CreateTagTemplateField', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getTagTemplateFieldId(); - $this->assertProtobufEquals($tagTemplateFieldId, $actualValue); - $actualValue = $actualRequestObject->getTagTemplateField(); - $this->assertProtobufEquals($tagTemplateField, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createTagTemplateFieldExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->tagTemplateName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); - $tagTemplateFieldId = 'tagTemplateFieldId-92144832'; - $tagTemplateField = new TagTemplateField(); - $tagTemplateFieldType = new FieldType(); - $tagTemplateField->setType($tagTemplateFieldType); - try { - $gapicClient->createTagTemplateField($formattedParent, $tagTemplateFieldId, $tagTemplateField); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteEntryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - $gapicClient->deleteEntry($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/DeleteEntry', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteEntryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - try { - $gapicClient->deleteEntry($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteEntryGroupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - $gapicClient->deleteEntryGroup($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/DeleteEntryGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteEntryGroupExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - try { - $gapicClient->deleteEntryGroup($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteTagTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - $gapicClient->deleteTag($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/DeleteTag', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteTagExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - try { - $gapicClient->deleteTag($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteTagTemplateTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->tagTemplateName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); - $force = false; - $gapicClient->deleteTagTemplate($formattedName, $force); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/DeleteTagTemplate', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getForce(); - $this->assertProtobufEquals($force, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteTagTemplateExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->tagTemplateName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); - $force = false; - try { - $gapicClient->deleteTagTemplate($formattedName, $force); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteTagTemplateFieldTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->tagTemplateFieldName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]', '[FIELD]'); - $force = false; - $gapicClient->deleteTagTemplateField($formattedName, $force); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/DeleteTagTemplateField', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getForce(); - $this->assertProtobufEquals($force, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteTagTemplateFieldExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->tagTemplateFieldName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]', '[FIELD]'); - $force = false; - try { - $gapicClient->deleteTagTemplateField($formattedName, $force); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEntryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $linkedResource = 'linkedResource1544625012'; - $fullyQualifiedName = 'fullyQualifiedName338146659'; - $userSpecifiedType = 'userSpecifiedType-940364963'; - $userSpecifiedSystem = 'userSpecifiedSystem-1776119406'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new Entry(); - $expectedResponse->setName($name2); - $expectedResponse->setLinkedResource($linkedResource); - $expectedResponse->setFullyQualifiedName($fullyQualifiedName); - $expectedResponse->setUserSpecifiedType($userSpecifiedType); - $expectedResponse->setUserSpecifiedSystem($userSpecifiedSystem); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - $response = $gapicClient->getEntry($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/GetEntry', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEntryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - try { - $gapicClient->getEntry($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEntryGroupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new EntryGroup(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - $response = $gapicClient->getEntryGroup($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/GetEntryGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEntryGroupExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - try { - $gapicClient->getEntryGroup($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $response = $gapicClient->getIamPolicy($resource); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - try { - $gapicClient->getIamPolicy($resource); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTagTemplateTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $isPubliclyReadable = true; - $expectedResponse = new TagTemplate(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setIsPubliclyReadable($isPubliclyReadable); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->tagTemplateName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); - $response = $gapicClient->getTagTemplate($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/GetTagTemplate', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTagTemplateExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->tagTemplateName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); - try { - $gapicClient->getTagTemplate($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function importEntriesTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/importEntriesTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $upsertedEntriesCount = 250168367; - $deletedEntriesCount = 167383302; - $expectedResponse = new ImportEntriesResponse(); - $expectedResponse->setUpsertedEntriesCount($upsertedEntriesCount); - $expectedResponse->setDeletedEntriesCount($deletedEntriesCount); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/importEntriesTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - $response = $gapicClient->importEntries($formattedParent); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/ImportEntries', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importEntriesTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function importEntriesExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/importEntriesTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - $response = $gapicClient->importEntries($formattedParent); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importEntriesTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function listEntriesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $entriesElement = new Entry(); - $entries = [ - $entriesElement, - ]; - $expectedResponse = new ListEntriesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setEntries($entries); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - $response = $gapicClient->listEntries($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getEntries()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/ListEntries', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEntriesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - try { - $gapicClient->listEntries($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEntryGroupsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $entryGroupsElement = new EntryGroup(); - $entryGroups = [ - $entryGroupsElement, - ]; - $expectedResponse = new ListEntryGroupsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setEntryGroups($entryGroups); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listEntryGroups($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getEntryGroups()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/ListEntryGroups', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEntryGroupsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - try { - $gapicClient->listEntryGroups($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTagsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $tagsElement = new Tag(); - $tags = [ - $tagsElement, - ]; - $expectedResponse = new ListTagsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTags($tags); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - $response = $gapicClient->listTags($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getTags()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/ListTags', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTagsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - try { - $gapicClient->listTags($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function lookupEntryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $linkedResource2 = 'linkedResource2-1674044889'; - $fullyQualifiedName = 'fullyQualifiedName338146659'; - $userSpecifiedType = 'userSpecifiedType-940364963'; - $userSpecifiedSystem = 'userSpecifiedSystem-1776119406'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new Entry(); - $expectedResponse->setName($name); - $expectedResponse->setLinkedResource($linkedResource2); - $expectedResponse->setFullyQualifiedName($fullyQualifiedName); - $expectedResponse->setUserSpecifiedType($userSpecifiedType); - $expectedResponse->setUserSpecifiedSystem($userSpecifiedSystem); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - $response = $gapicClient->lookupEntry(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/LookupEntry', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function lookupEntryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - try { - $gapicClient->lookupEntry(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function modifyEntryContactsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new Contacts(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - $contacts = new Contacts(); - $response = $gapicClient->modifyEntryContacts($formattedName, $contacts); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/ModifyEntryContacts', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getContacts(); - $this->assertProtobufEquals($contacts, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function modifyEntryContactsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - $contacts = new Contacts(); - try { - $gapicClient->modifyEntryContacts($formattedName, $contacts); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function modifyEntryOverviewTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $overview = 'overview530115961'; - $expectedResponse = new EntryOverview(); - $expectedResponse->setOverview($overview); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - $entryOverview = new EntryOverview(); - $response = $gapicClient->modifyEntryOverview($formattedName, $entryOverview); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/ModifyEntryOverview', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getEntryOverview(); - $this->assertProtobufEquals($entryOverview, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function modifyEntryOverviewExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - $entryOverview = new EntryOverview(); - try { - $gapicClient->modifyEntryOverview($formattedName, $entryOverview); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function reconcileTagsTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/reconcileTagsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $createdTagsCount = 986601696; - $updatedTagsCount = 344847213; - $deletedTagsCount = 59637071; - $expectedResponse = new ReconcileTagsResponse(); - $expectedResponse->setCreatedTagsCount($createdTagsCount); - $expectedResponse->setUpdatedTagsCount($updatedTagsCount); - $expectedResponse->setDeletedTagsCount($deletedTagsCount); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/reconcileTagsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - $formattedTagTemplate = $gapicClient->tagTemplateName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); - $response = $gapicClient->reconcileTags($formattedParent, $formattedTagTemplate); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/ReconcileTags', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getTagTemplate(); - $this->assertProtobufEquals($formattedTagTemplate, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/reconcileTagsTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function reconcileTagsExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/reconcileTagsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - $formattedTagTemplate = $gapicClient->tagTemplateName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); - $response = $gapicClient->reconcileTags($formattedParent, $formattedTagTemplate); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/reconcileTagsTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function renameTagTemplateFieldTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $isRequired = true; - $description = 'description-1724546052'; - $order = 106006350; - $expectedResponse = new TagTemplateField(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setIsRequired($isRequired); - $expectedResponse->setDescription($description); - $expectedResponse->setOrder($order); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->tagTemplateFieldName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]', '[FIELD]'); - $newTagTemplateFieldId = 'newTagTemplateFieldId-1668354591'; - $response = $gapicClient->renameTagTemplateField($formattedName, $newTagTemplateFieldId); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/RenameTagTemplateField', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getNewTagTemplateFieldId(); - $this->assertProtobufEquals($newTagTemplateFieldId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function renameTagTemplateFieldExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->tagTemplateFieldName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]', '[FIELD]'); - $newTagTemplateFieldId = 'newTagTemplateFieldId-1668354591'; - try { - $gapicClient->renameTagTemplateField($formattedName, $newTagTemplateFieldId); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function renameTagTemplateFieldEnumValueTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $isRequired = true; - $description = 'description-1724546052'; - $order = 106006350; - $expectedResponse = new TagTemplateField(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setIsRequired($isRequired); - $expectedResponse->setDescription($description); - $expectedResponse->setOrder($order); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->tagTemplateFieldEnumValueName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]', '[TAG_TEMPLATE_FIELD_ID]', '[ENUM_VALUE_DISPLAY_NAME]'); - $newEnumValueDisplayName = 'newEnumValueDisplayName2138960469'; - $response = $gapicClient->renameTagTemplateFieldEnumValue($formattedName, $newEnumValueDisplayName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/RenameTagTemplateFieldEnumValue', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getNewEnumValueDisplayName(); - $this->assertProtobufEquals($newEnumValueDisplayName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function renameTagTemplateFieldEnumValueExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->tagTemplateFieldEnumValueName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]', '[TAG_TEMPLATE_FIELD_ID]', '[ENUM_VALUE_DISPLAY_NAME]'); - $newEnumValueDisplayName = 'newEnumValueDisplayName2138960469'; - try { - $gapicClient->renameTagTemplateFieldEnumValue($formattedName, $newEnumValueDisplayName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchCatalogTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $totalSize = 705419236; - $nextPageToken = ''; - $resultsElement = new SearchCatalogResult(); - $results = [ - $resultsElement, - ]; - $expectedResponse = new SearchCatalogResponse(); - $expectedResponse->setTotalSize($totalSize); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setResults($results); - $transport->addResponse($expectedResponse); - // Mock request - $scope = new Scope(); - $query = 'query107944136'; - $response = $gapicClient->searchCatalog($scope, $query); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getResults()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/SearchCatalog', $actualFuncCall); - $actualValue = $actualRequestObject->getScope(); - $this->assertProtobufEquals($scope, $actualValue); - $actualValue = $actualRequestObject->getQuery(); - $this->assertProtobufEquals($query, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchCatalogExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $scope = new Scope(); - $query = 'query107944136'; - try { - $gapicClient->searchCatalog($scope, $query); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $response = $gapicClient->setIamPolicy($resource, $policy); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - try { - $gapicClient->setIamPolicy($resource, $policy); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function starEntryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new StarEntryResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - $response = $gapicClient->starEntry($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/StarEntry', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function starEntryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - try { - $gapicClient->starEntry($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $response = $gapicClient->testIamPermissions($resource, $permissions); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - try { - $gapicClient->testIamPermissions($resource, $permissions); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function unstarEntryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new UnstarEntryResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - $response = $gapicClient->unstarEntry($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/UnstarEntry', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function unstarEntryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - try { - $gapicClient->unstarEntry($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateEntryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $linkedResource = 'linkedResource1544625012'; - $fullyQualifiedName = 'fullyQualifiedName338146659'; - $userSpecifiedType = 'userSpecifiedType-940364963'; - $userSpecifiedSystem = 'userSpecifiedSystem-1776119406'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new Entry(); - $expectedResponse->setName($name); - $expectedResponse->setLinkedResource($linkedResource); - $expectedResponse->setFullyQualifiedName($fullyQualifiedName); - $expectedResponse->setUserSpecifiedType($userSpecifiedType); - $expectedResponse->setUserSpecifiedSystem($userSpecifiedSystem); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $entry = new Entry(); - $response = $gapicClient->updateEntry($entry); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/UpdateEntry', $actualFuncCall); - $actualValue = $actualRequestObject->getEntry(); - $this->assertProtobufEquals($entry, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateEntryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $entry = new Entry(); - try { - $gapicClient->updateEntry($entry); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateEntryGroupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new EntryGroup(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $entryGroup = new EntryGroup(); - $response = $gapicClient->updateEntryGroup($entryGroup); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/UpdateEntryGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getEntryGroup(); - $this->assertProtobufEquals($entryGroup, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateEntryGroupExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $entryGroup = new EntryGroup(); - try { - $gapicClient->updateEntryGroup($entryGroup); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateTagTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $template = 'template-1321546630'; - $templateDisplayName = 'templateDisplayName-532252787'; - $column = 'column-1354837162'; - $expectedResponse = new Tag(); - $expectedResponse->setName($name); - $expectedResponse->setTemplate($template); - $expectedResponse->setTemplateDisplayName($templateDisplayName); - $expectedResponse->setColumn($column); - $transport->addResponse($expectedResponse); - // Mock request - $tag = new Tag(); - $tagTemplate = 'tagTemplate1678947892'; - $tag->setTemplate($tagTemplate); - $fieldsValue = new TagField(); - $tagFields = [ - 'fieldsKey' => $fieldsValue, - ]; - $tag->setFields($tagFields); - $response = $gapicClient->updateTag($tag); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/UpdateTag', $actualFuncCall); - $actualValue = $actualRequestObject->getTag(); - $this->assertProtobufEquals($tag, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateTagExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $tag = new Tag(); - $tagTemplate = 'tagTemplate1678947892'; - $tag->setTemplate($tagTemplate); - $fieldsValue = new TagField(); - $tagFields = [ - 'fieldsKey' => $fieldsValue, - ]; - $tag->setFields($tagFields); - try { - $gapicClient->updateTag($tag); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateTagTemplateTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $isPubliclyReadable = true; - $expectedResponse = new TagTemplate(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setIsPubliclyReadable($isPubliclyReadable); - $transport->addResponse($expectedResponse); - // Mock request - $tagTemplate = new TagTemplate(); - $fieldsValue = new TagTemplateField(); - $valueType = new FieldType(); - $fieldsValue->setType($valueType); - $tagTemplateFields = [ - 'fieldsKey' => $fieldsValue, - ]; - $tagTemplate->setFields($tagTemplateFields); - $response = $gapicClient->updateTagTemplate($tagTemplate); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/UpdateTagTemplate', $actualFuncCall); - $actualValue = $actualRequestObject->getTagTemplate(); - $this->assertProtobufEquals($tagTemplate, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateTagTemplateExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $tagTemplate = new TagTemplate(); - $fieldsValue = new TagTemplateField(); - $valueType = new FieldType(); - $fieldsValue->setType($valueType); - $tagTemplateFields = [ - 'fieldsKey' => $fieldsValue, - ]; - $tagTemplate->setFields($tagTemplateFields); - try { - $gapicClient->updateTagTemplate($tagTemplate); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateTagTemplateFieldTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $isRequired = true; - $description = 'description-1724546052'; - $order = 106006350; - $expectedResponse = new TagTemplateField(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setIsRequired($isRequired); - $expectedResponse->setDescription($description); - $expectedResponse->setOrder($order); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->tagTemplateFieldName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]', '[FIELD]'); - $tagTemplateField = new TagTemplateField(); - $tagTemplateFieldType = new FieldType(); - $tagTemplateField->setType($tagTemplateFieldType); - $response = $gapicClient->updateTagTemplateField($formattedName, $tagTemplateField); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.DataCatalog/UpdateTagTemplateField', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getTagTemplateField(); - $this->assertProtobufEquals($tagTemplateField, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateTagTemplateFieldExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->tagTemplateFieldName('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]', '[FIELD]'); - $tagTemplateField = new TagTemplateField(); - $tagTemplateFieldType = new FieldType(); - $tagTemplateField->setType($tagTemplateFieldType); - try { - $gapicClient->updateTagTemplateField($formattedName, $tagTemplateField); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/DataCatalog/v1/tests/Unit/V1/PolicyTagManagerClientTest.php b/owl-bot-staging/DataCatalog/v1/tests/Unit/V1/PolicyTagManagerClientTest.php deleted file mode 100644 index dfa27389a713..000000000000 --- a/owl-bot-staging/DataCatalog/v1/tests/Unit/V1/PolicyTagManagerClientTest.php +++ /dev/null @@ -1,891 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return PolicyTagManagerClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new PolicyTagManagerClient($options); - } - - /** @test */ - public function createPolicyTagTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $parentPolicyTag = 'parentPolicyTag2071382466'; - $expectedResponse = new PolicyTag(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setParentPolicyTag($parentPolicyTag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); - $response = $gapicClient->createPolicyTag($formattedParent); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManager/CreatePolicyTag', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createPolicyTagExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); - try { - $gapicClient->createPolicyTag($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createTaxonomyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $policyTagCount = 1074340189; - $expectedResponse = new Taxonomy(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setPolicyTagCount($policyTagCount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->createTaxonomy($formattedParent); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManager/CreateTaxonomy', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createTaxonomyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - try { - $gapicClient->createTaxonomy($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deletePolicyTagTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->policyTagName('[PROJECT]', '[LOCATION]', '[TAXONOMY]', '[POLICY_TAG]'); - $gapicClient->deletePolicyTag($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManager/DeletePolicyTag', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deletePolicyTagExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->policyTagName('[PROJECT]', '[LOCATION]', '[TAXONOMY]', '[POLICY_TAG]'); - try { - $gapicClient->deletePolicyTag($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteTaxonomyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); - $gapicClient->deleteTaxonomy($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManager/DeleteTaxonomy', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteTaxonomyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); - try { - $gapicClient->deleteTaxonomy($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $response = $gapicClient->getIamPolicy($resource); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManager/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - try { - $gapicClient->getIamPolicy($resource); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getPolicyTagTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $parentPolicyTag = 'parentPolicyTag2071382466'; - $expectedResponse = new PolicyTag(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setParentPolicyTag($parentPolicyTag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->policyTagName('[PROJECT]', '[LOCATION]', '[TAXONOMY]', '[POLICY_TAG]'); - $response = $gapicClient->getPolicyTag($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManager/GetPolicyTag', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getPolicyTagExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->policyTagName('[PROJECT]', '[LOCATION]', '[TAXONOMY]', '[POLICY_TAG]'); - try { - $gapicClient->getPolicyTag($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTaxonomyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $policyTagCount = 1074340189; - $expectedResponse = new Taxonomy(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setPolicyTagCount($policyTagCount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); - $response = $gapicClient->getTaxonomy($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManager/GetTaxonomy', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTaxonomyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); - try { - $gapicClient->getTaxonomy($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPolicyTagsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $policyTagsElement = new PolicyTag(); - $policyTags = [ - $policyTagsElement, - ]; - $expectedResponse = new ListPolicyTagsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setPolicyTags($policyTags); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); - $response = $gapicClient->listPolicyTags($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getPolicyTags()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManager/ListPolicyTags', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPolicyTagsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); - try { - $gapicClient->listPolicyTags($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTaxonomiesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $taxonomiesElement = new Taxonomy(); - $taxonomies = [ - $taxonomiesElement, - ]; - $expectedResponse = new ListTaxonomiesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTaxonomies($taxonomies); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listTaxonomies($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getTaxonomies()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManager/ListTaxonomies', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTaxonomiesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - try { - $gapicClient->listTaxonomies($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $response = $gapicClient->setIamPolicy($resource, $policy); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManager/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - try { - $gapicClient->setIamPolicy($resource, $policy); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $response = $gapicClient->testIamPermissions($resource, $permissions); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManager/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - try { - $gapicClient->testIamPermissions($resource, $permissions); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updatePolicyTagTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $parentPolicyTag = 'parentPolicyTag2071382466'; - $expectedResponse = new PolicyTag(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setParentPolicyTag($parentPolicyTag); - $transport->addResponse($expectedResponse); - $response = $gapicClient->updatePolicyTag(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManager/UpdatePolicyTag', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updatePolicyTagExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - try { - $gapicClient->updatePolicyTag(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateTaxonomyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $policyTagCount = 1074340189; - $expectedResponse = new Taxonomy(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setPolicyTagCount($policyTagCount); - $transport->addResponse($expectedResponse); - $response = $gapicClient->updateTaxonomy(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManager/UpdateTaxonomy', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateTaxonomyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - try { - $gapicClient->updateTaxonomy(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/DataCatalog/v1/tests/Unit/V1/PolicyTagManagerSerializationClientTest.php b/owl-bot-staging/DataCatalog/v1/tests/Unit/V1/PolicyTagManagerSerializationClientTest.php deleted file mode 100644 index d7fb8c02a939..000000000000 --- a/owl-bot-staging/DataCatalog/v1/tests/Unit/V1/PolicyTagManagerSerializationClientTest.php +++ /dev/null @@ -1,262 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return PolicyTagManagerSerializationClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new PolicyTagManagerSerializationClient($options); - } - - /** @test */ - public function exportTaxonomiesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ExportTaxonomiesResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $formattedTaxonomies = [ - $gapicClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'), - ]; - $response = $gapicClient->exportTaxonomies($formattedParent, $formattedTaxonomies); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManagerSerialization/ExportTaxonomies', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getTaxonomies(); - $this->assertProtobufEquals($formattedTaxonomies, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function exportTaxonomiesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $formattedTaxonomies = [ - $gapicClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'), - ]; - try { - $gapicClient->exportTaxonomies($formattedParent, $formattedTaxonomies); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function importTaxonomiesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ImportTaxonomiesResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->importTaxonomies($formattedParent); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManagerSerialization/ImportTaxonomies', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function importTaxonomiesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - try { - $gapicClient->importTaxonomies($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function replaceTaxonomyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $policyTagCount = 1074340189; - $expectedResponse = new Taxonomy(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setPolicyTagCount($policyTagCount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); - $serializedTaxonomy = new SerializedTaxonomy(); - $serializedTaxonomyDisplayName = 'serializedTaxonomyDisplayName1493662264'; - $serializedTaxonomy->setDisplayName($serializedTaxonomyDisplayName); - $response = $gapicClient->replaceTaxonomy($formattedName, $serializedTaxonomy); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datacatalog.v1.PolicyTagManagerSerialization/ReplaceTaxonomy', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getSerializedTaxonomy(); - $this->assertProtobufEquals($serializedTaxonomy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function replaceTaxonomyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->taxonomyName('[PROJECT]', '[LOCATION]', '[TAXONOMY]'); - $serializedTaxonomy = new SerializedTaxonomy(); - $serializedTaxonomyDisplayName = 'serializedTaxonomyDisplayName1493662264'; - $serializedTaxonomy->setDisplayName($serializedTaxonomyDisplayName); - try { - $gapicClient->replaceTaxonomy($formattedName, $serializedTaxonomy); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -}