From 1064cfa51135bc67c5bddc3d3e04174bb35408bb Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Mon, 13 Apr 2026 08:10:36 +0000 Subject: [PATCH 1/2] feat: Add DataTableService to Chronicle v1 Client Libraries PiperOrigin-RevId: 898791366 Source-Link: https://github.com/googleapis/googleapis/commit/e182cf5152967047b763fd88f03094cfc836d194 Source-Link: https://github.com/googleapis/googleapis-gen/commit/dab413d43bd475386b375d7dca3169cb063dcd8d Copy-Tag: eyJwIjoiQ2hyb25pY2xlLy5Pd2xCb3QueWFtbCIsImgiOiJkYWI0MTNkNDNiZDQ3NTM4NmIzNzVkN2RjYTMxNjljYjA2M2RjZDhkIn0= --- .../Cloud/Chronicle/V1/DataAccessControl.php | 31 + .../Google/Cloud/Chronicle/V1/DataTable.php | 32 + .../Google/Cloud/Chronicle/V1/Entity.php | 31 + .../Google/Cloud/Chronicle/V1/Instance.php | 28 + .../Cloud/Chronicle/V1/ReferenceList.php | 30 + .../Google/Cloud/Chronicle/V1/Rule.php | 33 + .../V1/BulkCreateDataTableRowsRequest.php | 137 ++ .../V1/BulkCreateDataTableRowsResponse.php | 67 + .../V1/BulkGetDataTableRowsRequest.php | 132 ++ .../V1/BulkGetDataTableRowsResponse.php | 67 + .../V1/BulkReplaceDataTableRowsRequest.php | 142 ++ .../V1/BulkReplaceDataTableRowsResponse.php | 67 + .../V1/BulkUpdateDataTableRowsRequest.php | 132 ++ .../V1/BulkUpdateDataTableRowsResponse.php | 67 + .../Chronicle/V1/CompilationDiagnostic.php | 193 +++ .../V1/CompilationDiagnostic/Severity.php | 61 + .../Chronicle/V1/CompilationPosition.php | 170 +++ .../V1/CreateDataAccessLabelRequest.php | 183 +++ .../V1/CreateDataAccessScopeRequest.php | 178 +++ .../Chronicle/V1/CreateDataTableRequest.php | 188 +++ .../V1/CreateDataTableRowRequest.php | 137 ++ .../V1/CreateReferenceListRequest.php | 193 +++ .../Chronicle/V1/CreateRetrohuntRequest.php | 137 ++ .../Cloud/Chronicle/V1/CreateRuleRequest.php | 132 ++ .../Chronicle/V1/CreateWatchlistRequest.php | 184 +++ .../Cloud/Chronicle/V1/DataAccessLabel.php | 337 +++++ .../Chronicle/V1/DataAccessLabelReference.php | 227 ++++ .../Cloud/Chronicle/V1/DataAccessScope.php | 470 +++++++ .../Google/Cloud/Chronicle/V1/DataTable.php | 585 ++++++++ .../Chronicle/V1/DataTableColumnInfo.php | 274 ++++ .../DataTableColumnType.php | 76 ++ .../Chronicle/V1/DataTableOperationErrors.php | 113 ++ .../Cloud/Chronicle/V1/DataTableRow.php | 235 ++++ .../Cloud/Chronicle/V1/DataTableScopeInfo.php | 79 ++ .../Chronicle/V1/DataTableUpdateSource.php | 68 + .../V1/DeleteDataAccessLabelRequest.php | 91 ++ .../V1/DeleteDataAccessScopeRequest.php | 91 ++ .../Chronicle/V1/DeleteDataTableRequest.php | 137 ++ .../V1/DeleteDataTableRowRequest.php | 91 ++ .../Cloud/Chronicle/V1/DeleteRuleRequest.php | 151 +++ .../Chronicle/V1/DeleteWatchlistRequest.php | 137 ++ .../V1/GetDataAccessLabelRequest.php | 91 ++ .../V1/GetDataAccessScopeRequest.php | 91 ++ .../V1/GetDataTableOperationErrorsRequest.php | 91 ++ .../Chronicle/V1/GetDataTableRequest.php | 91 ++ .../Chronicle/V1/GetDataTableRowRequest.php | 91 ++ .../Cloud/Chronicle/V1/GetInstanceRequest.php | 91 ++ .../Chronicle/V1/GetReferenceListRequest.php | 129 ++ .../Chronicle/V1/GetRetrohuntRequest.php | 91 ++ .../Chronicle/V1/GetRuleDeploymentRequest.php | 91 ++ .../Cloud/Chronicle/V1/GetRuleRequest.php | 129 ++ .../Chronicle/V1/GetWatchlistRequest.php | 96 ++ .../Cloud/Chronicle/V1/IngestionLabel.php | 109 ++ .../Google/Cloud/Chronicle/V1/InputsUsed.php | 137 ++ .../Google/Cloud/Chronicle/V1/Instance.php | 71 + .../V1/ListDataAccessLabelsRequest.php | 220 +++ .../V1/ListDataAccessLabelsResponse.php | 105 ++ .../V1/ListDataAccessScopesRequest.php | 220 +++ .../V1/ListDataAccessScopesResponse.php | 149 +++ .../Chronicle/V1/ListDataTableRowsRequest.php | 247 ++++ .../V1/ListDataTableRowsResponse.php | 105 ++ .../Chronicle/V1/ListDataTablesRequest.php | 220 +++ .../Chronicle/V1/ListDataTablesResponse.php | 105 ++ .../V1/ListReferenceListsRequest.php | 221 ++++ .../V1/ListReferenceListsResponse.php | 109 ++ .../Chronicle/V1/ListRetrohuntsRequest.php | 225 ++++ .../Chronicle/V1/ListRetrohuntsResponse.php | 105 ++ .../V1/ListRuleDeploymentsRequest.php | 230 ++++ .../V1/ListRuleDeploymentsResponse.php | 105 ++ .../Chronicle/V1/ListRuleRevisionsRequest.php | 221 ++++ .../V1/ListRuleRevisionsResponse.php | 105 ++ .../Cloud/Chronicle/V1/ListRulesRequest.php | 263 ++++ .../Cloud/Chronicle/V1/ListRulesResponse.php | 105 ++ .../Chronicle/V1/ListWatchlistsRequest.php | 232 ++++ .../Chronicle/V1/ListWatchlistsResponse.php | 105 ++ .../Cloud/Chronicle/V1/ReferenceList.php | 409 ++++++ .../Cloud/Chronicle/V1/ReferenceListEntry.php | 67 + .../Cloud/Chronicle/V1/ReferenceListScope.php | 75 ++ .../Chronicle/V1/ReferenceListSyntaxType.php | 68 + .../Cloud/Chronicle/V1/ReferenceListView.php | 67 + .../Google/Cloud/Chronicle/V1/Retrohunt.php | 255 ++++ .../Cloud/Chronicle/V1/Retrohunt/State.php | 75 ++ .../Cloud/Chronicle/V1/RetrohuntMetadata.php | 157 +++ .../src/Google/Cloud/Chronicle/V1/Rule.php | 810 ++++++++++++ .../Chronicle/V1/Rule/CompilationState.php | 63 + .../Cloud/Chronicle/V1/RuleDeployment.php | 477 +++++++ .../V1/RuleDeployment/ExecutionState.php | 72 + .../Google/Cloud/Chronicle/V1/RuleType.php | 62 + .../Google/Cloud/Chronicle/V1/RuleView.php | 77 ++ .../Cloud/Chronicle/V1/RunFrequency.php | 69 + .../Google/Cloud/Chronicle/V1/ScopeInfo.php | 81 ++ .../Google/Cloud/Chronicle/V1/Severity.php | 71 + .../V1/UpdateDataAccessLabelRequest.php | 167 +++ .../V1/UpdateDataAccessScopeRequest.php | 172 +++ .../Chronicle/V1/UpdateDataTableRequest.php | 161 +++ .../V1/UpdateDataTableRowRequest.php | 156 +++ .../V1/UpdateReferenceListRequest.php | 167 +++ .../V1/UpdateRuleDeploymentRequest.php | 152 +++ .../Cloud/Chronicle/V1/UpdateRuleRequest.php | 157 +++ .../Chronicle/V1/UpdateWatchlistRequest.php | 152 +++ .../Google/Cloud/Chronicle/V1/Watchlist.php | 414 ++++++ .../Chronicle/V1/Watchlist/EntityCount.php | 101 ++ .../Watchlist/EntityPopulationMechanism.php | 75 ++ .../EntityPopulationMechanism/Manual.php | 33 + .../Chronicle/V1/WatchlistUserPreferences.php | 67 + .../create_data_access_label.php | 89 ++ .../create_data_access_scope.php | 105 ++ .../delete_data_access_label.php | 78 ++ .../delete_data_access_scope.php | 76 ++ .../get_data_access_label.php | 78 ++ .../get_data_access_scope.php | 78 ++ .../list_data_access_labels.php | 81 ++ .../list_data_access_scopes.php | 81 ++ .../update_data_access_label.php | 59 + .../update_data_access_scope.php | 79 ++ .../bulk_create_data_table_rows.php | 108 ++ .../bulk_get_data_table_rows.php | 96 ++ .../bulk_replace_data_table_rows.php | 108 ++ .../bulk_update_data_table_rows.php | 92 ++ .../create_data_table.php | 87 ++ .../create_data_table_row.php | 87 ++ .../delete_data_table.php | 76 ++ .../delete_data_table_row.php | 77 ++ .../DataTableServiceClient/get_data_table.php | 78 ++ .../get_data_table_operation_errors.php | 78 ++ .../get_data_table_row.php | 79 ++ .../list_data_table_rows.php | 83 ++ .../list_data_tables.php | 77 ++ .../update_data_table.php | 72 + .../update_data_table_row.php | 74 ++ .../EntityServiceClient/create_watchlist.php | 83 ++ .../EntityServiceClient/delete_watchlist.php | 76 ++ .../V1/EntityServiceClient/get_watchlist.php | 79 ++ .../EntityServiceClient/list_watchlists.php | 77 ++ .../EntityServiceClient/update_watchlist.php | 77 ++ .../V1/InstanceServiceClient/get_instance.php | 73 + .../create_reference_list.php | 111 ++ .../get_reference_list.php | 78 ++ .../list_reference_lists.php | 82 ++ .../update_reference_list.php | 90 ++ .../V1/RuleServiceClient/create_retrohunt.php | 90 ++ .../V1/RuleServiceClient/create_rule.php | 74 ++ .../V1/RuleServiceClient/delete_rule.php | 73 + .../V1/RuleServiceClient/get_retrohunt.php | 79 ++ .../samples/V1/RuleServiceClient/get_rule.php | 73 + .../RuleServiceClient/get_rule_deployment.php | 78 ++ .../V1/RuleServiceClient/list_retrohunts.php | 78 ++ .../list_rule_deployments.php | 79 ++ .../RuleServiceClient/list_rule_revisions.php | 78 ++ .../V1/RuleServiceClient/list_rules.php | 78 ++ .../V1/RuleServiceClient/update_rule.php | 59 + .../update_rule_deployment.php | 83 ++ .../Client/DataAccessControlServiceClient.php | 572 ++++++++ .../src/V1/Client/DataTableServiceClient.php | 747 +++++++++++ .../v1/src/V1/Client/EntityServiceClient.php | 389 ++++++ .../src/V1/Client/InstanceServiceClient.php | 255 ++++ .../V1/Client/ReferenceListServiceClient.php | 366 +++++ .../v1/src/V1/Client/RuleServiceClient.php | 733 ++++++++++ .../Chronicle/v1/src/V1/gapic_metadata.json | 298 +++++ ..._access_control_service_client_config.json | 94 ++ ...cess_control_service_descriptor_config.php | 171 +++ ...ess_control_service_rest_client_config.php | 198 +++ .../data_table_service_client_config.json | 119 ++ .../data_table_service_descriptor_config.php | 233 ++++ .../data_table_service_rest_client_config.php | 254 ++++ .../entity_service_client_config.json | 69 + .../entity_service_descriptor_config.php | 101 ++ .../entity_service_rest_client_config.php | 134 ++ .../instance_service_client_config.json | 39 + .../instance_service_descriptor_config.php | 43 + .../instance_service_rest_client_config.php | 87 ++ .../reference_list_service_client_config.json | 64 + ...ference_list_service_descriptor_config.php | 89 ++ ...erence_list_service_rest_client_config.php | 126 ++ .../resources/rule_service_client_config.json | 126 ++ .../rule_service_descriptor_config.php | 221 ++++ .../rule_service_rest_client_config.php | 217 +++ .../DataAccessControlServiceClientTest.php | 866 ++++++++++++ .../V1/Client/DataTableServiceClientTest.php | 1178 +++++++++++++++++ .../V1/Client/EntityServiceClientTest.php | 477 +++++++ .../V1/Client/InstanceServiceClientTest.php | 155 +++ .../Client/ReferenceListServiceClientTest.php | 434 ++++++ .../Unit/V1/Client/RuleServiceClientTest.php | 1100 +++++++++++++++ 183 files changed, 29418 insertions(+) create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/GPBMetadata/Google/Cloud/Chronicle/V1/DataAccessControl.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/GPBMetadata/Google/Cloud/Chronicle/V1/DataTable.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/GPBMetadata/Google/Cloud/Chronicle/V1/Entity.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/GPBMetadata/Google/Cloud/Chronicle/V1/Instance.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/GPBMetadata/Google/Cloud/Chronicle/V1/ReferenceList.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/GPBMetadata/Google/Cloud/Chronicle/V1/Rule.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/BulkCreateDataTableRowsRequest.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/BulkCreateDataTableRowsResponse.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/BulkGetDataTableRowsRequest.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/BulkGetDataTableRowsResponse.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/BulkReplaceDataTableRowsRequest.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/BulkReplaceDataTableRowsResponse.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/BulkUpdateDataTableRowsRequest.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/BulkUpdateDataTableRowsResponse.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CompilationDiagnostic.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CompilationDiagnostic/Severity.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CompilationPosition.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateDataAccessLabelRequest.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateDataAccessScopeRequest.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateDataTableRequest.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateDataTableRowRequest.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateReferenceListRequest.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateRetrohuntRequest.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateRuleRequest.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateWatchlistRequest.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataAccessLabel.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataAccessLabelReference.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataAccessScope.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataTable.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataTableColumnInfo.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataTableColumnInfo/DataTableColumnType.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataTableOperationErrors.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataTableRow.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataTableScopeInfo.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataTableUpdateSource.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DeleteDataAccessLabelRequest.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DeleteDataAccessScopeRequest.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DeleteDataTableRequest.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DeleteDataTableRowRequest.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DeleteRuleRequest.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DeleteWatchlistRequest.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetDataAccessLabelRequest.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetDataAccessScopeRequest.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetDataTableOperationErrorsRequest.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetDataTableRequest.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetDataTableRowRequest.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetInstanceRequest.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetReferenceListRequest.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetRetrohuntRequest.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetRuleDeploymentRequest.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetRuleRequest.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetWatchlistRequest.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/IngestionLabel.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/InputsUsed.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Instance.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListDataAccessLabelsRequest.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListDataAccessLabelsResponse.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListDataAccessScopesRequest.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListDataAccessScopesResponse.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListDataTableRowsRequest.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListDataTableRowsResponse.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListDataTablesRequest.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListDataTablesResponse.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListReferenceListsRequest.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListReferenceListsResponse.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRetrohuntsRequest.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRetrohuntsResponse.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRuleDeploymentsRequest.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRuleDeploymentsResponse.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRuleRevisionsRequest.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRuleRevisionsResponse.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRulesRequest.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRulesResponse.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListWatchlistsRequest.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListWatchlistsResponse.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ReferenceList.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ReferenceListEntry.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ReferenceListScope.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ReferenceListSyntaxType.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ReferenceListView.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Retrohunt.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Retrohunt/State.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/RetrohuntMetadata.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Rule.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Rule/CompilationState.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/RuleDeployment.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/RuleDeployment/ExecutionState.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/RuleType.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/RuleView.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/RunFrequency.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ScopeInfo.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Severity.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateDataAccessLabelRequest.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateDataAccessScopeRequest.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateDataTableRequest.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateDataTableRowRequest.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateReferenceListRequest.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateRuleDeploymentRequest.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateRuleRequest.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateWatchlistRequest.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Watchlist.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Watchlist/EntityCount.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Watchlist/EntityPopulationMechanism.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Watchlist/EntityPopulationMechanism/Manual.php create mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/WatchlistUserPreferences.php create mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/create_data_access_label.php create mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/create_data_access_scope.php create mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/delete_data_access_label.php create mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/delete_data_access_scope.php create mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/get_data_access_label.php create mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/get_data_access_scope.php create mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/list_data_access_labels.php create mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/list_data_access_scopes.php create mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/update_data_access_label.php create mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/update_data_access_scope.php create mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/bulk_create_data_table_rows.php create mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/bulk_get_data_table_rows.php create mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/bulk_replace_data_table_rows.php create mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/bulk_update_data_table_rows.php create mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/create_data_table.php create mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/create_data_table_row.php create mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/delete_data_table.php create mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/delete_data_table_row.php create mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/get_data_table.php create mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/get_data_table_operation_errors.php create mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/get_data_table_row.php create mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/list_data_table_rows.php create mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/list_data_tables.php create mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/update_data_table.php create mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/update_data_table_row.php create mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/EntityServiceClient/create_watchlist.php create mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/EntityServiceClient/delete_watchlist.php create mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/EntityServiceClient/get_watchlist.php create mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/EntityServiceClient/list_watchlists.php create mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/EntityServiceClient/update_watchlist.php create mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/InstanceServiceClient/get_instance.php create mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/ReferenceListServiceClient/create_reference_list.php create mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/ReferenceListServiceClient/get_reference_list.php create mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/ReferenceListServiceClient/list_reference_lists.php create mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/ReferenceListServiceClient/update_reference_list.php create mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/create_retrohunt.php create mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/create_rule.php create mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/delete_rule.php create mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/get_retrohunt.php create mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/get_rule.php create mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/get_rule_deployment.php create mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/list_retrohunts.php create mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/list_rule_deployments.php create mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/list_rule_revisions.php create mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/list_rules.php create mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/update_rule.php create mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/update_rule_deployment.php create mode 100644 owl-bot-staging/Chronicle/v1/src/V1/Client/DataAccessControlServiceClient.php create mode 100644 owl-bot-staging/Chronicle/v1/src/V1/Client/DataTableServiceClient.php create mode 100644 owl-bot-staging/Chronicle/v1/src/V1/Client/EntityServiceClient.php create mode 100644 owl-bot-staging/Chronicle/v1/src/V1/Client/InstanceServiceClient.php create mode 100644 owl-bot-staging/Chronicle/v1/src/V1/Client/ReferenceListServiceClient.php create mode 100644 owl-bot-staging/Chronicle/v1/src/V1/Client/RuleServiceClient.php create mode 100644 owl-bot-staging/Chronicle/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/Chronicle/v1/src/V1/resources/data_access_control_service_client_config.json create mode 100644 owl-bot-staging/Chronicle/v1/src/V1/resources/data_access_control_service_descriptor_config.php create mode 100644 owl-bot-staging/Chronicle/v1/src/V1/resources/data_access_control_service_rest_client_config.php create mode 100644 owl-bot-staging/Chronicle/v1/src/V1/resources/data_table_service_client_config.json create mode 100644 owl-bot-staging/Chronicle/v1/src/V1/resources/data_table_service_descriptor_config.php create mode 100644 owl-bot-staging/Chronicle/v1/src/V1/resources/data_table_service_rest_client_config.php create mode 100644 owl-bot-staging/Chronicle/v1/src/V1/resources/entity_service_client_config.json create mode 100644 owl-bot-staging/Chronicle/v1/src/V1/resources/entity_service_descriptor_config.php create mode 100644 owl-bot-staging/Chronicle/v1/src/V1/resources/entity_service_rest_client_config.php create mode 100644 owl-bot-staging/Chronicle/v1/src/V1/resources/instance_service_client_config.json create mode 100644 owl-bot-staging/Chronicle/v1/src/V1/resources/instance_service_descriptor_config.php create mode 100644 owl-bot-staging/Chronicle/v1/src/V1/resources/instance_service_rest_client_config.php create mode 100644 owl-bot-staging/Chronicle/v1/src/V1/resources/reference_list_service_client_config.json create mode 100644 owl-bot-staging/Chronicle/v1/src/V1/resources/reference_list_service_descriptor_config.php create mode 100644 owl-bot-staging/Chronicle/v1/src/V1/resources/reference_list_service_rest_client_config.php create mode 100644 owl-bot-staging/Chronicle/v1/src/V1/resources/rule_service_client_config.json create mode 100644 owl-bot-staging/Chronicle/v1/src/V1/resources/rule_service_descriptor_config.php create mode 100644 owl-bot-staging/Chronicle/v1/src/V1/resources/rule_service_rest_client_config.php create mode 100644 owl-bot-staging/Chronicle/v1/tests/Unit/V1/Client/DataAccessControlServiceClientTest.php create mode 100644 owl-bot-staging/Chronicle/v1/tests/Unit/V1/Client/DataTableServiceClientTest.php create mode 100644 owl-bot-staging/Chronicle/v1/tests/Unit/V1/Client/EntityServiceClientTest.php create mode 100644 owl-bot-staging/Chronicle/v1/tests/Unit/V1/Client/InstanceServiceClientTest.php create mode 100644 owl-bot-staging/Chronicle/v1/tests/Unit/V1/Client/ReferenceListServiceClientTest.php create mode 100644 owl-bot-staging/Chronicle/v1/tests/Unit/V1/Client/RuleServiceClientTest.php diff --git a/owl-bot-staging/Chronicle/v1/proto/src/GPBMetadata/Google/Cloud/Chronicle/V1/DataAccessControl.php b/owl-bot-staging/Chronicle/v1/proto/src/GPBMetadata/Google/Cloud/Chronicle/V1/DataAccessControl.php new file mode 100644 index 000000000000..211a4b8a9af5 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/GPBMetadata/Google/Cloud/Chronicle/V1/DataAccessControl.php @@ -0,0 +1,31 @@ +internalAddGeneratedFile( + "\x0A\xBA/\x0A3google/cloud/chronicle/v1/data_access_control.proto\x12\x19google.cloud.chronicle.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xCF\x01\x0A\x1CCreateDataAccessLabelRequest\x12@\x0A\x06parent\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x12(chronicle.googleapis.com/DataAccessLabel\x12J\x0A\x11data_access_label\x18\x02 \x01(\x0B2*.google.cloud.chronicle.v1.DataAccessLabelB\x03\xE0A\x02\x12!\x0A\x14data_access_label_id\x18\x03 \x01(\x09B\x03\xE0A\x02\"[\x0A\x19GetDataAccessLabelRequest\x12>\x0A\x04name\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x0A(chronicle.googleapis.com/DataAccessLabel\"\x9B\x01\x0A\x1BListDataAccessLabelsRequest\x12@\x0A\x06parent\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x12(chronicle.googleapis.com/DataAccessLabel\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12\x13\x0A\x06filter\x18\x04 \x01(\x09B\x03\xE0A\x01\"\x7F\x0A\x1CListDataAccessLabelsResponse\x12F\x0A\x12data_access_labels\x18\x01 \x03(\x0B2*.google.cloud.chronicle.v1.DataAccessLabel\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\x9B\x01\x0A\x1CUpdateDataAccessLabelRequest\x12J\x0A\x11data_access_label\x18\x01 \x01(\x0B2*.google.cloud.chronicle.v1.DataAccessLabelB\x03\xE0A\x02\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\"^\x0A\x1CDeleteDataAccessLabelRequest\x12>\x0A\x04name\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x0A(chronicle.googleapis.com/DataAccessLabel\"\xCF\x01\x0A\x1CCreateDataAccessScopeRequest\x12@\x0A\x06parent\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x12(chronicle.googleapis.com/DataAccessScope\x12J\x0A\x11data_access_scope\x18\x02 \x01(\x0B2*.google.cloud.chronicle.v1.DataAccessScopeB\x03\xE0A\x02\x12!\x0A\x14data_access_scope_id\x18\x03 \x01(\x09B\x03\xE0A\x02\"[\x0A\x19GetDataAccessScopeRequest\x12>\x0A\x04name\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x0A(chronicle.googleapis.com/DataAccessScope\"\x9B\x01\x0A\x1BListDataAccessScopesRequest\x12@\x0A\x06parent\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x12(chronicle.googleapis.com/DataAccessScope\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12\x13\x0A\x06filter\x18\x04 \x01(\x09B\x03\xE0A\x01\"\xD3\x01\x0A\x1CListDataAccessScopesResponse\x12F\x0A\x12data_access_scopes\x18\x01 \x03(\x0B2*.google.cloud.chronicle.v1.DataAccessScope\x12-\x0A global_data_access_scope_granted\x18\x03 \x01(\x08H\x00\x88\x01\x01\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09B#\x0A!_global_data_access_scope_granted\"\x9B\x01\x0A\x1CUpdateDataAccessScopeRequest\x12J\x0A\x11data_access_scope\x18\x01 \x01(\x0B2*.google.cloud.chronicle.v1.DataAccessScopeB\x03\xE0A\x02\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\"^\x0A\x1CDeleteDataAccessScopeRequest\x12>\x0A\x04name\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x0A(chronicle.googleapis.com/DataAccessScope\"\xD5\x03\x0A\x0FDataAccessLabel\x12\x13\x0A\x09udm_query\x18\x03 \x01(\x09H\x00\x12;\x0A\x04name\x18\x01 \x01(\x09B-\xFAA*\x0A(chronicle.googleapis.com/DataAccessLabel\x12\x19\x0A\x0Cdisplay_name\x18\x08 \x01(\x09B\x03\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x05 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x13\x0A\x06author\x18\x06 \x01(\x09B\x03\xE0A\x03\x12\x18\x0A\x0Blast_editor\x18\x07 \x01(\x09B\x03\xE0A\x03\x12\x18\x0A\x0Bdescription\x18\x02 \x01(\x09B\x03\xE0A\x01:\x91\x01\xEAA\x8D\x01\x0A(chronicle.googleapis.com/DataAccessLabel\x12aprojects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}B\x0C\x0A\x0Adefinition\"\x88\x05\x0A\x0FDataAccessScope\x12>\x0A\x04name\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x0A(chronicle.googleapis.com/DataAccessScope\x12\\\x0A\x1Aallowed_data_access_labels\x18\x02 \x03(\x0B23.google.cloud.chronicle.v1.DataAccessLabelReferenceB\x03\xE0A\x01\x12[\x0A\x19denied_data_access_labels\x18\x03 \x03(\x0B23.google.cloud.chronicle.v1.DataAccessLabelReferenceB\x03\xE0A\x01\x12\x19\x0A\x0Cdisplay_name\x18\x04 \x01(\x09B\x03\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x05 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x06 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x13\x0A\x06author\x18\x07 \x01(\x09B\x03\xE0A\x03\x12\x18\x0A\x0Blast_editor\x18\x08 \x01(\x09B\x03\xE0A\x03\x12\x18\x0A\x0Bdescription\x18\x09 \x01(\x09B\x03\xE0A\x01\x12\x16\x0A\x09allow_all\x18\x0A \x01(\x08B\x03\xE0A\x01:\x91\x01\xEAA\x8D\x01\x0A(chronicle.googleapis.com/DataAccessScope\x12aprojects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}\"\xD0\x01\x0A\x18DataAccessLabelReference\x12\x1B\x0A\x11data_access_label\x18\x01 \x01(\x09H\x00\x12\x12\x0A\x08log_type\x18\x02 \x01(\x09H\x00\x12\x19\x0A\x0Fasset_namespace\x18\x03 \x01(\x09H\x00\x12D\x0A\x0Fingestion_label\x18\x04 \x01(\x0B2).google.cloud.chronicle.v1.IngestionLabelH\x00\x12\x19\x0A\x0Cdisplay_name\x18\x05 \x01(\x09B\x03\xE0A\x03B\x07\x0A\x05label\"V\x0A\x0EIngestionLabel\x12 \x0A\x13ingestion_label_key\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\"\x0A\x15ingestion_label_value\x18\x02 \x01(\x09B\x03\xE0A\x012\xE6\x12\x0A\x18DataAccessControlService\x12\x8A\x02\x0A\x15CreateDataAccessLabel\x127.google.cloud.chronicle.v1.CreateDataAccessLabelRequest\x1A*.google.cloud.chronicle.v1.DataAccessLabel\"\x8B\x01\xDAA-parent,data_access_label,data_access_label_id\x82\xD3\xE4\x93\x02U\"@/v1/{parent=projects/*/locations/*/instances/*}/dataAccessLabels:\x11data_access_label\x12\xC7\x01\x0A\x12GetDataAccessLabel\x124.google.cloud.chronicle.v1.GetDataAccessLabelRequest\x1A*.google.cloud.chronicle.v1.DataAccessLabel\"O\xDAA\x04name\x82\xD3\xE4\x93\x02B\x12@/v1/{name=projects/*/locations/*/instances/*/dataAccessLabels/*}\x12\xDA\x01\x0A\x14ListDataAccessLabels\x126.google.cloud.chronicle.v1.ListDataAccessLabelsRequest\x1A7.google.cloud.chronicle.v1.ListDataAccessLabelsResponse\"Q\xDAA\x06parent\x82\xD3\xE4\x93\x02B\x12@/v1/{parent=projects/*/locations/*/instances/*}/dataAccessLabels\x12\x8C\x02\x0A\x15UpdateDataAccessLabel\x127.google.cloud.chronicle.v1.UpdateDataAccessLabelRequest\x1A*.google.cloud.chronicle.v1.DataAccessLabel\"\x8D\x01\xDAA\x1Ddata_access_label,update_mask\x82\xD3\xE4\x93\x02g2R/v1/{data_access_label.name=projects/*/locations/*/instances/*/dataAccessLabels/*}:\x11data_access_label\x12\xB9\x01\x0A\x15DeleteDataAccessLabel\x127.google.cloud.chronicle.v1.DeleteDataAccessLabelRequest\x1A\x16.google.protobuf.Empty\"O\xDAA\x04name\x82\xD3\xE4\x93\x02B*@/v1/{name=projects/*/locations/*/instances/*/dataAccessLabels/*}\x12\x8A\x02\x0A\x15CreateDataAccessScope\x127.google.cloud.chronicle.v1.CreateDataAccessScopeRequest\x1A*.google.cloud.chronicle.v1.DataAccessScope\"\x8B\x01\xDAA-parent,data_access_scope,data_access_scope_id\x82\xD3\xE4\x93\x02U\"@/v1/{parent=projects/*/locations/*/instances/*}/dataAccessScopes:\x11data_access_scope\x12\xC7\x01\x0A\x12GetDataAccessScope\x124.google.cloud.chronicle.v1.GetDataAccessScopeRequest\x1A*.google.cloud.chronicle.v1.DataAccessScope\"O\xDAA\x04name\x82\xD3\xE4\x93\x02B\x12@/v1/{name=projects/*/locations/*/instances/*/dataAccessScopes/*}\x12\xDA\x01\x0A\x14ListDataAccessScopes\x126.google.cloud.chronicle.v1.ListDataAccessScopesRequest\x1A7.google.cloud.chronicle.v1.ListDataAccessScopesResponse\"Q\xDAA\x06parent\x82\xD3\xE4\x93\x02B\x12@/v1/{parent=projects/*/locations/*/instances/*}/dataAccessScopes\x12\x8C\x02\x0A\x15UpdateDataAccessScope\x127.google.cloud.chronicle.v1.UpdateDataAccessScopeRequest\x1A*.google.cloud.chronicle.v1.DataAccessScope\"\x8D\x01\xDAA\x1Ddata_access_scope,update_mask\x82\xD3\xE4\x93\x02g2R/v1/{data_access_scope.name=projects/*/locations/*/instances/*/dataAccessScopes/*}:\x11data_access_scope\x12\xB9\x01\x0A\x15DeleteDataAccessScope\x127.google.cloud.chronicle.v1.DeleteDataAccessScopeRequest\x1A\x16.google.protobuf.Empty\"O\xDAA\x04name\x82\xD3\xE4\x93\x02B*@/v1/{name=projects/*/locations/*/instances/*/dataAccessScopes/*}\x1AL\xCAA\x18chronicle.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xC6\x01\x0A\x1Dcom.google.cloud.chronicle.v1B\x0FDataAccessProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xAA\x02\x19Google.Cloud.Chronicle.V1\xCA\x02\x19Google\\Cloud\\Chronicle\\V1\xEA\x02\x1CGoogle::Cloud::Chronicle::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/GPBMetadata/Google/Cloud/Chronicle/V1/DataTable.php b/owl-bot-staging/Chronicle/v1/proto/src/GPBMetadata/Google/Cloud/Chronicle/V1/DataTable.php new file mode 100644 index 000000000000..101c9111f097 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/GPBMetadata/Google/Cloud/Chronicle/V1/DataTable.php @@ -0,0 +1,32 @@ +internalAddGeneratedFile( + "\x0A\xF3E\x0A*google/cloud/chronicle/v1/data_table.proto\x12\x19google.cloud.chronicle.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x17google/rpc/status.proto\"\xAF\x01\x0A\x16CreateDataTableRequest\x12:\x0A\x06parent\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x12\"chronicle.googleapis.com/DataTable\x12=\x0A\x0Adata_table\x18\x02 \x01(\x0B2\$.google.cloud.chronicle.v1.DataTableB\x03\xE0A\x02\x12\x1A\x0A\x0Ddata_table_id\x18\x03 \x01(\x09B\x03\xE0A\x02\"O\x0A\x13GetDataTableRequest\x128\x0A\x04name\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x0A\"chronicle.googleapis.com/DataTable\"\x8D\x01\x0A\x16UpdateDataTableRequest\x12=\x0A\x0Adata_table\x18\x01 \x01(\x0B2\$.google.cloud.chronicle.v1.DataTableB\x03\xE0A\x02\x124\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\"\x9B\x01\x0A\x15ListDataTablesRequest\x12:\x0A\x06parent\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x12\"chronicle.googleapis.com/DataTable\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x08order_by\x18\x04 \x01(\x09B\x03\xE0A\x01\"f\x0A\x16DeleteDataTableRequest\x128\x0A\x04name\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x0A\"chronicle.googleapis.com/DataTable\x12\x12\x0A\x05force\x18\x02 \x01(\x08B\x03\xE0A\x01\"l\x0A\x16ListDataTablesResponse\x129\x0A\x0Bdata_tables\x18\x01 \x03(\x0B2\$.google.cloud.chronicle.v1.DataTable\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\xA0\x01\x0A\x19CreateDataTableRowRequest\x12=\x0A\x06parent\x18\x01 \x01(\x09B-\xE0A\x02\xFAA'\x12%chronicle.googleapis.com/DataTableRow\x12D\x0A\x0Edata_table_row\x18\x02 \x01(\x0B2'.google.cloud.chronicle.v1.DataTableRowB\x03\xE0A\x02\"\x97\x01\x0A\x19UpdateDataTableRowRequest\x12D\x0A\x0Edata_table_row\x18\x01 \x01(\x0B2'.google.cloud.chronicle.v1.DataTableRowB\x03\xE0A\x02\x124\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\"\xB6\x01\x0A\x18ListDataTableRowsRequest\x12=\x0A\x06parent\x18\x01 \x01(\x09B-\xE0A\x02\xFAA'\x12%chronicle.googleapis.com/DataTableRow\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x08order_by\x18\x04 \x01(\x09B\x03\xE0A\x01\x12\x13\x0A\x06filter\x18\x05 \x01(\x09B\x03\xE0A\x01\"{\x0A\x19ListDataTableRowsResponse\x12@\x0A\x0Fdata_table_rows\x18\x01 \x03(\x0B2'.google.cloud.chronicle.v1.DataTableRow\x12\x1C\x0A\x0Fnext_page_token\x18\x02 \x01(\x09B\x03\xE0A\x01\"U\x0A\x16GetDataTableRowRequest\x12;\x0A\x04name\x18\x01 \x01(\x09B-\xE0A\x02\xFAA'\x0A%chronicle.googleapis.com/DataTableRow\"X\x0A\x19DeleteDataTableRowRequest\x12;\x0A\x04name\x18\x01 \x01(\x09B-\xE0A\x02\xFAA'\x0A%chronicle.googleapis.com/DataTableRow\"\xAC\x01\x0A\x1EBulkCreateDataTableRowsRequest\x12=\x0A\x06parent\x18\x01 \x01(\x09B-\xE0A\x02\xFAA'\x12%chronicle.googleapis.com/DataTableRow\x12K\x0A\x08requests\x18\x02 \x03(\x0B24.google.cloud.chronicle.v1.CreateDataTableRowRequestB\x03\xE0A\x02\"c\x0A\x1FBulkCreateDataTableRowsResponse\x12@\x0A\x0Fdata_table_rows\x18\x01 \x03(\x0B2'.google.cloud.chronicle.v1.DataTableRow\"\xA6\x01\x0A\x1BBulkGetDataTableRowsRequest\x12=\x0A\x06parent\x18\x01 \x01(\x09B-\xE0A\x02\xFAA'\x12%chronicle.googleapis.com/DataTableRow\x12H\x0A\x08requests\x18\x02 \x03(\x0B21.google.cloud.chronicle.v1.GetDataTableRowRequestB\x03\xE0A\x02\"`\x0A\x1CBulkGetDataTableRowsResponse\x12@\x0A\x0Fdata_table_rows\x18\x01 \x03(\x0B2'.google.cloud.chronicle.v1.DataTableRow\"\xAD\x01\x0A\x1FBulkReplaceDataTableRowsRequest\x12=\x0A\x06parent\x18\x01 \x01(\x09B-\xE0A\x02\xFAA'\x12%chronicle.googleapis.com/DataTableRow\x12K\x0A\x08requests\x18\x02 \x03(\x0B24.google.cloud.chronicle.v1.CreateDataTableRowRequestB\x03\xE0A\x02\"d\x0A BulkReplaceDataTableRowsResponse\x12@\x0A\x0Fdata_table_rows\x18\x01 \x03(\x0B2'.google.cloud.chronicle.v1.DataTableRow\"\xAC\x01\x0A\x1EBulkUpdateDataTableRowsRequest\x12=\x0A\x06parent\x18\x01 \x01(\x09B-\xE0A\x02\xFAA'\x12%chronicle.googleapis.com/DataTableRow\x12K\x0A\x08requests\x18\x02 \x03(\x0B24.google.cloud.chronicle.v1.UpdateDataTableRowRequestB\x03\xE0A\x02\"c\x0A\x1FBulkUpdateDataTableRowsResponse\x12@\x0A\x0Fdata_table_rows\x18\x01 \x03(\x0B2'.google.cloud.chronicle.v1.DataTableRow\"b\x0A\x12DataTableScopeInfo\x12L\x0A\x12data_access_scopes\x18\x01 \x03(\x09B0\xE0A\x02\xFAA*\x0A(chronicle.googleapis.com/DataAccessScope\"\x99\x06\x0A\x09DataTable\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12\x19\x0A\x0Cdisplay_name\x18\x02 \x01(\x09B\x03\xE0A\x03\x12\x18\x0A\x0Bdescription\x18\x03 \x01(\x09B\x03\xE0A\x02\x124\x0A\x0Bcreate_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x05 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12H\x0A\x0Bcolumn_info\x18\x06 \x03(\x0B2..google.cloud.chronicle.v1.DataTableColumnInfoB\x03\xE0A\x05\x12\x1C\x0A\x0Fdata_table_uuid\x18\x07 \x01(\x09B\x03\xE0A\x03\x12\x12\x0A\x05rules\x18\x08 \x03(\x09B\x03\xE0A\x03\x12\$\x0A\x17rule_associations_count\x18\x09 \x01(\x05B\x03\xE0A\x03\x12\x1D\x0A\x10row_time_to_live\x18\x0A \x01(\x09B\x03\xE0A\x01\x12\"\x0A\x15approximate_row_count\x18\x0B \x01(\x03B\x03\xE0A\x03\x12F\x0A\x0Ascope_info\x18\x0C \x01(\x0B2-.google.cloud.chronicle.v1.DataTableScopeInfoB\x03\xE0A\x01\x12L\x0A\x0Dupdate_source\x18\x0D \x01(\x0E20.google.cloud.chronicle.v1.DataTableUpdateSourceB\x03\xE0A\x03\x12E\x0A\x1Crow_time_to_live_update_time\x18\x0E \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03:\x95\x01\xEAA\x91\x01\x0A\"chronicle.googleapis.com/DataTable\x12Tprojects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}*\x0AdataTables2\x09dataTable\"\x81\x03\x0A\x0CDataTableRow\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12\x13\x0A\x06values\x18\x02 \x03(\x09B\x03\xE0A\x02\x124\x0A\x0Bcreate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x1D\x0A\x10row_time_to_live\x18\x05 \x01(\x09B\x03\xE0A\x01:\xBD\x01\xEAA\xB9\x01\x0A%chronicle.googleapis.com/DataTableRow\x12sprojects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}/dataTableRows/{data_table_row}*\x0DdataTableRows2\x0CdataTableRow\"\xFA\x02\x0A\x13DataTableColumnInfo\x12\x1C\x0A\x12mapped_column_path\x18\x03 \x01(\x09H\x00\x12Y\x0A\x0Bcolumn_type\x18\x04 \x01(\x0E2B.google.cloud.chronicle.v1.DataTableColumnInfo.DataTableColumnTypeH\x00\x12\x19\x0A\x0Ccolumn_index\x18\x01 \x01(\x05B\x03\xE0A\x02\x12\x1C\x0A\x0Foriginal_column\x18\x02 \x01(\x09B\x03\xE0A\x02\x12\x17\x0A\x0Akey_column\x18\x05 \x01(\x08B\x03\xE0A\x01\x12\x1C\x0A\x0Frepeated_values\x18\x06 \x01(\x08B\x03\xE0A\x01\"j\x0A\x13DataTableColumnType\x12&\x0A\"DATA_TABLE_COLUMN_TYPE_UNSPECIFIED\x10\x00\x12\x0A\x0A\x06STRING\x10\x01\x12\x09\x0A\x05REGEX\x10\x02\x12\x08\x0A\x04CIDR\x10\x03\x12\x0A\x0A\x06NUMBER\x10\x04B\x0E\x0A\x0Cpath_or_type\"m\x0A\"GetDataTableOperationErrorsRequest\x12G\x0A\x04name\x18\x01 \x01(\x09B9\xE0A\x02\xFAA3\x0A1chronicle.googleapis.com/DataTableOperationErrors\"\xB8\x02\x0A\x18DataTableOperationErrors\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12&\x0A\x0Arpc_errors\x18\x03 \x03(\x0B2\x12.google.rpc.Status:\xE0\x01\xEAA\xDC\x01\x0A1chronicle.googleapis.com/DataTableOperationErrors\x12sprojects/{project}/locations/{location}/instances/{instance}/dataTableOperationErrors/{data_table_operation_errors}*\x18dataTableOperationErrors2\x18dataTableOperationErrors*a\x0A\x15DataTableUpdateSource\x12(\x0A\$DATA_TABLE_UPDATE_SOURCE_UNSPECIFIED\x10\x00\x12\x08\x0A\x04USER\x10\x01\x12\x08\x0A\x04RULE\x10\x02\x12\x0A\x0A\x06SEARCH\x10\x032\x89\x1C\x0A\x10DataTableService\x12\xDC\x01\x0A\x0FCreateDataTable\x121.google.cloud.chronicle.v1.CreateDataTableRequest\x1A\$.google.cloud.chronicle.v1.DataTable\"p\xDAA\x1Fparent,data_table,data_table_id\x82\xD3\xE4\x93\x02H\":/v1/{parent=projects/*/locations/*/instances/*}/dataTables:\x0Adata_table\x12\xC2\x01\x0A\x0EListDataTables\x120.google.cloud.chronicle.v1.ListDataTablesRequest\x1A1.google.cloud.chronicle.v1.ListDataTablesResponse\"K\xDAA\x06parent\x82\xD3\xE4\x93\x02<\x12:/v1/{parent=projects/*/locations/*/instances/*}/dataTables\x12\xAF\x01\x0A\x0CGetDataTable\x12..google.cloud.chronicle.v1.GetDataTableRequest\x1A\$.google.cloud.chronicle.v1.DataTable\"I\xDAA\x04name\x82\xD3\xE4\x93\x02<\x12:/v1/{name=projects/*/locations/*/instances/*/dataTables/*}\x12\xDE\x01\x0A\x0FUpdateDataTable\x121.google.cloud.chronicle.v1.UpdateDataTableRequest\x1A\$.google.cloud.chronicle.v1.DataTable\"r\xDAA\x16data_table,update_mask\x82\xD3\xE4\x93\x02S2E/v1/{data_table.name=projects/*/locations/*/instances/*/dataTables/*}:\x0Adata_table\x12\xAD\x01\x0A\x0FDeleteDataTable\x121.google.cloud.chronicle.v1.DeleteDataTableRequest\x1A\x16.google.protobuf.Empty\"O\xDAA\x0Aname,force\x82\xD3\xE4\x93\x02<*:/v1/{name=projects/*/locations/*/instances/*/dataTables/*}\x12\xEF\x01\x0A\x12CreateDataTableRow\x124.google.cloud.chronicle.v1.CreateDataTableRowRequest\x1A'.google.cloud.chronicle.v1.DataTableRow\"z\xDAA\x15parent,data_table_row\x82\xD3\xE4\x93\x02\\\"J/v1/{parent=projects/*/locations/*/instances/*/dataTables/*}/dataTableRows:\x0Edata_table_row\x12\x84\x02\x0A\x12UpdateDataTableRow\x124.google.cloud.chronicle.v1.UpdateDataTableRowRequest\x1A'.google.cloud.chronicle.v1.DataTableRow\"\x8E\x01\xDAA\x1Adata_table_row,update_mask\x82\xD3\xE4\x93\x02k2Y/v1/{data_table_row.name=projects/*/locations/*/instances/*/dataTables/*/dataTableRows/*}:\x0Edata_table_row\x12\xDB\x01\x0A\x11ListDataTableRows\x123.google.cloud.chronicle.v1.ListDataTableRowsRequest\x1A4.google.cloud.chronicle.v1.ListDataTableRowsResponse\"[\xDAA\x06parent\x82\xD3\xE4\x93\x02L\x12J/v1/{parent=projects/*/locations/*/instances/*/dataTables/*}/dataTableRows\x12\xC8\x01\x0A\x0FGetDataTableRow\x121.google.cloud.chronicle.v1.GetDataTableRowRequest\x1A'.google.cloud.chronicle.v1.DataTableRow\"Y\xDAA\x04name\x82\xD3\xE4\x93\x02L\x12J/v1/{name=projects/*/locations/*/instances/*/dataTables/*/dataTableRows/*}\x12\xBD\x01\x0A\x12DeleteDataTableRow\x124.google.cloud.chronicle.v1.DeleteDataTableRowRequest\x1A\x16.google.protobuf.Empty\"Y\xDAA\x04name\x82\xD3\xE4\x93\x02L*J/v1/{name=projects/*/locations/*/instances/*/dataTables/*/dataTableRows/*}\x12\x84\x02\x0A\x17BulkCreateDataTableRows\x129.google.cloud.chronicle.v1.BulkCreateDataTableRowsRequest\x1A:.google.cloud.chronicle.v1.BulkCreateDataTableRowsResponse\"r\xDAA\x0Fparent,requests\x82\xD3\xE4\x93\x02Z\"U/v1/{parent=projects/*/locations/*/instances/*/dataTables/*}/dataTableRows:bulkCreate:\x01*\x12\xF8\x01\x0A\x14BulkGetDataTableRows\x126.google.cloud.chronicle.v1.BulkGetDataTableRowsRequest\x1A7.google.cloud.chronicle.v1.BulkGetDataTableRowsResponse\"o\xDAA\x0Fparent,requests\x82\xD3\xE4\x93\x02W\"R/v1/{parent=projects/*/locations/*/instances/*/dataTables/*}/dataTableRows:bulkGet:\x01*\x12\x88\x02\x0A\x18BulkReplaceDataTableRows\x12:.google.cloud.chronicle.v1.BulkReplaceDataTableRowsRequest\x1A;.google.cloud.chronicle.v1.BulkReplaceDataTableRowsResponse\"s\xDAA\x0Fparent,requests\x82\xD3\xE4\x93\x02[\"V/v1/{parent=projects/*/locations/*/instances/*/dataTables/*}/dataTableRows:bulkReplace:\x01*\x12\x84\x02\x0A\x17BulkUpdateDataTableRows\x129.google.cloud.chronicle.v1.BulkUpdateDataTableRowsRequest\x1A:.google.cloud.chronicle.v1.BulkUpdateDataTableRowsResponse\"r\xDAA\x0Fparent,requests\x82\xD3\xE4\x93\x02Z\"U/v1/{parent=projects/*/locations/*/instances/*/dataTables/*}/dataTableRows:bulkUpdate:\x01*\x12\xEA\x01\x0A\x1BGetDataTableOperationErrors\x12=.google.cloud.chronicle.v1.GetDataTableOperationErrorsRequest\x1A3.google.cloud.chronicle.v1.DataTableOperationErrors\"W\xDAA\x04name\x82\xD3\xE4\x93\x02J\x12H/v1/{name=projects/*/locations/*/instances/*/dataTableOperationErrors/*}\x1A\xAA\x01\xCAA\x18chronicle.googleapis.com\xD2A\x8B\x01https://www.googleapis.com/auth/chronicle,https://www.googleapis.com/auth/chronicle.readonly,https://www.googleapis.com/auth/cloud-platformB\xC5\x01\x0A\x1Dcom.google.cloud.chronicle.v1B\x0EDataTableProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xAA\x02\x19Google.Cloud.Chronicle.V1\xCA\x02\x19Google\\Cloud\\Chronicle\\V1\xEA\x02\x1CGoogle::Cloud::Chronicle::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/GPBMetadata/Google/Cloud/Chronicle/V1/Entity.php b/owl-bot-staging/Chronicle/v1/proto/src/GPBMetadata/Google/Cloud/Chronicle/V1/Entity.php new file mode 100644 index 000000000000..45b8f91f3f08 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/GPBMetadata/Google/Cloud/Chronicle/V1/Entity.php @@ -0,0 +1,31 @@ +internalAddGeneratedFile( + "\x0A\x9A\x19\x0A&google/cloud/chronicle/v1/entity.proto\x12\x19google.cloud.chronicle.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xD5\x06\x0A\x09Watchlist\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12\x19\x0A\x0Cdisplay_name\x18\x02 \x01(\x09B\x03\xE0A\x02\x12\x18\x0A\x0Bdescription\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x1F\x0A\x12multiplying_factor\x18\x05 \x01(\x02B\x03\xE0A\x01\x12h\x0A\x1Bentity_population_mechanism\x18\x06 \x01(\x0B2>.google.cloud.chronicle.v1.Watchlist.EntityPopulationMechanismB\x03\xE0A\x02\x12K\x0A\x0Centity_count\x18\x07 \x01(\x0B20.google.cloud.chronicle.v1.Watchlist.EntityCountB\x03\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x08 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x09 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\\\x0A\x1Awatchlist_user_preferences\x18\x0A \x01(\x0B23.google.cloud.chronicle.v1.WatchlistUserPreferencesB\x03\xE0A\x01\x1A\x90\x01\x0A\x19EntityPopulationMechanism\x12\\\x0A\x06manual\x18\x01 \x01(\x0B2E.google.cloud.chronicle.v1.Watchlist.EntityPopulationMechanism.ManualB\x03\xE0A\x01H\x00\x1A\x08\x0A\x06ManualB\x0B\x0A\x09mechanism\x1A4\x0A\x0BEntityCount\x12\x11\x0A\x04user\x18\x01 \x01(\x05B\x03\xE0A\x03\x12\x12\x0A\x05asset\x18\x02 \x01(\x05B\x03\xE0A\x03:\x94\x01\xEAA\x90\x01\x0A\"chronicle.googleapis.com/Watchlist\x12Sprojects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}*\x0Awatchlists2\x09watchlist\"/\x0A\x18WatchlistUserPreferences\x12\x13\x0A\x06pinned\x18\x01 \x01(\x08B\x03\xE0A\x01\"O\x0A\x13GetWatchlistRequest\x128\x0A\x04name\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x0A\"chronicle.googleapis.com/Watchlist\"\x99\x01\x0A\x15ListWatchlistsRequest\x12:\x0A\x06parent\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x12\"chronicle.googleapis.com/Watchlist\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x13\x0A\x06filter\x18\x04 \x01(\x09B\x03\xE0A\x01\"u\x0A\x16ListWatchlistsResponse\x12=\x0A\x0Awatchlists\x18\x01 \x03(\x0B2\$.google.cloud.chronicle.v1.WatchlistB\x03\xE0A\x01\x12\x1C\x0A\x0Fnext_page_token\x18\x02 \x01(\x09B\x03\xE0A\x01\"\xAD\x01\x0A\x16CreateWatchlistRequest\x12:\x0A\x06parent\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x12\"chronicle.googleapis.com/Watchlist\x12\x19\x0A\x0Cwatchlist_id\x18\x02 \x01(\x09B\x03\xE0A\x01\x12<\x0A\x09watchlist\x18\x03 \x01(\x0B2\$.google.cloud.chronicle.v1.WatchlistB\x03\xE0A\x02\"\x8C\x01\x0A\x16UpdateWatchlistRequest\x12<\x0A\x09watchlist\x18\x01 \x01(\x0B2\$.google.cloud.chronicle.v1.WatchlistB\x03\xE0A\x02\x124\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\"f\x0A\x16DeleteWatchlistRequest\x128\x0A\x04name\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x0A\"chronicle.googleapis.com/Watchlist\x12\x12\x0A\x05force\x18\x02 \x01(\x08B\x03\xE0A\x012\xBE\x08\x0A\x0DEntityService\x12\xAF\x01\x0A\x0CGetWatchlist\x12..google.cloud.chronicle.v1.GetWatchlistRequest\x1A\$.google.cloud.chronicle.v1.Watchlist\"I\xDAA\x04name\x82\xD3\xE4\x93\x02<\x12:/v1/{name=projects/*/locations/*/instances/*/watchlists/*}\x12\xC2\x01\x0A\x0EListWatchlists\x120.google.cloud.chronicle.v1.ListWatchlistsRequest\x1A1.google.cloud.chronicle.v1.ListWatchlistsResponse\"K\xDAA\x06parent\x82\xD3\xE4\x93\x02<\x12:/v1/{parent=projects/*/locations/*/instances/*}/watchlists\x12\xD9\x01\x0A\x0FCreateWatchlist\x121.google.cloud.chronicle.v1.CreateWatchlistRequest\x1A\$.google.cloud.chronicle.v1.Watchlist\"m\xDAA\x1Dparent,watchlist,watchlist_id\x82\xD3\xE4\x93\x02G\":/v1/{parent=projects/*/locations/*/instances/*}/watchlists:\x09watchlist\x12\xDB\x01\x0A\x0FUpdateWatchlist\x121.google.cloud.chronicle.v1.UpdateWatchlistRequest\x1A\$.google.cloud.chronicle.v1.Watchlist\"o\xDAA\x15watchlist,update_mask\x82\xD3\xE4\x93\x02Q2D/v1/{watchlist.name=projects/*/locations/*/instances/*/watchlists/*}:\x09watchlist\x12\xAD\x01\x0A\x0FDeleteWatchlist\x121.google.cloud.chronicle.v1.DeleteWatchlistRequest\x1A\x16.google.protobuf.Empty\"O\xDAA\x0Aname,force\x82\xD3\xE4\x93\x02<*:/v1/{name=projects/*/locations/*/instances/*/watchlists/*}\x1AL\xCAA\x18chronicle.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xC2\x01\x0A\x1Dcom.google.cloud.chronicle.v1B\x0BEntityProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xAA\x02\x19Google.Cloud.Chronicle.V1\xCA\x02\x19Google\\Cloud\\Chronicle\\V1\xEA\x02\x1CGoogle::Cloud::Chronicle::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/GPBMetadata/Google/Cloud/Chronicle/V1/Instance.php b/owl-bot-staging/Chronicle/v1/proto/src/GPBMetadata/Google/Cloud/Chronicle/V1/Instance.php new file mode 100644 index 000000000000..35968a37f5c2 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/GPBMetadata/Google/Cloud/Chronicle/V1/Instance.php @@ -0,0 +1,28 @@ +internalAddGeneratedFile( + "\x0A\xD7\x06\x0A(google/cloud/chronicle/v1/instance.proto\x12\x19google.cloud.chronicle.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\"\x98\x01\x0A\x08Instance\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08:y\xEAAv\x0A!chronicle.googleapis.com/Instance\x12internalAddGeneratedFile( + "\x0A\xFF\x19\x0A.google/cloud/chronicle/v1/reference_list.proto\x12\x19google.cloud.chronicle.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"]\x0A\x09ScopeInfo\x12P\x0A\x14reference_list_scope\x18\x02 \x01(\x0B2-.google.cloud.chronicle.v1.ReferenceListScopeB\x03\xE0A\x02\".\x0A\x12ReferenceListScope\x12\x18\x0A\x0Bscope_names\x18\x01 \x03(\x09B\x03\xE0A\x01\"\x93\x01\x0A\x17GetReferenceListRequest\x12<\x0A\x04name\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&chronicle.googleapis.com/ReferenceList\x12:\x0A\x04view\x18\x02 \x01(\x0E2,.google.cloud.chronicle.v1.ReferenceListView\"\xBE\x01\x0A\x19ListReferenceListsRequest\x12>\x0A\x06parent\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x12&chronicle.googleapis.com/ReferenceList\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12:\x0A\x04view\x18\x04 \x01(\x0E2,.google.cloud.chronicle.v1.ReferenceListView\"x\x0A\x1AListReferenceListsResponse\x12A\x0A\x0Freference_lists\x18\x01 \x03(\x0B2(.google.cloud.chronicle.v1.ReferenceList\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\xC3\x01\x0A\x1ACreateReferenceListRequest\x12>\x0A\x06parent\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x12&chronicle.googleapis.com/ReferenceList\x12E\x0A\x0Ereference_list\x18\x02 \x01(\x0B2(.google.cloud.chronicle.v1.ReferenceListB\x03\xE0A\x02\x12\x1E\x0A\x11reference_list_id\x18\x03 \x01(\x09B\x03\xE0A\x02\"\x94\x01\x0A\x1AUpdateReferenceListRequest\x12E\x0A\x0Ereference_list\x18\x01 \x01(\x0B2(.google.cloud.chronicle.v1.ReferenceListB\x03\xE0A\x02\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\"\xAA\x04\x0A\x0DReferenceList\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12\x19\x0A\x0Cdisplay_name\x18\x02 \x01(\x09B\x03\xE0A\x03\x12=\x0A\x14revision_create_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x18\x0A\x0Bdescription\x18\x04 \x01(\x09B\x03\xE0A\x02\x12C\x0A\x07entries\x18\x05 \x03(\x0B2-.google.cloud.chronicle.v1.ReferenceListEntryB\x03\xE0A\x02\x12\x12\x0A\x05rules\x18\x06 \x03(\x09B\x03\xE0A\x03\x12L\x0A\x0Bsyntax_type\x18\x08 \x01(\x0E22.google.cloud.chronicle.v1.ReferenceListSyntaxTypeB\x03\xE0A\x02\x12\$\x0A\x17rule_associations_count\x18\x09 \x01(\x05B\x03\xE0A\x03\x128\x0A\x0Ascope_info\x18\x0B \x01(\x0B2\$.google.cloud.chronicle.v1.ScopeInfo:\x8A\x01\xEAA\x86\x01\x0A&chronicle.googleapis.com/ReferenceList\x12\\projects/{project}/locations/{location}/instances/{instance}/referenceLists/{reference_list}\"(\x0A\x12ReferenceListEntry\x12\x12\x0A\x05value\x18\x01 \x01(\x09B\x03\xE0A\x02*\xC2\x01\x0A\x17ReferenceListSyntaxType\x12*\x0A&REFERENCE_LIST_SYNTAX_TYPE_UNSPECIFIED\x10\x00\x120\x0A,REFERENCE_LIST_SYNTAX_TYPE_PLAIN_TEXT_STRING\x10\x01\x12\$\x0A REFERENCE_LIST_SYNTAX_TYPE_REGEX\x10\x02\x12#\x0A\x1FREFERENCE_LIST_SYNTAX_TYPE_CIDR\x10\x03*u\x0A\x11ReferenceListView\x12#\x0A\x1FREFERENCE_LIST_VIEW_UNSPECIFIED\x10\x00\x12\x1D\x0A\x19REFERENCE_LIST_VIEW_BASIC\x10\x01\x12\x1C\x0A\x18REFERENCE_LIST_VIEW_FULL\x10\x022\xF5\x07\x0A\x14ReferenceListService\x12\xBF\x01\x0A\x10GetReferenceList\x122.google.cloud.chronicle.v1.GetReferenceListRequest\x1A(.google.cloud.chronicle.v1.ReferenceList\"M\xDAA\x04name\x82\xD3\xE4\x93\x02@\x12>/v1/{name=projects/*/locations/*/instances/*/referenceLists/*}\x12\xD2\x01\x0A\x12ListReferenceLists\x124.google.cloud.chronicle.v1.ListReferenceListsRequest\x1A5.google.cloud.chronicle.v1.ListReferenceListsResponse\"O\xDAA\x06parent\x82\xD3\xE4\x93\x02@\x12>/v1/{parent=projects/*/locations/*/instances/*}/referenceLists\x12\xF9\x01\x0A\x13CreateReferenceList\x125.google.cloud.chronicle.v1.CreateReferenceListRequest\x1A(.google.cloud.chronicle.v1.ReferenceList\"\x80\x01\xDAA'parent,reference_list,reference_list_id\x82\xD3\xE4\x93\x02P\">/v1/{parent=projects/*/locations/*/instances/*}/referenceLists:\x0Ereference_list\x12\xFB\x01\x0A\x13UpdateReferenceList\x125.google.cloud.chronicle.v1.UpdateReferenceListRequest\x1A(.google.cloud.chronicle.v1.ReferenceList\"\x82\x01\xDAA\x1Areference_list,update_mask\x82\xD3\xE4\x93\x02_2M/v1/{reference_list.name=projects/*/locations/*/instances/*/referenceLists/*}:\x0Ereference_list\x1AL\xCAA\x18chronicle.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xC9\x01\x0A\x1Dcom.google.cloud.chronicle.v1B\x12ReferenceListProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xAA\x02\x19Google.Cloud.Chronicle.V1\xCA\x02\x19Google\\Cloud\\Chronicle\\V1\xEA\x02\x1CGoogle::Cloud::Chronicle::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/GPBMetadata/Google/Cloud/Chronicle/V1/Rule.php b/owl-bot-staging/Chronicle/v1/proto/src/GPBMetadata/Google/Cloud/Chronicle/V1/Rule.php new file mode 100644 index 000000000000..752c16da4d3a --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/GPBMetadata/Google/Cloud/Chronicle/V1/Rule.php @@ -0,0 +1,33 @@ +internalAddGeneratedFile( + "\x0A\xE2@\x0A\$google/cloud/chronicle/v1/rule.proto\x12\x19google.cloud.chronicle.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A#google/longrunning/operations.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x1Agoogle/type/interval.proto\"\x91\x09\x0A\x04Rule\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12\x18\x0A\x0Brevision_id\x18\x02 \x01(\x09B\x03\xE0A\x03\x12\x19\x0A\x0Cdisplay_name\x18\x03 \x01(\x09B\x03\xE0A\x03\x12\x0C\x0A\x04text\x18\x04 \x01(\x09\x12\x13\x0A\x06author\x18\x05 \x01(\x09B\x03\xE0A\x03\x12:\x0A\x08severity\x18\x06 \x01(\x0B2#.google.cloud.chronicle.v1.SeverityB\x03\xE0A\x03\x12D\x0A\x08metadata\x18\x07 \x03(\x0B2-.google.cloud.chronicle.v1.Rule.MetadataEntryB\x03\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x08 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12=\x0A\x14revision_create_time\x18\x09 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12P\x0A\x11compilation_state\x18\x0A \x01(\x0E20.google.cloud.chronicle.v1.Rule.CompilationStateB\x03\xE0A\x03\x126\x0A\x04type\x18\x0C \x01(\x0E2#.google.cloud.chronicle.v1.RuleTypeB\x03\xE0A\x03\x12G\x0A\x0Freference_lists\x18\x0D \x03(\x09B.\xE0A\x03\xFAA(\x0A&chronicle.googleapis.com/ReferenceList\x12M\x0A\x17allowed_run_frequencies\x18\x0E \x03(\x0E2'.google.cloud.chronicle.v1.RunFrequencyB\x03\xE0A\x03\x12\x0C\x0A\x04etag\x18\x0F \x01(\x09\x12<\x0A\x05scope\x18\x10 \x01(\x09B-\xFAA*\x0A(chronicle.googleapis.com/DataAccessScope\x12V\x0A\x17compilation_diagnostics\x18\x11 \x03(\x0B20.google.cloud.chronicle.v1.CompilationDiagnosticB\x03\xE0A\x03\x12.\x0A!near_real_time_live_rule_eligible\x18\x12 \x01(\x08B\x03\xE0A\x03\x12?\x0A\x0Binputs_used\x18\x14 \x01(\x0B2%.google.cloud.chronicle.v1.InputsUsedB\x03\xE0A\x03\x1A/\x0A\x0DMetadataEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"P\x0A\x10CompilationState\x12!\x0A\x1DCOMPILATION_STATE_UNSPECIFIED\x10\x00\x12\x0D\x0A\x09SUCCEEDED\x10\x01\x12\x0A\x0A\x06FAILED\x10\x02:m\xEAAj\x0A\x1Dchronicle.googleapis.com/Rule\x12Iprojects/{project}/locations/{location}/instances/{instance}/rules/{rule}\"\xCB\x05\x0A\x0ERuleDeployment\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x0F\x0A\x07enabled\x18\x02 \x01(\x08\x12\x10\x0A\x08alerting\x18\x03 \x01(\x08\x12\x10\x0A\x08archived\x18\x04 \x01(\x08\x125\x0A\x0Carchive_time\x18\x05 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12>\x0A\x0Drun_frequency\x18\x06 \x01(\x0E2'.google.cloud.chronicle.v1.RunFrequency\x12V\x0A\x0Fexecution_state\x18\x07 \x01(\x0E28.google.cloud.chronicle.v1.RuleDeployment.ExecutionStateB\x03\xE0A\x03\x12=\x0A\x0Eproducer_rules\x18\x08 \x03(\x09B%\xE0A\x03\xFAA\x1F\x12\x1Dchronicle.googleapis.com/Rule\x12=\x0A\x0Econsumer_rules\x18\x09 \x03(\x09B%\xE0A\x03\xFAA\x1F\x12\x1Dchronicle.googleapis.com/Rule\x12F\x0A\x1Dlast_alert_status_change_time\x18\x0A \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\"W\x0A\x0EExecutionState\x12\x1F\x0A\x1BEXECUTION_STATE_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07DEFAULT\x10\x01\x12\x0B\x0A\x07LIMITED\x10\x02\x12\x0A\x0A\x06PAUSED\x10\x03:\x82\x01\xEAA\x7F\x0A'chronicle.googleapis.com/RuleDeployment\x12Tprojects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment\"\xC8\x03\x0A\x09Retrohunt\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x124\x0A\x10process_interval\x18\x02 \x01(\x0B2\x15.google.type.IntervalB\x03\xE0A\x02\x126\x0A\x12execution_interval\x18\x03 \x01(\x0B2\x15.google.type.IntervalB\x03\xE0A\x03\x12>\x0A\x05state\x18\x04 \x01(\x0E2*.google.cloud.chronicle.v1.Retrohunt.StateB\x03\xE0A\x03\x12 \x0A\x13progress_percentage\x18\x05 \x01(\x02B\x03\xE0A\x03\"P\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07RUNNING\x10\x01\x12\x08\x0A\x04DONE\x10\x02\x12\x0D\x0A\x09CANCELLED\x10\x03\x12\x0A\x0A\x06FAILED\x10\x04:\x8A\x01\xEAA\x86\x01\x0A\"chronicle.googleapis.com/Retrohunt\x12`projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}\"~\x0A\x11CreateRuleRequest\x125\x0A\x06parent\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x12\x1Dchronicle.googleapis.com/Rule\x122\x0A\x04rule\x18\x02 \x01(\x0B2\x1F.google.cloud.chronicle.v1.RuleB\x03\xE0A\x02\"x\x0A\x0EGetRuleRequest\x123\x0A\x04name\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dchronicle.googleapis.com/Rule\x121\x0A\x04view\x18\x02 \x01(\x0E2#.google.cloud.chronicle.v1.RuleView\"\xB3\x01\x0A\x10ListRulesRequest\x125\x0A\x06parent\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x12\x1Dchronicle.googleapis.com/Rule\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x121\x0A\x04view\x18\x04 \x01(\x0E2#.google.cloud.chronicle.v1.RuleView\x12\x0E\x0A\x06filter\x18\x05 \x01(\x09\"\\\x0A\x11ListRulesResponse\x12.\x0A\x05rules\x18\x01 \x03(\x0B2\x1F.google.cloud.chronicle.v1.Rule\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"x\x0A\x11UpdateRuleRequest\x122\x0A\x04rule\x18\x01 \x01(\x0B2\x1F.google.cloud.chronicle.v1.RuleB\x03\xE0A\x02\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\"\\\x0A\x11DeleteRuleRequest\x123\x0A\x04name\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dchronicle.googleapis.com/Rule\x12\x12\x0A\x05force\x18\x02 \x01(\x08B\x03\xE0A\x01\"\xA9\x01\x0A\x18ListRuleRevisionsRequest\x123\x0A\x04name\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dchronicle.googleapis.com/Rule\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x121\x0A\x04view\x18\x04 \x01(\x0E2#.google.cloud.chronicle.v1.RuleView\"d\x0A\x19ListRuleRevisionsResponse\x12.\x0A\x05rules\x18\x01 \x03(\x0B2\x1F.google.cloud.chronicle.v1.Rule\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\x92\x01\x0A\x16CreateRetrohuntRequest\x12:\x0A\x06parent\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x12\"chronicle.googleapis.com/Retrohunt\x12<\x0A\x09retrohunt\x18\x02 \x01(\x0B2\$.google.cloud.chronicle.v1.RetrohuntB\x03\xE0A\x02\"O\x0A\x13GetRetrohuntRequest\x128\x0A\x04name\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x0A\"chronicle.googleapis.com/Retrohunt\"\x8A\x01\x0A\x15ListRetrohuntsRequest\x12:\x0A\x06parent\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x12\"chronicle.googleapis.com/Retrohunt\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12\x0E\x0A\x06filter\x18\x04 \x01(\x09\"k\x0A\x16ListRetrohuntsResponse\x128\x0A\x0Aretrohunts\x18\x01 \x03(\x0B2\$.google.cloud.chronicle.v1.Retrohunt\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"Y\x0A\x18GetRuleDeploymentRequest\x12=\x0A\x04name\x18\x01 \x01(\x09B/\xE0A\x02\xFAA)\x0A'chronicle.googleapis.com/RuleDeployment\"\x94\x01\x0A\x1AListRuleDeploymentsRequest\x12?\x0A\x06parent\x18\x01 \x01(\x09B/\xE0A\x02\xFAA)\x12'chronicle.googleapis.com/RuleDeployment\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12\x0E\x0A\x06filter\x18\x04 \x01(\x09\"{\x0A\x1BListRuleDeploymentsResponse\x12C\x0A\x10rule_deployments\x18\x01 \x03(\x0B2).google.cloud.chronicle.v1.RuleDeployment\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\x9C\x01\x0A\x1BUpdateRuleDeploymentRequest\x12G\x0A\x0Frule_deployment\x18\x01 \x01(\x0B2).google.cloud.chronicle.v1.RuleDeploymentB\x03\xE0A\x02\x124\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x02\"y\x0A\x13CompilationPosition\x12\x17\x0A\x0Astart_line\x18\x01 \x01(\x05B\x03\xE0A\x03\x12\x19\x0A\x0Cstart_column\x18\x02 \x01(\x05B\x03\xE0A\x03\x12\x15\x0A\x08end_line\x18\x03 \x01(\x05B\x03\xE0A\x03\x12\x17\x0A\x0Aend_column\x18\x04 \x01(\x05B\x03\xE0A\x03\"\x96\x02\x0A\x15CompilationDiagnostic\x12\x14\x0A\x07message\x18\x01 \x01(\x09B\x03\xE0A\x03\x12E\x0A\x08position\x18\x02 \x01(\x0B2..google.cloud.chronicle.v1.CompilationPositionB\x03\xE0A\x03\x12P\x0A\x08severity\x18\x03 \x01(\x0E29.google.cloud.chronicle.v1.CompilationDiagnostic.SeverityB\x03\xE0A\x03\x12\x10\x0A\x03uri\x18\x05 \x01(\x09B\x03\xE0A\x03\"<\x0A\x08Severity\x12\x18\x0A\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07WARNING\x10\x01\x12\x09\x0A\x05ERROR\x10\x02\" \x0A\x08Severity\x12\x14\x0A\x0Cdisplay_name\x18\x01 \x01(\x09\"\x9A\x01\x0A\x11RetrohuntMetadata\x125\x0A\x09retrohunt\x18\x01 \x01(\x09B\"\xFAA\x1F\x0A\x1Dchronicle.googleapis.com/Rule\x121\x0A\x12execution_interval\x18\x02 \x01(\x0B2\x15.google.type.Interval\x12\x1B\x0A\x13progress_percentage\x18\x03 \x01(\x02\"Z\x0A\x0AInputsUsed\x12\x15\x0A\x08uses_udm\x18\x01 \x01(\x08B\x03\xE0A\x01\x12\x18\x0A\x0Buses_entity\x18\x02 \x01(\x08B\x03\xE0A\x01\x12\x1B\x0A\x0Euses_detection\x18\x03 \x01(\x08B\x03\xE0A\x01*N\x0A\x0CRunFrequency\x12\x1D\x0A\x19RUN_FREQUENCY_UNSPECIFIED\x10\x00\x12\x08\x0A\x04LIVE\x10\x01\x12\x0A\x0A\x06HOURLY\x10\x02\x12\x09\x0A\x05DAILY\x10\x03*H\x0A\x08RuleType\x12\x19\x0A\x15RULE_TYPE_UNSPECIFIED\x10\x00\x12\x10\x0A\x0CSINGLE_EVENT\x10\x01\x12\x0F\x0A\x0BMULTI_EVENT\x10\x02*V\x0A\x08RuleView\x12\x19\x0A\x15RULE_VIEW_UNSPECIFIED\x10\x00\x12\x09\x0A\x05BASIC\x10\x01\x12\x08\x0A\x04FULL\x10\x02\x12\x1A\x0A\x16REVISION_METADATA_ONLY\x10\x032\xA9\x13\x0A\x0BRuleService\x12\xAE\x01\x0A\x0ACreateRule\x12,.google.cloud.chronicle.v1.CreateRuleRequest\x1A\x1F.google.cloud.chronicle.v1.Rule\"Q\xDAA\x0Bparent,rule\x82\xD3\xE4\x93\x02=\"5/v1/{parent=projects/*/locations/*/instances/*}/rules:\x04rule\x12\x9B\x01\x0A\x07GetRule\x12).google.cloud.chronicle.v1.GetRuleRequest\x1A\x1F.google.cloud.chronicle.v1.Rule\"D\xDAA\x04name\x82\xD3\xE4\x93\x027\x125/v1/{name=projects/*/locations/*/instances/*/rules/*}\x12\xAE\x01\x0A\x09ListRules\x12+.google.cloud.chronicle.v1.ListRulesRequest\x1A,.google.cloud.chronicle.v1.ListRulesResponse\"F\xDAA\x06parent\x82\xD3\xE4\x93\x027\x125/v1/{parent=projects/*/locations/*/instances/*}/rules\x12\xB8\x01\x0A\x0AUpdateRule\x12,.google.cloud.chronicle.v1.UpdateRuleRequest\x1A\x1F.google.cloud.chronicle.v1.Rule\"[\xDAA\x10rule,update_mask\x82\xD3\xE4\x93\x02B2:/v1/{rule.name=projects/*/locations/*/instances/*/rules/*}:\x04rule\x12\x98\x01\x0A\x0ADeleteRule\x12,.google.cloud.chronicle.v1.DeleteRuleRequest\x1A\x16.google.protobuf.Empty\"D\xDAA\x04name\x82\xD3\xE4\x93\x027*5/v1/{name=projects/*/locations/*/instances/*/rules/*}\x12\xD2\x01\x0A\x11ListRuleRevisions\x123.google.cloud.chronicle.v1.ListRuleRevisionsRequest\x1A4.google.cloud.chronicle.v1.ListRuleRevisionsResponse\"R\xDAA\x04name\x82\xD3\xE4\x93\x02E\x12C/v1/{name=projects/*/locations/*/instances/*/rules/*}:listRevisions\x12\xEF\x01\x0A\x0FCreateRetrohunt\x121.google.cloud.chronicle.v1.CreateRetrohuntRequest\x1A\x1D.google.longrunning.Operation\"\x89\x01\xCAA\x1E\x0A\x09Retrohunt\x12\x11RetrohuntMetadata\xDAA\x10parent,retrohunt\x82\xD3\xE4\x93\x02O\"B/v1/{parent=projects/*/locations/*/instances/*/rules/*}/retrohunts:\x09retrohunt\x12\xB7\x01\x0A\x0CGetRetrohunt\x12..google.cloud.chronicle.v1.GetRetrohuntRequest\x1A\$.google.cloud.chronicle.v1.Retrohunt\"Q\xDAA\x04name\x82\xD3\xE4\x93\x02D\x12B/v1/{name=projects/*/locations/*/instances/*/rules/*/retrohunts/*}\x12\xCA\x01\x0A\x0EListRetrohunts\x120.google.cloud.chronicle.v1.ListRetrohuntsRequest\x1A1.google.cloud.chronicle.v1.ListRetrohuntsResponse\"S\xDAA\x06parent\x82\xD3\xE4\x93\x02D\x12B/v1/{parent=projects/*/locations/*/instances/*/rules/*}/retrohunts\x12\xC4\x01\x0A\x11GetRuleDeployment\x123.google.cloud.chronicle.v1.GetRuleDeploymentRequest\x1A).google.cloud.chronicle.v1.RuleDeployment\"O\xDAA\x04name\x82\xD3\xE4\x93\x02B\x12@/v1/{name=projects/*/locations/*/instances/*/rules/*/deployment}\x12\xDA\x01\x0A\x13ListRuleDeployments\x125.google.cloud.chronicle.v1.ListRuleDeploymentsRequest\x1A6.google.cloud.chronicle.v1.ListRuleDeploymentsResponse\"T\xDAA\x06parent\x82\xD3\xE4\x93\x02E\x12C/v1/{parent=projects/*/locations/*/instances/*/rules/*}/deployments\x12\x83\x02\x0A\x14UpdateRuleDeployment\x126.google.cloud.chronicle.v1.UpdateRuleDeploymentRequest\x1A).google.cloud.chronicle.v1.RuleDeployment\"\x87\x01\xDAA\x1Brule_deployment,update_mask\x82\xD3\xE4\x93\x02c2P/v1/{rule_deployment.name=projects/*/locations/*/instances/*/rules/*/deployment}:\x0Frule_deployment\x1AL\xCAA\x18chronicle.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xC0\x01\x0A\x1Dcom.google.cloud.chronicle.v1B\x09RuleProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xAA\x02\x19Google.Cloud.Chronicle.V1\xCA\x02\x19Google\\Cloud\\Chronicle\\V1\xEA\x02\x1CGoogle::Cloud::Chronicle::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/BulkCreateDataTableRowsRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/BulkCreateDataTableRowsRequest.php new file mode 100644 index 000000000000..dac0cbb7ab42 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/BulkCreateDataTableRowsRequest.php @@ -0,0 +1,137 @@ +google.cloud.chronicle.v1.BulkCreateDataTableRowsRequest + */ +class BulkCreateDataTableRowsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource id of the data table. + * Format: + * /projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Data table rows to create. A maximum of 1000 rows (for sync + * requests) or 2000 rows (for async requests) can be created in a single + * request. Total size of the rows should be less than 4MB. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.CreateDataTableRowRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $requests; + + /** + * @param string $parent Required. The resource id of the data table. + * Format: + * /projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table} + * Please see {@see DataTableServiceClient::dataTableName()} for help formatting this field. + * @param \Google\Cloud\Chronicle\V1\CreateDataTableRowRequest[] $requests Required. Data table rows to create. A maximum of 1000 rows (for sync + * requests) or 2000 rows (for async requests) can be created in a single + * request. Total size of the rows should be less than 4MB. + * + * @return \Google\Cloud\Chronicle\V1\BulkCreateDataTableRowsRequest + * + * @experimental + */ + public static function build(string $parent, array $requests): self + { + return (new self()) + ->setParent($parent) + ->setRequests($requests); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource id of the data table. + * Format: + * /projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table} + * @type \Google\Cloud\Chronicle\V1\CreateDataTableRowRequest[] $requests + * Required. Data table rows to create. A maximum of 1000 rows (for sync + * requests) or 2000 rows (for async requests) can be created in a single + * request. Total size of the rows should be less than 4MB. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DataTable::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource id of the data table. + * Format: + * /projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table} + * + * 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 resource id of the data table. + * Format: + * /projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table} + * + * 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. Data table rows to create. A maximum of 1000 rows (for sync + * requests) or 2000 rows (for async requests) can be created in a single + * request. Total size of the rows should be less than 4MB. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.CreateDataTableRowRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return RepeatedField<\Google\Cloud\Chronicle\V1\CreateDataTableRowRequest> + */ + public function getRequests() + { + return $this->requests; + } + + /** + * Required. Data table rows to create. A maximum of 1000 rows (for sync + * requests) or 2000 rows (for async requests) can be created in a single + * request. Total size of the rows should be less than 4MB. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.CreateDataTableRowRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Chronicle\V1\CreateDataTableRowRequest[] $var + * @return $this + */ + public function setRequests($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\CreateDataTableRowRequest::class); + $this->requests = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/BulkCreateDataTableRowsResponse.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/BulkCreateDataTableRowsResponse.php new file mode 100644 index 000000000000..ec0e78d92832 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/BulkCreateDataTableRowsResponse.php @@ -0,0 +1,67 @@ +google.cloud.chronicle.v1.BulkCreateDataTableRowsResponse + */ +class BulkCreateDataTableRowsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * DataTableRows created + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DataTableRow data_table_rows = 1; + */ + private $data_table_rows; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Chronicle\V1\DataTableRow[] $data_table_rows + * DataTableRows created + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DataTable::initOnce(); + parent::__construct($data); + } + + /** + * DataTableRows created + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DataTableRow data_table_rows = 1; + * @return RepeatedField<\Google\Cloud\Chronicle\V1\DataTableRow> + */ + public function getDataTableRows() + { + return $this->data_table_rows; + } + + /** + * DataTableRows created + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DataTableRow data_table_rows = 1; + * @param \Google\Cloud\Chronicle\V1\DataTableRow[] $var + * @return $this + */ + public function setDataTableRows($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\DataTableRow::class); + $this->data_table_rows = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/BulkGetDataTableRowsRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/BulkGetDataTableRowsRequest.php new file mode 100644 index 000000000000..6c824543b91b --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/BulkGetDataTableRowsRequest.php @@ -0,0 +1,132 @@ +google.cloud.chronicle.v1.BulkGetDataTableRowsRequest + */ +class BulkGetDataTableRowsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource id of the data table. + * Format: + * /projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Data table rows to get. At max 1,000 rows can be there in a + * request. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.GetDataTableRowRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $requests; + + /** + * @param string $parent Required. The resource id of the data table. + * Format: + * /projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table} + * Please see {@see DataTableServiceClient::dataTableName()} for help formatting this field. + * @param \Google\Cloud\Chronicle\V1\GetDataTableRowRequest[] $requests Required. Data table rows to get. At max 1,000 rows can be there in a + * request. + * + * @return \Google\Cloud\Chronicle\V1\BulkGetDataTableRowsRequest + * + * @experimental + */ + public static function build(string $parent, array $requests): self + { + return (new self()) + ->setParent($parent) + ->setRequests($requests); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource id of the data table. + * Format: + * /projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table} + * @type \Google\Cloud\Chronicle\V1\GetDataTableRowRequest[] $requests + * Required. Data table rows to get. At max 1,000 rows can be there in a + * request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DataTable::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource id of the data table. + * Format: + * /projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table} + * + * 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 resource id of the data table. + * Format: + * /projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table} + * + * 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. Data table rows to get. At max 1,000 rows can be there in a + * request. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.GetDataTableRowRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return RepeatedField<\Google\Cloud\Chronicle\V1\GetDataTableRowRequest> + */ + public function getRequests() + { + return $this->requests; + } + + /** + * Required. Data table rows to get. At max 1,000 rows can be there in a + * request. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.GetDataTableRowRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Chronicle\V1\GetDataTableRowRequest[] $var + * @return $this + */ + public function setRequests($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\GetDataTableRowRequest::class); + $this->requests = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/BulkGetDataTableRowsResponse.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/BulkGetDataTableRowsResponse.php new file mode 100644 index 000000000000..b4bc937ab8bb --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/BulkGetDataTableRowsResponse.php @@ -0,0 +1,67 @@ +google.cloud.chronicle.v1.BulkGetDataTableRowsResponse + */ +class BulkGetDataTableRowsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The requested data table rows. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DataTableRow data_table_rows = 1; + */ + private $data_table_rows; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Chronicle\V1\DataTableRow[] $data_table_rows + * The requested data table rows. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DataTable::initOnce(); + parent::__construct($data); + } + + /** + * The requested data table rows. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DataTableRow data_table_rows = 1; + * @return RepeatedField<\Google\Cloud\Chronicle\V1\DataTableRow> + */ + public function getDataTableRows() + { + return $this->data_table_rows; + } + + /** + * The requested data table rows. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DataTableRow data_table_rows = 1; + * @param \Google\Cloud\Chronicle\V1\DataTableRow[] $var + * @return $this + */ + public function setDataTableRows($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\DataTableRow::class); + $this->data_table_rows = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/BulkReplaceDataTableRowsRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/BulkReplaceDataTableRowsRequest.php new file mode 100644 index 000000000000..8389b6eecd77 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/BulkReplaceDataTableRowsRequest.php @@ -0,0 +1,142 @@ +google.cloud.chronicle.v1.BulkReplaceDataTableRowsRequest + */ +class BulkReplaceDataTableRowsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource id of the data table. + * Format: + * /projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Data table rows to replace the existing data table rows. A + * maximum of 1000 rows (for sync requests) or 2000 rows (for async requests) + * can be replaced in a single request. Total size of the rows should be less + * than 4MB. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.CreateDataTableRowRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $requests; + + /** + * @param string $parent Required. The resource id of the data table. + * Format: + * /projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table} + * Please see {@see DataTableServiceClient::dataTableName()} for help formatting this field. + * @param \Google\Cloud\Chronicle\V1\CreateDataTableRowRequest[] $requests Required. Data table rows to replace the existing data table rows. A + * maximum of 1000 rows (for sync requests) or 2000 rows (for async requests) + * can be replaced in a single request. Total size of the rows should be less + * than 4MB. + * + * @return \Google\Cloud\Chronicle\V1\BulkReplaceDataTableRowsRequest + * + * @experimental + */ + public static function build(string $parent, array $requests): self + { + return (new self()) + ->setParent($parent) + ->setRequests($requests); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource id of the data table. + * Format: + * /projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table} + * @type \Google\Cloud\Chronicle\V1\CreateDataTableRowRequest[] $requests + * Required. Data table rows to replace the existing data table rows. A + * maximum of 1000 rows (for sync requests) or 2000 rows (for async requests) + * can be replaced in a single request. Total size of the rows should be less + * than 4MB. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DataTable::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource id of the data table. + * Format: + * /projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table} + * + * 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 resource id of the data table. + * Format: + * /projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table} + * + * 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. Data table rows to replace the existing data table rows. A + * maximum of 1000 rows (for sync requests) or 2000 rows (for async requests) + * can be replaced in a single request. Total size of the rows should be less + * than 4MB. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.CreateDataTableRowRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return RepeatedField<\Google\Cloud\Chronicle\V1\CreateDataTableRowRequest> + */ + public function getRequests() + { + return $this->requests; + } + + /** + * Required. Data table rows to replace the existing data table rows. A + * maximum of 1000 rows (for sync requests) or 2000 rows (for async requests) + * can be replaced in a single request. Total size of the rows should be less + * than 4MB. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.CreateDataTableRowRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Chronicle\V1\CreateDataTableRowRequest[] $var + * @return $this + */ + public function setRequests($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\CreateDataTableRowRequest::class); + $this->requests = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/BulkReplaceDataTableRowsResponse.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/BulkReplaceDataTableRowsResponse.php new file mode 100644 index 000000000000..2dc0f909f77a --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/BulkReplaceDataTableRowsResponse.php @@ -0,0 +1,67 @@ +google.cloud.chronicle.v1.BulkReplaceDataTableRowsResponse + */ +class BulkReplaceDataTableRowsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * DataTableRows that replaced existing data table rows + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DataTableRow data_table_rows = 1; + */ + private $data_table_rows; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Chronicle\V1\DataTableRow[] $data_table_rows + * DataTableRows that replaced existing data table rows + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DataTable::initOnce(); + parent::__construct($data); + } + + /** + * DataTableRows that replaced existing data table rows + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DataTableRow data_table_rows = 1; + * @return RepeatedField<\Google\Cloud\Chronicle\V1\DataTableRow> + */ + public function getDataTableRows() + { + return $this->data_table_rows; + } + + /** + * DataTableRows that replaced existing data table rows + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DataTableRow data_table_rows = 1; + * @param \Google\Cloud\Chronicle\V1\DataTableRow[] $var + * @return $this + */ + public function setDataTableRows($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\DataTableRow::class); + $this->data_table_rows = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/BulkUpdateDataTableRowsRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/BulkUpdateDataTableRowsRequest.php new file mode 100644 index 000000000000..a635d9e33430 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/BulkUpdateDataTableRowsRequest.php @@ -0,0 +1,132 @@ +google.cloud.chronicle.v1.BulkUpdateDataTableRowsRequest + */ +class BulkUpdateDataTableRowsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource id of the data table. + * Format: + * /projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Data table rows to update. At max 1,000 rows (or rows with size + * less than 2MB) can be there in a request. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.UpdateDataTableRowRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $requests; + + /** + * @param string $parent Required. The resource id of the data table. + * Format: + * /projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table} + * Please see {@see DataTableServiceClient::dataTableName()} for help formatting this field. + * @param \Google\Cloud\Chronicle\V1\UpdateDataTableRowRequest[] $requests Required. Data table rows to update. At max 1,000 rows (or rows with size + * less than 2MB) can be there in a request. + * + * @return \Google\Cloud\Chronicle\V1\BulkUpdateDataTableRowsRequest + * + * @experimental + */ + public static function build(string $parent, array $requests): self + { + return (new self()) + ->setParent($parent) + ->setRequests($requests); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource id of the data table. + * Format: + * /projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table} + * @type \Google\Cloud\Chronicle\V1\UpdateDataTableRowRequest[] $requests + * Required. Data table rows to update. At max 1,000 rows (or rows with size + * less than 2MB) can be there in a request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DataTable::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource id of the data table. + * Format: + * /projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table} + * + * 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 resource id of the data table. + * Format: + * /projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table} + * + * 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. Data table rows to update. At max 1,000 rows (or rows with size + * less than 2MB) can be there in a request. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.UpdateDataTableRowRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return RepeatedField<\Google\Cloud\Chronicle\V1\UpdateDataTableRowRequest> + */ + public function getRequests() + { + return $this->requests; + } + + /** + * Required. Data table rows to update. At max 1,000 rows (or rows with size + * less than 2MB) can be there in a request. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.UpdateDataTableRowRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Chronicle\V1\UpdateDataTableRowRequest[] $var + * @return $this + */ + public function setRequests($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\UpdateDataTableRowRequest::class); + $this->requests = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/BulkUpdateDataTableRowsResponse.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/BulkUpdateDataTableRowsResponse.php new file mode 100644 index 000000000000..903503608d86 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/BulkUpdateDataTableRowsResponse.php @@ -0,0 +1,67 @@ +google.cloud.chronicle.v1.BulkUpdateDataTableRowsResponse + */ +class BulkUpdateDataTableRowsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * DataTableRows updated + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DataTableRow data_table_rows = 1; + */ + private $data_table_rows; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Chronicle\V1\DataTableRow[] $data_table_rows + * DataTableRows updated + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DataTable::initOnce(); + parent::__construct($data); + } + + /** + * DataTableRows updated + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DataTableRow data_table_rows = 1; + * @return RepeatedField<\Google\Cloud\Chronicle\V1\DataTableRow> + */ + public function getDataTableRows() + { + return $this->data_table_rows; + } + + /** + * DataTableRows updated + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DataTableRow data_table_rows = 1; + * @param \Google\Cloud\Chronicle\V1\DataTableRow[] $var + * @return $this + */ + public function setDataTableRows($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\DataTableRow::class); + $this->data_table_rows = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CompilationDiagnostic.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CompilationDiagnostic.php new file mode 100644 index 000000000000..0bb762683f68 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CompilationDiagnostic.php @@ -0,0 +1,193 @@ +google.cloud.chronicle.v1.CompilationDiagnostic + */ +class CompilationDiagnostic extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The diagnostic message. + * + * Generated from protobuf field string message = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $message = ''; + /** + * Output only. The approximate position in the rule text associated with the + * compilation diagnostic. + * Compilation Position may be empty. + * + * Generated from protobuf field .google.cloud.chronicle.v1.CompilationPosition position = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $position = null; + /** + * Output only. The severity of a rule's compilation diagnostic. + * + * Generated from protobuf field .google.cloud.chronicle.v1.CompilationDiagnostic.Severity severity = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $severity = 0; + /** + * Output only. Link to documentation that describes a diagnostic in more + * detail. + * + * Generated from protobuf field string uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $message + * Output only. The diagnostic message. + * @type \Google\Cloud\Chronicle\V1\CompilationPosition $position + * Output only. The approximate position in the rule text associated with the + * compilation diagnostic. + * Compilation Position may be empty. + * @type int $severity + * Output only. The severity of a rule's compilation diagnostic. + * @type string $uri + * Output only. Link to documentation that describes a diagnostic in more + * detail. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\Rule::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The diagnostic message. + * + * Generated from protobuf field string message = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * Output only. The diagnostic message. + * + * Generated from protobuf field string message = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + + /** + * Output only. The approximate position in the rule text associated with the + * compilation diagnostic. + * Compilation Position may be empty. + * + * Generated from protobuf field .google.cloud.chronicle.v1.CompilationPosition position = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Chronicle\V1\CompilationPosition|null + */ + public function getPosition() + { + return $this->position; + } + + public function hasPosition() + { + return isset($this->position); + } + + public function clearPosition() + { + unset($this->position); + } + + /** + * Output only. The approximate position in the rule text associated with the + * compilation diagnostic. + * Compilation Position may be empty. + * + * Generated from protobuf field .google.cloud.chronicle.v1.CompilationPosition position = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Chronicle\V1\CompilationPosition $var + * @return $this + */ + public function setPosition($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\CompilationPosition::class); + $this->position = $var; + + return $this; + } + + /** + * Output only. The severity of a rule's compilation diagnostic. + * + * Generated from protobuf field .google.cloud.chronicle.v1.CompilationDiagnostic.Severity severity = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getSeverity() + { + return $this->severity; + } + + /** + * Output only. The severity of a rule's compilation diagnostic. + * + * Generated from protobuf field .google.cloud.chronicle.v1.CompilationDiagnostic.Severity severity = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setSeverity($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Chronicle\V1\CompilationDiagnostic\Severity::class); + $this->severity = $var; + + return $this; + } + + /** + * Output only. Link to documentation that describes a diagnostic in more + * detail. + * + * Generated from protobuf field string uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * Output only. Link to documentation that describes a diagnostic in more + * detail. + * + * Generated from protobuf field string uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CompilationDiagnostic/Severity.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CompilationDiagnostic/Severity.php new file mode 100644 index 000000000000..09e4fc379326 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CompilationDiagnostic/Severity.php @@ -0,0 +1,61 @@ +google.cloud.chronicle.v1.CompilationDiagnostic.Severity + */ +class Severity +{ + /** + * An unspecified severity level. + * + * Generated from protobuf enum SEVERITY_UNSPECIFIED = 0; + */ + const SEVERITY_UNSPECIFIED = 0; + /** + * A compilation warning. + * + * Generated from protobuf enum WARNING = 1; + */ + const WARNING = 1; + /** + * A compilation error. + * + * Generated from protobuf enum ERROR = 2; + */ + const ERROR = 2; + + private static $valueToName = [ + self::SEVERITY_UNSPECIFIED => 'SEVERITY_UNSPECIFIED', + self::WARNING => 'WARNING', + self::ERROR => 'ERROR', + ]; + + 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CompilationPosition.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CompilationPosition.php new file mode 100644 index 000000000000..2ab7cc676528 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CompilationPosition.php @@ -0,0 +1,170 @@ +google.cloud.chronicle.v1.CompilationPosition + */ +class CompilationPosition extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Start line number, beginning at 1. + * + * Generated from protobuf field int32 start_line = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $start_line = 0; + /** + * Output only. Start column number, beginning at 1. + * + * Generated from protobuf field int32 start_column = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $start_column = 0; + /** + * Output only. End line number, beginning at 1. + * + * Generated from protobuf field int32 end_line = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_line = 0; + /** + * Output only. End column number, beginning at 1. + * + * Generated from protobuf field int32 end_column = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_column = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $start_line + * Output only. Start line number, beginning at 1. + * @type int $start_column + * Output only. Start column number, beginning at 1. + * @type int $end_line + * Output only. End line number, beginning at 1. + * @type int $end_column + * Output only. End column number, beginning at 1. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\Rule::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Start line number, beginning at 1. + * + * Generated from protobuf field int32 start_line = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getStartLine() + { + return $this->start_line; + } + + /** + * Output only. Start line number, beginning at 1. + * + * Generated from protobuf field int32 start_line = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setStartLine($var) + { + GPBUtil::checkInt32($var); + $this->start_line = $var; + + return $this; + } + + /** + * Output only. Start column number, beginning at 1. + * + * Generated from protobuf field int32 start_column = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getStartColumn() + { + return $this->start_column; + } + + /** + * Output only. Start column number, beginning at 1. + * + * Generated from protobuf field int32 start_column = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setStartColumn($var) + { + GPBUtil::checkInt32($var); + $this->start_column = $var; + + return $this; + } + + /** + * Output only. End line number, beginning at 1. + * + * Generated from protobuf field int32 end_line = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getEndLine() + { + return $this->end_line; + } + + /** + * Output only. End line number, beginning at 1. + * + * Generated from protobuf field int32 end_line = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setEndLine($var) + { + GPBUtil::checkInt32($var); + $this->end_line = $var; + + return $this; + } + + /** + * Output only. End column number, beginning at 1. + * + * Generated from protobuf field int32 end_column = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getEndColumn() + { + return $this->end_column; + } + + /** + * Output only. End column number, beginning at 1. + * + * Generated from protobuf field int32 end_column = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setEndColumn($var) + { + GPBUtil::checkInt32($var); + $this->end_column = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateDataAccessLabelRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateDataAccessLabelRequest.php new file mode 100644 index 000000000000..53319e2e95d3 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateDataAccessLabelRequest.php @@ -0,0 +1,183 @@ +google.cloud.chronicle.v1.CreateDataAccessLabelRequest + */ +class CreateDataAccessLabelRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where this Data Access Label will be created. + * Format: `projects/{project}/locations/{location}/instances/{instance}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Data access label to create. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DataAccessLabel data_access_label = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $data_access_label = null; + /** + * Required. The ID to use for the data access label, which will become the + * label's display name and the final component of the label's resource name. + * The maximum number of characters should be 63. Regex pattern is as per AIP: + * https://google.aip.dev/122#resource-id-segments + * + * Generated from protobuf field string data_access_label_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $data_access_label_id = ''; + + /** + * @param string $parent Required. The parent resource where this Data Access Label will be created. + * Format: `projects/{project}/locations/{location}/instances/{instance}` + * Please see {@see DataAccessControlServiceClient::instanceName()} for help formatting this field. + * @param \Google\Cloud\Chronicle\V1\DataAccessLabel $dataAccessLabel Required. Data access label to create. + * @param string $dataAccessLabelId Required. The ID to use for the data access label, which will become the + * label's display name and the final component of the label's resource name. + * The maximum number of characters should be 63. Regex pattern is as per AIP: + * https://google.aip.dev/122#resource-id-segments + * + * @return \Google\Cloud\Chronicle\V1\CreateDataAccessLabelRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Chronicle\V1\DataAccessLabel $dataAccessLabel, string $dataAccessLabelId): self + { + return (new self()) + ->setParent($parent) + ->setDataAccessLabel($dataAccessLabel) + ->setDataAccessLabelId($dataAccessLabelId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource where this Data Access Label will be created. + * Format: `projects/{project}/locations/{location}/instances/{instance}` + * @type \Google\Cloud\Chronicle\V1\DataAccessLabel $data_access_label + * Required. Data access label to create. + * @type string $data_access_label_id + * Required. The ID to use for the data access label, which will become the + * label's display name and the final component of the label's resource name. + * The maximum number of characters should be 63. Regex pattern is as per AIP: + * https://google.aip.dev/122#resource-id-segments + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DataAccessControl::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where this Data Access Label will be created. + * Format: `projects/{project}/locations/{location}/instances/{instance}` + * + * 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 parent resource where this Data Access Label will be created. + * Format: `projects/{project}/locations/{location}/instances/{instance}` + * + * 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. Data access label to create. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DataAccessLabel data_access_label = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Chronicle\V1\DataAccessLabel|null + */ + public function getDataAccessLabel() + { + return $this->data_access_label; + } + + public function hasDataAccessLabel() + { + return isset($this->data_access_label); + } + + public function clearDataAccessLabel() + { + unset($this->data_access_label); + } + + /** + * Required. Data access label to create. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DataAccessLabel data_access_label = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Chronicle\V1\DataAccessLabel $var + * @return $this + */ + public function setDataAccessLabel($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DataAccessLabel::class); + $this->data_access_label = $var; + + return $this; + } + + /** + * Required. The ID to use for the data access label, which will become the + * label's display name and the final component of the label's resource name. + * The maximum number of characters should be 63. Regex pattern is as per AIP: + * https://google.aip.dev/122#resource-id-segments + * + * Generated from protobuf field string data_access_label_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDataAccessLabelId() + { + return $this->data_access_label_id; + } + + /** + * Required. The ID to use for the data access label, which will become the + * label's display name and the final component of the label's resource name. + * The maximum number of characters should be 63. Regex pattern is as per AIP: + * https://google.aip.dev/122#resource-id-segments + * + * Generated from protobuf field string data_access_label_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDataAccessLabelId($var) + { + GPBUtil::checkString($var, True); + $this->data_access_label_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateDataAccessScopeRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateDataAccessScopeRequest.php new file mode 100644 index 000000000000..d4d59d290e1b --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateDataAccessScopeRequest.php @@ -0,0 +1,178 @@ +google.cloud.chronicle.v1.CreateDataAccessScopeRequest + */ +class CreateDataAccessScopeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where this Data Access Scope will be created. + * Format: `projects/{project}/locations/{location}/instances/{instance}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Data access scope to create. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DataAccessScope data_access_scope = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $data_access_scope = null; + /** + * Required. The user provided scope id which will become the last part of the + * name of the scope resource. Needs to be compliant with + * https://google.aip.dev/122 + * + * Generated from protobuf field string data_access_scope_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $data_access_scope_id = ''; + + /** + * @param string $parent Required. The parent resource where this Data Access Scope will be created. + * Format: `projects/{project}/locations/{location}/instances/{instance}` + * Please see {@see DataAccessControlServiceClient::instanceName()} for help formatting this field. + * @param \Google\Cloud\Chronicle\V1\DataAccessScope $dataAccessScope Required. Data access scope to create. + * @param string $dataAccessScopeId Required. The user provided scope id which will become the last part of the + * name of the scope resource. Needs to be compliant with + * https://google.aip.dev/122 + * + * @return \Google\Cloud\Chronicle\V1\CreateDataAccessScopeRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Chronicle\V1\DataAccessScope $dataAccessScope, string $dataAccessScopeId): self + { + return (new self()) + ->setParent($parent) + ->setDataAccessScope($dataAccessScope) + ->setDataAccessScopeId($dataAccessScopeId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource where this Data Access Scope will be created. + * Format: `projects/{project}/locations/{location}/instances/{instance}` + * @type \Google\Cloud\Chronicle\V1\DataAccessScope $data_access_scope + * Required. Data access scope to create. + * @type string $data_access_scope_id + * Required. The user provided scope id which will become the last part of the + * name of the scope resource. Needs to be compliant with + * https://google.aip.dev/122 + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DataAccessControl::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where this Data Access Scope will be created. + * Format: `projects/{project}/locations/{location}/instances/{instance}` + * + * 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 parent resource where this Data Access Scope will be created. + * Format: `projects/{project}/locations/{location}/instances/{instance}` + * + * 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. Data access scope to create. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DataAccessScope data_access_scope = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Chronicle\V1\DataAccessScope|null + */ + public function getDataAccessScope() + { + return $this->data_access_scope; + } + + public function hasDataAccessScope() + { + return isset($this->data_access_scope); + } + + public function clearDataAccessScope() + { + unset($this->data_access_scope); + } + + /** + * Required. Data access scope to create. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DataAccessScope data_access_scope = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Chronicle\V1\DataAccessScope $var + * @return $this + */ + public function setDataAccessScope($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DataAccessScope::class); + $this->data_access_scope = $var; + + return $this; + } + + /** + * Required. The user provided scope id which will become the last part of the + * name of the scope resource. Needs to be compliant with + * https://google.aip.dev/122 + * + * Generated from protobuf field string data_access_scope_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDataAccessScopeId() + { + return $this->data_access_scope_id; + } + + /** + * Required. The user provided scope id which will become the last part of the + * name of the scope resource. Needs to be compliant with + * https://google.aip.dev/122 + * + * Generated from protobuf field string data_access_scope_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDataAccessScopeId($var) + { + GPBUtil::checkString($var, True); + $this->data_access_scope_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateDataTableRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateDataTableRequest.php new file mode 100644 index 000000000000..01a4b78c238a --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateDataTableRequest.php @@ -0,0 +1,188 @@ +google.cloud.chronicle.v1.CreateDataTableRequest + */ +class CreateDataTableRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where this data table will be created. + * Format: projects/{project}/locations/{location}/instances/{instance} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The data table being created. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DataTable data_table = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $data_table = null; + /** + * Required. The ID to use for the data table. This is also the display name + * for the data table. It must satisfy the following requirements: + * - Starts with letter. + * - Contains only letters, numbers and underscore. + * - Must be unique and has length < 256. + * + * Generated from protobuf field string data_table_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $data_table_id = ''; + + /** + * @param string $parent Required. The parent resource where this data table will be created. + * Format: projects/{project}/locations/{location}/instances/{instance} + * Please see {@see DataTableServiceClient::instanceName()} for help formatting this field. + * @param \Google\Cloud\Chronicle\V1\DataTable $dataTable Required. The data table being created. + * @param string $dataTableId Required. The ID to use for the data table. This is also the display name + * for the data table. It must satisfy the following requirements: + * - Starts with letter. + * - Contains only letters, numbers and underscore. + * - Must be unique and has length < 256. + * + * @return \Google\Cloud\Chronicle\V1\CreateDataTableRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Chronicle\V1\DataTable $dataTable, string $dataTableId): self + { + return (new self()) + ->setParent($parent) + ->setDataTable($dataTable) + ->setDataTableId($dataTableId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource where this data table will be created. + * Format: projects/{project}/locations/{location}/instances/{instance} + * @type \Google\Cloud\Chronicle\V1\DataTable $data_table + * Required. The data table being created. + * @type string $data_table_id + * Required. The ID to use for the data table. This is also the display name + * for the data table. It must satisfy the following requirements: + * - Starts with letter. + * - Contains only letters, numbers and underscore. + * - Must be unique and has length < 256. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DataTable::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where this data table will be created. + * Format: projects/{project}/locations/{location}/instances/{instance} + * + * 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 parent resource where this data table will be created. + * Format: projects/{project}/locations/{location}/instances/{instance} + * + * 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 data table being created. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DataTable data_table = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Chronicle\V1\DataTable|null + */ + public function getDataTable() + { + return $this->data_table; + } + + public function hasDataTable() + { + return isset($this->data_table); + } + + public function clearDataTable() + { + unset($this->data_table); + } + + /** + * Required. The data table being created. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DataTable data_table = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Chronicle\V1\DataTable $var + * @return $this + */ + public function setDataTable($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DataTable::class); + $this->data_table = $var; + + return $this; + } + + /** + * Required. The ID to use for the data table. This is also the display name + * for the data table. It must satisfy the following requirements: + * - Starts with letter. + * - Contains only letters, numbers and underscore. + * - Must be unique and has length < 256. + * + * Generated from protobuf field string data_table_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDataTableId() + { + return $this->data_table_id; + } + + /** + * Required. The ID to use for the data table. This is also the display name + * for the data table. It must satisfy the following requirements: + * - Starts with letter. + * - Contains only letters, numbers and underscore. + * - Must be unique and has length < 256. + * + * Generated from protobuf field string data_table_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDataTableId($var) + { + GPBUtil::checkString($var, True); + $this->data_table_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateDataTableRowRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateDataTableRowRequest.php new file mode 100644 index 000000000000..61d1e625e79e --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateDataTableRowRequest.php @@ -0,0 +1,137 @@ +google.cloud.chronicle.v1.CreateDataTableRowRequest + */ +class CreateDataTableRowRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource id of the data table. + * Format: + * /projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The data table row to create. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DataTableRow data_table_row = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $data_table_row = null; + + /** + * @param string $parent Required. The resource id of the data table. + * Format: + * /projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table} + * Please see {@see DataTableServiceClient::dataTableName()} for help formatting this field. + * @param \Google\Cloud\Chronicle\V1\DataTableRow $dataTableRow Required. The data table row to create. + * + * @return \Google\Cloud\Chronicle\V1\CreateDataTableRowRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Chronicle\V1\DataTableRow $dataTableRow): self + { + return (new self()) + ->setParent($parent) + ->setDataTableRow($dataTableRow); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource id of the data table. + * Format: + * /projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table} + * @type \Google\Cloud\Chronicle\V1\DataTableRow $data_table_row + * Required. The data table row to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DataTable::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource id of the data table. + * Format: + * /projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table} + * + * 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 resource id of the data table. + * Format: + * /projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table} + * + * 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 data table row to create. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DataTableRow data_table_row = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Chronicle\V1\DataTableRow|null + */ + public function getDataTableRow() + { + return $this->data_table_row; + } + + public function hasDataTableRow() + { + return isset($this->data_table_row); + } + + public function clearDataTableRow() + { + unset($this->data_table_row); + } + + /** + * Required. The data table row to create. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DataTableRow data_table_row = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Chronicle\V1\DataTableRow $var + * @return $this + */ + public function setDataTableRow($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DataTableRow::class); + $this->data_table_row = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateReferenceListRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateReferenceListRequest.php new file mode 100644 index 000000000000..dabeb7c2fc4b --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateReferenceListRequest.php @@ -0,0 +1,193 @@ +google.cloud.chronicle.v1.CreateReferenceListRequest + */ +class CreateReferenceListRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where this reference list will be created. + * Format: `projects/{project}/locations/{location}/instances/{instance}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The reference list to create. + * + * Generated from protobuf field .google.cloud.chronicle.v1.ReferenceList reference_list = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $reference_list = null; + /** + * Required. The ID to use for the reference list. This is also the display + * name for the reference list. It must satisfy the following requirements: + * - Starts with letter. + * - Contains only letters, numbers and underscore. + * - Has length less than 256. + * - Must be unique. + * + * Generated from protobuf field string reference_list_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $reference_list_id = ''; + + /** + * @param string $parent Required. The parent resource where this reference list will be created. + * Format: `projects/{project}/locations/{location}/instances/{instance}` + * Please see {@see ReferenceListServiceClient::instanceName()} for help formatting this field. + * @param \Google\Cloud\Chronicle\V1\ReferenceList $referenceList Required. The reference list to create. + * @param string $referenceListId Required. The ID to use for the reference list. This is also the display + * name for the reference list. It must satisfy the following requirements: + * - Starts with letter. + * - Contains only letters, numbers and underscore. + * - Has length less than 256. + * - Must be unique. + * + * @return \Google\Cloud\Chronicle\V1\CreateReferenceListRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Chronicle\V1\ReferenceList $referenceList, string $referenceListId): self + { + return (new self()) + ->setParent($parent) + ->setReferenceList($referenceList) + ->setReferenceListId($referenceListId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource where this reference list will be created. + * Format: `projects/{project}/locations/{location}/instances/{instance}` + * @type \Google\Cloud\Chronicle\V1\ReferenceList $reference_list + * Required. The reference list to create. + * @type string $reference_list_id + * Required. The ID to use for the reference list. This is also the display + * name for the reference list. It must satisfy the following requirements: + * - Starts with letter. + * - Contains only letters, numbers and underscore. + * - Has length less than 256. + * - Must be unique. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\ReferenceList::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where this reference list will be created. + * Format: `projects/{project}/locations/{location}/instances/{instance}` + * + * 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 parent resource where this reference list will be created. + * Format: `projects/{project}/locations/{location}/instances/{instance}` + * + * 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 reference list to create. + * + * Generated from protobuf field .google.cloud.chronicle.v1.ReferenceList reference_list = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Chronicle\V1\ReferenceList|null + */ + public function getReferenceList() + { + return $this->reference_list; + } + + public function hasReferenceList() + { + return isset($this->reference_list); + } + + public function clearReferenceList() + { + unset($this->reference_list); + } + + /** + * Required. The reference list to create. + * + * Generated from protobuf field .google.cloud.chronicle.v1.ReferenceList reference_list = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Chronicle\V1\ReferenceList $var + * @return $this + */ + public function setReferenceList($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\ReferenceList::class); + $this->reference_list = $var; + + return $this; + } + + /** + * Required. The ID to use for the reference list. This is also the display + * name for the reference list. It must satisfy the following requirements: + * - Starts with letter. + * - Contains only letters, numbers and underscore. + * - Has length less than 256. + * - Must be unique. + * + * Generated from protobuf field string reference_list_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getReferenceListId() + { + return $this->reference_list_id; + } + + /** + * Required. The ID to use for the reference list. This is also the display + * name for the reference list. It must satisfy the following requirements: + * - Starts with letter. + * - Contains only letters, numbers and underscore. + * - Has length less than 256. + * - Must be unique. + * + * Generated from protobuf field string reference_list_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setReferenceListId($var) + { + GPBUtil::checkString($var, True); + $this->reference_list_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateRetrohuntRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateRetrohuntRequest.php new file mode 100644 index 000000000000..94af572d344c --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateRetrohuntRequest.php @@ -0,0 +1,137 @@ +google.cloud.chronicle.v1.CreateRetrohuntRequest + */ +class CreateRetrohuntRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent of retrohunt, which is a rule. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The retrohunt to create. + * + * Generated from protobuf field .google.cloud.chronicle.v1.Retrohunt retrohunt = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $retrohunt = null; + + /** + * @param string $parent Required. The parent of retrohunt, which is a rule. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + * Please see {@see RuleServiceClient::ruleName()} for help formatting this field. + * @param \Google\Cloud\Chronicle\V1\Retrohunt $retrohunt Required. The retrohunt to create. + * + * @return \Google\Cloud\Chronicle\V1\CreateRetrohuntRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Chronicle\V1\Retrohunt $retrohunt): self + { + return (new self()) + ->setParent($parent) + ->setRetrohunt($retrohunt); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent of retrohunt, which is a rule. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + * @type \Google\Cloud\Chronicle\V1\Retrohunt $retrohunt + * Required. The retrohunt to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\Rule::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent of retrohunt, which is a rule. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + * + * 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 parent of retrohunt, which is a rule. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + * + * 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 retrohunt to create. + * + * Generated from protobuf field .google.cloud.chronicle.v1.Retrohunt retrohunt = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Chronicle\V1\Retrohunt|null + */ + public function getRetrohunt() + { + return $this->retrohunt; + } + + public function hasRetrohunt() + { + return isset($this->retrohunt); + } + + public function clearRetrohunt() + { + unset($this->retrohunt); + } + + /** + * Required. The retrohunt to create. + * + * Generated from protobuf field .google.cloud.chronicle.v1.Retrohunt retrohunt = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Chronicle\V1\Retrohunt $var + * @return $this + */ + public function setRetrohunt($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\Retrohunt::class); + $this->retrohunt = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateRuleRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateRuleRequest.php new file mode 100644 index 000000000000..883ebb114ef8 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateRuleRequest.php @@ -0,0 +1,132 @@ +google.cloud.chronicle.v1.CreateRuleRequest + */ +class CreateRuleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where this rule will be created. + * Format: `projects/{project}/locations/{location}/instances/{instance}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The rule to create. + * + * Generated from protobuf field .google.cloud.chronicle.v1.Rule rule = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $rule = null; + + /** + * @param string $parent Required. The parent resource where this rule will be created. + * Format: `projects/{project}/locations/{location}/instances/{instance}` + * Please see {@see RuleServiceClient::instanceName()} for help formatting this field. + * @param \Google\Cloud\Chronicle\V1\Rule $rule Required. The rule to create. + * + * @return \Google\Cloud\Chronicle\V1\CreateRuleRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Chronicle\V1\Rule $rule): self + { + return (new self()) + ->setParent($parent) + ->setRule($rule); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource where this rule will be created. + * Format: `projects/{project}/locations/{location}/instances/{instance}` + * @type \Google\Cloud\Chronicle\V1\Rule $rule + * Required. The rule to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\Rule::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where this rule will be created. + * Format: `projects/{project}/locations/{location}/instances/{instance}` + * + * 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 parent resource where this rule will be created. + * Format: `projects/{project}/locations/{location}/instances/{instance}` + * + * 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 rule to create. + * + * Generated from protobuf field .google.cloud.chronicle.v1.Rule rule = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Chronicle\V1\Rule|null + */ + public function getRule() + { + return $this->rule; + } + + public function hasRule() + { + return isset($this->rule); + } + + public function clearRule() + { + unset($this->rule); + } + + /** + * Required. The rule to create. + * + * Generated from protobuf field .google.cloud.chronicle.v1.Rule rule = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Chronicle\V1\Rule $var + * @return $this + */ + public function setRule($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\Rule::class); + $this->rule = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateWatchlistRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateWatchlistRequest.php new file mode 100644 index 000000000000..8909973322b9 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateWatchlistRequest.php @@ -0,0 +1,184 @@ +google.cloud.chronicle.v1.CreateWatchlistRequest + */ +class CreateWatchlistRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where this watchlist will be created. + * Format: `projects/{project}/locations/{location}/instances/{instance}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The ID to use for the watchlist, + * which will become the final component of the watchlist's resource name. + * This value should be 4-63 characters, and valid characters + * are /[a-z][0-9]-/. + * + * Generated from protobuf field string watchlist_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $watchlist_id = ''; + /** + * Required. The watchlist to create. + * + * Generated from protobuf field .google.cloud.chronicle.v1.Watchlist watchlist = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $watchlist = null; + + /** + * @param string $parent Required. The parent resource where this watchlist will be created. + * Format: `projects/{project}/locations/{location}/instances/{instance}` + * Please see {@see EntityServiceClient::instanceName()} for help formatting this field. + * @param \Google\Cloud\Chronicle\V1\Watchlist $watchlist Required. The watchlist to create. + * @param string $watchlistId Optional. The ID to use for the watchlist, + * which will become the final component of the watchlist's resource name. + * + * This value should be 4-63 characters, and valid characters + * are /[a-z][0-9]-/. + * + * @return \Google\Cloud\Chronicle\V1\CreateWatchlistRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Chronicle\V1\Watchlist $watchlist, string $watchlistId): self + { + return (new self()) + ->setParent($parent) + ->setWatchlist($watchlist) + ->setWatchlistId($watchlistId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource where this watchlist will be created. + * Format: `projects/{project}/locations/{location}/instances/{instance}` + * @type string $watchlist_id + * Optional. The ID to use for the watchlist, + * which will become the final component of the watchlist's resource name. + * This value should be 4-63 characters, and valid characters + * are /[a-z][0-9]-/. + * @type \Google\Cloud\Chronicle\V1\Watchlist $watchlist + * Required. The watchlist to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\Entity::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where this watchlist will be created. + * Format: `projects/{project}/locations/{location}/instances/{instance}` + * + * 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 parent resource where this watchlist will be created. + * Format: `projects/{project}/locations/{location}/instances/{instance}` + * + * 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 ID to use for the watchlist, + * which will become the final component of the watchlist's resource name. + * This value should be 4-63 characters, and valid characters + * are /[a-z][0-9]-/. + * + * Generated from protobuf field string watchlist_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getWatchlistId() + { + return $this->watchlist_id; + } + + /** + * Optional. The ID to use for the watchlist, + * which will become the final component of the watchlist's resource name. + * This value should be 4-63 characters, and valid characters + * are /[a-z][0-9]-/. + * + * Generated from protobuf field string watchlist_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setWatchlistId($var) + { + GPBUtil::checkString($var, True); + $this->watchlist_id = $var; + + return $this; + } + + /** + * Required. The watchlist to create. + * + * Generated from protobuf field .google.cloud.chronicle.v1.Watchlist watchlist = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Chronicle\V1\Watchlist|null + */ + public function getWatchlist() + { + return $this->watchlist; + } + + public function hasWatchlist() + { + return isset($this->watchlist); + } + + public function clearWatchlist() + { + unset($this->watchlist); + } + + /** + * Required. The watchlist to create. + * + * Generated from protobuf field .google.cloud.chronicle.v1.Watchlist watchlist = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Chronicle\V1\Watchlist $var + * @return $this + */ + public function setWatchlist($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\Watchlist::class); + $this->watchlist = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataAccessLabel.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataAccessLabel.php new file mode 100644 index 000000000000..9eb65ff6b99b --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataAccessLabel.php @@ -0,0 +1,337 @@ +google.cloud.chronicle.v1.DataAccessLabel + */ +class DataAccessLabel extends \Google\Protobuf\Internal\Message +{ + /** + * The unique resource name of the data access label. + * + * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Output only. The short name displayed for the label as it appears on event + * data. + * + * Generated from protobuf field string display_name = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $display_name = ''; + /** + * Output only. The time at which the data access label was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time at which the data access label was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. The user who created the data access label. + * + * Generated from protobuf field string author = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $author = ''; + /** + * Output only. The user who last updated the data access label. + * + * Generated from protobuf field string last_editor = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $last_editor = ''; + /** + * Optional. A description of the data access label for a human reader. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + protected $definition; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $udm_query + * A UDM query over event data. + * @type string $name + * The unique resource name of the data access label. + * @type string $display_name + * Output only. The short name displayed for the label as it appears on event + * data. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time at which the data access label was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time at which the data access label was last updated. + * @type string $author + * Output only. The user who created the data access label. + * @type string $last_editor + * Output only. The user who last updated the data access label. + * @type string $description + * Optional. A description of the data access label for a human reader. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DataAccessControl::initOnce(); + parent::__construct($data); + } + + /** + * A UDM query over event data. + * + * Generated from protobuf field string udm_query = 3; + * @return string + */ + public function getUdmQuery() + { + return $this->readOneof(3); + } + + public function hasUdmQuery() + { + return $this->hasOneof(3); + } + + /** + * A UDM query over event data. + * + * Generated from protobuf field string udm_query = 3; + * @param string $var + * @return $this + */ + public function setUdmQuery($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * The unique resource name of the data access label. + * + * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The unique resource name of the data access label. + * + * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The short name displayed for the label as it appears on event + * data. + * + * Generated from protobuf field string display_name = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Output only. The short name displayed for the label as it appears on event + * data. + * + * Generated from protobuf field string display_name = 8 [(.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; + } + + /** + * Output only. The time at which the data access label was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @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); + } + + /** + * Output only. The time at which the data access label was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time at which the data access label was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @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); + } + + /** + * Output only. The time at which the data access label was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @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. The user who created the data access label. + * + * Generated from protobuf field string author = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getAuthor() + { + return $this->author; + } + + /** + * Output only. The user who created the data access label. + * + * Generated from protobuf field string author = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setAuthor($var) + { + GPBUtil::checkString($var, True); + $this->author = $var; + + return $this; + } + + /** + * Output only. The user who last updated the data access label. + * + * Generated from protobuf field string last_editor = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getLastEditor() + { + return $this->last_editor; + } + + /** + * Output only. The user who last updated the data access label. + * + * Generated from protobuf field string last_editor = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setLastEditor($var) + { + GPBUtil::checkString($var, True); + $this->last_editor = $var; + + return $this; + } + + /** + * Optional. A description of the data access label for a human reader. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. A description of the data access label for a human reader. + * + * 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; + } + + /** + * @return string + */ + public function getDefinition() + { + return $this->whichOneof("definition"); + } + +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataAccessLabelReference.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataAccessLabelReference.php new file mode 100644 index 000000000000..9f32f7c3f294 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataAccessLabelReference.php @@ -0,0 +1,227 @@ +google.cloud.chronicle.v1.DataAccessLabelReference + */ +class DataAccessLabelReference extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The display name of the label. + * Data access label and log types's name + * will match the display name of the resource. + * The asset namespace will match the namespace itself. + * The ingestion key value pair will match the key of the tuple. + * + * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $display_name = ''; + protected $label; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $data_access_label + * The name of the data access label. + * @type string $log_type + * The name of the log type. + * @type string $asset_namespace + * The asset namespace configured in the forwarder + * of the customer's events. + * @type \Google\Cloud\Chronicle\V1\IngestionLabel $ingestion_label + * The ingestion label configured in the forwarder of the customer's events. + * @type string $display_name + * Output only. The display name of the label. + * Data access label and log types's name + * will match the display name of the resource. + * The asset namespace will match the namespace itself. + * The ingestion key value pair will match the key of the tuple. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DataAccessControl::initOnce(); + parent::__construct($data); + } + + /** + * The name of the data access label. + * + * Generated from protobuf field string data_access_label = 1; + * @return string + */ + public function getDataAccessLabel() + { + return $this->readOneof(1); + } + + public function hasDataAccessLabel() + { + return $this->hasOneof(1); + } + + /** + * The name of the data access label. + * + * Generated from protobuf field string data_access_label = 1; + * @param string $var + * @return $this + */ + public function setDataAccessLabel($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * The name of the log type. + * + * Generated from protobuf field string log_type = 2; + * @return string + */ + public function getLogType() + { + return $this->readOneof(2); + } + + public function hasLogType() + { + return $this->hasOneof(2); + } + + /** + * The name of the log type. + * + * Generated from protobuf field string log_type = 2; + * @param string $var + * @return $this + */ + public function setLogType($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * The asset namespace configured in the forwarder + * of the customer's events. + * + * Generated from protobuf field string asset_namespace = 3; + * @return string + */ + public function getAssetNamespace() + { + return $this->readOneof(3); + } + + public function hasAssetNamespace() + { + return $this->hasOneof(3); + } + + /** + * The asset namespace configured in the forwarder + * of the customer's events. + * + * Generated from protobuf field string asset_namespace = 3; + * @param string $var + * @return $this + */ + public function setAssetNamespace($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * The ingestion label configured in the forwarder of the customer's events. + * + * Generated from protobuf field .google.cloud.chronicle.v1.IngestionLabel ingestion_label = 4; + * @return \Google\Cloud\Chronicle\V1\IngestionLabel|null + */ + public function getIngestionLabel() + { + return $this->readOneof(4); + } + + public function hasIngestionLabel() + { + return $this->hasOneof(4); + } + + /** + * The ingestion label configured in the forwarder of the customer's events. + * + * Generated from protobuf field .google.cloud.chronicle.v1.IngestionLabel ingestion_label = 4; + * @param \Google\Cloud\Chronicle\V1\IngestionLabel $var + * @return $this + */ + public function setIngestionLabel($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\IngestionLabel::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Output only. The display name of the label. + * Data access label and log types's name + * will match the display name of the resource. + * The asset namespace will match the namespace itself. + * The ingestion key value pair will match the key of the tuple. + * + * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Output only. The display name of the label. + * Data access label and log types's name + * will match the display name of the resource. + * The asset namespace will match the namespace itself. + * The ingestion key value pair will match the key of the tuple. + * + * Generated from protobuf field string display_name = 5 [(.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; + } + + /** + * @return string + */ + public function getLabel() + { + return $this->whichOneof("label"); + } + +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataAccessScope.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataAccessScope.php new file mode 100644 index 000000000000..687d809ead24 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataAccessScope.php @@ -0,0 +1,470 @@ +google.cloud.chronicle.v1.DataAccessScope + */ +class DataAccessScope extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unique full name of the data access scope. + * The name should comply with https://google.aip.dev/122 standards. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. The allowed labels for the scope. + * Either allow_all or allowed_data_access_labels needs to be provided. + * When provided, there has to be at least one label allowed for the scope to + * be valid. + * The logical operator for evaluation of the allowed labels is OR. + * E.g.: A customer with scope with allowed labels A and B will be able + * to see data with labeled with A or B or (A and B). + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DataAccessLabelReference allowed_data_access_labels = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $allowed_data_access_labels; + /** + * Optional. The denied labels for the scope. + * The logical operator for evaluation of the denied labels is AND. + * E.g.: A customer with scope with denied labels A and B won't be able + * to see data labeled with A and data labeled with B + * and data with labels A and B. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DataAccessLabelReference denied_data_access_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $denied_data_access_labels; + /** + * Output only. The name to be used for display to customers of the data + * access scope. + * + * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $display_name = ''; + /** + * Output only. The time at which the data access scope was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time at which the data access scope was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. The user who created the data access scope. + * + * Generated from protobuf field string author = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $author = ''; + /** + * Output only. The user who last updated the data access scope. + * + * Generated from protobuf field string last_editor = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $last_editor = ''; + /** + * Optional. A description of the data access scope for a human reader. + * + * Generated from protobuf field string description = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Optional. Whether or not the scope allows all labels, allow_all and + * allowed_data_access_labels are mutually exclusive and one of them must be + * present. denied_data_access_labels can still be used along with allow_all. + * When combined with denied_data_access_labels, access will be granted to all + * data that doesn't have labels mentioned in denied_data_access_labels. E.g.: + * A customer with scope with denied labels A and B and allow_all will be able + * to see all data except data labeled with A and data labeled with B and data + * with labels A and B. + * + * Generated from protobuf field bool allow_all = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $allow_all = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The unique full name of the data access scope. + * The name should comply with https://google.aip.dev/122 standards. + * @type \Google\Cloud\Chronicle\V1\DataAccessLabelReference[] $allowed_data_access_labels + * Optional. The allowed labels for the scope. + * Either allow_all or allowed_data_access_labels needs to be provided. + * When provided, there has to be at least one label allowed for the scope to + * be valid. + * The logical operator for evaluation of the allowed labels is OR. + * E.g.: A customer with scope with allowed labels A and B will be able + * to see data with labeled with A or B or (A and B). + * @type \Google\Cloud\Chronicle\V1\DataAccessLabelReference[] $denied_data_access_labels + * Optional. The denied labels for the scope. + * The logical operator for evaluation of the denied labels is AND. + * E.g.: A customer with scope with denied labels A and B won't be able + * to see data labeled with A and data labeled with B + * and data with labels A and B. + * @type string $display_name + * Output only. The name to be used for display to customers of the data + * access scope. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time at which the data access scope was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time at which the data access scope was last updated. + * @type string $author + * Output only. The user who created the data access scope. + * @type string $last_editor + * Output only. The user who last updated the data access scope. + * @type string $description + * Optional. A description of the data access scope for a human reader. + * @type bool $allow_all + * Optional. Whether or not the scope allows all labels, allow_all and + * allowed_data_access_labels are mutually exclusive and one of them must be + * present. denied_data_access_labels can still be used along with allow_all. + * When combined with denied_data_access_labels, access will be granted to all + * data that doesn't have labels mentioned in denied_data_access_labels. E.g.: + * A customer with scope with denied labels A and B and allow_all will be able + * to see all data except data labeled with A and data labeled with B and data + * with labels A and B. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DataAccessControl::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unique full name of the data access scope. + * The name should comply with https://google.aip.dev/122 standards. + * + * 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 unique full name of the data access scope. + * The name should comply with https://google.aip.dev/122 standards. + * + * 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. The allowed labels for the scope. + * Either allow_all or allowed_data_access_labels needs to be provided. + * When provided, there has to be at least one label allowed for the scope to + * be valid. + * The logical operator for evaluation of the allowed labels is OR. + * E.g.: A customer with scope with allowed labels A and B will be able + * to see data with labeled with A or B or (A and B). + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DataAccessLabelReference allowed_data_access_labels = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\Chronicle\V1\DataAccessLabelReference> + */ + public function getAllowedDataAccessLabels() + { + return $this->allowed_data_access_labels; + } + + /** + * Optional. The allowed labels for the scope. + * Either allow_all or allowed_data_access_labels needs to be provided. + * When provided, there has to be at least one label allowed for the scope to + * be valid. + * The logical operator for evaluation of the allowed labels is OR. + * E.g.: A customer with scope with allowed labels A and B will be able + * to see data with labeled with A or B or (A and B). + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DataAccessLabelReference allowed_data_access_labels = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Chronicle\V1\DataAccessLabelReference[] $var + * @return $this + */ + public function setAllowedDataAccessLabels($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\DataAccessLabelReference::class); + $this->allowed_data_access_labels = $arr; + + return $this; + } + + /** + * Optional. The denied labels for the scope. + * The logical operator for evaluation of the denied labels is AND. + * E.g.: A customer with scope with denied labels A and B won't be able + * to see data labeled with A and data labeled with B + * and data with labels A and B. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DataAccessLabelReference denied_data_access_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\Chronicle\V1\DataAccessLabelReference> + */ + public function getDeniedDataAccessLabels() + { + return $this->denied_data_access_labels; + } + + /** + * Optional. The denied labels for the scope. + * The logical operator for evaluation of the denied labels is AND. + * E.g.: A customer with scope with denied labels A and B won't be able + * to see data labeled with A and data labeled with B + * and data with labels A and B. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DataAccessLabelReference denied_data_access_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Chronicle\V1\DataAccessLabelReference[] $var + * @return $this + */ + public function setDeniedDataAccessLabels($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\DataAccessLabelReference::class); + $this->denied_data_access_labels = $arr; + + return $this; + } + + /** + * Output only. The name to be used for display to customers of the data + * access scope. + * + * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Output only. The name to be used for display to customers of the data + * access scope. + * + * Generated from protobuf field string display_name = 4 [(.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; + } + + /** + * Output only. The time at which the data access scope was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @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); + } + + /** + * Output only. The time at which the data access scope was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time at which the data access scope was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @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); + } + + /** + * Output only. The time at which the data access scope was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @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. The user who created the data access scope. + * + * Generated from protobuf field string author = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getAuthor() + { + return $this->author; + } + + /** + * Output only. The user who created the data access scope. + * + * Generated from protobuf field string author = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setAuthor($var) + { + GPBUtil::checkString($var, True); + $this->author = $var; + + return $this; + } + + /** + * Output only. The user who last updated the data access scope. + * + * Generated from protobuf field string last_editor = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getLastEditor() + { + return $this->last_editor; + } + + /** + * Output only. The user who last updated the data access scope. + * + * Generated from protobuf field string last_editor = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setLastEditor($var) + { + GPBUtil::checkString($var, True); + $this->last_editor = $var; + + return $this; + } + + /** + * Optional. A description of the data access scope for a human reader. + * + * Generated from protobuf field string description = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. A description of the data access scope for a human reader. + * + * Generated from protobuf field string description = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Optional. Whether or not the scope allows all labels, allow_all and + * allowed_data_access_labels are mutually exclusive and one of them must be + * present. denied_data_access_labels can still be used along with allow_all. + * When combined with denied_data_access_labels, access will be granted to all + * data that doesn't have labels mentioned in denied_data_access_labels. E.g.: + * A customer with scope with denied labels A and B and allow_all will be able + * to see all data except data labeled with A and data labeled with B and data + * with labels A and B. + * + * Generated from protobuf field bool allow_all = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getAllowAll() + { + return $this->allow_all; + } + + /** + * Optional. Whether or not the scope allows all labels, allow_all and + * allowed_data_access_labels are mutually exclusive and one of them must be + * present. denied_data_access_labels can still be used along with allow_all. + * When combined with denied_data_access_labels, access will be granted to all + * data that doesn't have labels mentioned in denied_data_access_labels. E.g.: + * A customer with scope with denied labels A and B and allow_all will be able + * to see all data except data labeled with A and data labeled with B and data + * with labels A and B. + * + * Generated from protobuf field bool allow_all = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setAllowAll($var) + { + GPBUtil::checkBool($var); + $this->allow_all = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataTable.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataTable.php new file mode 100644 index 000000000000..f2024c29a822 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataTable.php @@ -0,0 +1,585 @@ +google.cloud.chronicle.v1.DataTable + */ +class DataTable extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the data table + * Format: + * "{project}/locations/{location}/instances/{instance}/dataTables/{data_table}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. The unique display name of the data table. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $display_name = ''; + /** + * Required. A user-provided description of the data table. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $description = ''; + /** + * Output only. Table create time + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Table update time + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Immutable. Details of all the columns in the table + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DataTableColumnInfo column_info = 6 [(.google.api.field_behavior) = IMMUTABLE]; + */ + private $column_info; + /** + * Output only. Data table unique id + * + * Generated from protobuf field string data_table_uuid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $data_table_uuid = ''; + /** + * Output only. The resource names for the associated Rules that use this + * data table. Format: + * projects/{project}/locations/{location}/instances/{instance}/rules/{rule}. + * {rule} here refers to the rule id. + * + * Generated from protobuf field repeated string rules = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $rules; + /** + * Output only. The count of rules using the data table. + * + * Generated from protobuf field int32 rule_associations_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $rule_associations_count = 0; + /** + * Optional. User-provided TTL of the data table. + * + * Generated from protobuf field string row_time_to_live = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $row_time_to_live = ''; + /** + * Output only. The count of rows in the data table. + * + * Generated from protobuf field int64 approximate_row_count = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $approximate_row_count = 0; + /** + * Optional. The scope info of the data table. + * During data table creation, if this field is not set, the data + * table without scopes (an unscoped table) will be created for a global + * user. For a scoped user, this field must be set. During data table + * update, if scope_info is requested to be updated, this field must be set. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DataTableScopeInfo scope_info = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $scope_info = null; + /** + * Output only. Source of the data table update. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DataTableUpdateSource update_source = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_source = 0; + /** + * Output only. Last update time of the TTL of the data table. + * + * Generated from protobuf field .google.protobuf.Timestamp row_time_to_live_update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $row_time_to_live_update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the data table + * Format: + * "{project}/locations/{location}/instances/{instance}/dataTables/{data_table}" + * @type string $display_name + * Output only. The unique display name of the data table. + * @type string $description + * Required. A user-provided description of the data table. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Table create time + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Table update time + * @type \Google\Cloud\Chronicle\V1\DataTableColumnInfo[] $column_info + * Immutable. Details of all the columns in the table + * @type string $data_table_uuid + * Output only. Data table unique id + * @type string[] $rules + * Output only. The resource names for the associated Rules that use this + * data table. Format: + * projects/{project}/locations/{location}/instances/{instance}/rules/{rule}. + * {rule} here refers to the rule id. + * @type int $rule_associations_count + * Output only. The count of rules using the data table. + * @type string $row_time_to_live + * Optional. User-provided TTL of the data table. + * @type int|string $approximate_row_count + * Output only. The count of rows in the data table. + * @type \Google\Cloud\Chronicle\V1\DataTableScopeInfo $scope_info + * Optional. The scope info of the data table. + * During data table creation, if this field is not set, the data + * table without scopes (an unscoped table) will be created for a global + * user. For a scoped user, this field must be set. During data table + * update, if scope_info is requested to be updated, this field must be set. + * @type int $update_source + * Output only. Source of the data table update. + * @type \Google\Protobuf\Timestamp $row_time_to_live_update_time + * Output only. Last update time of the TTL of the data table. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DataTable::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the data table + * Format: + * "{project}/locations/{location}/instances/{instance}/dataTables/{data_table}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name of the data table + * Format: + * "{project}/locations/{location}/instances/{instance}/dataTables/{data_table}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The unique display name of the data table. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Output only. The unique display name of the data table. + * + * Generated from protobuf field string display_name = 2 [(.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; + } + + /** + * Required. A user-provided description of the data table. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Required. A user-provided description of the data table. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. Table create time + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @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); + } + + /** + * Output only. Table create time + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. Table update time + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @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); + } + + /** + * Output only. Table update time + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Immutable. Details of all the columns in the table + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DataTableColumnInfo column_info = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * @return RepeatedField<\Google\Cloud\Chronicle\V1\DataTableColumnInfo> + */ + public function getColumnInfo() + { + return $this->column_info; + } + + /** + * Immutable. Details of all the columns in the table + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DataTableColumnInfo column_info = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * @param \Google\Cloud\Chronicle\V1\DataTableColumnInfo[] $var + * @return $this + */ + public function setColumnInfo($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\DataTableColumnInfo::class); + $this->column_info = $arr; + + return $this; + } + + /** + * Output only. Data table unique id + * + * Generated from protobuf field string data_table_uuid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDataTableUuid() + { + return $this->data_table_uuid; + } + + /** + * Output only. Data table unique id + * + * Generated from protobuf field string data_table_uuid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDataTableUuid($var) + { + GPBUtil::checkString($var, True); + $this->data_table_uuid = $var; + + return $this; + } + + /** + * Output only. The resource names for the associated Rules that use this + * data table. Format: + * projects/{project}/locations/{location}/instances/{instance}/rules/{rule}. + * {rule} here refers to the rule id. + * + * Generated from protobuf field repeated string rules = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField + */ + public function getRules() + { + return $this->rules; + } + + /** + * Output only. The resource names for the associated Rules that use this + * data table. Format: + * projects/{project}/locations/{location}/instances/{instance}/rules/{rule}. + * {rule} here refers to the rule id. + * + * Generated from protobuf field repeated string rules = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string[] $var + * @return $this + */ + public function setRules($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->rules = $arr; + + return $this; + } + + /** + * Output only. The count of rules using the data table. + * + * Generated from protobuf field int32 rule_associations_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getRuleAssociationsCount() + { + return $this->rule_associations_count; + } + + /** + * Output only. The count of rules using the data table. + * + * Generated from protobuf field int32 rule_associations_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setRuleAssociationsCount($var) + { + GPBUtil::checkInt32($var); + $this->rule_associations_count = $var; + + return $this; + } + + /** + * Optional. User-provided TTL of the data table. + * + * Generated from protobuf field string row_time_to_live = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRowTimeToLive() + { + return $this->row_time_to_live; + } + + /** + * Optional. User-provided TTL of the data table. + * + * Generated from protobuf field string row_time_to_live = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRowTimeToLive($var) + { + GPBUtil::checkString($var, True); + $this->row_time_to_live = $var; + + return $this; + } + + /** + * Output only. The count of rows in the data table. + * + * Generated from protobuf field int64 approximate_row_count = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getApproximateRowCount() + { + return $this->approximate_row_count; + } + + /** + * Output only. The count of rows in the data table. + * + * Generated from protobuf field int64 approximate_row_count = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setApproximateRowCount($var) + { + GPBUtil::checkInt64($var); + $this->approximate_row_count = $var; + + return $this; + } + + /** + * Optional. The scope info of the data table. + * During data table creation, if this field is not set, the data + * table without scopes (an unscoped table) will be created for a global + * user. For a scoped user, this field must be set. During data table + * update, if scope_info is requested to be updated, this field must be set. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DataTableScopeInfo scope_info = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Chronicle\V1\DataTableScopeInfo|null + */ + public function getScopeInfo() + { + return $this->scope_info; + } + + public function hasScopeInfo() + { + return isset($this->scope_info); + } + + public function clearScopeInfo() + { + unset($this->scope_info); + } + + /** + * Optional. The scope info of the data table. + * During data table creation, if this field is not set, the data + * table without scopes (an unscoped table) will be created for a global + * user. For a scoped user, this field must be set. During data table + * update, if scope_info is requested to be updated, this field must be set. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DataTableScopeInfo scope_info = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Chronicle\V1\DataTableScopeInfo $var + * @return $this + */ + public function setScopeInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DataTableScopeInfo::class); + $this->scope_info = $var; + + return $this; + } + + /** + * Output only. Source of the data table update. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DataTableUpdateSource update_source = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getUpdateSource() + { + return $this->update_source; + } + + /** + * Output only. Source of the data table update. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DataTableUpdateSource update_source = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setUpdateSource($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Chronicle\V1\DataTableUpdateSource::class); + $this->update_source = $var; + + return $this; + } + + /** + * Output only. Last update time of the TTL of the data table. + * + * Generated from protobuf field .google.protobuf.Timestamp row_time_to_live_update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getRowTimeToLiveUpdateTime() + { + return $this->row_time_to_live_update_time; + } + + public function hasRowTimeToLiveUpdateTime() + { + return isset($this->row_time_to_live_update_time); + } + + public function clearRowTimeToLiveUpdateTime() + { + unset($this->row_time_to_live_update_time); + } + + /** + * Output only. Last update time of the TTL of the data table. + * + * Generated from protobuf field .google.protobuf.Timestamp row_time_to_live_update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setRowTimeToLiveUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->row_time_to_live_update_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataTableColumnInfo.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataTableColumnInfo.php new file mode 100644 index 000000000000..e8d196b47d9e --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataTableColumnInfo.php @@ -0,0 +1,274 @@ +google.cloud.chronicle.v1.DataTableColumnInfo + */ +class DataTableColumnInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Column Index. 0,1,2... + * + * Generated from protobuf field int32 column_index = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $column_index = 0; + /** + * Required. Original column name of the Data Table (present in the CSV header + * in case of creation of data tables using file uploads). It must satisfy the + * following requirements: + * - Starts with letter. + * - Contains only letters, numbers and underscore. + * - Must be unique and has length < 256. + * + * Generated from protobuf field string original_column = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $original_column = ''; + /** + * Optional. Whether to include this column in the calculation of the row ID. + * If no columns have key_column = true, all columns will be included in the + * calculation of the row ID. + * + * Generated from protobuf field bool key_column = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $key_column = false; + /** + * Optional. Whether the column is a repeated values column. + * + * Generated from protobuf field bool repeated_values = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $repeated_values = false; + protected $path_or_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $mapped_column_path + * Entity proto field path that the column is mapped to + * @type int $column_type + * Column type can be STRING, CIDR (Ex- 10.1.1.0/24), REGEX + * @type int $column_index + * Required. Column Index. 0,1,2... + * @type string $original_column + * Required. Original column name of the Data Table (present in the CSV header + * in case of creation of data tables using file uploads). It must satisfy the + * following requirements: + * - Starts with letter. + * - Contains only letters, numbers and underscore. + * - Must be unique and has length < 256. + * @type bool $key_column + * Optional. Whether to include this column in the calculation of the row ID. + * If no columns have key_column = true, all columns will be included in the + * calculation of the row ID. + * @type bool $repeated_values + * Optional. Whether the column is a repeated values column. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DataTable::initOnce(); + parent::__construct($data); + } + + /** + * Entity proto field path that the column is mapped to + * + * Generated from protobuf field string mapped_column_path = 3; + * @return string + */ + public function getMappedColumnPath() + { + return $this->readOneof(3); + } + + public function hasMappedColumnPath() + { + return $this->hasOneof(3); + } + + /** + * Entity proto field path that the column is mapped to + * + * Generated from protobuf field string mapped_column_path = 3; + * @param string $var + * @return $this + */ + public function setMappedColumnPath($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Column type can be STRING, CIDR (Ex- 10.1.1.0/24), REGEX + * + * Generated from protobuf field .google.cloud.chronicle.v1.DataTableColumnInfo.DataTableColumnType column_type = 4; + * @return int + */ + public function getColumnType() + { + return $this->readOneof(4); + } + + public function hasColumnType() + { + return $this->hasOneof(4); + } + + /** + * Column type can be STRING, CIDR (Ex- 10.1.1.0/24), REGEX + * + * Generated from protobuf field .google.cloud.chronicle.v1.DataTableColumnInfo.DataTableColumnType column_type = 4; + * @param int $var + * @return $this + */ + public function setColumnType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Chronicle\V1\DataTableColumnInfo\DataTableColumnType::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Required. Column Index. 0,1,2... + * + * Generated from protobuf field int32 column_index = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getColumnIndex() + { + return $this->column_index; + } + + /** + * Required. Column Index. 0,1,2... + * + * Generated from protobuf field int32 column_index = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setColumnIndex($var) + { + GPBUtil::checkInt32($var); + $this->column_index = $var; + + return $this; + } + + /** + * Required. Original column name of the Data Table (present in the CSV header + * in case of creation of data tables using file uploads). It must satisfy the + * following requirements: + * - Starts with letter. + * - Contains only letters, numbers and underscore. + * - Must be unique and has length < 256. + * + * Generated from protobuf field string original_column = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getOriginalColumn() + { + return $this->original_column; + } + + /** + * Required. Original column name of the Data Table (present in the CSV header + * in case of creation of data tables using file uploads). It must satisfy the + * following requirements: + * - Starts with letter. + * - Contains only letters, numbers and underscore. + * - Must be unique and has length < 256. + * + * Generated from protobuf field string original_column = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setOriginalColumn($var) + { + GPBUtil::checkString($var, True); + $this->original_column = $var; + + return $this; + } + + /** + * Optional. Whether to include this column in the calculation of the row ID. + * If no columns have key_column = true, all columns will be included in the + * calculation of the row ID. + * + * Generated from protobuf field bool key_column = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getKeyColumn() + { + return $this->key_column; + } + + /** + * Optional. Whether to include this column in the calculation of the row ID. + * If no columns have key_column = true, all columns will be included in the + * calculation of the row ID. + * + * Generated from protobuf field bool key_column = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setKeyColumn($var) + { + GPBUtil::checkBool($var); + $this->key_column = $var; + + return $this; + } + + /** + * Optional. Whether the column is a repeated values column. + * + * Generated from protobuf field bool repeated_values = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getRepeatedValues() + { + return $this->repeated_values; + } + + /** + * Optional. Whether the column is a repeated values column. + * + * Generated from protobuf field bool repeated_values = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setRepeatedValues($var) + { + GPBUtil::checkBool($var); + $this->repeated_values = $var; + + return $this; + } + + /** + * @return string + */ + public function getPathOrType() + { + return $this->whichOneof("path_or_type"); + } + +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataTableColumnInfo/DataTableColumnType.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataTableColumnInfo/DataTableColumnType.php new file mode 100644 index 000000000000..66ce99ee22da --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataTableColumnInfo/DataTableColumnType.php @@ -0,0 +1,76 @@ +google.cloud.chronicle.v1.DataTableColumnInfo.DataTableColumnType + */ +class DataTableColumnType +{ + /** + * The default Data Table Column Type. + * + * Generated from protobuf enum DATA_TABLE_COLUMN_TYPE_UNSPECIFIED = 0; + */ + const DATA_TABLE_COLUMN_TYPE_UNSPECIFIED = 0; + /** + * Denotes the type of the column as STRING. + * + * Generated from protobuf enum STRING = 1; + */ + const STRING = 1; + /** + * Denotes the type of the column as REGEX. + * + * Generated from protobuf enum REGEX = 2; + */ + const REGEX = 2; + /** + * Denotes the type of the column as CIDR. + * + * Generated from protobuf enum CIDR = 3; + */ + const CIDR = 3; + /** + * Denotes the type of the column as NUMBER (includes int and float). + * + * Generated from protobuf enum NUMBER = 4; + */ + const NUMBER = 4; + + private static $valueToName = [ + self::DATA_TABLE_COLUMN_TYPE_UNSPECIFIED => 'DATA_TABLE_COLUMN_TYPE_UNSPECIFIED', + self::STRING => 'STRING', + self::REGEX => 'REGEX', + self::CIDR => 'CIDR', + self::NUMBER => 'NUMBER', + ]; + + 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataTableOperationErrors.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataTableOperationErrors.php new file mode 100644 index 000000000000..23120c0eb49b --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataTableOperationErrors.php @@ -0,0 +1,113 @@ +google.cloud.chronicle.v1.DataTableOperationErrors + */ +class DataTableOperationErrors extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. Resource name for the data table operation errors. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/dataTableOperationErrors/{data_table_operation_errors} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * The list of errors. + * Replaces the deprecated `errors` field. + * + * Generated from protobuf field repeated .google.rpc.Status rpc_errors = 3; + */ + private $rpc_errors; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. Resource name for the data table operation errors. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/dataTableOperationErrors/{data_table_operation_errors} + * @type \Google\Rpc\Status[] $rpc_errors + * The list of errors. + * Replaces the deprecated `errors` field. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DataTable::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. Resource name for the data table operation errors. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/dataTableOperationErrors/{data_table_operation_errors} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. Resource name for the data table operation errors. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/dataTableOperationErrors/{data_table_operation_errors} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The list of errors. + * Replaces the deprecated `errors` field. + * + * Generated from protobuf field repeated .google.rpc.Status rpc_errors = 3; + * @return RepeatedField<\Google\Rpc\Status> + */ + public function getRpcErrors() + { + return $this->rpc_errors; + } + + /** + * The list of errors. + * Replaces the deprecated `errors` field. + * + * Generated from protobuf field repeated .google.rpc.Status rpc_errors = 3; + * @param \Google\Rpc\Status[] $var + * @return $this + */ + public function setRpcErrors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Status::class); + $this->rpc_errors = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataTableRow.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataTableRow.php new file mode 100644 index 000000000000..09f30b14ac0c --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataTableRow.php @@ -0,0 +1,235 @@ +google.cloud.chronicle.v1.DataTableRow + */ +class DataTableRow extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the data table + * Format: + * projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}/dataTableRows/{data_table_row} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Required. All column values for a single row. The values should be in the + * same order as the columns of the data tables. + * + * Generated from protobuf field repeated string values = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $values; + /** + * Output only. DataTableRow create time + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. DataTableRow update time + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. User-provided TTL of the data table row. + * + * Generated from protobuf field string row_time_to_live = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $row_time_to_live = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the data table + * Format: + * projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}/dataTableRows/{data_table_row} + * @type string[] $values + * Required. All column values for a single row. The values should be in the + * same order as the columns of the data tables. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. DataTableRow create time + * @type \Google\Protobuf\Timestamp $update_time + * Output only. DataTableRow update time + * @type string $row_time_to_live + * Optional. User-provided TTL of the data table row. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DataTable::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the data table + * Format: + * projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}/dataTableRows/{data_table_row} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name of the data table + * Format: + * projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}/dataTableRows/{data_table_row} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. All column values for a single row. The values should be in the + * same order as the columns of the data tables. + * + * Generated from protobuf field repeated string values = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return RepeatedField + */ + public function getValues() + { + return $this->values; + } + + /** + * Required. All column values for a single row. The values should be in the + * same order as the columns of the data tables. + * + * Generated from protobuf field repeated string values = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string[] $var + * @return $this + */ + public function setValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->values = $arr; + + return $this; + } + + /** + * Output only. DataTableRow create time + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @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); + } + + /** + * Output only. DataTableRow create time + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. DataTableRow update time + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @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); + } + + /** + * Output only. DataTableRow update time + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Optional. User-provided TTL of the data table row. + * + * Generated from protobuf field string row_time_to_live = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRowTimeToLive() + { + return $this->row_time_to_live; + } + + /** + * Optional. User-provided TTL of the data table row. + * + * Generated from protobuf field string row_time_to_live = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRowTimeToLive($var) + { + GPBUtil::checkString($var, True); + $this->row_time_to_live = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataTableScopeInfo.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataTableScopeInfo.php new file mode 100644 index 000000000000..71088a6ffab9 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataTableScopeInfo.php @@ -0,0 +1,79 @@ +google.cloud.chronicle.v1.DataTableScopeInfo + */ +class DataTableScopeInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Contains the list of scope names of the data table. If the list + * is empty, the data table is treated as unscoped. The scope names should be + * full resource names and should be of the format: + * "projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{scope_name}" + * + * Generated from protobuf field repeated string data_access_scopes = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $data_access_scopes; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string[] $data_access_scopes + * Required. Contains the list of scope names of the data table. If the list + * is empty, the data table is treated as unscoped. The scope names should be + * full resource names and should be of the format: + * "projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{scope_name}" + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DataTable::initOnce(); + parent::__construct($data); + } + + /** + * Required. Contains the list of scope names of the data table. If the list + * is empty, the data table is treated as unscoped. The scope names should be + * full resource names and should be of the format: + * "projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{scope_name}" + * + * Generated from protobuf field repeated string data_access_scopes = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return RepeatedField + */ + public function getDataAccessScopes() + { + return $this->data_access_scopes; + } + + /** + * Required. Contains the list of scope names of the data table. If the list + * is empty, the data table is treated as unscoped. The scope names should be + * full resource names and should be of the format: + * "projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{scope_name}" + * + * Generated from protobuf field repeated string data_access_scopes = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string[] $var + * @return $this + */ + public function setDataAccessScopes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->data_access_scopes = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataTableUpdateSource.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataTableUpdateSource.php new file mode 100644 index 000000000000..a2d2cbf75cc5 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataTableUpdateSource.php @@ -0,0 +1,68 @@ +google.cloud.chronicle.v1.DataTableUpdateSource + */ +class DataTableUpdateSource +{ + /** + * The data table is updated by the user. + * + * Generated from protobuf enum DATA_TABLE_UPDATE_SOURCE_UNSPECIFIED = 0; + */ + const DATA_TABLE_UPDATE_SOURCE_UNSPECIFIED = 0; + /** + * The data table is updated by the user. + * + * Generated from protobuf enum USER = 1; + */ + const USER = 1; + /** + * The data table is updated by the rule. + * + * Generated from protobuf enum RULE = 2; + */ + const RULE = 2; + /** + * The data table is updated by the search. + * + * Generated from protobuf enum SEARCH = 3; + */ + const SEARCH = 3; + + private static $valueToName = [ + self::DATA_TABLE_UPDATE_SOURCE_UNSPECIFIED => 'DATA_TABLE_UPDATE_SOURCE_UNSPECIFIED', + self::USER => 'USER', + self::RULE => 'RULE', + self::SEARCH => 'SEARCH', + ]; + + 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DeleteDataAccessLabelRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DeleteDataAccessLabelRequest.php new file mode 100644 index 000000000000..31005e449a5e --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DeleteDataAccessLabelRequest.php @@ -0,0 +1,91 @@ +google.cloud.chronicle.v1.DeleteDataAccessLabelRequest + */ +class DeleteDataAccessLabelRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The ID of the data access label to delete. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The ID of the data access label to delete. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` + * Please see {@see DataAccessControlServiceClient::dataAccessLabelName()} for help formatting this field. + * + * @return \Google\Cloud\Chronicle\V1\DeleteDataAccessLabelRequest + * + * @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 ID of the data access label to delete. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DataAccessControl::initOnce(); + parent::__construct($data); + } + + /** + * Required. The ID of the data access label to delete. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` + * + * 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 ID of the data access label to delete. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` + * + * 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DeleteDataAccessScopeRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DeleteDataAccessScopeRequest.php new file mode 100644 index 000000000000..5d5ef83446ba --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DeleteDataAccessScopeRequest.php @@ -0,0 +1,91 @@ +google.cloud.chronicle.v1.DeleteDataAccessScopeRequest + */ +class DeleteDataAccessScopeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The ID of the data access scope to delete. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The ID of the data access scope to delete. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` + * Please see {@see DataAccessControlServiceClient::dataAccessScopeName()} for help formatting this field. + * + * @return \Google\Cloud\Chronicle\V1\DeleteDataAccessScopeRequest + * + * @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 ID of the data access scope to delete. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DataAccessControl::initOnce(); + parent::__construct($data); + } + + /** + * Required. The ID of the data access scope to delete. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` + * + * 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 ID of the data access scope to delete. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` + * + * 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DeleteDataTableRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DeleteDataTableRequest.php new file mode 100644 index 000000000000..5b6d521de2f3 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DeleteDataTableRequest.php @@ -0,0 +1,137 @@ +google.cloud.chronicle.v1.DeleteDataTableRequest + */ +class DeleteDataTableRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the data table to delete. + * Format + * projects/{project}/locations/{location}/instances/{instances}/dataTables/{data_table} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. If set to true, any rows under this data table will also be + * deleted. (Otherwise, the request will only work if the data table has no + * rows.) + * + * Generated from protobuf field bool force = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $force = false; + + /** + * @param string $name Required. The resource name of the data table to delete. + * Format + * projects/{project}/locations/{location}/instances/{instances}/dataTables/{data_table} + * Please see {@see DataTableServiceClient::dataTableName()} for help formatting this field. + * @param bool $force Optional. If set to true, any rows under this data table will also be + * deleted. (Otherwise, the request will only work if the data table has no + * rows.) + * + * @return \Google\Cloud\Chronicle\V1\DeleteDataTableRequest + * + * @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 resource name of the data table to delete. + * Format + * projects/{project}/locations/{location}/instances/{instances}/dataTables/{data_table} + * @type bool $force + * Optional. If set to true, any rows under this data table will also be + * deleted. (Otherwise, the request will only work if the data table has no + * rows.) + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DataTable::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the data table to delete. + * Format + * projects/{project}/locations/{location}/instances/{instances}/dataTables/{data_table} + * + * 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 resource name of the data table to delete. + * Format + * projects/{project}/locations/{location}/instances/{instances}/dataTables/{data_table} + * + * 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 set to true, any rows under this data table will also be + * deleted. (Otherwise, the request will only work if the data table has no + * rows.) + * + * Generated from protobuf field bool force = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * Optional. If set to true, any rows under this data table will also be + * deleted. (Otherwise, the request will only work if the data table has no + * rows.) + * + * 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DeleteDataTableRowRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DeleteDataTableRowRequest.php new file mode 100644 index 000000000000..90e6718b303a --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DeleteDataTableRowRequest.php @@ -0,0 +1,91 @@ +google.cloud.chronicle.v1.DeleteDataTableRowRequest + */ +class DeleteDataTableRowRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the data table row i,e row_id. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}/dataTableRows/{data_table_row} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the data table row i,e row_id. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}/dataTableRows/{data_table_row} + * Please see {@see DataTableServiceClient::dataTableRowName()} for help formatting this field. + * + * @return \Google\Cloud\Chronicle\V1\DeleteDataTableRowRequest + * + * @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 resource name of the data table row i,e row_id. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}/dataTableRows/{data_table_row} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DataTable::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the data table row i,e row_id. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}/dataTableRows/{data_table_row} + * + * 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 resource name of the data table row i,e row_id. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}/dataTableRows/{data_table_row} + * + * 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DeleteRuleRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DeleteRuleRequest.php new file mode 100644 index 000000000000..65679e334596 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DeleteRuleRequest.php @@ -0,0 +1,151 @@ +google.cloud.chronicle.v1.DeleteRuleRequest + */ +class DeleteRuleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the rule to delete. A rule revision timestamp cannot + * be specified as part of the name, as deleting specific revisions is not + * supported. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. If set to true, any retrohunts and any detections associated with + * the rule will also be deleted. If set to false, the call will only succeed + * if the rule has no associated retrohunts, including completed retrohunts, + * and no associated detections. Regardless of this field's value, the rule + * deployment associated with this rule will also be deleted. + * + * Generated from protobuf field bool force = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $force = false; + + /** + * @param string $name Required. The name of the rule to delete. A rule revision timestamp cannot + * be specified as part of the name, as deleting specific revisions is not + * supported. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + * Please see {@see RuleServiceClient::ruleName()} for help formatting this field. + * + * @return \Google\Cloud\Chronicle\V1\DeleteRuleRequest + * + * @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 rule to delete. A rule revision timestamp cannot + * be specified as part of the name, as deleting specific revisions is not + * supported. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + * @type bool $force + * Optional. If set to true, any retrohunts and any detections associated with + * the rule will also be deleted. If set to false, the call will only succeed + * if the rule has no associated retrohunts, including completed retrohunts, + * and no associated detections. Regardless of this field's value, the rule + * deployment associated with this rule will also be deleted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\Rule::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the rule to delete. A rule revision timestamp cannot + * be specified as part of the name, as deleting specific revisions is not + * supported. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + * + * 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 rule to delete. A rule revision timestamp cannot + * be specified as part of the name, as deleting specific revisions is not + * supported. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + * + * 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 set to true, any retrohunts and any detections associated with + * the rule will also be deleted. If set to false, the call will only succeed + * if the rule has no associated retrohunts, including completed retrohunts, + * and no associated detections. Regardless of this field's value, the rule + * deployment associated with this rule will also be deleted. + * + * Generated from protobuf field bool force = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * Optional. If set to true, any retrohunts and any detections associated with + * the rule will also be deleted. If set to false, the call will only succeed + * if the rule has no associated retrohunts, including completed retrohunts, + * and no associated detections. Regardless of this field's value, the rule + * deployment associated with this rule will also be deleted. + * + * 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DeleteWatchlistRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DeleteWatchlistRequest.php new file mode 100644 index 000000000000..d713acb98186 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DeleteWatchlistRequest.php @@ -0,0 +1,137 @@ +google.cloud.chronicle.v1.DeleteWatchlistRequest + */ +class DeleteWatchlistRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the watchlist to delete. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. If set to true, any entities under this watchlist will also be + * deleted. (Otherwise, the request will only work if the watchlist has no + * entities.) + * + * Generated from protobuf field bool force = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $force = false; + + /** + * @param string $name Required. The name of the watchlist to delete. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` + * Please see {@see EntityServiceClient::watchlistName()} for help formatting this field. + * @param bool $force Optional. If set to true, any entities under this watchlist will also be + * deleted. (Otherwise, the request will only work if the watchlist has no + * entities.) + * + * @return \Google\Cloud\Chronicle\V1\DeleteWatchlistRequest + * + * @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 watchlist to delete. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` + * @type bool $force + * Optional. If set to true, any entities under this watchlist will also be + * deleted. (Otherwise, the request will only work if the watchlist has no + * entities.) + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\Entity::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the watchlist to delete. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` + * + * 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 watchlist to delete. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` + * + * 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 set to true, any entities under this watchlist will also be + * deleted. (Otherwise, the request will only work if the watchlist has no + * entities.) + * + * Generated from protobuf field bool force = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * Optional. If set to true, any entities under this watchlist will also be + * deleted. (Otherwise, the request will only work if the watchlist has no + * entities.) + * + * 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetDataAccessLabelRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetDataAccessLabelRequest.php new file mode 100644 index 000000000000..74aead7733a7 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetDataAccessLabelRequest.php @@ -0,0 +1,91 @@ +google.cloud.chronicle.v1.GetDataAccessLabelRequest + */ +class GetDataAccessLabelRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The ID of the data access label to retrieve. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The ID of the data access label to retrieve. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` + * Please see {@see DataAccessControlServiceClient::dataAccessLabelName()} for help formatting this field. + * + * @return \Google\Cloud\Chronicle\V1\GetDataAccessLabelRequest + * + * @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 ID of the data access label to retrieve. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DataAccessControl::initOnce(); + parent::__construct($data); + } + + /** + * Required. The ID of the data access label to retrieve. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` + * + * 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 ID of the data access label to retrieve. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` + * + * 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetDataAccessScopeRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetDataAccessScopeRequest.php new file mode 100644 index 000000000000..0ee76b341d49 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetDataAccessScopeRequest.php @@ -0,0 +1,91 @@ +google.cloud.chronicle.v1.GetDataAccessScopeRequest + */ +class GetDataAccessScopeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The ID of the data access scope to retrieve. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The ID of the data access scope to retrieve. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` + * Please see {@see DataAccessControlServiceClient::dataAccessScopeName()} for help formatting this field. + * + * @return \Google\Cloud\Chronicle\V1\GetDataAccessScopeRequest + * + * @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 ID of the data access scope to retrieve. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DataAccessControl::initOnce(); + parent::__construct($data); + } + + /** + * Required. The ID of the data access scope to retrieve. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` + * + * 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 ID of the data access scope to retrieve. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` + * + * 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetDataTableOperationErrorsRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetDataTableOperationErrorsRequest.php new file mode 100644 index 000000000000..b00e5d52ec7d --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetDataTableOperationErrorsRequest.php @@ -0,0 +1,91 @@ +google.cloud.chronicle.v1.GetDataTableOperationErrorsRequest + */ +class GetDataTableOperationErrorsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name for the data table operation errors. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/dataTableOperationErrors/{data_table_operation_errors} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Resource name for the data table operation errors. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/dataTableOperationErrors/{data_table_operation_errors} + * Please see {@see DataTableServiceClient::dataTableOperationErrorsName()} for help formatting this field. + * + * @return \Google\Cloud\Chronicle\V1\GetDataTableOperationErrorsRequest + * + * @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 for the data table operation errors. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/dataTableOperationErrors/{data_table_operation_errors} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DataTable::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name for the data table operation errors. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/dataTableOperationErrors/{data_table_operation_errors} + * + * 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 for the data table operation errors. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/dataTableOperationErrors/{data_table_operation_errors} + * + * 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetDataTableRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetDataTableRequest.php new file mode 100644 index 000000000000..ab2aac02a02c --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetDataTableRequest.php @@ -0,0 +1,91 @@ +google.cloud.chronicle.v1.GetDataTableRequest + */ +class GetDataTableRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the data table to retrieve. + * Format: + * projects/{project}/locations/{location}/instances/{instances}/dataTables/{data_table} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the data table to retrieve. + * Format: + * projects/{project}/locations/{location}/instances/{instances}/dataTables/{data_table} + * Please see {@see DataTableServiceClient::dataTableName()} for help formatting this field. + * + * @return \Google\Cloud\Chronicle\V1\GetDataTableRequest + * + * @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 resource name of the data table to retrieve. + * Format: + * projects/{project}/locations/{location}/instances/{instances}/dataTables/{data_table} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DataTable::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the data table to retrieve. + * Format: + * projects/{project}/locations/{location}/instances/{instances}/dataTables/{data_table} + * + * 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 resource name of the data table to retrieve. + * Format: + * projects/{project}/locations/{location}/instances/{instances}/dataTables/{data_table} + * + * 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetDataTableRowRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetDataTableRowRequest.php new file mode 100644 index 000000000000..3c1918a3f2be --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetDataTableRowRequest.php @@ -0,0 +1,91 @@ +google.cloud.chronicle.v1.GetDataTableRowRequest + */ +class GetDataTableRowRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the data table row i,e row_id. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}/dataTableRows/{data_table_row} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the data table row i,e row_id. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}/dataTableRows/{data_table_row} + * Please see {@see DataTableServiceClient::dataTableRowName()} for help formatting this field. + * + * @return \Google\Cloud\Chronicle\V1\GetDataTableRowRequest + * + * @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 resource name of the data table row i,e row_id. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}/dataTableRows/{data_table_row} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DataTable::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the data table row i,e row_id. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}/dataTableRows/{data_table_row} + * + * 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 resource name of the data table row i,e row_id. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}/dataTableRows/{data_table_row} + * + * 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetInstanceRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetInstanceRequest.php new file mode 100644 index 000000000000..f7f10e18fe26 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetInstanceRequest.php @@ -0,0 +1,91 @@ +google.cloud.chronicle.v1.GetInstanceRequest + */ +class GetInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the instance to retrieve. + * Format: + * `projects/{project_id}/locations/{location}/instances/{instance}` + * + * 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 instance to retrieve. + * Format: + * `projects/{project_id}/locations/{location}/instances/{instance}` + * Please see {@see InstanceServiceClient::instanceName()} for help formatting this field. + * + * @return \Google\Cloud\Chronicle\V1\GetInstanceRequest + * + * @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 instance to retrieve. + * Format: + * `projects/{project_id}/locations/{location}/instances/{instance}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\Instance::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the instance to retrieve. + * Format: + * `projects/{project_id}/locations/{location}/instances/{instance}` + * + * 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 instance to retrieve. + * Format: + * `projects/{project_id}/locations/{location}/instances/{instance}` + * + * 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetReferenceListRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetReferenceListRequest.php new file mode 100644 index 000000000000..baf589cbd38c --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetReferenceListRequest.php @@ -0,0 +1,129 @@ +google.cloud.chronicle.v1.GetReferenceListRequest + */ +class GetReferenceListRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the reference list to retrieve. + * Format: + * `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * How much of the ReferenceList to view. Defaults to + * REFERENCE_LIST_VIEW_FULL. + * + * Generated from protobuf field .google.cloud.chronicle.v1.ReferenceListView view = 2; + */ + protected $view = 0; + + /** + * @param string $name Required. The resource name of the reference list to retrieve. + * Format: + * `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}` + * Please see {@see ReferenceListServiceClient::referenceListName()} for help formatting this field. + * + * @return \Google\Cloud\Chronicle\V1\GetReferenceListRequest + * + * @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 resource name of the reference list to retrieve. + * Format: + * `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}` + * @type int $view + * How much of the ReferenceList to view. Defaults to + * REFERENCE_LIST_VIEW_FULL. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\ReferenceList::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the reference list to retrieve. + * Format: + * `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}` + * + * 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 resource name of the reference list to retrieve. + * Format: + * `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}` + * + * 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; + } + + /** + * How much of the ReferenceList to view. Defaults to + * REFERENCE_LIST_VIEW_FULL. + * + * Generated from protobuf field .google.cloud.chronicle.v1.ReferenceListView view = 2; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * How much of the ReferenceList to view. Defaults to + * REFERENCE_LIST_VIEW_FULL. + * + * Generated from protobuf field .google.cloud.chronicle.v1.ReferenceListView view = 2; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Chronicle\V1\ReferenceListView::class); + $this->view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetRetrohuntRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetRetrohuntRequest.php new file mode 100644 index 000000000000..2d46a2a1ae1f --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetRetrohuntRequest.php @@ -0,0 +1,91 @@ +google.cloud.chronicle.v1.GetRetrohuntRequest + */ +class GetRetrohuntRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the retrohunt to retrieve. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` + * + * 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 retrohunt to retrieve. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` + * Please see {@see RuleServiceClient::retrohuntName()} for help formatting this field. + * + * @return \Google\Cloud\Chronicle\V1\GetRetrohuntRequest + * + * @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 retrohunt to retrieve. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\Rule::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the retrohunt to retrieve. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` + * + * 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 retrohunt to retrieve. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` + * + * 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetRuleDeploymentRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetRuleDeploymentRequest.php new file mode 100644 index 000000000000..c5defab4535b --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetRuleDeploymentRequest.php @@ -0,0 +1,91 @@ +google.cloud.chronicle.v1.GetRuleDeploymentRequest + */ +class GetRuleDeploymentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the rule deployment to retrieve. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` + * + * 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 rule deployment to retrieve. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` + * Please see {@see RuleServiceClient::ruleDeploymentName()} for help formatting this field. + * + * @return \Google\Cloud\Chronicle\V1\GetRuleDeploymentRequest + * + * @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 rule deployment to retrieve. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\Rule::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the rule deployment to retrieve. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` + * + * 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 rule deployment to retrieve. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` + * + * 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetRuleRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetRuleRequest.php new file mode 100644 index 000000000000..d43e6dff3705 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetRuleRequest.php @@ -0,0 +1,129 @@ +google.cloud.chronicle.v1.GetRuleRequest + */ +class GetRuleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the rule to retrieve. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The view field indicates the scope of fields to populate for the Rule being + * returned. If unspecified, defaults to FULL. + * + * Generated from protobuf field .google.cloud.chronicle.v1.RuleView view = 2; + */ + protected $view = 0; + + /** + * @param string $name Required. The name of the rule to retrieve. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + * Please see {@see RuleServiceClient::ruleName()} for help formatting this field. + * + * @return \Google\Cloud\Chronicle\V1\GetRuleRequest + * + * @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 rule to retrieve. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + * @type int $view + * The view field indicates the scope of fields to populate for the Rule being + * returned. If unspecified, defaults to FULL. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\Rule::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the rule to retrieve. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + * + * 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 rule to retrieve. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + * + * 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 view field indicates the scope of fields to populate for the Rule being + * returned. If unspecified, defaults to FULL. + * + * Generated from protobuf field .google.cloud.chronicle.v1.RuleView view = 2; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * The view field indicates the scope of fields to populate for the Rule being + * returned. If unspecified, defaults to FULL. + * + * Generated from protobuf field .google.cloud.chronicle.v1.RuleView view = 2; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Chronicle\V1\RuleView::class); + $this->view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetWatchlistRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetWatchlistRequest.php new file mode 100644 index 000000000000..056e4ed0fcf8 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetWatchlistRequest.php @@ -0,0 +1,96 @@ +google.cloud.chronicle.v1.GetWatchlistRequest + */ +class GetWatchlistRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of watchlists. + * The name of the watchlist to retrieve. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The parent, which owns this collection of watchlists. + * The name of the watchlist to retrieve. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` + * Please see {@see EntityServiceClient::watchlistName()} for help formatting this field. + * + * @return \Google\Cloud\Chronicle\V1\GetWatchlistRequest + * + * @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 parent, which owns this collection of watchlists. + * The name of the watchlist to retrieve. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\Entity::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of watchlists. + * The name of the watchlist to retrieve. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` + * + * 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 parent, which owns this collection of watchlists. + * The name of the watchlist to retrieve. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` + * + * 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/IngestionLabel.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/IngestionLabel.php new file mode 100644 index 000000000000..de4fea8fbc81 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/IngestionLabel.php @@ -0,0 +1,109 @@ +google.cloud.chronicle.v1.IngestionLabel + */ +class IngestionLabel extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The key of the ingestion label. Always required. + * + * Generated from protobuf field string ingestion_label_key = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $ingestion_label_key = ''; + /** + * Optional. The value of the ingestion label. Optional. An object + * with no provided value and some key provided would match + * against the given key and ANY value. + * + * Generated from protobuf field string ingestion_label_value = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $ingestion_label_value = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $ingestion_label_key + * Required. The key of the ingestion label. Always required. + * @type string $ingestion_label_value + * Optional. The value of the ingestion label. Optional. An object + * with no provided value and some key provided would match + * against the given key and ANY value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DataAccessControl::initOnce(); + parent::__construct($data); + } + + /** + * Required. The key of the ingestion label. Always required. + * + * Generated from protobuf field string ingestion_label_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getIngestionLabelKey() + { + return $this->ingestion_label_key; + } + + /** + * Required. The key of the ingestion label. Always required. + * + * Generated from protobuf field string ingestion_label_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setIngestionLabelKey($var) + { + GPBUtil::checkString($var, True); + $this->ingestion_label_key = $var; + + return $this; + } + + /** + * Optional. The value of the ingestion label. Optional. An object + * with no provided value and some key provided would match + * against the given key and ANY value. + * + * Generated from protobuf field string ingestion_label_value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getIngestionLabelValue() + { + return $this->ingestion_label_value; + } + + /** + * Optional. The value of the ingestion label. Optional. An object + * with no provided value and some key provided would match + * against the given key and ANY value. + * + * Generated from protobuf field string ingestion_label_value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setIngestionLabelValue($var) + { + GPBUtil::checkString($var, True); + $this->ingestion_label_value = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/InputsUsed.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/InputsUsed.php new file mode 100644 index 000000000000..a8afa8fd340e --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/InputsUsed.php @@ -0,0 +1,137 @@ +google.cloud.chronicle.v1.InputsUsed + */ +class InputsUsed extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Whether the rule queries UDM events. + * + * Generated from protobuf field bool uses_udm = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $uses_udm = false; + /** + * Optional. Whether the rule queries entity events. + * + * Generated from protobuf field bool uses_entity = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $uses_entity = false; + /** + * Optional. Whether the rule queries detections. + * + * Generated from protobuf field bool uses_detection = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $uses_detection = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $uses_udm + * Optional. Whether the rule queries UDM events. + * @type bool $uses_entity + * Optional. Whether the rule queries entity events. + * @type bool $uses_detection + * Optional. Whether the rule queries detections. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\Rule::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Whether the rule queries UDM events. + * + * Generated from protobuf field bool uses_udm = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getUsesUdm() + { + return $this->uses_udm; + } + + /** + * Optional. Whether the rule queries UDM events. + * + * Generated from protobuf field bool uses_udm = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setUsesUdm($var) + { + GPBUtil::checkBool($var); + $this->uses_udm = $var; + + return $this; + } + + /** + * Optional. Whether the rule queries entity events. + * + * Generated from protobuf field bool uses_entity = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getUsesEntity() + { + return $this->uses_entity; + } + + /** + * Optional. Whether the rule queries entity events. + * + * Generated from protobuf field bool uses_entity = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setUsesEntity($var) + { + GPBUtil::checkBool($var); + $this->uses_entity = $var; + + return $this; + } + + /** + * Optional. Whether the rule queries detections. + * + * Generated from protobuf field bool uses_detection = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getUsesDetection() + { + return $this->uses_detection; + } + + /** + * Optional. Whether the rule queries detections. + * + * Generated from protobuf field bool uses_detection = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setUsesDetection($var) + { + GPBUtil::checkBool($var); + $this->uses_detection = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Instance.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Instance.php new file mode 100644 index 000000000000..4f364828a412 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Instance.php @@ -0,0 +1,71 @@ +google.cloud.chronicle.v1.Instance + */ +class Instance extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of this instance. + * Format: `projects/{project}/locations/{location}/instances/{instance}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of this instance. + * Format: `projects/{project}/locations/{location}/instances/{instance}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\Instance::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of this instance. + * Format: `projects/{project}/locations/{location}/instances/{instance}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name of this instance. + * Format: `projects/{project}/locations/{location}/instances/{instance}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListDataAccessLabelsRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListDataAccessLabelsRequest.php new file mode 100644 index 000000000000..40f14437c42a --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListDataAccessLabelsRequest.php @@ -0,0 +1,220 @@ +google.cloud.chronicle.v1.ListDataAccessLabelsRequest + */ +class ListDataAccessLabelsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where this data access label will be created. + * Format: `projects/{project}/locations/{location}/instances/{instance}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of data access labels to return. The service may return + * fewer than this value. If unspecified, at most 100 data access labels will + * be returned. The maximum value is 1000; values above 1000 will be coerced + * to 1000. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token, received from a previous `ListDataAccessLabelsRequest` call. + * Provide this to retrieve the subsequent page. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Optional. A filter which should follow the guidelines of AIP-160. + * Supports filtering on all fieds of DataAccessLabel and all operations as + * mentioned in https://google.aip.dev/160. + * example filter: "create_time greater than \"2023-04-21T11:30:00-04:00\" OR + * display_name:\"-21-1\"". + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + + /** + * @param string $parent Required. The parent resource where this data access label will be created. + * Format: `projects/{project}/locations/{location}/instances/{instance}` + * Please see {@see DataAccessControlServiceClient::instanceName()} for help formatting this field. + * + * @return \Google\Cloud\Chronicle\V1\ListDataAccessLabelsRequest + * + * @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 parent resource where this data access label will be created. + * Format: `projects/{project}/locations/{location}/instances/{instance}` + * @type int $page_size + * The maximum number of data access labels to return. The service may return + * fewer than this value. If unspecified, at most 100 data access labels will + * be returned. The maximum value is 1000; values above 1000 will be coerced + * to 1000. + * @type string $page_token + * A page token, received from a previous `ListDataAccessLabelsRequest` call. + * Provide this to retrieve the subsequent page. + * @type string $filter + * Optional. A filter which should follow the guidelines of AIP-160. + * Supports filtering on all fieds of DataAccessLabel and all operations as + * mentioned in https://google.aip.dev/160. + * example filter: "create_time greater than \"2023-04-21T11:30:00-04:00\" OR + * display_name:\"-21-1\"". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DataAccessControl::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where this data access label will be created. + * Format: `projects/{project}/locations/{location}/instances/{instance}` + * + * 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 parent resource where this data access label will be created. + * Format: `projects/{project}/locations/{location}/instances/{instance}` + * + * 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 data access labels to return. The service may return + * fewer than this value. If unspecified, at most 100 data access labels will + * be returned. The maximum value is 1000; values above 1000 will be coerced + * to 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of data access labels to return. The service may return + * fewer than this value. If unspecified, at most 100 data access labels will + * be returned. The maximum value is 1000; values above 1000 will be coerced + * to 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; + } + + /** + * A page token, received from a previous `ListDataAccessLabelsRequest` call. + * Provide this to retrieve the subsequent page. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token, received from a previous `ListDataAccessLabelsRequest` call. + * Provide this to retrieve the subsequent page. + * + * 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; + } + + /** + * Optional. A filter which should follow the guidelines of AIP-160. + * Supports filtering on all fieds of DataAccessLabel and all operations as + * mentioned in https://google.aip.dev/160. + * example filter: "create_time greater than \"2023-04-21T11:30:00-04:00\" OR + * display_name:\"-21-1\"". + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. A filter which should follow the guidelines of AIP-160. + * Supports filtering on all fieds of DataAccessLabel and all operations as + * mentioned in https://google.aip.dev/160. + * example filter: "create_time greater than \"2023-04-21T11:30:00-04:00\" OR + * display_name:\"-21-1\"". + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListDataAccessLabelsResponse.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListDataAccessLabelsResponse.php new file mode 100644 index 000000000000..0fb2a491bf5d --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListDataAccessLabelsResponse.php @@ -0,0 +1,105 @@ +google.cloud.chronicle.v1.ListDataAccessLabelsResponse + */ +class ListDataAccessLabelsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of data access labels. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DataAccessLabel data_access_labels = 1; + */ + private $data_access_labels; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * 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 \Google\Cloud\Chronicle\V1\DataAccessLabel[] $data_access_labels + * List of data access labels. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DataAccessControl::initOnce(); + parent::__construct($data); + } + + /** + * List of data access labels. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DataAccessLabel data_access_labels = 1; + * @return RepeatedField<\Google\Cloud\Chronicle\V1\DataAccessLabel> + */ + public function getDataAccessLabels() + { + return $this->data_access_labels; + } + + /** + * List of data access labels. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DataAccessLabel data_access_labels = 1; + * @param \Google\Cloud\Chronicle\V1\DataAccessLabel[] $var + * @return $this + */ + public function setDataAccessLabels($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\DataAccessLabel::class); + $this->data_access_labels = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListDataAccessScopesRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListDataAccessScopesRequest.php new file mode 100644 index 000000000000..54813ad9638e --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListDataAccessScopesRequest.php @@ -0,0 +1,220 @@ +google.cloud.chronicle.v1.ListDataAccessScopesRequest + */ +class ListDataAccessScopesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where this data access scope will be created. + * Format: `projects/{project}/locations/{location}/instances/{instance}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of data access scopes to return. The service may return + * fewer than this value. If unspecified, at most 100 data access scopes will + * be returned. The maximum value is 1000; values above 1000 will be coerced + * to 1000. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token, received from a previous `ListDataAccessScopesRequest` call. + * Provide this to retrieve the subsequent page. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Optional. A filter which should follow the guidelines of AIP-160. + * Supports filtering on all fieds of DataAccessScope and all operations as + * mentioned in https://google.aip.dev/160. + * example filter: "create_time greater than \"2023-04-21T11:30:00-04:00\" OR + * display_name:\"-21-1\"". + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + + /** + * @param string $parent Required. The parent resource where this data access scope will be created. + * Format: `projects/{project}/locations/{location}/instances/{instance}` + * Please see {@see DataAccessControlServiceClient::instanceName()} for help formatting this field. + * + * @return \Google\Cloud\Chronicle\V1\ListDataAccessScopesRequest + * + * @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 parent resource where this data access scope will be created. + * Format: `projects/{project}/locations/{location}/instances/{instance}` + * @type int $page_size + * The maximum number of data access scopes to return. The service may return + * fewer than this value. If unspecified, at most 100 data access scopes will + * be returned. The maximum value is 1000; values above 1000 will be coerced + * to 1000. + * @type string $page_token + * A page token, received from a previous `ListDataAccessScopesRequest` call. + * Provide this to retrieve the subsequent page. + * @type string $filter + * Optional. A filter which should follow the guidelines of AIP-160. + * Supports filtering on all fieds of DataAccessScope and all operations as + * mentioned in https://google.aip.dev/160. + * example filter: "create_time greater than \"2023-04-21T11:30:00-04:00\" OR + * display_name:\"-21-1\"". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DataAccessControl::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where this data access scope will be created. + * Format: `projects/{project}/locations/{location}/instances/{instance}` + * + * 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 parent resource where this data access scope will be created. + * Format: `projects/{project}/locations/{location}/instances/{instance}` + * + * 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 data access scopes to return. The service may return + * fewer than this value. If unspecified, at most 100 data access scopes will + * be returned. The maximum value is 1000; values above 1000 will be coerced + * to 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of data access scopes to return. The service may return + * fewer than this value. If unspecified, at most 100 data access scopes will + * be returned. The maximum value is 1000; values above 1000 will be coerced + * to 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; + } + + /** + * A page token, received from a previous `ListDataAccessScopesRequest` call. + * Provide this to retrieve the subsequent page. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token, received from a previous `ListDataAccessScopesRequest` call. + * Provide this to retrieve the subsequent page. + * + * 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; + } + + /** + * Optional. A filter which should follow the guidelines of AIP-160. + * Supports filtering on all fieds of DataAccessScope and all operations as + * mentioned in https://google.aip.dev/160. + * example filter: "create_time greater than \"2023-04-21T11:30:00-04:00\" OR + * display_name:\"-21-1\"". + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. A filter which should follow the guidelines of AIP-160. + * Supports filtering on all fieds of DataAccessScope and all operations as + * mentioned in https://google.aip.dev/160. + * example filter: "create_time greater than \"2023-04-21T11:30:00-04:00\" OR + * display_name:\"-21-1\"". + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListDataAccessScopesResponse.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListDataAccessScopesResponse.php new file mode 100644 index 000000000000..fd1d5cd91bc8 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListDataAccessScopesResponse.php @@ -0,0 +1,149 @@ +google.cloud.chronicle.v1.ListDataAccessScopesResponse + */ +class ListDataAccessScopesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of data access scopes. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DataAccessScope data_access_scopes = 1; + */ + private $data_access_scopes; + /** + * Whether or not global scope is granted to the user. + * + * Generated from protobuf field optional bool global_data_access_scope_granted = 3; + */ + protected $global_data_access_scope_granted = null; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * 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 \Google\Cloud\Chronicle\V1\DataAccessScope[] $data_access_scopes + * List of data access scopes. + * @type bool $global_data_access_scope_granted + * Whether or not global scope is granted to the user. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DataAccessControl::initOnce(); + parent::__construct($data); + } + + /** + * List of data access scopes. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DataAccessScope data_access_scopes = 1; + * @return RepeatedField<\Google\Cloud\Chronicle\V1\DataAccessScope> + */ + public function getDataAccessScopes() + { + return $this->data_access_scopes; + } + + /** + * List of data access scopes. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DataAccessScope data_access_scopes = 1; + * @param \Google\Cloud\Chronicle\V1\DataAccessScope[] $var + * @return $this + */ + public function setDataAccessScopes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\DataAccessScope::class); + $this->data_access_scopes = $arr; + + return $this; + } + + /** + * Whether or not global scope is granted to the user. + * + * Generated from protobuf field optional bool global_data_access_scope_granted = 3; + * @return bool + */ + public function getGlobalDataAccessScopeGranted() + { + return isset($this->global_data_access_scope_granted) ? $this->global_data_access_scope_granted : false; + } + + public function hasGlobalDataAccessScopeGranted() + { + return isset($this->global_data_access_scope_granted); + } + + public function clearGlobalDataAccessScopeGranted() + { + unset($this->global_data_access_scope_granted); + } + + /** + * Whether or not global scope is granted to the user. + * + * Generated from protobuf field optional bool global_data_access_scope_granted = 3; + * @param bool $var + * @return $this + */ + public function setGlobalDataAccessScopeGranted($var) + { + GPBUtil::checkBool($var); + $this->global_data_access_scope_granted = $var; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListDataTableRowsRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListDataTableRowsRequest.php new file mode 100644 index 000000000000..3289a1b5e1cc --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListDataTableRowsRequest.php @@ -0,0 +1,247 @@ +google.cloud.chronicle.v1.ListDataTableRowsRequest + */ +class ListDataTableRowsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource id of the data table. + * Format: + * projects/{project}/locations/{locations}/instances/{instance}/dataTables/{data_table} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of data table rows to return. The service may + * return fewer than this value. If unspecified, at most 100 data table rows + * will be returned. The maximum value is 1000; values above 1000 will be + * coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A page token, received from a previous `ListDataTableRows` call. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Configures ordering of DataTables in the response. + * Note: Our implementation currently supports order by "create_time asc" only + * + * Generated from protobuf field string order_by = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + /** + * Optional. Filter facilitating search over data table rows. This filter + * performs a case-insensitive substring match on the row values. + * + * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + + /** + * @param string $parent Required. The resource id of the data table. + * Format: + * projects/{project}/locations/{locations}/instances/{instance}/dataTables/{data_table} + * Please see {@see DataTableServiceClient::dataTableName()} for help formatting this field. + * + * @return \Google\Cloud\Chronicle\V1\ListDataTableRowsRequest + * + * @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 resource id of the data table. + * Format: + * projects/{project}/locations/{locations}/instances/{instance}/dataTables/{data_table} + * @type int $page_size + * Optional. The maximum number of data table rows to return. The service may + * return fewer than this value. If unspecified, at most 100 data table rows + * will be returned. The maximum value is 1000; values above 1000 will be + * coerced to 1000. + * @type string $page_token + * Optional. A page token, received from a previous `ListDataTableRows` call. + * @type string $order_by + * Optional. Configures ordering of DataTables in the response. + * Note: Our implementation currently supports order by "create_time asc" only + * @type string $filter + * Optional. Filter facilitating search over data table rows. This filter + * performs a case-insensitive substring match on the row values. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DataTable::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource id of the data table. + * Format: + * projects/{project}/locations/{locations}/instances/{instance}/dataTables/{data_table} + * + * 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 resource id of the data table. + * Format: + * projects/{project}/locations/{locations}/instances/{instance}/dataTables/{data_table} + * + * 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 data table rows to return. The service may + * return fewer than this value. If unspecified, at most 100 data table rows + * will be returned. The maximum value is 1000; values above 1000 will be + * coerced to 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 data table rows to return. The service may + * return fewer than this value. If unspecified, at most 100 data table rows + * will be returned. The maximum value is 1000; values above 1000 will be + * coerced to 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. A page token, received from a previous `ListDataTableRows` call. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A page token, received from a previous `ListDataTableRows` 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; + } + + /** + * Optional. Configures ordering of DataTables in the response. + * Note: Our implementation currently supports order by "create_time asc" only + * + * Generated from protobuf field string order_by = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Configures ordering of DataTables in the response. + * Note: Our implementation currently supports order by "create_time asc" only + * + * Generated from protobuf field string order_by = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Optional. Filter facilitating search over data table rows. This filter + * performs a case-insensitive substring match on the row values. + * + * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Filter facilitating search over data table rows. This filter + * performs a case-insensitive substring match on the row values. + * + * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListDataTableRowsResponse.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListDataTableRowsResponse.php new file mode 100644 index 000000000000..7cde914b2a14 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListDataTableRowsResponse.php @@ -0,0 +1,105 @@ +google.cloud.chronicle.v1.ListDataTableRowsResponse + */ +class ListDataTableRowsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of the data table rows returned. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DataTableRow data_table_rows = 1; + */ + private $data_table_rows; + /** + * Optional. A token, which can be sent as `page_token` to retrieve the next + * page. If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Chronicle\V1\DataTableRow[] $data_table_rows + * The list of the data table rows returned. + * @type string $next_page_token + * Optional. A token, which can be sent as `page_token` to retrieve the next + * page. If this field is omitted, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DataTable::initOnce(); + parent::__construct($data); + } + + /** + * The list of the data table rows returned. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DataTableRow data_table_rows = 1; + * @return RepeatedField<\Google\Cloud\Chronicle\V1\DataTableRow> + */ + public function getDataTableRows() + { + return $this->data_table_rows; + } + + /** + * The list of the data table rows returned. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DataTableRow data_table_rows = 1; + * @param \Google\Cloud\Chronicle\V1\DataTableRow[] $var + * @return $this + */ + public function setDataTableRows($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\DataTableRow::class); + $this->data_table_rows = $arr; + + return $this; + } + + /** + * Optional. A token, which can be sent as `page_token` to retrieve the next + * page. If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Optional. A token, which can be sent as `page_token` to retrieve the next + * page. If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListDataTablesRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListDataTablesRequest.php new file mode 100644 index 000000000000..bb06c76adbf4 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListDataTablesRequest.php @@ -0,0 +1,220 @@ +google.cloud.chronicle.v1.ListDataTablesRequest + */ +class ListDataTablesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where this data table will be created. + * Format: projects/{project}/locations/{location}/instances/{instance} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of data tables to return. The service may + * return fewer than this value. If unspecified, at most 100 data tables will + * be returned. The maximum value is 1000; values above 1000 will be coerced + * to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A page token, received from a previous `ListDataTables` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListDataTables` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Configures ordering of DataTables in the response. + * Note: Our implementation currently supports order by "create_time asc" only + * + * Generated from protobuf field string order_by = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent resource where this data table will be created. + * Format: projects/{project}/locations/{location}/instances/{instance} + * Please see {@see DataTableServiceClient::instanceName()} for help formatting this field. + * + * @return \Google\Cloud\Chronicle\V1\ListDataTablesRequest + * + * @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 parent resource where this data table will be created. + * Format: projects/{project}/locations/{location}/instances/{instance} + * @type int $page_size + * Optional. The maximum number of data tables to return. The service may + * return fewer than this value. If unspecified, at most 100 data tables will + * be returned. The maximum value is 1000; values above 1000 will be coerced + * to 1000. + * @type string $page_token + * Optional. A page token, received from a previous `ListDataTables` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListDataTables` must match the call that provided the page + * token. + * @type string $order_by + * Optional. Configures ordering of DataTables in the response. + * Note: Our implementation currently supports order by "create_time asc" only + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DataTable::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where this data table will be created. + * Format: projects/{project}/locations/{location}/instances/{instance} + * + * 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 parent resource where this data table will be created. + * Format: projects/{project}/locations/{location}/instances/{instance} + * + * 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 data tables to return. The service may + * return fewer than this value. If unspecified, at most 100 data tables will + * be returned. The maximum value is 1000; values above 1000 will be coerced + * to 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 data tables to return. The service may + * return fewer than this value. If unspecified, at most 100 data tables will + * be returned. The maximum value is 1000; values above 1000 will be coerced + * to 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. A page token, received from a previous `ListDataTables` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListDataTables` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A page token, received from a previous `ListDataTables` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListDataTables` must match the call that provided the page + * token. + * + * 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; + } + + /** + * Optional. Configures ordering of DataTables in the response. + * Note: Our implementation currently supports order by "create_time asc" only + * + * Generated from protobuf field string order_by = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Configures ordering of DataTables in the response. + * Note: Our implementation currently supports order by "create_time asc" only + * + * Generated from protobuf field string order_by = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListDataTablesResponse.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListDataTablesResponse.php new file mode 100644 index 000000000000..51e7bfc065c6 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListDataTablesResponse.php @@ -0,0 +1,105 @@ +google.cloud.chronicle.v1.ListDataTablesResponse + */ +class ListDataTablesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of the data tables returned. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DataTable data_tables = 1; + */ + private $data_tables; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * 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 \Google\Cloud\Chronicle\V1\DataTable[] $data_tables + * The list of the data tables returned. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DataTable::initOnce(); + parent::__construct($data); + } + + /** + * The list of the data tables returned. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DataTable data_tables = 1; + * @return RepeatedField<\Google\Cloud\Chronicle\V1\DataTable> + */ + public function getDataTables() + { + return $this->data_tables; + } + + /** + * The list of the data tables returned. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DataTable data_tables = 1; + * @param \Google\Cloud\Chronicle\V1\DataTable[] $var + * @return $this + */ + public function setDataTables($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\DataTable::class); + $this->data_tables = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListReferenceListsRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListReferenceListsRequest.php new file mode 100644 index 000000000000..f06a8a98b070 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListReferenceListsRequest.php @@ -0,0 +1,221 @@ +google.cloud.chronicle.v1.ListReferenceListsRequest + */ +class ListReferenceListsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of reference lists. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of reference lists to return. + * The service may return fewer than this value. + * If unspecified, at most 100 reference lists will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token, received from a previous `ListReferenceLists` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListReferenceLists` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * How much of each ReferenceList to view. Defaults to + * REFERENCE_LIST_VIEW_BASIC. + * + * Generated from protobuf field .google.cloud.chronicle.v1.ReferenceListView view = 4; + */ + protected $view = 0; + + /** + * @param string $parent Required. The parent, which owns this collection of reference lists. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}` + * Please see {@see ReferenceListServiceClient::instanceName()} for help formatting this field. + * + * @return \Google\Cloud\Chronicle\V1\ListReferenceListsRequest + * + * @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 parent, which owns this collection of reference lists. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}` + * @type int $page_size + * The maximum number of reference lists to return. + * The service may return fewer than this value. + * If unspecified, at most 100 reference lists will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * @type string $page_token + * A page token, received from a previous `ListReferenceLists` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListReferenceLists` must + * match the call that provided the page token. + * @type int $view + * How much of each ReferenceList to view. Defaults to + * REFERENCE_LIST_VIEW_BASIC. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\ReferenceList::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of reference lists. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}` + * + * 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 parent, which owns this collection of reference lists. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}` + * + * 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 reference lists to return. + * The service may return fewer than this value. + * If unspecified, at most 100 reference lists will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of reference lists to return. + * The service may return fewer than this value. + * If unspecified, at most 100 reference lists will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 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; + } + + /** + * A page token, received from a previous `ListReferenceLists` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListReferenceLists` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token, received from a previous `ListReferenceLists` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListReferenceLists` must + * match the call that provided the page token. + * + * 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; + } + + /** + * How much of each ReferenceList to view. Defaults to + * REFERENCE_LIST_VIEW_BASIC. + * + * Generated from protobuf field .google.cloud.chronicle.v1.ReferenceListView view = 4; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * How much of each ReferenceList to view. Defaults to + * REFERENCE_LIST_VIEW_BASIC. + * + * Generated from protobuf field .google.cloud.chronicle.v1.ReferenceListView view = 4; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Chronicle\V1\ReferenceListView::class); + $this->view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListReferenceListsResponse.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListReferenceListsResponse.php new file mode 100644 index 000000000000..9c7b02ac252a --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListReferenceListsResponse.php @@ -0,0 +1,109 @@ +google.cloud.chronicle.v1.ListReferenceListsResponse + */ +class ListReferenceListsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The reference lists. + * Ordered in ascending alphabetical order by name. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.ReferenceList reference_lists = 1; + */ + private $reference_lists; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * 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 \Google\Cloud\Chronicle\V1\ReferenceList[] $reference_lists + * The reference lists. + * Ordered in ascending alphabetical order by name. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\ReferenceList::initOnce(); + parent::__construct($data); + } + + /** + * The reference lists. + * Ordered in ascending alphabetical order by name. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.ReferenceList reference_lists = 1; + * @return RepeatedField<\Google\Cloud\Chronicle\V1\ReferenceList> + */ + public function getReferenceLists() + { + return $this->reference_lists; + } + + /** + * The reference lists. + * Ordered in ascending alphabetical order by name. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.ReferenceList reference_lists = 1; + * @param \Google\Cloud\Chronicle\V1\ReferenceList[] $var + * @return $this + */ + public function setReferenceLists($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\ReferenceList::class); + $this->reference_lists = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRetrohuntsRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRetrohuntsRequest.php new file mode 100644 index 000000000000..0fb98bf934cf --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRetrohuntsRequest.php @@ -0,0 +1,225 @@ +google.cloud.chronicle.v1.ListRetrohuntsRequest + */ +class ListRetrohuntsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The rule that the retrohunts belong to. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of retrohunt to return. The service may return fewer + * than this value. If unspecified, at most 100 retrohunts will be returned. + * The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token, received from a previous `ListRetrohunts` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListRetrohunts` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * A filter that can be used to retrieve specific rule deployments. + * The following fields are filterable: + * state + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + + /** + * @param string $parent Required. The rule that the retrohunts belong to. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + * Please see {@see RuleServiceClient::ruleName()} for help formatting this field. + * + * @return \Google\Cloud\Chronicle\V1\ListRetrohuntsRequest + * + * @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 rule that the retrohunts belong to. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + * @type int $page_size + * The maximum number of retrohunt to return. The service may return fewer + * than this value. If unspecified, at most 100 retrohunts will be returned. + * The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * @type string $page_token + * A page token, received from a previous `ListRetrohunts` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListRetrohunts` must + * match the call that provided the page token. + * @type string $filter + * A filter that can be used to retrieve specific rule deployments. + * The following fields are filterable: + * state + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\Rule::initOnce(); + parent::__construct($data); + } + + /** + * Required. The rule that the retrohunts belong to. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + * + * 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 rule that the retrohunts belong to. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + * + * 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 retrohunt to return. The service may return fewer + * than this value. If unspecified, at most 100 retrohunts will be returned. + * The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of retrohunt to return. The service may return fewer + * than this value. If unspecified, at most 100 retrohunts will be returned. + * The maximum value is 1000; values above 1000 will be coerced to + * 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; + } + + /** + * A page token, received from a previous `ListRetrohunts` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListRetrohunts` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token, received from a previous `ListRetrohunts` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListRetrohunts` must + * match the call that provided the page token. + * + * 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; + } + + /** + * A filter that can be used to retrieve specific rule deployments. + * The following fields are filterable: + * state + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * A filter that can be used to retrieve specific rule deployments. + * The following fields are filterable: + * state + * + * 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRetrohuntsResponse.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRetrohuntsResponse.php new file mode 100644 index 000000000000..c4dc57d829af --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRetrohuntsResponse.php @@ -0,0 +1,105 @@ +google.cloud.chronicle.v1.ListRetrohuntsResponse + */ +class ListRetrohuntsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The retrohunts from the specified rule. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.Retrohunt retrohunts = 1; + */ + private $retrohunts; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * 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 \Google\Cloud\Chronicle\V1\Retrohunt[] $retrohunts + * The retrohunts from the specified rule. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\Rule::initOnce(); + parent::__construct($data); + } + + /** + * The retrohunts from the specified rule. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.Retrohunt retrohunts = 1; + * @return RepeatedField<\Google\Cloud\Chronicle\V1\Retrohunt> + */ + public function getRetrohunts() + { + return $this->retrohunts; + } + + /** + * The retrohunts from the specified rule. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.Retrohunt retrohunts = 1; + * @param \Google\Cloud\Chronicle\V1\Retrohunt[] $var + * @return $this + */ + public function setRetrohunts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\Retrohunt::class); + $this->retrohunts = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRuleDeploymentsRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRuleDeploymentsRequest.php new file mode 100644 index 000000000000..a9135574e7c7 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRuleDeploymentsRequest.php @@ -0,0 +1,230 @@ +google.cloud.chronicle.v1.ListRuleDeploymentsRequest + */ +class ListRuleDeploymentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The collection of all parents which own all rule deployments. The + * "-" wildcard token must be used as the rule identifier in the resource + * path. Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/-` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of rule deployments to return. The service may return + * fewer than this value. If unspecified, at most 100 rule deployments will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token, received from a previous `ListRuleDeployments` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListRuleDeployments` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * A filter that can be used to retrieve specific rule deployments. + * The following fields are filterable: + * archived, name + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + + /** + * @param string $parent Required. The collection of all parents which own all rule deployments. The + * "-" wildcard token must be used as the rule identifier in the resource + * path. Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/-` + * Please see {@see RuleServiceClient::ruleName()} for help formatting this field. + * + * @return \Google\Cloud\Chronicle\V1\ListRuleDeploymentsRequest + * + * @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 collection of all parents which own all rule deployments. The + * "-" wildcard token must be used as the rule identifier in the resource + * path. Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/-` + * @type int $page_size + * The maximum number of rule deployments to return. The service may return + * fewer than this value. If unspecified, at most 100 rule deployments will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * @type string $page_token + * A page token, received from a previous `ListRuleDeployments` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListRuleDeployments` + * must match the call that provided the page token. + * @type string $filter + * A filter that can be used to retrieve specific rule deployments. + * The following fields are filterable: + * archived, name + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\Rule::initOnce(); + parent::__construct($data); + } + + /** + * Required. The collection of all parents which own all rule deployments. The + * "-" wildcard token must be used as the rule identifier in the resource + * path. Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/-` + * + * 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 collection of all parents which own all rule deployments. The + * "-" wildcard token must be used as the rule identifier in the resource + * path. Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/-` + * + * 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 rule deployments to return. The service may return + * fewer than this value. If unspecified, at most 100 rule deployments will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of rule deployments to return. The service may return + * fewer than this value. If unspecified, at most 100 rule deployments will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 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; + } + + /** + * A page token, received from a previous `ListRuleDeployments` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListRuleDeployments` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token, received from a previous `ListRuleDeployments` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListRuleDeployments` + * must match the call that provided the page token. + * + * 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; + } + + /** + * A filter that can be used to retrieve specific rule deployments. + * The following fields are filterable: + * archived, name + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * A filter that can be used to retrieve specific rule deployments. + * The following fields are filterable: + * archived, name + * + * 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRuleDeploymentsResponse.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRuleDeploymentsResponse.php new file mode 100644 index 000000000000..b3057a270969 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRuleDeploymentsResponse.php @@ -0,0 +1,105 @@ +google.cloud.chronicle.v1.ListRuleDeploymentsResponse + */ +class ListRuleDeploymentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The rule deployments from all rules. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.RuleDeployment rule_deployments = 1; + */ + private $rule_deployments; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * 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 \Google\Cloud\Chronicle\V1\RuleDeployment[] $rule_deployments + * The rule deployments from all rules. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\Rule::initOnce(); + parent::__construct($data); + } + + /** + * The rule deployments from all rules. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.RuleDeployment rule_deployments = 1; + * @return RepeatedField<\Google\Cloud\Chronicle\V1\RuleDeployment> + */ + public function getRuleDeployments() + { + return $this->rule_deployments; + } + + /** + * The rule deployments from all rules. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.RuleDeployment rule_deployments = 1; + * @param \Google\Cloud\Chronicle\V1\RuleDeployment[] $var + * @return $this + */ + public function setRuleDeployments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\RuleDeployment::class); + $this->rule_deployments = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRuleRevisionsRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRuleRevisionsRequest.php new file mode 100644 index 000000000000..a22efe8c8aff --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRuleRevisionsRequest.php @@ -0,0 +1,221 @@ +google.cloud.chronicle.v1.ListRuleRevisionsRequest + */ +class ListRuleRevisionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the rule to list revisions for. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The maximum number of revisions to return per page. The service may return + * fewer than this value. If unspecified, at most 100 revisions will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The page token, received from a previous `ListRuleRevisions` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListRuleRevisions` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * The view field indicates the scope of fields to populate for the revision + * being returned. If unspecified, defaults to BASIC. + * + * Generated from protobuf field .google.cloud.chronicle.v1.RuleView view = 4; + */ + protected $view = 0; + + /** + * @param string $name Required. The name of the rule to list revisions for. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + * Please see {@see RuleServiceClient::ruleName()} for help formatting this field. + * + * @return \Google\Cloud\Chronicle\V1\ListRuleRevisionsRequest + * + * @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 rule to list revisions for. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + * @type int $page_size + * The maximum number of revisions to return per page. The service may return + * fewer than this value. If unspecified, at most 100 revisions will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * @type string $page_token + * The page token, received from a previous `ListRuleRevisions` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListRuleRevisions` + * must match the call that provided the page token. + * @type int $view + * The view field indicates the scope of fields to populate for the revision + * being returned. If unspecified, defaults to BASIC. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\Rule::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the rule to list revisions for. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + * + * 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 rule to list revisions for. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + * + * 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 maximum number of revisions to return per page. The service may return + * fewer than this value. If unspecified, at most 100 revisions will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of revisions to return per page. The service may return + * fewer than this value. If unspecified, at most 100 revisions will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 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; + } + + /** + * The page token, received from a previous `ListRuleRevisions` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListRuleRevisions` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The page token, received from a previous `ListRuleRevisions` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListRuleRevisions` + * must match the call that provided the page token. + * + * 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 view field indicates the scope of fields to populate for the revision + * being returned. If unspecified, defaults to BASIC. + * + * Generated from protobuf field .google.cloud.chronicle.v1.RuleView view = 4; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * The view field indicates the scope of fields to populate for the revision + * being returned. If unspecified, defaults to BASIC. + * + * Generated from protobuf field .google.cloud.chronicle.v1.RuleView view = 4; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Chronicle\V1\RuleView::class); + $this->view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRuleRevisionsResponse.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRuleRevisionsResponse.php new file mode 100644 index 000000000000..9b6fb1ea283d --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRuleRevisionsResponse.php @@ -0,0 +1,105 @@ +google.cloud.chronicle.v1.ListRuleRevisionsResponse + */ +class ListRuleRevisionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The revisions of the rule. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.Rule rules = 1; + */ + private $rules; + /** + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * 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 \Google\Cloud\Chronicle\V1\Rule[] $rules + * The revisions of the rule. + * @type string $next_page_token + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\Rule::initOnce(); + parent::__construct($data); + } + + /** + * The revisions of the rule. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.Rule rules = 1; + * @return RepeatedField<\Google\Cloud\Chronicle\V1\Rule> + */ + public function getRules() + { + return $this->rules; + } + + /** + * The revisions of the rule. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.Rule rules = 1; + * @param \Google\Cloud\Chronicle\V1\Rule[] $var + * @return $this + */ + public function setRules($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\Rule::class); + $this->rules = $arr; + + return $this; + } + + /** + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRulesRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRulesRequest.php new file mode 100644 index 000000000000..9a5c5ce2394c --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRulesRequest.php @@ -0,0 +1,263 @@ +google.cloud.chronicle.v1.ListRulesRequest + */ +class ListRulesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of rules. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of rules to return. The service may return fewer than + * this value. If unspecified, at most 100 rules will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token, received from a previous `ListRules` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListRules` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * view indicates the scope of fields to populate for the Rule being returned. + * If unspecified, defaults to BASIC. + * + * Generated from protobuf field .google.cloud.chronicle.v1.RuleView view = 4; + */ + protected $view = 0; + /** + * Only the following filters are allowed: + * "reference_lists:{reference_list_name}" + * "data_tables:{data_table_name}" + * "display_name:{display_name}" + * + * Generated from protobuf field string filter = 5; + */ + protected $filter = ''; + + /** + * @param string $parent Required. The parent, which owns this collection of rules. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}` + * Please see {@see RuleServiceClient::instanceName()} for help formatting this field. + * + * @return \Google\Cloud\Chronicle\V1\ListRulesRequest + * + * @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 parent, which owns this collection of rules. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}` + * @type int $page_size + * The maximum number of rules to return. The service may return fewer than + * this value. If unspecified, at most 100 rules will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @type string $page_token + * A page token, received from a previous `ListRules` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListRules` + * must match the call that provided the page token. + * @type int $view + * view indicates the scope of fields to populate for the Rule being returned. + * If unspecified, defaults to BASIC. + * @type string $filter + * Only the following filters are allowed: + * "reference_lists:{reference_list_name}" + * "data_tables:{data_table_name}" + * "display_name:{display_name}" + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\Rule::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of rules. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}` + * + * 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 parent, which owns this collection of rules. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}` + * + * 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 rules to return. The service may return fewer than + * this value. If unspecified, at most 100 rules will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of rules to return. The service may return fewer than + * this value. If unspecified, at most 100 rules will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 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; + } + + /** + * A page token, received from a previous `ListRules` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListRules` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token, received from a previous `ListRules` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListRules` + * must match the call that provided the page token. + * + * 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; + } + + /** + * view indicates the scope of fields to populate for the Rule being returned. + * If unspecified, defaults to BASIC. + * + * Generated from protobuf field .google.cloud.chronicle.v1.RuleView view = 4; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * view indicates the scope of fields to populate for the Rule being returned. + * If unspecified, defaults to BASIC. + * + * Generated from protobuf field .google.cloud.chronicle.v1.RuleView view = 4; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Chronicle\V1\RuleView::class); + $this->view = $var; + + return $this; + } + + /** + * Only the following filters are allowed: + * "reference_lists:{reference_list_name}" + * "data_tables:{data_table_name}" + * "display_name:{display_name}" + * + * Generated from protobuf field string filter = 5; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Only the following filters are allowed: + * "reference_lists:{reference_list_name}" + * "data_tables:{data_table_name}" + * "display_name:{display_name}" + * + * Generated from protobuf field string filter = 5; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRulesResponse.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRulesResponse.php new file mode 100644 index 000000000000..acf552de7aac --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRulesResponse.php @@ -0,0 +1,105 @@ +google.cloud.chronicle.v1.ListRulesResponse + */ +class ListRulesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The rules from the specified instance. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.Rule rules = 1; + */ + private $rules; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * 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 \Google\Cloud\Chronicle\V1\Rule[] $rules + * The rules from the specified instance. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\Rule::initOnce(); + parent::__construct($data); + } + + /** + * The rules from the specified instance. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.Rule rules = 1; + * @return RepeatedField<\Google\Cloud\Chronicle\V1\Rule> + */ + public function getRules() + { + return $this->rules; + } + + /** + * The rules from the specified instance. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.Rule rules = 1; + * @param \Google\Cloud\Chronicle\V1\Rule[] $var + * @return $this + */ + public function setRules($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\Rule::class); + $this->rules = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListWatchlistsRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListWatchlistsRequest.php new file mode 100644 index 000000000000..0fef99adc24d --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListWatchlistsRequest.php @@ -0,0 +1,232 @@ +google.cloud.chronicle.v1.ListWatchlistsRequest + */ +class ListWatchlistsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of watchlists. + * Format: `projects/{project}/locations/{location}/instances/{instance}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of watchlists to return. + * The service may return fewer than this value. + * If unspecified, at most 200 watchlists will be returned. + * The maximum value is 200; values above 200 will be coerced to 200. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A page token, received from a previous `ListWatchlists` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListWatchlists` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Which watchlist to return in aip.dev/160 form. + * Currently, only the following filters are supported: + * - `watchlist_user_preferences.pinned=true` + * - `has_entity([ENTITY_INDICATOR],[ENTITY_TYPE])` + * - `has_entity([ENTITY_INDICATOR],[ENTITY_TYPE],[NAMESPACE])` + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + + /** + * @param string $parent Required. The parent, which owns this collection of watchlists. + * Format: `projects/{project}/locations/{location}/instances/{instance}` + * Please see {@see EntityServiceClient::instanceName()} for help formatting this field. + * + * @return \Google\Cloud\Chronicle\V1\ListWatchlistsRequest + * + * @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 parent, which owns this collection of watchlists. + * Format: `projects/{project}/locations/{location}/instances/{instance}` + * @type int $page_size + * Optional. The maximum number of watchlists to return. + * The service may return fewer than this value. + * If unspecified, at most 200 watchlists will be returned. + * The maximum value is 200; values above 200 will be coerced to 200. + * @type string $page_token + * Optional. A page token, received from a previous `ListWatchlists` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListWatchlists` must match the call that provided the page + * token. + * @type string $filter + * Optional. Which watchlist to return in aip.dev/160 form. + * Currently, only the following filters are supported: + * - `watchlist_user_preferences.pinned=true` + * - `has_entity([ENTITY_INDICATOR],[ENTITY_TYPE])` + * - `has_entity([ENTITY_INDICATOR],[ENTITY_TYPE],[NAMESPACE])` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\Entity::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of watchlists. + * Format: `projects/{project}/locations/{location}/instances/{instance}` + * + * 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 parent, which owns this collection of watchlists. + * Format: `projects/{project}/locations/{location}/instances/{instance}` + * + * 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 watchlists to return. + * The service may return fewer than this value. + * If unspecified, at most 200 watchlists will be returned. + * The maximum value is 200; values above 200 will be coerced to 200. + * + * 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 watchlists to return. + * The service may return fewer than this value. + * If unspecified, at most 200 watchlists will be returned. + * The maximum value is 200; values above 200 will be coerced to 200. + * + * 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. A page token, received from a previous `ListWatchlists` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListWatchlists` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A page token, received from a previous `ListWatchlists` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListWatchlists` must match the call that provided the page + * token. + * + * 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; + } + + /** + * Optional. Which watchlist to return in aip.dev/160 form. + * Currently, only the following filters are supported: + * - `watchlist_user_preferences.pinned=true` + * - `has_entity([ENTITY_INDICATOR],[ENTITY_TYPE])` + * - `has_entity([ENTITY_INDICATOR],[ENTITY_TYPE],[NAMESPACE])` + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Which watchlist to return in aip.dev/160 form. + * Currently, only the following filters are supported: + * - `watchlist_user_preferences.pinned=true` + * - `has_entity([ENTITY_INDICATOR],[ENTITY_TYPE])` + * - `has_entity([ENTITY_INDICATOR],[ENTITY_TYPE],[NAMESPACE])` + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListWatchlistsResponse.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListWatchlistsResponse.php new file mode 100644 index 000000000000..7c89c05776a3 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListWatchlistsResponse.php @@ -0,0 +1,105 @@ +google.cloud.chronicle.v1.ListWatchlistsResponse + */ +class ListWatchlistsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The watchlists from the specified instance. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.Watchlist watchlists = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $watchlists; + /** + * Optional. A token, which can be sent as `page_token` to retrieve the next + * page. If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Chronicle\V1\Watchlist[] $watchlists + * Optional. The watchlists from the specified instance. + * @type string $next_page_token + * Optional. A token, which can be sent as `page_token` to retrieve the next + * page. If this field is omitted, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\Entity::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The watchlists from the specified instance. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.Watchlist watchlists = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\Chronicle\V1\Watchlist> + */ + public function getWatchlists() + { + return $this->watchlists; + } + + /** + * Optional. The watchlists from the specified instance. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.Watchlist watchlists = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Chronicle\V1\Watchlist[] $var + * @return $this + */ + public function setWatchlists($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\Watchlist::class); + $this->watchlists = $arr; + + return $this; + } + + /** + * Optional. A token, which can be sent as `page_token` to retrieve the next + * page. If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Optional. A token, which can be sent as `page_token` to retrieve the next + * page. If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ReferenceList.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ReferenceList.php new file mode 100644 index 000000000000..fa290dd6040a --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ReferenceList.php @@ -0,0 +1,409 @@ +google.cloud.chronicle.v1.ReferenceList + */ +class ReferenceList extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the reference list. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/referenceLists/{reference_list}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. The unique display name of the reference list. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $display_name = ''; + /** + * Output only. The timestamp when the reference list was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp revision_create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $revision_create_time = null; + /** + * Required. A user-provided description of the reference list. + * + * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $description = ''; + /** + * Required. The entries of the reference list. + * When listed, they are returned in the order that was specified at creation + * or update. The combined size of the values of the reference list may not + * exceed 6MB. + * This is returned only when the view is REFERENCE_LIST_VIEW_FULL. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.ReferenceListEntry entries = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + private $entries; + /** + * Output only. The resource names for the associated self-authored Rules that + * use this reference list. This is returned only when the view is + * REFERENCE_LIST_VIEW_FULL. + * + * Generated from protobuf field repeated string rules = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $rules; + /** + * Required. The syntax type indicating how list entries should be validated. + * + * Generated from protobuf field .google.cloud.chronicle.v1.ReferenceListSyntaxType syntax_type = 8 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $syntax_type = 0; + /** + * Output only. The count of self-authored rules using the reference list. + * + * Generated from protobuf field int32 rule_associations_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $rule_associations_count = 0; + /** + * The scope info of the reference list. + * During reference list creation, if this field is not set, the reference + * list without scopes (an unscoped list) will be created for an unscoped + * user. For a scoped user, this field must be set. During reference list + * update, if scope_info is requested to be updated, this field must be set. + * + * Generated from protobuf field .google.cloud.chronicle.v1.ScopeInfo scope_info = 11; + */ + protected $scope_info = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the reference list. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/referenceLists/{reference_list}` + * @type string $display_name + * Output only. The unique display name of the reference list. + * @type \Google\Protobuf\Timestamp $revision_create_time + * Output only. The timestamp when the reference list was last updated. + * @type string $description + * Required. A user-provided description of the reference list. + * @type \Google\Cloud\Chronicle\V1\ReferenceListEntry[] $entries + * Required. The entries of the reference list. + * When listed, they are returned in the order that was specified at creation + * or update. The combined size of the values of the reference list may not + * exceed 6MB. + * This is returned only when the view is REFERENCE_LIST_VIEW_FULL. + * @type string[] $rules + * Output only. The resource names for the associated self-authored Rules that + * use this reference list. This is returned only when the view is + * REFERENCE_LIST_VIEW_FULL. + * @type int $syntax_type + * Required. The syntax type indicating how list entries should be validated. + * @type int $rule_associations_count + * Output only. The count of self-authored rules using the reference list. + * @type \Google\Cloud\Chronicle\V1\ScopeInfo $scope_info + * The scope info of the reference list. + * During reference list creation, if this field is not set, the reference + * list without scopes (an unscoped list) will be created for an unscoped + * user. For a scoped user, this field must be set. During reference list + * update, if scope_info is requested to be updated, this field must be set. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\ReferenceList::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the reference list. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/referenceLists/{reference_list}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name of the reference list. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/referenceLists/{reference_list}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The unique display name of the reference list. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Output only. The unique display name of the reference list. + * + * Generated from protobuf field string display_name = 2 [(.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; + } + + /** + * Output only. The timestamp when the reference list was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp revision_create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getRevisionCreateTime() + { + return $this->revision_create_time; + } + + public function hasRevisionCreateTime() + { + return isset($this->revision_create_time); + } + + public function clearRevisionCreateTime() + { + unset($this->revision_create_time); + } + + /** + * Output only. The timestamp when the reference list was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp revision_create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setRevisionCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->revision_create_time = $var; + + return $this; + } + + /** + * Required. A user-provided description of the reference list. + * + * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Required. A user-provided description of the reference list. + * + * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Required. The entries of the reference list. + * When listed, they are returned in the order that was specified at creation + * or update. The combined size of the values of the reference list may not + * exceed 6MB. + * This is returned only when the view is REFERENCE_LIST_VIEW_FULL. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.ReferenceListEntry entries = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return RepeatedField<\Google\Cloud\Chronicle\V1\ReferenceListEntry> + */ + public function getEntries() + { + return $this->entries; + } + + /** + * Required. The entries of the reference list. + * When listed, they are returned in the order that was specified at creation + * or update. The combined size of the values of the reference list may not + * exceed 6MB. + * This is returned only when the view is REFERENCE_LIST_VIEW_FULL. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.ReferenceListEntry entries = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Chronicle\V1\ReferenceListEntry[] $var + * @return $this + */ + public function setEntries($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\ReferenceListEntry::class); + $this->entries = $arr; + + return $this; + } + + /** + * Output only. The resource names for the associated self-authored Rules that + * use this reference list. This is returned only when the view is + * REFERENCE_LIST_VIEW_FULL. + * + * Generated from protobuf field repeated string rules = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField + */ + public function getRules() + { + return $this->rules; + } + + /** + * Output only. The resource names for the associated self-authored Rules that + * use this reference list. This is returned only when the view is + * REFERENCE_LIST_VIEW_FULL. + * + * Generated from protobuf field repeated string rules = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string[] $var + * @return $this + */ + public function setRules($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->rules = $arr; + + return $this; + } + + /** + * Required. The syntax type indicating how list entries should be validated. + * + * Generated from protobuf field .google.cloud.chronicle.v1.ReferenceListSyntaxType syntax_type = 8 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getSyntaxType() + { + return $this->syntax_type; + } + + /** + * Required. The syntax type indicating how list entries should be validated. + * + * Generated from protobuf field .google.cloud.chronicle.v1.ReferenceListSyntaxType syntax_type = 8 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setSyntaxType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Chronicle\V1\ReferenceListSyntaxType::class); + $this->syntax_type = $var; + + return $this; + } + + /** + * Output only. The count of self-authored rules using the reference list. + * + * Generated from protobuf field int32 rule_associations_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getRuleAssociationsCount() + { + return $this->rule_associations_count; + } + + /** + * Output only. The count of self-authored rules using the reference list. + * + * Generated from protobuf field int32 rule_associations_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setRuleAssociationsCount($var) + { + GPBUtil::checkInt32($var); + $this->rule_associations_count = $var; + + return $this; + } + + /** + * The scope info of the reference list. + * During reference list creation, if this field is not set, the reference + * list without scopes (an unscoped list) will be created for an unscoped + * user. For a scoped user, this field must be set. During reference list + * update, if scope_info is requested to be updated, this field must be set. + * + * Generated from protobuf field .google.cloud.chronicle.v1.ScopeInfo scope_info = 11; + * @return \Google\Cloud\Chronicle\V1\ScopeInfo|null + */ + public function getScopeInfo() + { + return $this->scope_info; + } + + public function hasScopeInfo() + { + return isset($this->scope_info); + } + + public function clearScopeInfo() + { + unset($this->scope_info); + } + + /** + * The scope info of the reference list. + * During reference list creation, if this field is not set, the reference + * list without scopes (an unscoped list) will be created for an unscoped + * user. For a scoped user, this field must be set. During reference list + * update, if scope_info is requested to be updated, this field must be set. + * + * Generated from protobuf field .google.cloud.chronicle.v1.ScopeInfo scope_info = 11; + * @param \Google\Cloud\Chronicle\V1\ScopeInfo $var + * @return $this + */ + public function setScopeInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\ScopeInfo::class); + $this->scope_info = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ReferenceListEntry.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ReferenceListEntry.php new file mode 100644 index 000000000000..09d9360018ce --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ReferenceListEntry.php @@ -0,0 +1,67 @@ +google.cloud.chronicle.v1.ReferenceListEntry + */ +class ReferenceListEntry extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The value of the entry. Maximum length is 512 characters. + * + * Generated from protobuf field string value = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $value = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $value + * Required. The value of the entry. Maximum length is 512 characters. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\ReferenceList::initOnce(); + parent::__construct($data); + } + + /** + * Required. The value of the entry. Maximum length is 512 characters. + * + * Generated from protobuf field string value = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * Required. The value of the entry. Maximum length is 512 characters. + * + * Generated from protobuf field string value = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, True); + $this->value = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ReferenceListScope.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ReferenceListScope.php new file mode 100644 index 000000000000..56675595cb8a --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ReferenceListScope.php @@ -0,0 +1,75 @@ +google.cloud.chronicle.v1.ReferenceListScope + */ +class ReferenceListScope extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The list of scope names of the reference list. The scope names + * should be full resource names and should be of the format: + * `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{scope_name}`. + * + * Generated from protobuf field repeated string scope_names = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $scope_names; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string[] $scope_names + * Optional. The list of scope names of the reference list. The scope names + * should be full resource names and should be of the format: + * `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{scope_name}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\ReferenceList::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The list of scope names of the reference list. The scope names + * should be full resource names and should be of the format: + * `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{scope_name}`. + * + * Generated from protobuf field repeated string scope_names = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField + */ + public function getScopeNames() + { + return $this->scope_names; + } + + /** + * Optional. The list of scope names of the reference list. The scope names + * should be full resource names and should be of the format: + * `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{scope_name}`. + * + * Generated from protobuf field repeated string scope_names = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string[] $var + * @return $this + */ + public function setScopeNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->scope_names = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ReferenceListSyntaxType.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ReferenceListSyntaxType.php new file mode 100644 index 000000000000..1cc19918caec --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ReferenceListSyntaxType.php @@ -0,0 +1,68 @@ +google.cloud.chronicle.v1.ReferenceListSyntaxType + */ +class ReferenceListSyntaxType +{ + /** + * Defaults to REFERENCE_LIST_SYNTAX_TYPE_PLAIN_TEXT_STRING. + * + * Generated from protobuf enum REFERENCE_LIST_SYNTAX_TYPE_UNSPECIFIED = 0; + */ + const REFERENCE_LIST_SYNTAX_TYPE_UNSPECIFIED = 0; + /** + * List contains plain text patterns. + * + * Generated from protobuf enum REFERENCE_LIST_SYNTAX_TYPE_PLAIN_TEXT_STRING = 1; + */ + const REFERENCE_LIST_SYNTAX_TYPE_PLAIN_TEXT_STRING = 1; + /** + * List contains only Regular Expression patterns. + * + * Generated from protobuf enum REFERENCE_LIST_SYNTAX_TYPE_REGEX = 2; + */ + const REFERENCE_LIST_SYNTAX_TYPE_REGEX = 2; + /** + * List contains only CIDR patterns. + * + * Generated from protobuf enum REFERENCE_LIST_SYNTAX_TYPE_CIDR = 3; + */ + const REFERENCE_LIST_SYNTAX_TYPE_CIDR = 3; + + private static $valueToName = [ + self::REFERENCE_LIST_SYNTAX_TYPE_UNSPECIFIED => 'REFERENCE_LIST_SYNTAX_TYPE_UNSPECIFIED', + self::REFERENCE_LIST_SYNTAX_TYPE_PLAIN_TEXT_STRING => 'REFERENCE_LIST_SYNTAX_TYPE_PLAIN_TEXT_STRING', + self::REFERENCE_LIST_SYNTAX_TYPE_REGEX => 'REFERENCE_LIST_SYNTAX_TYPE_REGEX', + self::REFERENCE_LIST_SYNTAX_TYPE_CIDR => 'REFERENCE_LIST_SYNTAX_TYPE_CIDR', + ]; + + 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ReferenceListView.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ReferenceListView.php new file mode 100644 index 000000000000..78d29ab7d594 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ReferenceListView.php @@ -0,0 +1,67 @@ +google.cloud.chronicle.v1.ReferenceListView + */ +class ReferenceListView +{ + /** + * The default / unset value. + * The API will default to the BASIC view for ListReferenceLists. + * The API will default to the FULL view for methods that return a single + * ReferenceList resource. + * + * Generated from protobuf enum REFERENCE_LIST_VIEW_UNSPECIFIED = 0; + */ + const REFERENCE_LIST_VIEW_UNSPECIFIED = 0; + /** + * Include metadata about the ReferenceList. + * This is the default view for ListReferenceLists. + * + * Generated from protobuf enum REFERENCE_LIST_VIEW_BASIC = 1; + */ + const REFERENCE_LIST_VIEW_BASIC = 1; + /** + * Include all details about the ReferenceList: metadata, content lines, + * associated rule counts. This is the default view for GetReferenceList. + * + * Generated from protobuf enum REFERENCE_LIST_VIEW_FULL = 2; + */ + const REFERENCE_LIST_VIEW_FULL = 2; + + private static $valueToName = [ + self::REFERENCE_LIST_VIEW_UNSPECIFIED => 'REFERENCE_LIST_VIEW_UNSPECIFIED', + self::REFERENCE_LIST_VIEW_BASIC => 'REFERENCE_LIST_VIEW_BASIC', + self::REFERENCE_LIST_VIEW_FULL => 'REFERENCE_LIST_VIEW_FULL', + ]; + + 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Retrohunt.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Retrohunt.php new file mode 100644 index 000000000000..39703c9069fd --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Retrohunt.php @@ -0,0 +1,255 @@ +google.cloud.chronicle.v1.Retrohunt + */ +class Retrohunt extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the retrohunt. + * Retrohunt is the child of a rule revision. {rule} in the format below is + * structured as {rule_id\@revision_id}. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Required. The start and end time of the event time range this retrohunt + * processes. + * + * Generated from protobuf field .google.type.Interval process_interval = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $process_interval = null; + /** + * Output only. The start and end time of the retrohunt execution. If the + * retrohunt is not yet finished, the end time of the interval will not be + * populated. + * + * Generated from protobuf field .google.type.Interval execution_interval = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $execution_interval = null; + /** + * Output only. The state of the retrohunt. + * + * Generated from protobuf field .google.cloud.chronicle.v1.Retrohunt.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. Percent progress of the retrohunt towards completion, from + * 0.00 to 100.00. + * + * Generated from protobuf field float progress_percentage = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $progress_percentage = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the retrohunt. + * Retrohunt is the child of a rule revision. {rule} in the format below is + * structured as {rule_id\@revision_id}. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` + * @type \Google\Type\Interval $process_interval + * Required. The start and end time of the event time range this retrohunt + * processes. + * @type \Google\Type\Interval $execution_interval + * Output only. The start and end time of the retrohunt execution. If the + * retrohunt is not yet finished, the end time of the interval will not be + * populated. + * @type int $state + * Output only. The state of the retrohunt. + * @type float $progress_percentage + * Output only. Percent progress of the retrohunt towards completion, from + * 0.00 to 100.00. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\Rule::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the retrohunt. + * Retrohunt is the child of a rule revision. {rule} in the format below is + * structured as {rule_id\@revision_id}. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the retrohunt. + * Retrohunt is the child of a rule revision. {rule} in the format below is + * structured as {rule_id\@revision_id}. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` + * + * 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 start and end time of the event time range this retrohunt + * processes. + * + * Generated from protobuf field .google.type.Interval process_interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Type\Interval|null + */ + public function getProcessInterval() + { + return $this->process_interval; + } + + public function hasProcessInterval() + { + return isset($this->process_interval); + } + + public function clearProcessInterval() + { + unset($this->process_interval); + } + + /** + * Required. The start and end time of the event time range this retrohunt + * processes. + * + * Generated from protobuf field .google.type.Interval process_interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Type\Interval $var + * @return $this + */ + public function setProcessInterval($var) + { + GPBUtil::checkMessage($var, \Google\Type\Interval::class); + $this->process_interval = $var; + + return $this; + } + + /** + * Output only. The start and end time of the retrohunt execution. If the + * retrohunt is not yet finished, the end time of the interval will not be + * populated. + * + * Generated from protobuf field .google.type.Interval execution_interval = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Type\Interval|null + */ + public function getExecutionInterval() + { + return $this->execution_interval; + } + + public function hasExecutionInterval() + { + return isset($this->execution_interval); + } + + public function clearExecutionInterval() + { + unset($this->execution_interval); + } + + /** + * Output only. The start and end time of the retrohunt execution. If the + * retrohunt is not yet finished, the end time of the interval will not be + * populated. + * + * Generated from protobuf field .google.type.Interval execution_interval = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Type\Interval $var + * @return $this + */ + public function setExecutionInterval($var) + { + GPBUtil::checkMessage($var, \Google\Type\Interval::class); + $this->execution_interval = $var; + + return $this; + } + + /** + * Output only. The state of the retrohunt. + * + * Generated from protobuf field .google.cloud.chronicle.v1.Retrohunt.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The state of the retrohunt. + * + * Generated from protobuf field .google.cloud.chronicle.v1.Retrohunt.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Chronicle\V1\Retrohunt\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. Percent progress of the retrohunt towards completion, from + * 0.00 to 100.00. + * + * Generated from protobuf field float progress_percentage = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getProgressPercentage() + { + return $this->progress_percentage; + } + + /** + * Output only. Percent progress of the retrohunt towards completion, from + * 0.00 to 100.00. + * + * Generated from protobuf field float progress_percentage = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setProgressPercentage($var) + { + GPBUtil::checkFloat($var); + $this->progress_percentage = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Retrohunt/State.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Retrohunt/State.php new file mode 100644 index 000000000000..0c54a8ff495c --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Retrohunt/State.php @@ -0,0 +1,75 @@ +google.cloud.chronicle.v1.Retrohunt.State + */ +class State +{ + /** + * Unspecified or unknown retrohunt state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Running state. + * + * Generated from protobuf enum RUNNING = 1; + */ + const RUNNING = 1; + /** + * Done state. + * + * Generated from protobuf enum DONE = 2; + */ + const DONE = 2; + /** + * Cancelled state. + * + * Generated from protobuf enum CANCELLED = 3; + */ + const CANCELLED = 3; + /** + * Failed state. + * + * Generated from protobuf enum FAILED = 4; + */ + const FAILED = 4; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::RUNNING => 'RUNNING', + self::DONE => 'DONE', + self::CANCELLED => 'CANCELLED', + self::FAILED => 'FAILED', + ]; + + 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/RetrohuntMetadata.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/RetrohuntMetadata.php new file mode 100644 index 000000000000..87deefb9bb2e --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/RetrohuntMetadata.php @@ -0,0 +1,157 @@ +google.cloud.chronicle.v1.RetrohuntMetadata + */ +class RetrohuntMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the retrohunt. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` + * + * Generated from protobuf field string retrohunt = 1 [(.google.api.resource_reference) = { + */ + protected $retrohunt = ''; + /** + * The start and end time of the retrohunt execution. If the retrohunt is not + * yet finished, the end time of the interval will not be filled. + * + * Generated from protobuf field .google.type.Interval execution_interval = 2; + */ + protected $execution_interval = null; + /** + * Percent progress of the retrohunt towards completion, from 0.00 to 100.00. + * + * Generated from protobuf field float progress_percentage = 3; + */ + protected $progress_percentage = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $retrohunt + * The name of the retrohunt. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` + * @type \Google\Type\Interval $execution_interval + * The start and end time of the retrohunt execution. If the retrohunt is not + * yet finished, the end time of the interval will not be filled. + * @type float $progress_percentage + * Percent progress of the retrohunt towards completion, from 0.00 to 100.00. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\Rule::initOnce(); + parent::__construct($data); + } + + /** + * The name of the retrohunt. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` + * + * Generated from protobuf field string retrohunt = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getRetrohunt() + { + return $this->retrohunt; + } + + /** + * The name of the retrohunt. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` + * + * Generated from protobuf field string retrohunt = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setRetrohunt($var) + { + GPBUtil::checkString($var, True); + $this->retrohunt = $var; + + return $this; + } + + /** + * The start and end time of the retrohunt execution. If the retrohunt is not + * yet finished, the end time of the interval will not be filled. + * + * Generated from protobuf field .google.type.Interval execution_interval = 2; + * @return \Google\Type\Interval|null + */ + public function getExecutionInterval() + { + return $this->execution_interval; + } + + public function hasExecutionInterval() + { + return isset($this->execution_interval); + } + + public function clearExecutionInterval() + { + unset($this->execution_interval); + } + + /** + * The start and end time of the retrohunt execution. If the retrohunt is not + * yet finished, the end time of the interval will not be filled. + * + * Generated from protobuf field .google.type.Interval execution_interval = 2; + * @param \Google\Type\Interval $var + * @return $this + */ + public function setExecutionInterval($var) + { + GPBUtil::checkMessage($var, \Google\Type\Interval::class); + $this->execution_interval = $var; + + return $this; + } + + /** + * Percent progress of the retrohunt towards completion, from 0.00 to 100.00. + * + * Generated from protobuf field float progress_percentage = 3; + * @return float + */ + public function getProgressPercentage() + { + return $this->progress_percentage; + } + + /** + * Percent progress of the retrohunt towards completion, from 0.00 to 100.00. + * + * Generated from protobuf field float progress_percentage = 3; + * @param float $var + * @return $this + */ + public function setProgressPercentage($var) + { + GPBUtil::checkFloat($var); + $this->progress_percentage = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Rule.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Rule.php new file mode 100644 index 000000000000..d1fced9182be --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Rule.php @@ -0,0 +1,810 @@ +google.cloud.chronicle.v1.Rule + */ +class Rule extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. Full resource name for the rule. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. The revision ID of the rule. + * A new revision is created whenever the rule text is changed in any way. + * Format: `v_{10 digits}_{9 digits}` + * Populated in REVISION_METADATA_ONLY view and FULL view. + * + * Generated from protobuf field string revision_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $revision_id = ''; + /** + * Output only. Display name of the rule. + * Populated in BASIC view and FULL view. + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $display_name = ''; + /** + * The YARA-L content of the rule. + * Populated in FULL view. + * + * Generated from protobuf field string text = 4; + */ + protected $text = ''; + /** + * Output only. The author of the rule. Extracted from the meta section of + * text. Populated in BASIC view and FULL view. + * + * Generated from protobuf field string author = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $author = ''; + /** + * Output only. The severity of the rule as specified in the meta section of + * text. Populated in BASIC view and FULL view. + * + * Generated from protobuf field .google.cloud.chronicle.v1.Severity severity = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $severity = null; + /** + * Output only. Additional metadata specified in the meta section of text. + * Populated in FULL view. + * + * Generated from protobuf field map metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $metadata; + /** + * Output only. The timestamp of when the rule was created. + * Populated in FULL view. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The timestamp of when the rule revision was created. + * Populated in FULL, REVISION_METADATA_ONLY views. + * + * Generated from protobuf field .google.protobuf.Timestamp revision_create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $revision_create_time = null; + /** + * Output only. The current compilation state of the rule. + * Populated in FULL view. + * + * Generated from protobuf field .google.cloud.chronicle.v1.Rule.CompilationState compilation_state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $compilation_state = 0; + /** + * Output only. User-facing type of the rule. Extracted from the events + * section of rule text. Populated in BASIC view and FULL view. + * + * Generated from protobuf field .google.cloud.chronicle.v1.RuleType type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $type = 0; + /** + * Output only. Resource names of the reference lists used in this rule. + * Populated in FULL view. + * + * Generated from protobuf field repeated string reference_lists = 13 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + private $reference_lists; + /** + * Output only. The run frequencies that are allowed for the rule. + * Populated in BASIC view and FULL view. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.RunFrequency allowed_run_frequencies = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $allowed_run_frequencies; + /** + * The etag for this rule. + * If this is provided on update, the request will succeed if and only if it + * matches the server-computed value, and will fail with an ABORTED error + * otherwise. + * Populated in BASIC view and FULL view. + * + * Generated from protobuf field string etag = 15; + */ + protected $etag = ''; + /** + * Resource name of the DataAccessScope bound to this rule. + * Populated in BASIC view and FULL view. + * If reference lists are used in the rule, validations will be performed + * against this scope to ensure that the reference lists are compatible with + * both the user's and the rule's scopes. + * The scope should be in the format: + * `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{scope}`. + * + * Generated from protobuf field string scope = 16 [(.google.api.resource_reference) = { + */ + protected $scope = ''; + /** + * Output only. A list of a rule's corresponding compilation diagnostic + * messages such as compilation errors and compilation warnings. Populated in + * FULL view. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.CompilationDiagnostic compilation_diagnostics = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $compilation_diagnostics; + /** + * Output only. Indicate the rule can run in near real time live rule. + * If this is true, the rule uses the near real time live rule when the run + * frequency is set to LIVE. + * + * Generated from protobuf field bool near_real_time_live_rule_eligible = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $near_real_time_live_rule_eligible = false; + /** + * Output only. The set of inputs used in the rule. For example, if the rule + * uses $e.principal.hostname, then the uses_udm field will be true. + * + * Generated from protobuf field .google.cloud.chronicle.v1.InputsUsed inputs_used = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $inputs_used = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. Full resource name for the rule. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + * @type string $revision_id + * Output only. The revision ID of the rule. + * A new revision is created whenever the rule text is changed in any way. + * Format: `v_{10 digits}_{9 digits}` + * Populated in REVISION_METADATA_ONLY view and FULL view. + * @type string $display_name + * Output only. Display name of the rule. + * Populated in BASIC view and FULL view. + * @type string $text + * The YARA-L content of the rule. + * Populated in FULL view. + * @type string $author + * Output only. The author of the rule. Extracted from the meta section of + * text. Populated in BASIC view and FULL view. + * @type \Google\Cloud\Chronicle\V1\Severity $severity + * Output only. The severity of the rule as specified in the meta section of + * text. Populated in BASIC view and FULL view. + * @type array|\Google\Protobuf\Internal\MapField $metadata + * Output only. Additional metadata specified in the meta section of text. + * Populated in FULL view. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp of when the rule was created. + * Populated in FULL view. + * @type \Google\Protobuf\Timestamp $revision_create_time + * Output only. The timestamp of when the rule revision was created. + * Populated in FULL, REVISION_METADATA_ONLY views. + * @type int $compilation_state + * Output only. The current compilation state of the rule. + * Populated in FULL view. + * @type int $type + * Output only. User-facing type of the rule. Extracted from the events + * section of rule text. Populated in BASIC view and FULL view. + * @type string[] $reference_lists + * Output only. Resource names of the reference lists used in this rule. + * Populated in FULL view. + * @type int[] $allowed_run_frequencies + * Output only. The run frequencies that are allowed for the rule. + * Populated in BASIC view and FULL view. + * @type string $etag + * The etag for this rule. + * If this is provided on update, the request will succeed if and only if it + * matches the server-computed value, and will fail with an ABORTED error + * otherwise. + * Populated in BASIC view and FULL view. + * @type string $scope + * Resource name of the DataAccessScope bound to this rule. + * Populated in BASIC view and FULL view. + * If reference lists are used in the rule, validations will be performed + * against this scope to ensure that the reference lists are compatible with + * both the user's and the rule's scopes. + * The scope should be in the format: + * `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{scope}`. + * @type \Google\Cloud\Chronicle\V1\CompilationDiagnostic[] $compilation_diagnostics + * Output only. A list of a rule's corresponding compilation diagnostic + * messages such as compilation errors and compilation warnings. Populated in + * FULL view. + * @type bool $near_real_time_live_rule_eligible + * Output only. Indicate the rule can run in near real time live rule. + * If this is true, the rule uses the near real time live rule when the run + * frequency is set to LIVE. + * @type \Google\Cloud\Chronicle\V1\InputsUsed $inputs_used + * Output only. The set of inputs used in the rule. For example, if the rule + * uses $e.principal.hostname, then the uses_udm field will be true. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\Rule::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. Full resource name for the rule. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. Full resource name for the rule. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The revision ID of the rule. + * A new revision is created whenever the rule text is changed in any way. + * Format: `v_{10 digits}_{9 digits}` + * Populated in REVISION_METADATA_ONLY view and FULL view. + * + * Generated from protobuf field string revision_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getRevisionId() + { + return $this->revision_id; + } + + /** + * Output only. The revision ID of the rule. + * A new revision is created whenever the rule text is changed in any way. + * Format: `v_{10 digits}_{9 digits}` + * Populated in REVISION_METADATA_ONLY view and FULL view. + * + * Generated from protobuf field string revision_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setRevisionId($var) + { + GPBUtil::checkString($var, True); + $this->revision_id = $var; + + return $this; + } + + /** + * Output only. Display name of the rule. + * Populated in BASIC view and FULL view. + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Output only. Display name of the rule. + * Populated in BASIC view and FULL view. + * + * Generated from protobuf field string display_name = 3 [(.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 YARA-L content of the rule. + * Populated in FULL view. + * + * Generated from protobuf field string text = 4; + * @return string + */ + public function getText() + { + return $this->text; + } + + /** + * The YARA-L content of the rule. + * Populated in FULL view. + * + * Generated from protobuf field string text = 4; + * @param string $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkString($var, True); + $this->text = $var; + + return $this; + } + + /** + * Output only. The author of the rule. Extracted from the meta section of + * text. Populated in BASIC view and FULL view. + * + * Generated from protobuf field string author = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getAuthor() + { + return $this->author; + } + + /** + * Output only. The author of the rule. Extracted from the meta section of + * text. Populated in BASIC view and FULL view. + * + * Generated from protobuf field string author = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setAuthor($var) + { + GPBUtil::checkString($var, True); + $this->author = $var; + + return $this; + } + + /** + * Output only. The severity of the rule as specified in the meta section of + * text. Populated in BASIC view and FULL view. + * + * Generated from protobuf field .google.cloud.chronicle.v1.Severity severity = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Chronicle\V1\Severity|null + */ + public function getSeverity() + { + return $this->severity; + } + + public function hasSeverity() + { + return isset($this->severity); + } + + public function clearSeverity() + { + unset($this->severity); + } + + /** + * Output only. The severity of the rule as specified in the meta section of + * text. Populated in BASIC view and FULL view. + * + * Generated from protobuf field .google.cloud.chronicle.v1.Severity severity = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Chronicle\V1\Severity $var + * @return $this + */ + public function setSeverity($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\Severity::class); + $this->severity = $var; + + return $this; + } + + /** + * Output only. Additional metadata specified in the meta section of text. + * Populated in FULL view. + * + * Generated from protobuf field map metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getMetadata() + { + return $this->metadata; + } + + /** + * Output only. Additional metadata specified in the meta section of text. + * Populated in FULL view. + * + * Generated from protobuf field map metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setMetadata($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->metadata = $arr; + + return $this; + } + + /** + * Output only. The timestamp of when the rule was created. + * Populated in FULL view. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @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); + } + + /** + * Output only. The timestamp of when the rule was created. + * Populated in FULL view. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The timestamp of when the rule revision was created. + * Populated in FULL, REVISION_METADATA_ONLY views. + * + * Generated from protobuf field .google.protobuf.Timestamp revision_create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getRevisionCreateTime() + { + return $this->revision_create_time; + } + + public function hasRevisionCreateTime() + { + return isset($this->revision_create_time); + } + + public function clearRevisionCreateTime() + { + unset($this->revision_create_time); + } + + /** + * Output only. The timestamp of when the rule revision was created. + * Populated in FULL, REVISION_METADATA_ONLY views. + * + * Generated from protobuf field .google.protobuf.Timestamp revision_create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setRevisionCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->revision_create_time = $var; + + return $this; + } + + /** + * Output only. The current compilation state of the rule. + * Populated in FULL view. + * + * Generated from protobuf field .google.cloud.chronicle.v1.Rule.CompilationState compilation_state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getCompilationState() + { + return $this->compilation_state; + } + + /** + * Output only. The current compilation state of the rule. + * Populated in FULL view. + * + * Generated from protobuf field .google.cloud.chronicle.v1.Rule.CompilationState compilation_state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setCompilationState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Chronicle\V1\Rule\CompilationState::class); + $this->compilation_state = $var; + + return $this; + } + + /** + * Output only. User-facing type of the rule. Extracted from the events + * section of rule text. Populated in BASIC view and FULL view. + * + * Generated from protobuf field .google.cloud.chronicle.v1.RuleType type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Output only. User-facing type of the rule. Extracted from the events + * section of rule text. Populated in BASIC view and FULL view. + * + * Generated from protobuf field .google.cloud.chronicle.v1.RuleType type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Chronicle\V1\RuleType::class); + $this->type = $var; + + return $this; + } + + /** + * Output only. Resource names of the reference lists used in this rule. + * Populated in FULL view. + * + * Generated from protobuf field repeated string reference_lists = 13 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return RepeatedField + */ + public function getReferenceLists() + { + return $this->reference_lists; + } + + /** + * Output only. Resource names of the reference lists used in this rule. + * Populated in FULL view. + * + * Generated from protobuf field repeated string reference_lists = 13 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string[] $var + * @return $this + */ + public function setReferenceLists($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->reference_lists = $arr; + + return $this; + } + + /** + * Output only. The run frequencies that are allowed for the rule. + * Populated in BASIC view and FULL view. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.RunFrequency allowed_run_frequencies = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField + */ + public function getAllowedRunFrequencies() + { + return $this->allowed_run_frequencies; + } + + /** + * Output only. The run frequencies that are allowed for the rule. + * Populated in BASIC view and FULL view. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.RunFrequency allowed_run_frequencies = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int[] $var + * @return $this + */ + public function setAllowedRunFrequencies($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Chronicle\V1\RunFrequency::class); + $this->allowed_run_frequencies = $arr; + + return $this; + } + + /** + * The etag for this rule. + * If this is provided on update, the request will succeed if and only if it + * matches the server-computed value, and will fail with an ABORTED error + * otherwise. + * Populated in BASIC view and FULL view. + * + * Generated from protobuf field string etag = 15; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * The etag for this rule. + * If this is provided on update, the request will succeed if and only if it + * matches the server-computed value, and will fail with an ABORTED error + * otherwise. + * Populated in BASIC view and FULL view. + * + * Generated from protobuf field string etag = 15; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * Resource name of the DataAccessScope bound to this rule. + * Populated in BASIC view and FULL view. + * If reference lists are used in the rule, validations will be performed + * against this scope to ensure that the reference lists are compatible with + * both the user's and the rule's scopes. + * The scope should be in the format: + * `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{scope}`. + * + * Generated from protobuf field string scope = 16 [(.google.api.resource_reference) = { + * @return string + */ + public function getScope() + { + return $this->scope; + } + + /** + * Resource name of the DataAccessScope bound to this rule. + * Populated in BASIC view and FULL view. + * If reference lists are used in the rule, validations will be performed + * against this scope to ensure that the reference lists are compatible with + * both the user's and the rule's scopes. + * The scope should be in the format: + * `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{scope}`. + * + * Generated from protobuf field string scope = 16 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setScope($var) + { + GPBUtil::checkString($var, True); + $this->scope = $var; + + return $this; + } + + /** + * Output only. A list of a rule's corresponding compilation diagnostic + * messages such as compilation errors and compilation warnings. Populated in + * FULL view. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.CompilationDiagnostic compilation_diagnostics = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField<\Google\Cloud\Chronicle\V1\CompilationDiagnostic> + */ + public function getCompilationDiagnostics() + { + return $this->compilation_diagnostics; + } + + /** + * Output only. A list of a rule's corresponding compilation diagnostic + * messages such as compilation errors and compilation warnings. Populated in + * FULL view. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.CompilationDiagnostic compilation_diagnostics = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Chronicle\V1\CompilationDiagnostic[] $var + * @return $this + */ + public function setCompilationDiagnostics($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\CompilationDiagnostic::class); + $this->compilation_diagnostics = $arr; + + return $this; + } + + /** + * Output only. Indicate the rule can run in near real time live rule. + * If this is true, the rule uses the near real time live rule when the run + * frequency is set to LIVE. + * + * Generated from protobuf field bool near_real_time_live_rule_eligible = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getNearRealTimeLiveRuleEligible() + { + return $this->near_real_time_live_rule_eligible; + } + + /** + * Output only. Indicate the rule can run in near real time live rule. + * If this is true, the rule uses the near real time live rule when the run + * frequency is set to LIVE. + * + * Generated from protobuf field bool near_real_time_live_rule_eligible = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setNearRealTimeLiveRuleEligible($var) + { + GPBUtil::checkBool($var); + $this->near_real_time_live_rule_eligible = $var; + + return $this; + } + + /** + * Output only. The set of inputs used in the rule. For example, if the rule + * uses $e.principal.hostname, then the uses_udm field will be true. + * + * Generated from protobuf field .google.cloud.chronicle.v1.InputsUsed inputs_used = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Chronicle\V1\InputsUsed|null + */ + public function getInputsUsed() + { + return $this->inputs_used; + } + + public function hasInputsUsed() + { + return isset($this->inputs_used); + } + + public function clearInputsUsed() + { + unset($this->inputs_used); + } + + /** + * Output only. The set of inputs used in the rule. For example, if the rule + * uses $e.principal.hostname, then the uses_udm field will be true. + * + * Generated from protobuf field .google.cloud.chronicle.v1.InputsUsed inputs_used = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Chronicle\V1\InputsUsed $var + * @return $this + */ + public function setInputsUsed($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\InputsUsed::class); + $this->inputs_used = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Rule/CompilationState.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Rule/CompilationState.php new file mode 100644 index 000000000000..fde2594a8645 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Rule/CompilationState.php @@ -0,0 +1,63 @@ +google.cloud.chronicle.v1.Rule.CompilationState + */ +class CompilationState +{ + /** + * The compilation state is unspecified/unknown. + * + * Generated from protobuf enum COMPILATION_STATE_UNSPECIFIED = 0; + */ + const COMPILATION_STATE_UNSPECIFIED = 0; + /** + * The Rule can successfully compile. + * + * Generated from protobuf enum SUCCEEDED = 1; + */ + const SUCCEEDED = 1; + /** + * The Rule cannot successfully compile. + * This is possible if a backwards-incompatible change was made to the + * compiler. + * + * Generated from protobuf enum FAILED = 2; + */ + const FAILED = 2; + + private static $valueToName = [ + self::COMPILATION_STATE_UNSPECIFIED => 'COMPILATION_STATE_UNSPECIFIED', + self::SUCCEEDED => 'SUCCEEDED', + self::FAILED => 'FAILED', + ]; + + 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/RuleDeployment.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/RuleDeployment.php new file mode 100644 index 000000000000..59c5d3f3033c --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/RuleDeployment.php @@ -0,0 +1,477 @@ +google.cloud.chronicle.v1.RuleDeployment + */ +class RuleDeployment extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the rule deployment. + * Note that RuleDeployment is a child of the overall Rule, not any individual + * revision, so the resource ID segment for the Rule resource must not + * reference a specific revision. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Whether the rule is currently deployed continuously against incoming data. + * + * Generated from protobuf field bool enabled = 2; + */ + protected $enabled = false; + /** + * Whether detections resulting from this deployment should be considered + * alerts. + * + * Generated from protobuf field bool alerting = 3; + */ + protected $alerting = false; + /** + * The archive state of the rule deployment. + * Cannot be set to true unless enabled is set to false. + * If set to true, alerting will automatically be set to false. + * If currently set to true, enabled, alerting, and run_frequency cannot be + * updated. + * + * Generated from protobuf field bool archived = 4; + */ + protected $archived = false; + /** + * Output only. The timestamp when the rule deployment archive state was last + * set to true. If the rule deployment's current archive state is not set to + * true, the field will be empty. + * + * Generated from protobuf field .google.protobuf.Timestamp archive_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $archive_time = null; + /** + * The run frequency of the rule deployment. + * + * Generated from protobuf field .google.cloud.chronicle.v1.RunFrequency run_frequency = 6; + */ + protected $run_frequency = 0; + /** + * Output only. The execution state of the rule deployment. + * + * Generated from protobuf field .google.cloud.chronicle.v1.RuleDeployment.ExecutionState execution_state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $execution_state = 0; + /** + * Output only. The names of the associated/chained producer rules. Rules are + * considered producers for this rule if this rule explicitly filters on their + * ruleid. Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + * + * Generated from protobuf field repeated string producer_rules = 8 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + private $producer_rules; + /** + * Output only. The names of the associated/chained consumer rules. Rules are + * considered consumers of this rule if their rule text explicitly filters on + * this rule's ruleid. Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + * + * Generated from protobuf field repeated string consumer_rules = 9 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + private $consumer_rules; + /** + * Output only. The timestamp when the rule deployment alert state was lastly + * changed. This is filled regardless of the current alert state. E.g. if the + * current alert status is false, this timestamp will be the timestamp when + * the alert status was changed to false. + * + * Generated from protobuf field .google.protobuf.Timestamp last_alert_status_change_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $last_alert_status_change_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the rule deployment. + * Note that RuleDeployment is a child of the overall Rule, not any individual + * revision, so the resource ID segment for the Rule resource must not + * reference a specific revision. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` + * @type bool $enabled + * Whether the rule is currently deployed continuously against incoming data. + * @type bool $alerting + * Whether detections resulting from this deployment should be considered + * alerts. + * @type bool $archived + * The archive state of the rule deployment. + * Cannot be set to true unless enabled is set to false. + * If set to true, alerting will automatically be set to false. + * If currently set to true, enabled, alerting, and run_frequency cannot be + * updated. + * @type \Google\Protobuf\Timestamp $archive_time + * Output only. The timestamp when the rule deployment archive state was last + * set to true. If the rule deployment's current archive state is not set to + * true, the field will be empty. + * @type int $run_frequency + * The run frequency of the rule deployment. + * @type int $execution_state + * Output only. The execution state of the rule deployment. + * @type string[] $producer_rules + * Output only. The names of the associated/chained producer rules. Rules are + * considered producers for this rule if this rule explicitly filters on their + * ruleid. Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + * @type string[] $consumer_rules + * Output only. The names of the associated/chained consumer rules. Rules are + * considered consumers of this rule if their rule text explicitly filters on + * this rule's ruleid. Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + * @type \Google\Protobuf\Timestamp $last_alert_status_change_time + * Output only. The timestamp when the rule deployment alert state was lastly + * changed. This is filled regardless of the current alert state. E.g. if the + * current alert status is false, this timestamp will be the timestamp when + * the alert status was changed to false. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\Rule::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the rule deployment. + * Note that RuleDeployment is a child of the overall Rule, not any individual + * revision, so the resource ID segment for the Rule resource must not + * reference a specific revision. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the rule deployment. + * Note that RuleDeployment is a child of the overall Rule, not any individual + * revision, so the resource ID segment for the Rule resource must not + * reference a specific revision. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Whether the rule is currently deployed continuously against incoming data. + * + * Generated from protobuf field bool enabled = 2; + * @return bool + */ + public function getEnabled() + { + return $this->enabled; + } + + /** + * Whether the rule is currently deployed continuously against incoming data. + * + * Generated from protobuf field bool enabled = 2; + * @param bool $var + * @return $this + */ + public function setEnabled($var) + { + GPBUtil::checkBool($var); + $this->enabled = $var; + + return $this; + } + + /** + * Whether detections resulting from this deployment should be considered + * alerts. + * + * Generated from protobuf field bool alerting = 3; + * @return bool + */ + public function getAlerting() + { + return $this->alerting; + } + + /** + * Whether detections resulting from this deployment should be considered + * alerts. + * + * Generated from protobuf field bool alerting = 3; + * @param bool $var + * @return $this + */ + public function setAlerting($var) + { + GPBUtil::checkBool($var); + $this->alerting = $var; + + return $this; + } + + /** + * The archive state of the rule deployment. + * Cannot be set to true unless enabled is set to false. + * If set to true, alerting will automatically be set to false. + * If currently set to true, enabled, alerting, and run_frequency cannot be + * updated. + * + * Generated from protobuf field bool archived = 4; + * @return bool + */ + public function getArchived() + { + return $this->archived; + } + + /** + * The archive state of the rule deployment. + * Cannot be set to true unless enabled is set to false. + * If set to true, alerting will automatically be set to false. + * If currently set to true, enabled, alerting, and run_frequency cannot be + * updated. + * + * Generated from protobuf field bool archived = 4; + * @param bool $var + * @return $this + */ + public function setArchived($var) + { + GPBUtil::checkBool($var); + $this->archived = $var; + + return $this; + } + + /** + * Output only. The timestamp when the rule deployment archive state was last + * set to true. If the rule deployment's current archive state is not set to + * true, the field will be empty. + * + * Generated from protobuf field .google.protobuf.Timestamp archive_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getArchiveTime() + { + return $this->archive_time; + } + + public function hasArchiveTime() + { + return isset($this->archive_time); + } + + public function clearArchiveTime() + { + unset($this->archive_time); + } + + /** + * Output only. The timestamp when the rule deployment archive state was last + * set to true. If the rule deployment's current archive state is not set to + * true, the field will be empty. + * + * Generated from protobuf field .google.protobuf.Timestamp archive_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setArchiveTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->archive_time = $var; + + return $this; + } + + /** + * The run frequency of the rule deployment. + * + * Generated from protobuf field .google.cloud.chronicle.v1.RunFrequency run_frequency = 6; + * @return int + */ + public function getRunFrequency() + { + return $this->run_frequency; + } + + /** + * The run frequency of the rule deployment. + * + * Generated from protobuf field .google.cloud.chronicle.v1.RunFrequency run_frequency = 6; + * @param int $var + * @return $this + */ + public function setRunFrequency($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Chronicle\V1\RunFrequency::class); + $this->run_frequency = $var; + + return $this; + } + + /** + * Output only. The execution state of the rule deployment. + * + * Generated from protobuf field .google.cloud.chronicle.v1.RuleDeployment.ExecutionState execution_state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getExecutionState() + { + return $this->execution_state; + } + + /** + * Output only. The execution state of the rule deployment. + * + * Generated from protobuf field .google.cloud.chronicle.v1.RuleDeployment.ExecutionState execution_state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setExecutionState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Chronicle\V1\RuleDeployment\ExecutionState::class); + $this->execution_state = $var; + + return $this; + } + + /** + * Output only. The names of the associated/chained producer rules. Rules are + * considered producers for this rule if this rule explicitly filters on their + * ruleid. Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + * + * Generated from protobuf field repeated string producer_rules = 8 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return RepeatedField + */ + public function getProducerRules() + { + return $this->producer_rules; + } + + /** + * Output only. The names of the associated/chained producer rules. Rules are + * considered producers for this rule if this rule explicitly filters on their + * ruleid. Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + * + * Generated from protobuf field repeated string producer_rules = 8 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string[] $var + * @return $this + */ + public function setProducerRules($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->producer_rules = $arr; + + return $this; + } + + /** + * Output only. The names of the associated/chained consumer rules. Rules are + * considered consumers of this rule if their rule text explicitly filters on + * this rule's ruleid. Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + * + * Generated from protobuf field repeated string consumer_rules = 9 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return RepeatedField + */ + public function getConsumerRules() + { + return $this->consumer_rules; + } + + /** + * Output only. The names of the associated/chained consumer rules. Rules are + * considered consumers of this rule if their rule text explicitly filters on + * this rule's ruleid. Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + * + * Generated from protobuf field repeated string consumer_rules = 9 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string[] $var + * @return $this + */ + public function setConsumerRules($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->consumer_rules = $arr; + + return $this; + } + + /** + * Output only. The timestamp when the rule deployment alert state was lastly + * changed. This is filled regardless of the current alert state. E.g. if the + * current alert status is false, this timestamp will be the timestamp when + * the alert status was changed to false. + * + * Generated from protobuf field .google.protobuf.Timestamp last_alert_status_change_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastAlertStatusChangeTime() + { + return $this->last_alert_status_change_time; + } + + public function hasLastAlertStatusChangeTime() + { + return isset($this->last_alert_status_change_time); + } + + public function clearLastAlertStatusChangeTime() + { + unset($this->last_alert_status_change_time); + } + + /** + * Output only. The timestamp when the rule deployment alert state was lastly + * changed. This is filled regardless of the current alert state. E.g. if the + * current alert status is false, this timestamp will be the timestamp when + * the alert status was changed to false. + * + * Generated from protobuf field .google.protobuf.Timestamp last_alert_status_change_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastAlertStatusChangeTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_alert_status_change_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/RuleDeployment/ExecutionState.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/RuleDeployment/ExecutionState.php new file mode 100644 index 000000000000..c942861abbcc --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/RuleDeployment/ExecutionState.php @@ -0,0 +1,72 @@ +google.cloud.chronicle.v1.RuleDeployment.ExecutionState + */ +class ExecutionState +{ + /** + * Unspecified or unknown execution state. + * + * Generated from protobuf enum EXECUTION_STATE_UNSPECIFIED = 0; + */ + const EXECUTION_STATE_UNSPECIFIED = 0; + /** + * Default execution state. + * + * Generated from protobuf enum DEFAULT = 1; + */ + const PBDEFAULT = 1; + /** + * Rules in limited state may not have their executions guaranteed. + * + * Generated from protobuf enum LIMITED = 2; + */ + const LIMITED = 2; + /** + * Paused rules are not executed at all. + * + * Generated from protobuf enum PAUSED = 3; + */ + const PAUSED = 3; + + private static $valueToName = [ + self::EXECUTION_STATE_UNSPECIFIED => 'EXECUTION_STATE_UNSPECIFIED', + self::PBDEFAULT => 'DEFAULT', + self::LIMITED => 'LIMITED', + self::PAUSED => 'PAUSED', + ]; + + 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)) { + $pbconst = __CLASS__. '::PB' . strtoupper($name); + if (!defined($pbconst)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($pbconst); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/RuleType.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/RuleType.php new file mode 100644 index 000000000000..fd4d0dbae098 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/RuleType.php @@ -0,0 +1,62 @@ +google.cloud.chronicle.v1.RuleType + */ +class RuleType +{ + /** + * The rule type is unspecified/unknown. + * + * Generated from protobuf enum RULE_TYPE_UNSPECIFIED = 0; + */ + const RULE_TYPE_UNSPECIFIED = 0; + /** + * Rule checks for the existence of a single event. + * + * Generated from protobuf enum SINGLE_EVENT = 1; + */ + const SINGLE_EVENT = 1; + /** + * Rule checks for correlation between multiple events + * + * Generated from protobuf enum MULTI_EVENT = 2; + */ + const MULTI_EVENT = 2; + + private static $valueToName = [ + self::RULE_TYPE_UNSPECIFIED => 'RULE_TYPE_UNSPECIFIED', + self::SINGLE_EVENT => 'SINGLE_EVENT', + self::MULTI_EVENT => 'MULTI_EVENT', + ]; + + 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/RuleView.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/RuleView.php new file mode 100644 index 000000000000..a79782aed652 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/RuleView.php @@ -0,0 +1,77 @@ +google.cloud.chronicle.v1.RuleView + */ +class RuleView +{ + /** + * The default/unset value. + * The API will default to the BASIC view for ListRules/ListRuleRevisions. + * The API will default to the FULL view for GetRule. + * + * Generated from protobuf enum RULE_VIEW_UNSPECIFIED = 0; + */ + const RULE_VIEW_UNSPECIFIED = 0; + /** + * Include basic metadata about the rule, but not the full contents. + * Returned fields include: revision_id, revision_create_time, display_name, + * author, severity, type, allowed_run_frequency, + * near_real_time_live_rule_eligible, etag, and scope. + * This is the default value for ListRules and ListRuleRevisions. + * + * Generated from protobuf enum BASIC = 1; + */ + const BASIC = 1; + /** + * Include all fields. + * This is the default value for GetRule. + * + * Generated from protobuf enum FULL = 2; + */ + const FULL = 2; + /** + * Include basic metadata about the rule's revision only. + * Returned fields include: revision_id and revision_create_time. + * + * Generated from protobuf enum REVISION_METADATA_ONLY = 3; + */ + const REVISION_METADATA_ONLY = 3; + + private static $valueToName = [ + self::RULE_VIEW_UNSPECIFIED => 'RULE_VIEW_UNSPECIFIED', + self::BASIC => 'BASIC', + self::FULL => 'FULL', + self::REVISION_METADATA_ONLY => 'REVISION_METADATA_ONLY', + ]; + + 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/RunFrequency.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/RunFrequency.php new file mode 100644 index 000000000000..0540b9c3cfd8 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/RunFrequency.php @@ -0,0 +1,69 @@ +google.cloud.chronicle.v1.RunFrequency + */ +class RunFrequency +{ + /** + * The run frequency is unspecified/unknown. + * + * Generated from protobuf enum RUN_FREQUENCY_UNSPECIFIED = 0; + */ + const RUN_FREQUENCY_UNSPECIFIED = 0; + /** + * Executes in real time. + * + * Generated from protobuf enum LIVE = 1; + */ + const LIVE = 1; + /** + * Executes once per hour. + * + * Generated from protobuf enum HOURLY = 2; + */ + const HOURLY = 2; + /** + * Executes once per day. + * + * Generated from protobuf enum DAILY = 3; + */ + const DAILY = 3; + + private static $valueToName = [ + self::RUN_FREQUENCY_UNSPECIFIED => 'RUN_FREQUENCY_UNSPECIFIED', + self::LIVE => 'LIVE', + self::HOURLY => 'HOURLY', + self::DAILY => 'DAILY', + ]; + + 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ScopeInfo.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ScopeInfo.php new file mode 100644 index 000000000000..69d47b86337b --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ScopeInfo.php @@ -0,0 +1,81 @@ +google.cloud.chronicle.v1.ScopeInfo + */ +class ScopeInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The list of scope names of the reference list, if the list is + * empty the reference list is treated as unscoped. + * + * Generated from protobuf field .google.cloud.chronicle.v1.ReferenceListScope reference_list_scope = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $reference_list_scope = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Chronicle\V1\ReferenceListScope $reference_list_scope + * Required. The list of scope names of the reference list, if the list is + * empty the reference list is treated as unscoped. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\ReferenceList::initOnce(); + parent::__construct($data); + } + + /** + * Required. The list of scope names of the reference list, if the list is + * empty the reference list is treated as unscoped. + * + * Generated from protobuf field .google.cloud.chronicle.v1.ReferenceListScope reference_list_scope = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Chronicle\V1\ReferenceListScope|null + */ + public function getReferenceListScope() + { + return $this->reference_list_scope; + } + + public function hasReferenceListScope() + { + return isset($this->reference_list_scope); + } + + public function clearReferenceListScope() + { + unset($this->reference_list_scope); + } + + /** + * Required. The list of scope names of the reference list, if the list is + * empty the reference list is treated as unscoped. + * + * Generated from protobuf field .google.cloud.chronicle.v1.ReferenceListScope reference_list_scope = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Chronicle\V1\ReferenceListScope $var + * @return $this + */ + public function setReferenceListScope($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\ReferenceListScope::class); + $this->reference_list_scope = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Severity.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Severity.php new file mode 100644 index 000000000000..8d2c048917ac --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Severity.php @@ -0,0 +1,71 @@ +google.cloud.chronicle.v1.Severity + */ +class Severity extends \Google\Protobuf\Internal\Message +{ + /** + * The display name of the severity level. Extracted from the meta section of + * the rule text. + * + * 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 severity level. Extracted from the meta section of + * the rule text. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\Rule::initOnce(); + parent::__construct($data); + } + + /** + * The display name of the severity level. Extracted from the meta section of + * the rule text. + * + * Generated from protobuf field string display_name = 1; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The display name of the severity level. Extracted from the meta section of + * the rule text. + * + * 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; + } + +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateDataAccessLabelRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateDataAccessLabelRequest.php new file mode 100644 index 000000000000..6830fde1824e --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateDataAccessLabelRequest.php @@ -0,0 +1,167 @@ +google.cloud.chronicle.v1.UpdateDataAccessLabelRequest + */ +class UpdateDataAccessLabelRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The data access label to update. + * The label's `name` field is used to identify the label to update. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` + * + * Generated from protobuf field .google.cloud.chronicle.v1.DataAccessLabel data_access_label = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $data_access_label = null; + /** + * The list of fields to update. If not included, all fields with a non-empty + * value will be overwritten. Currently, only the description and definition + * fields are supported for update; an update call that attempts to update any + * other fields will return INVALID_ARGUMENT. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Chronicle\V1\DataAccessLabel $dataAccessLabel Required. The data access label to update. + * + * The label's `name` field is used to identify the label to update. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` + * @param \Google\Protobuf\FieldMask $updateMask The list of fields to update. If not included, all fields with a non-empty + * value will be overwritten. Currently, only the description and definition + * fields are supported for update; an update call that attempts to update any + * other fields will return INVALID_ARGUMENT. + * + * @return \Google\Cloud\Chronicle\V1\UpdateDataAccessLabelRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Chronicle\V1\DataAccessLabel $dataAccessLabel, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setDataAccessLabel($dataAccessLabel) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Chronicle\V1\DataAccessLabel $data_access_label + * Required. The data access label to update. + * The label's `name` field is used to identify the label to update. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` + * @type \Google\Protobuf\FieldMask $update_mask + * The list of fields to update. If not included, all fields with a non-empty + * value will be overwritten. Currently, only the description and definition + * fields are supported for update; an update call that attempts to update any + * other fields will return INVALID_ARGUMENT. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DataAccessControl::initOnce(); + parent::__construct($data); + } + + /** + * Required. The data access label to update. + * The label's `name` field is used to identify the label to update. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` + * + * Generated from protobuf field .google.cloud.chronicle.v1.DataAccessLabel data_access_label = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Chronicle\V1\DataAccessLabel|null + */ + public function getDataAccessLabel() + { + return $this->data_access_label; + } + + public function hasDataAccessLabel() + { + return isset($this->data_access_label); + } + + public function clearDataAccessLabel() + { + unset($this->data_access_label); + } + + /** + * Required. The data access label to update. + * The label's `name` field is used to identify the label to update. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` + * + * Generated from protobuf field .google.cloud.chronicle.v1.DataAccessLabel data_access_label = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Chronicle\V1\DataAccessLabel $var + * @return $this + */ + public function setDataAccessLabel($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DataAccessLabel::class); + $this->data_access_label = $var; + + return $this; + } + + /** + * The list of fields to update. If not included, all fields with a non-empty + * value will be overwritten. Currently, only the description and definition + * fields are supported for update; an update call that attempts to update any + * other fields will return INVALID_ARGUMENT. + * + * 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); + } + + /** + * The list of fields to update. If not included, all fields with a non-empty + * value will be overwritten. Currently, only the description and definition + * fields are supported for update; an update call that attempts to update any + * other fields will return INVALID_ARGUMENT. + * + * 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateDataAccessScopeRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateDataAccessScopeRequest.php new file mode 100644 index 000000000000..b332994c240e --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateDataAccessScopeRequest.php @@ -0,0 +1,172 @@ +google.cloud.chronicle.v1.UpdateDataAccessScopeRequest + */ +class UpdateDataAccessScopeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The data access scope to update. + * The scope's `name` field is used to identify the scope to update. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` + * + * Generated from protobuf field .google.cloud.chronicle.v1.DataAccessScope data_access_scope = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $data_access_scope = null; + /** + * The list of fields to update. If not included, all fields with a non-empty + * value will be overwritten. Currently, only the description, the allowed + * and denied labels list fields are supported for update; + * an update call that attempts to update any + * other fields will return INVALID_ARGUMENT. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Chronicle\V1\DataAccessScope $dataAccessScope Required. The data access scope to update. + * + * The scope's `name` field is used to identify the scope to update. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` + * @param \Google\Protobuf\FieldMask $updateMask The list of fields to update. If not included, all fields with a non-empty + * value will be overwritten. Currently, only the description, the allowed + * and denied labels list fields are supported for update; + * an update call that attempts to update any + * other fields will return INVALID_ARGUMENT. + * + * @return \Google\Cloud\Chronicle\V1\UpdateDataAccessScopeRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Chronicle\V1\DataAccessScope $dataAccessScope, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setDataAccessScope($dataAccessScope) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Chronicle\V1\DataAccessScope $data_access_scope + * Required. The data access scope to update. + * The scope's `name` field is used to identify the scope to update. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` + * @type \Google\Protobuf\FieldMask $update_mask + * The list of fields to update. If not included, all fields with a non-empty + * value will be overwritten. Currently, only the description, the allowed + * and denied labels list fields are supported for update; + * an update call that attempts to update any + * other fields will return INVALID_ARGUMENT. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DataAccessControl::initOnce(); + parent::__construct($data); + } + + /** + * Required. The data access scope to update. + * The scope's `name` field is used to identify the scope to update. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` + * + * Generated from protobuf field .google.cloud.chronicle.v1.DataAccessScope data_access_scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Chronicle\V1\DataAccessScope|null + */ + public function getDataAccessScope() + { + return $this->data_access_scope; + } + + public function hasDataAccessScope() + { + return isset($this->data_access_scope); + } + + public function clearDataAccessScope() + { + unset($this->data_access_scope); + } + + /** + * Required. The data access scope to update. + * The scope's `name` field is used to identify the scope to update. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` + * + * Generated from protobuf field .google.cloud.chronicle.v1.DataAccessScope data_access_scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Chronicle\V1\DataAccessScope $var + * @return $this + */ + public function setDataAccessScope($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DataAccessScope::class); + $this->data_access_scope = $var; + + return $this; + } + + /** + * The list of fields to update. If not included, all fields with a non-empty + * value will be overwritten. Currently, only the description, the allowed + * and denied labels list fields are supported for update; + * an update call that attempts to update any + * other fields will return INVALID_ARGUMENT. + * + * 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); + } + + /** + * The list of fields to update. If not included, all fields with a non-empty + * value will be overwritten. Currently, only the description, the allowed + * and denied labels list fields are supported for update; + * an update call that attempts to update any + * other fields will return INVALID_ARGUMENT. + * + * 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateDataTableRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateDataTableRequest.php new file mode 100644 index 000000000000..db7d985e7a3d --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateDataTableRequest.php @@ -0,0 +1,161 @@ +google.cloud.chronicle.v1.UpdateDataTableRequest + */ +class UpdateDataTableRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. This field is used to identify the datatable to update. + * Format: + * projects/{project}/locations/{locations}/instances/{instance}/dataTables/{data_table} + * + * Generated from protobuf field .google.cloud.chronicle.v1.DataTable data_table = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $data_table = null; + /** + * Optional. The list of metadata fields to update. Currently data tables only + * support updating the `description`, `row_time_to_live` and `scope_info` + * fields. When no field mask is supplied, all non-empty fields will be + * updated. A field mask of "*" will update all fields, whether empty or not. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Chronicle\V1\DataTable $dataTable Required. This field is used to identify the datatable to update. + * Format: + * projects/{project}/locations/{locations}/instances/{instance}/dataTables/{data_table} + * @param \Google\Protobuf\FieldMask $updateMask Optional. The list of metadata fields to update. Currently data tables only + * support updating the `description`, `row_time_to_live` and `scope_info` + * fields. When no field mask is supplied, all non-empty fields will be + * updated. A field mask of "*" will update all fields, whether empty or not. + * + * @return \Google\Cloud\Chronicle\V1\UpdateDataTableRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Chronicle\V1\DataTable $dataTable, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setDataTable($dataTable) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Chronicle\V1\DataTable $data_table + * Required. This field is used to identify the datatable to update. + * Format: + * projects/{project}/locations/{locations}/instances/{instance}/dataTables/{data_table} + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. The list of metadata fields to update. Currently data tables only + * support updating the `description`, `row_time_to_live` and `scope_info` + * fields. When no field mask is supplied, all non-empty fields will be + * updated. A field mask of "*" will update all fields, whether empty or not. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DataTable::initOnce(); + parent::__construct($data); + } + + /** + * Required. This field is used to identify the datatable to update. + * Format: + * projects/{project}/locations/{locations}/instances/{instance}/dataTables/{data_table} + * + * Generated from protobuf field .google.cloud.chronicle.v1.DataTable data_table = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Chronicle\V1\DataTable|null + */ + public function getDataTable() + { + return $this->data_table; + } + + public function hasDataTable() + { + return isset($this->data_table); + } + + public function clearDataTable() + { + unset($this->data_table); + } + + /** + * Required. This field is used to identify the datatable to update. + * Format: + * projects/{project}/locations/{locations}/instances/{instance}/dataTables/{data_table} + * + * Generated from protobuf field .google.cloud.chronicle.v1.DataTable data_table = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Chronicle\V1\DataTable $var + * @return $this + */ + public function setDataTable($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DataTable::class); + $this->data_table = $var; + + return $this; + } + + /** + * Optional. The list of metadata fields to update. Currently data tables only + * support updating the `description`, `row_time_to_live` and `scope_info` + * fields. When no field mask is supplied, all non-empty fields will be + * updated. A field mask of "*" will update all fields, whether empty or not. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.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. The list of metadata fields to update. Currently data tables only + * support updating the `description`, `row_time_to_live` and `scope_info` + * fields. When no field mask is supplied, all non-empty fields will be + * updated. A field mask of "*" will update all fields, whether empty or not. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateDataTableRowRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateDataTableRowRequest.php new file mode 100644 index 000000000000..9f1bc32f4b5b --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateDataTableRowRequest.php @@ -0,0 +1,156 @@ +google.cloud.chronicle.v1.UpdateDataTableRowRequest + */ +class UpdateDataTableRowRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}/dataTableRows/{data_table_row} + * + * Generated from protobuf field .google.cloud.chronicle.v1.DataTableRow data_table_row = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $data_table_row = null; + /** + * Optional. The list of fields to update. Currently data table rows only + * support updating the `values` field. When no field mask is supplied, all + * non-empty fields will be updated. A field mask of "*" will update all + * fields, whether empty or not. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Chronicle\V1\DataTableRow $dataTableRow Required. Format: + * projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}/dataTableRows/{data_table_row} + * @param \Google\Protobuf\FieldMask $updateMask Optional. The list of fields to update. Currently data table rows only + * support updating the `values` field. When no field mask is supplied, all + * non-empty fields will be updated. A field mask of "*" will update all + * fields, whether empty or not. + * + * @return \Google\Cloud\Chronicle\V1\UpdateDataTableRowRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Chronicle\V1\DataTableRow $dataTableRow, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setDataTableRow($dataTableRow) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Chronicle\V1\DataTableRow $data_table_row + * Required. Format: + * projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}/dataTableRows/{data_table_row} + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. The list of fields to update. Currently data table rows only + * support updating the `values` field. When no field mask is supplied, all + * non-empty fields will be updated. A field mask of "*" will update all + * fields, whether empty or not. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DataTable::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}/dataTableRows/{data_table_row} + * + * Generated from protobuf field .google.cloud.chronicle.v1.DataTableRow data_table_row = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Chronicle\V1\DataTableRow|null + */ + public function getDataTableRow() + { + return $this->data_table_row; + } + + public function hasDataTableRow() + { + return isset($this->data_table_row); + } + + public function clearDataTableRow() + { + unset($this->data_table_row); + } + + /** + * Required. Format: + * projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}/dataTableRows/{data_table_row} + * + * Generated from protobuf field .google.cloud.chronicle.v1.DataTableRow data_table_row = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Chronicle\V1\DataTableRow $var + * @return $this + */ + public function setDataTableRow($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DataTableRow::class); + $this->data_table_row = $var; + + return $this; + } + + /** + * Optional. The list of fields to update. Currently data table rows only + * support updating the `values` field. When no field mask is supplied, all + * non-empty fields will be updated. A field mask of "*" will update all + * fields, whether empty or not. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.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. The list of fields to update. Currently data table rows only + * support updating the `values` field. When no field mask is supplied, all + * non-empty fields will be updated. A field mask of "*" will update all + * fields, whether empty or not. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateReferenceListRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateReferenceListRequest.php new file mode 100644 index 000000000000..f38d1db1fad1 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateReferenceListRequest.php @@ -0,0 +1,167 @@ +google.cloud.chronicle.v1.UpdateReferenceListRequest + */ +class UpdateReferenceListRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The reference list to update. + * The reference list's `name` field is used to identify the reference list to + * update. + * Format: + * `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}` + * + * Generated from protobuf field .google.cloud.chronicle.v1.ReferenceList reference_list = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $reference_list = null; + /** + * The list of fields to update. + * When no field mask is supplied, all non-empty fields will be updated. + * A field mask of "*" will update all fields, whether empty or not. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Chronicle\V1\ReferenceList $referenceList Required. The reference list to update. + * + * The reference list's `name` field is used to identify the reference list to + * update. + * Format: + * `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}` + * @param \Google\Protobuf\FieldMask $updateMask The list of fields to update. + * When no field mask is supplied, all non-empty fields will be updated. + * A field mask of "*" will update all fields, whether empty or not. + * + * @return \Google\Cloud\Chronicle\V1\UpdateReferenceListRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Chronicle\V1\ReferenceList $referenceList, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setReferenceList($referenceList) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Chronicle\V1\ReferenceList $reference_list + * Required. The reference list to update. + * The reference list's `name` field is used to identify the reference list to + * update. + * Format: + * `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}` + * @type \Google\Protobuf\FieldMask $update_mask + * The list of fields to update. + * When no field mask is supplied, all non-empty fields will be updated. + * A field mask of "*" will update all fields, whether empty or not. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\ReferenceList::initOnce(); + parent::__construct($data); + } + + /** + * Required. The reference list to update. + * The reference list's `name` field is used to identify the reference list to + * update. + * Format: + * `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}` + * + * Generated from protobuf field .google.cloud.chronicle.v1.ReferenceList reference_list = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Chronicle\V1\ReferenceList|null + */ + public function getReferenceList() + { + return $this->reference_list; + } + + public function hasReferenceList() + { + return isset($this->reference_list); + } + + public function clearReferenceList() + { + unset($this->reference_list); + } + + /** + * Required. The reference list to update. + * The reference list's `name` field is used to identify the reference list to + * update. + * Format: + * `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}` + * + * Generated from protobuf field .google.cloud.chronicle.v1.ReferenceList reference_list = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Chronicle\V1\ReferenceList $var + * @return $this + */ + public function setReferenceList($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\ReferenceList::class); + $this->reference_list = $var; + + return $this; + } + + /** + * The list of fields to update. + * When no field mask is supplied, all non-empty fields will be updated. + * A field mask of "*" will update all fields, whether empty or not. + * + * 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); + } + + /** + * The list of fields to update. + * When no field mask is supplied, all non-empty fields will be updated. + * A field mask of "*" will update all fields, whether empty or not. + * + * 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateRuleDeploymentRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateRuleDeploymentRequest.php new file mode 100644 index 000000000000..b6628f53c50e --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateRuleDeploymentRequest.php @@ -0,0 +1,152 @@ +google.cloud.chronicle.v1.UpdateRuleDeploymentRequest + */ +class UpdateRuleDeploymentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The rule deployment to update. + * The rule deployment's `name` field is used to identify the rule deployment + * to update. Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` + * + * Generated from protobuf field .google.cloud.chronicle.v1.RuleDeployment rule_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $rule_deployment = null; + /** + * Required. The list of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Chronicle\V1\RuleDeployment $ruleDeployment Required. The rule deployment to update. + * + * The rule deployment's `name` field is used to identify the rule deployment + * to update. Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` + * @param \Google\Protobuf\FieldMask $updateMask Required. The list of fields to update. + * + * @return \Google\Cloud\Chronicle\V1\UpdateRuleDeploymentRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Chronicle\V1\RuleDeployment $ruleDeployment, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setRuleDeployment($ruleDeployment) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Chronicle\V1\RuleDeployment $rule_deployment + * Required. The rule deployment to update. + * The rule deployment's `name` field is used to identify the rule deployment + * to update. Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The list of fields to update. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\Rule::initOnce(); + parent::__construct($data); + } + + /** + * Required. The rule deployment to update. + * The rule deployment's `name` field is used to identify the rule deployment + * to update. Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` + * + * Generated from protobuf field .google.cloud.chronicle.v1.RuleDeployment rule_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Chronicle\V1\RuleDeployment|null + */ + public function getRuleDeployment() + { + return $this->rule_deployment; + } + + public function hasRuleDeployment() + { + return isset($this->rule_deployment); + } + + public function clearRuleDeployment() + { + unset($this->rule_deployment); + } + + /** + * Required. The rule deployment to update. + * The rule deployment's `name` field is used to identify the rule deployment + * to update. Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` + * + * Generated from protobuf field .google.cloud.chronicle.v1.RuleDeployment rule_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Chronicle\V1\RuleDeployment $var + * @return $this + */ + public function setRuleDeployment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\RuleDeployment::class); + $this->rule_deployment = $var; + + return $this; + } + + /** + * Required. The list of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @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); + } + + /** + * Required. The list of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateRuleRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateRuleRequest.php new file mode 100644 index 000000000000..4d51451d9e75 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateRuleRequest.php @@ -0,0 +1,157 @@ +google.cloud.chronicle.v1.UpdateRuleRequest + */ +class UpdateRuleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The rule to update. + * The rule's `name` field is used to identify the rule to update. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + * + * Generated from protobuf field .google.cloud.chronicle.v1.Rule rule = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $rule = null; + /** + * The list of fields to update. If not included, all fields with a non-empty + * value will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Chronicle\V1\Rule $rule Required. The rule to update. + * + * The rule's `name` field is used to identify the rule to update. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + * @param \Google\Protobuf\FieldMask $updateMask The list of fields to update. If not included, all fields with a non-empty + * value will be overwritten. + * + * @return \Google\Cloud\Chronicle\V1\UpdateRuleRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Chronicle\V1\Rule $rule, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setRule($rule) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Chronicle\V1\Rule $rule + * Required. The rule to update. + * The rule's `name` field is used to identify the rule to update. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + * @type \Google\Protobuf\FieldMask $update_mask + * The list of fields to update. If not included, all fields with a non-empty + * value will be overwritten. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\Rule::initOnce(); + parent::__construct($data); + } + + /** + * Required. The rule to update. + * The rule's `name` field is used to identify the rule to update. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + * + * Generated from protobuf field .google.cloud.chronicle.v1.Rule rule = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Chronicle\V1\Rule|null + */ + public function getRule() + { + return $this->rule; + } + + public function hasRule() + { + return isset($this->rule); + } + + public function clearRule() + { + unset($this->rule); + } + + /** + * Required. The rule to update. + * The rule's `name` field is used to identify the rule to update. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + * + * Generated from protobuf field .google.cloud.chronicle.v1.Rule rule = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Chronicle\V1\Rule $var + * @return $this + */ + public function setRule($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\Rule::class); + $this->rule = $var; + + return $this; + } + + /** + * The list of fields to update. If not included, all fields with a non-empty + * value will be overwritten. + * + * 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); + } + + /** + * The list of fields to update. If not included, all fields with a non-empty + * value will be overwritten. + * + * 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateWatchlistRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateWatchlistRequest.php new file mode 100644 index 000000000000..9afffa4ab421 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateWatchlistRequest.php @@ -0,0 +1,152 @@ +google.cloud.chronicle.v1.UpdateWatchlistRequest + */ +class UpdateWatchlistRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The watchlist to update. + * The watchlist's `name` field is used to identify the watchlist to update. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` + * + * Generated from protobuf field .google.cloud.chronicle.v1.Watchlist watchlist = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $watchlist = null; + /** + * Optional. The list of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Chronicle\V1\Watchlist $watchlist Required. The watchlist to update. + * + * The watchlist's `name` field is used to identify the watchlist to update. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` + * @param \Google\Protobuf\FieldMask $updateMask Optional. The list of fields to update. + * + * @return \Google\Cloud\Chronicle\V1\UpdateWatchlistRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Chronicle\V1\Watchlist $watchlist, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setWatchlist($watchlist) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Chronicle\V1\Watchlist $watchlist + * Required. The watchlist to update. + * The watchlist's `name` field is used to identify the watchlist to update. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. The list of fields to update. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\Entity::initOnce(); + parent::__construct($data); + } + + /** + * Required. The watchlist to update. + * The watchlist's `name` field is used to identify the watchlist to update. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` + * + * Generated from protobuf field .google.cloud.chronicle.v1.Watchlist watchlist = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Chronicle\V1\Watchlist|null + */ + public function getWatchlist() + { + return $this->watchlist; + } + + public function hasWatchlist() + { + return isset($this->watchlist); + } + + public function clearWatchlist() + { + unset($this->watchlist); + } + + /** + * Required. The watchlist to update. + * The watchlist's `name` field is used to identify the watchlist to update. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` + * + * Generated from protobuf field .google.cloud.chronicle.v1.Watchlist watchlist = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Chronicle\V1\Watchlist $var + * @return $this + */ + public function setWatchlist($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\Watchlist::class); + $this->watchlist = $var; + + return $this; + } + + /** + * Optional. The list of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.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. The list of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Watchlist.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Watchlist.php new file mode 100644 index 000000000000..2c3553e82f3e --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Watchlist.php @@ -0,0 +1,414 @@ +google.cloud.chronicle.v1.Watchlist + */ +class Watchlist extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. Resource name of the watchlist. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Required. Display name of the watchlist. + * Note that it must be at least one character and less than 63 characters + * (https://google.aip.dev/148). + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * Optional. Description of the watchlist. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Optional. Weight applied to the risk score for entities + * in this watchlist. + * The default is 1.0 if it is not specified. + * + * Generated from protobuf field float multiplying_factor = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $multiplying_factor = 0.0; + /** + * Required. Mechanism to populate entities in the watchlist. + * + * Generated from protobuf field .google.cloud.chronicle.v1.Watchlist.EntityPopulationMechanism entity_population_mechanism = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $entity_population_mechanism = null; + /** + * Output only. Entity count in the watchlist. + * + * Generated from protobuf field .google.cloud.chronicle.v1.Watchlist.EntityCount entity_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $entity_count = null; + /** + * Output only. Time the watchlist was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Time the watchlist was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. User preferences for watchlist configuration. + * + * Generated from protobuf field .google.cloud.chronicle.v1.WatchlistUserPreferences watchlist_user_preferences = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $watchlist_user_preferences = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. Resource name of the watchlist. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` + * @type string $display_name + * Required. Display name of the watchlist. + * Note that it must be at least one character and less than 63 characters + * (https://google.aip.dev/148). + * @type string $description + * Optional. Description of the watchlist. + * @type float $multiplying_factor + * Optional. Weight applied to the risk score for entities + * in this watchlist. + * The default is 1.0 if it is not specified. + * @type \Google\Cloud\Chronicle\V1\Watchlist\EntityPopulationMechanism $entity_population_mechanism + * Required. Mechanism to populate entities in the watchlist. + * @type \Google\Cloud\Chronicle\V1\Watchlist\EntityCount $entity_count + * Output only. Entity count in the watchlist. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Time the watchlist was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Time the watchlist was last updated. + * @type \Google\Cloud\Chronicle\V1\WatchlistUserPreferences $watchlist_user_preferences + * Optional. User preferences for watchlist configuration. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\Entity::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. Resource name of the watchlist. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. Resource name of the watchlist. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. Display name of the watchlist. + * Note that it must be at least one character and less than 63 characters + * (https://google.aip.dev/148). + * + * 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 watchlist. + * Note that it must be at least one character and less than 63 characters + * (https://google.aip.dev/148). + * + * 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 the watchlist. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. Description of the watchlist. + * + * 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; + } + + /** + * Optional. Weight applied to the risk score for entities + * in this watchlist. + * The default is 1.0 if it is not specified. + * + * Generated from protobuf field float multiplying_factor = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getMultiplyingFactor() + { + return $this->multiplying_factor; + } + + /** + * Optional. Weight applied to the risk score for entities + * in this watchlist. + * The default is 1.0 if it is not specified. + * + * Generated from protobuf field float multiplying_factor = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setMultiplyingFactor($var) + { + GPBUtil::checkFloat($var); + $this->multiplying_factor = $var; + + return $this; + } + + /** + * Required. Mechanism to populate entities in the watchlist. + * + * Generated from protobuf field .google.cloud.chronicle.v1.Watchlist.EntityPopulationMechanism entity_population_mechanism = 6 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Chronicle\V1\Watchlist\EntityPopulationMechanism|null + */ + public function getEntityPopulationMechanism() + { + return $this->entity_population_mechanism; + } + + public function hasEntityPopulationMechanism() + { + return isset($this->entity_population_mechanism); + } + + public function clearEntityPopulationMechanism() + { + unset($this->entity_population_mechanism); + } + + /** + * Required. Mechanism to populate entities in the watchlist. + * + * Generated from protobuf field .google.cloud.chronicle.v1.Watchlist.EntityPopulationMechanism entity_population_mechanism = 6 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Chronicle\V1\Watchlist\EntityPopulationMechanism $var + * @return $this + */ + public function setEntityPopulationMechanism($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\Watchlist\EntityPopulationMechanism::class); + $this->entity_population_mechanism = $var; + + return $this; + } + + /** + * Output only. Entity count in the watchlist. + * + * Generated from protobuf field .google.cloud.chronicle.v1.Watchlist.EntityCount entity_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Chronicle\V1\Watchlist\EntityCount|null + */ + public function getEntityCount() + { + return $this->entity_count; + } + + public function hasEntityCount() + { + return isset($this->entity_count); + } + + public function clearEntityCount() + { + unset($this->entity_count); + } + + /** + * Output only. Entity count in the watchlist. + * + * Generated from protobuf field .google.cloud.chronicle.v1.Watchlist.EntityCount entity_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Chronicle\V1\Watchlist\EntityCount $var + * @return $this + */ + public function setEntityCount($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\Watchlist\EntityCount::class); + $this->entity_count = $var; + + return $this; + } + + /** + * Output only. Time the watchlist was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @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); + } + + /** + * Output only. Time the watchlist was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. Time the watchlist was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @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); + } + + /** + * Output only. Time the watchlist was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Optional. User preferences for watchlist configuration. + * + * Generated from protobuf field .google.cloud.chronicle.v1.WatchlistUserPreferences watchlist_user_preferences = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Chronicle\V1\WatchlistUserPreferences|null + */ + public function getWatchlistUserPreferences() + { + return $this->watchlist_user_preferences; + } + + public function hasWatchlistUserPreferences() + { + return isset($this->watchlist_user_preferences); + } + + public function clearWatchlistUserPreferences() + { + unset($this->watchlist_user_preferences); + } + + /** + * Optional. User preferences for watchlist configuration. + * + * Generated from protobuf field .google.cloud.chronicle.v1.WatchlistUserPreferences watchlist_user_preferences = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Chronicle\V1\WatchlistUserPreferences $var + * @return $this + */ + public function setWatchlistUserPreferences($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\WatchlistUserPreferences::class); + $this->watchlist_user_preferences = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Watchlist/EntityCount.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Watchlist/EntityCount.php new file mode 100644 index 000000000000..6ed43d57e34a --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Watchlist/EntityCount.php @@ -0,0 +1,101 @@ +google.cloud.chronicle.v1.Watchlist.EntityCount + */ +class EntityCount extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Count of user type entities in the watchlist. + * + * Generated from protobuf field int32 user = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $user = 0; + /** + * Output only. Count of asset type entities in the watchlist. + * + * Generated from protobuf field int32 asset = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $asset = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $user + * Output only. Count of user type entities in the watchlist. + * @type int $asset + * Output only. Count of asset type entities in the watchlist. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\Entity::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Count of user type entities in the watchlist. + * + * Generated from protobuf field int32 user = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getUser() + { + return $this->user; + } + + /** + * Output only. Count of user type entities in the watchlist. + * + * Generated from protobuf field int32 user = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setUser($var) + { + GPBUtil::checkInt32($var); + $this->user = $var; + + return $this; + } + + /** + * Output only. Count of asset type entities in the watchlist. + * + * Generated from protobuf field int32 asset = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getAsset() + { + return $this->asset; + } + + /** + * Output only. Count of asset type entities in the watchlist. + * + * Generated from protobuf field int32 asset = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setAsset($var) + { + GPBUtil::checkInt32($var); + $this->asset = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Watchlist/EntityPopulationMechanism.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Watchlist/EntityPopulationMechanism.php new file mode 100644 index 000000000000..1d821fb12d88 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Watchlist/EntityPopulationMechanism.php @@ -0,0 +1,75 @@ +google.cloud.chronicle.v1.Watchlist.EntityPopulationMechanism + */ +class EntityPopulationMechanism extends \Google\Protobuf\Internal\Message +{ + protected $mechanism; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Chronicle\V1\Watchlist\EntityPopulationMechanism\Manual $manual + * Optional. Entities are added manually. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\Entity::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Entities are added manually. + * + * Generated from protobuf field .google.cloud.chronicle.v1.Watchlist.EntityPopulationMechanism.Manual manual = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Chronicle\V1\Watchlist\EntityPopulationMechanism\Manual|null + */ + public function getManual() + { + return $this->readOneof(1); + } + + public function hasManual() + { + return $this->hasOneof(1); + } + + /** + * Optional. Entities are added manually. + * + * Generated from protobuf field .google.cloud.chronicle.v1.Watchlist.EntityPopulationMechanism.Manual manual = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Chronicle\V1\Watchlist\EntityPopulationMechanism\Manual $var + * @return $this + */ + public function setManual($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\Watchlist\EntityPopulationMechanism\Manual::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getMechanism() + { + return $this->whichOneof("mechanism"); + } + +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Watchlist/EntityPopulationMechanism/Manual.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Watchlist/EntityPopulationMechanism/Manual.php new file mode 100644 index 000000000000..610033c25683 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Watchlist/EntityPopulationMechanism/Manual.php @@ -0,0 +1,33 @@ +google.cloud.chronicle.v1.Watchlist.EntityPopulationMechanism.Manual + */ +class Manual extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\Entity::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/WatchlistUserPreferences.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/WatchlistUserPreferences.php new file mode 100644 index 000000000000..1e28b313f6fe --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/WatchlistUserPreferences.php @@ -0,0 +1,67 @@ +google.cloud.chronicle.v1.WatchlistUserPreferences + */ +class WatchlistUserPreferences extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Whether the watchlist is pinned on the dashboard. + * + * Generated from protobuf field bool pinned = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $pinned = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $pinned + * Optional. Whether the watchlist is pinned on the dashboard. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\Entity::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Whether the watchlist is pinned on the dashboard. + * + * Generated from protobuf field bool pinned = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getPinned() + { + return $this->pinned; + } + + /** + * Optional. Whether the watchlist is pinned on the dashboard. + * + * Generated from protobuf field bool pinned = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setPinned($var) + { + GPBUtil::checkBool($var); + $this->pinned = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/create_data_access_label.php b/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/create_data_access_label.php new file mode 100644 index 000000000000..0623874acf9e --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/create_data_access_label.php @@ -0,0 +1,89 @@ +setParent($formattedParent) + ->setDataAccessLabel($dataAccessLabel) + ->setDataAccessLabelId($dataAccessLabelId); + + // Call the API and handle any network failures. + try { + /** @var DataAccessLabel $response */ + $response = $dataAccessControlServiceClient->createDataAccessLabel($request); + 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 = DataAccessControlServiceClient::instanceName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]' + ); + $dataAccessLabelId = '[DATA_ACCESS_LABEL_ID]'; + + create_data_access_label_sample($formattedParent, $dataAccessLabelId); +} +// [END chronicle_v1_generated_DataAccessControlService_CreateDataAccessLabel_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/create_data_access_scope.php b/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/create_data_access_scope.php new file mode 100644 index 000000000000..5219ceb6ae38 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/create_data_access_scope.php @@ -0,0 +1,105 @@ +setName($formattedDataAccessScopeName); + $request = (new CreateDataAccessScopeRequest()) + ->setParent($formattedParent) + ->setDataAccessScope($dataAccessScope) + ->setDataAccessScopeId($dataAccessScopeId); + + // Call the API and handle any network failures. + try { + /** @var DataAccessScope $response */ + $response = $dataAccessControlServiceClient->createDataAccessScope($request); + 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 = DataAccessControlServiceClient::instanceName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]' + ); + $formattedDataAccessScopeName = DataAccessControlServiceClient::dataAccessScopeName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]', + '[DATA_ACCESS_SCOPE]' + ); + $dataAccessScopeId = '[DATA_ACCESS_SCOPE_ID]'; + + create_data_access_scope_sample( + $formattedParent, + $formattedDataAccessScopeName, + $dataAccessScopeId + ); +} +// [END chronicle_v1_generated_DataAccessControlService_CreateDataAccessScope_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/delete_data_access_label.php b/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/delete_data_access_label.php new file mode 100644 index 000000000000..3c885880892f --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/delete_data_access_label.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $dataAccessControlServiceClient->deleteDataAccessLabel($request); + 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 = DataAccessControlServiceClient::dataAccessLabelName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]', + '[DATA_ACCESS_LABEL]' + ); + + delete_data_access_label_sample($formattedName); +} +// [END chronicle_v1_generated_DataAccessControlService_DeleteDataAccessLabel_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/delete_data_access_scope.php b/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/delete_data_access_scope.php new file mode 100644 index 000000000000..41f166b0bf41 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/delete_data_access_scope.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $dataAccessControlServiceClient->deleteDataAccessScope($request); + 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 = DataAccessControlServiceClient::dataAccessScopeName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]', + '[DATA_ACCESS_SCOPE]' + ); + + delete_data_access_scope_sample($formattedName); +} +// [END chronicle_v1_generated_DataAccessControlService_DeleteDataAccessScope_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/get_data_access_label.php b/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/get_data_access_label.php new file mode 100644 index 000000000000..7b8c83109598 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/get_data_access_label.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var DataAccessLabel $response */ + $response = $dataAccessControlServiceClient->getDataAccessLabel($request); + 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 = DataAccessControlServiceClient::dataAccessLabelName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]', + '[DATA_ACCESS_LABEL]' + ); + + get_data_access_label_sample($formattedName); +} +// [END chronicle_v1_generated_DataAccessControlService_GetDataAccessLabel_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/get_data_access_scope.php b/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/get_data_access_scope.php new file mode 100644 index 000000000000..e434c9be6db8 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/get_data_access_scope.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var DataAccessScope $response */ + $response = $dataAccessControlServiceClient->getDataAccessScope($request); + 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 = DataAccessControlServiceClient::dataAccessScopeName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]', + '[DATA_ACCESS_SCOPE]' + ); + + get_data_access_scope_sample($formattedName); +} +// [END chronicle_v1_generated_DataAccessControlService_GetDataAccessScope_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/list_data_access_labels.php b/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/list_data_access_labels.php new file mode 100644 index 000000000000..f831204ae17d --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/list_data_access_labels.php @@ -0,0 +1,81 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $dataAccessControlServiceClient->listDataAccessLabels($request); + + /** @var DataAccessLabel $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 = DataAccessControlServiceClient::instanceName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]' + ); + + list_data_access_labels_sample($formattedParent); +} +// [END chronicle_v1_generated_DataAccessControlService_ListDataAccessLabels_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/list_data_access_scopes.php b/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/list_data_access_scopes.php new file mode 100644 index 000000000000..ac4cfa39ba9e --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/list_data_access_scopes.php @@ -0,0 +1,81 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $dataAccessControlServiceClient->listDataAccessScopes($request); + + /** @var DataAccessScope $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 = DataAccessControlServiceClient::instanceName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]' + ); + + list_data_access_scopes_sample($formattedParent); +} +// [END chronicle_v1_generated_DataAccessControlService_ListDataAccessScopes_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/update_data_access_label.php b/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/update_data_access_label.php new file mode 100644 index 000000000000..e949373ca7f3 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/update_data_access_label.php @@ -0,0 +1,59 @@ +setDataAccessLabel($dataAccessLabel); + + // Call the API and handle any network failures. + try { + /** @var DataAccessLabel $response */ + $response = $dataAccessControlServiceClient->updateDataAccessLabel($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END chronicle_v1_generated_DataAccessControlService_UpdateDataAccessLabel_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/update_data_access_scope.php b/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/update_data_access_scope.php new file mode 100644 index 000000000000..33d0d8a4424b --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/update_data_access_scope.php @@ -0,0 +1,79 @@ +setName($formattedDataAccessScopeName); + $request = (new UpdateDataAccessScopeRequest()) + ->setDataAccessScope($dataAccessScope); + + // Call the API and handle any network failures. + try { + /** @var DataAccessScope $response */ + $response = $dataAccessControlServiceClient->updateDataAccessScope($request); + 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 +{ + $formattedDataAccessScopeName = DataAccessControlServiceClient::dataAccessScopeName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]', + '[DATA_ACCESS_SCOPE]' + ); + + update_data_access_scope_sample($formattedDataAccessScopeName); +} +// [END chronicle_v1_generated_DataAccessControlService_UpdateDataAccessScope_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/bulk_create_data_table_rows.php b/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/bulk_create_data_table_rows.php new file mode 100644 index 000000000000..1f64d05306a3 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/bulk_create_data_table_rows.php @@ -0,0 +1,108 @@ +setValues($requestsDataTableRowValues); + $createDataTableRowRequest = (new CreateDataTableRowRequest()) + ->setParent($formattedRequestsParent) + ->setDataTableRow($requestsDataTableRow); + $requests = [$createDataTableRowRequest,]; + $request = (new BulkCreateDataTableRowsRequest()) + ->setParent($formattedParent) + ->setRequests($requests); + + // Call the API and handle any network failures. + try { + /** @var BulkCreateDataTableRowsResponse $response */ + $response = $dataTableServiceClient->bulkCreateDataTableRows($request); + 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 = DataTableServiceClient::dataTableName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]', + '[DATA_TABLE]' + ); + $formattedRequestsParent = DataTableServiceClient::dataTableName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]', + '[DATA_TABLE]' + ); + $requestsDataTableRowValuesElement = '[VALUES]'; + + bulk_create_data_table_rows_sample( + $formattedParent, + $formattedRequestsParent, + $requestsDataTableRowValuesElement + ); +} +// [END chronicle_v1_generated_DataTableService_BulkCreateDataTableRows_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/bulk_get_data_table_rows.php b/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/bulk_get_data_table_rows.php new file mode 100644 index 000000000000..5dff1680a8d2 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/bulk_get_data_table_rows.php @@ -0,0 +1,96 @@ +setName($formattedRequestsName); + $requests = [$getDataTableRowRequest,]; + $request = (new BulkGetDataTableRowsRequest()) + ->setParent($formattedParent) + ->setRequests($requests); + + // Call the API and handle any network failures. + try { + /** @var BulkGetDataTableRowsResponse $response */ + $response = $dataTableServiceClient->bulkGetDataTableRows($request); + 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 = DataTableServiceClient::dataTableName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]', + '[DATA_TABLE]' + ); + $formattedRequestsName = DataTableServiceClient::dataTableRowName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]', + '[DATA_TABLE]', + '[DATA_TABLE_ROW]' + ); + + bulk_get_data_table_rows_sample($formattedParent, $formattedRequestsName); +} +// [END chronicle_v1_generated_DataTableService_BulkGetDataTableRows_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/bulk_replace_data_table_rows.php b/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/bulk_replace_data_table_rows.php new file mode 100644 index 000000000000..719f12db7676 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/bulk_replace_data_table_rows.php @@ -0,0 +1,108 @@ +setValues($requestsDataTableRowValues); + $createDataTableRowRequest = (new CreateDataTableRowRequest()) + ->setParent($formattedRequestsParent) + ->setDataTableRow($requestsDataTableRow); + $requests = [$createDataTableRowRequest,]; + $request = (new BulkReplaceDataTableRowsRequest()) + ->setParent($formattedParent) + ->setRequests($requests); + + // Call the API and handle any network failures. + try { + /** @var BulkReplaceDataTableRowsResponse $response */ + $response = $dataTableServiceClient->bulkReplaceDataTableRows($request); + 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 = DataTableServiceClient::dataTableName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]', + '[DATA_TABLE]' + ); + $formattedRequestsParent = DataTableServiceClient::dataTableName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]', + '[DATA_TABLE]' + ); + $requestsDataTableRowValuesElement = '[VALUES]'; + + bulk_replace_data_table_rows_sample( + $formattedParent, + $formattedRequestsParent, + $requestsDataTableRowValuesElement + ); +} +// [END chronicle_v1_generated_DataTableService_BulkReplaceDataTableRows_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/bulk_update_data_table_rows.php b/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/bulk_update_data_table_rows.php new file mode 100644 index 000000000000..c5b35718149f --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/bulk_update_data_table_rows.php @@ -0,0 +1,92 @@ +setValues($requestsDataTableRowValues); + $updateDataTableRowRequest = (new UpdateDataTableRowRequest()) + ->setDataTableRow($requestsDataTableRow); + $requests = [$updateDataTableRowRequest,]; + $request = (new BulkUpdateDataTableRowsRequest()) + ->setParent($formattedParent) + ->setRequests($requests); + + // Call the API and handle any network failures. + try { + /** @var BulkUpdateDataTableRowsResponse $response */ + $response = $dataTableServiceClient->bulkUpdateDataTableRows($request); + 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 = DataTableServiceClient::dataTableName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]', + '[DATA_TABLE]' + ); + $requestsDataTableRowValuesElement = '[VALUES]'; + + bulk_update_data_table_rows_sample($formattedParent, $requestsDataTableRowValuesElement); +} +// [END chronicle_v1_generated_DataTableService_BulkUpdateDataTableRows_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/create_data_table.php b/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/create_data_table.php new file mode 100644 index 000000000000..bca1084349da --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/create_data_table.php @@ -0,0 +1,87 @@ +setDescription($dataTableDescription); + $request = (new CreateDataTableRequest()) + ->setParent($formattedParent) + ->setDataTable($dataTable) + ->setDataTableId($dataTableId); + + // Call the API and handle any network failures. + try { + /** @var DataTable $response */ + $response = $dataTableServiceClient->createDataTable($request); + 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 = DataTableServiceClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $dataTableDescription = '[DESCRIPTION]'; + $dataTableId = '[DATA_TABLE_ID]'; + + create_data_table_sample($formattedParent, $dataTableDescription, $dataTableId); +} +// [END chronicle_v1_generated_DataTableService_CreateDataTable_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/create_data_table_row.php b/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/create_data_table_row.php new file mode 100644 index 000000000000..4c2f774cc155 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/create_data_table_row.php @@ -0,0 +1,87 @@ +setValues($dataTableRowValues); + $request = (new CreateDataTableRowRequest()) + ->setParent($formattedParent) + ->setDataTableRow($dataTableRow); + + // Call the API and handle any network failures. + try { + /** @var DataTableRow $response */ + $response = $dataTableServiceClient->createDataTableRow($request); + 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 = DataTableServiceClient::dataTableName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]', + '[DATA_TABLE]' + ); + $dataTableRowValuesElement = '[VALUES]'; + + create_data_table_row_sample($formattedParent, $dataTableRowValuesElement); +} +// [END chronicle_v1_generated_DataTableService_CreateDataTableRow_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/delete_data_table.php b/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/delete_data_table.php new file mode 100644 index 000000000000..28c77cdb6435 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/delete_data_table.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $dataTableServiceClient->deleteDataTable($request); + 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 = DataTableServiceClient::dataTableName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]', + '[DATA_TABLE]' + ); + + delete_data_table_sample($formattedName); +} +// [END chronicle_v1_generated_DataTableService_DeleteDataTable_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/delete_data_table_row.php b/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/delete_data_table_row.php new file mode 100644 index 000000000000..82188421d34a --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/delete_data_table_row.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $dataTableServiceClient->deleteDataTableRow($request); + 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 = DataTableServiceClient::dataTableRowName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]', + '[DATA_TABLE]', + '[DATA_TABLE_ROW]' + ); + + delete_data_table_row_sample($formattedName); +} +// [END chronicle_v1_generated_DataTableService_DeleteDataTableRow_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/get_data_table.php b/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/get_data_table.php new file mode 100644 index 000000000000..f8c92cf8d5be --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/get_data_table.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var DataTable $response */ + $response = $dataTableServiceClient->getDataTable($request); + 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 = DataTableServiceClient::dataTableName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]', + '[DATA_TABLE]' + ); + + get_data_table_sample($formattedName); +} +// [END chronicle_v1_generated_DataTableService_GetDataTable_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/get_data_table_operation_errors.php b/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/get_data_table_operation_errors.php new file mode 100644 index 000000000000..354a4397517f --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/get_data_table_operation_errors.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var DataTableOperationErrors $response */ + $response = $dataTableServiceClient->getDataTableOperationErrors($request); + 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 = DataTableServiceClient::dataTableOperationErrorsName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]', + '[DATA_TABLE_OPERATION_ERRORS]' + ); + + get_data_table_operation_errors_sample($formattedName); +} +// [END chronicle_v1_generated_DataTableService_GetDataTableOperationErrors_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/get_data_table_row.php b/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/get_data_table_row.php new file mode 100644 index 000000000000..90790e1fd6b3 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/get_data_table_row.php @@ -0,0 +1,79 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var DataTableRow $response */ + $response = $dataTableServiceClient->getDataTableRow($request); + 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 = DataTableServiceClient::dataTableRowName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]', + '[DATA_TABLE]', + '[DATA_TABLE_ROW]' + ); + + get_data_table_row_sample($formattedName); +} +// [END chronicle_v1_generated_DataTableService_GetDataTableRow_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/list_data_table_rows.php b/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/list_data_table_rows.php new file mode 100644 index 000000000000..d38cc698f7fd --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/list_data_table_rows.php @@ -0,0 +1,83 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $dataTableServiceClient->listDataTableRows($request); + + /** @var DataTableRow $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 = DataTableServiceClient::dataTableName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]', + '[DATA_TABLE]' + ); + + list_data_table_rows_sample($formattedParent); +} +// [END chronicle_v1_generated_DataTableService_ListDataTableRows_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/list_data_tables.php b/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/list_data_tables.php new file mode 100644 index 000000000000..87d6c459c2f2 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/list_data_tables.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $dataTableServiceClient->listDataTables($request); + + /** @var DataTable $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 = DataTableServiceClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + + list_data_tables_sample($formattedParent); +} +// [END chronicle_v1_generated_DataTableService_ListDataTables_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/update_data_table.php b/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/update_data_table.php new file mode 100644 index 000000000000..56d2a5d3e41c --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/update_data_table.php @@ -0,0 +1,72 @@ +setDescription($dataTableDescription); + $request = (new UpdateDataTableRequest()) + ->setDataTable($dataTable); + + // Call the API and handle any network failures. + try { + /** @var DataTable $response */ + $response = $dataTableServiceClient->updateDataTable($request); + 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 +{ + $dataTableDescription = '[DESCRIPTION]'; + + update_data_table_sample($dataTableDescription); +} +// [END chronicle_v1_generated_DataTableService_UpdateDataTable_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/update_data_table_row.php b/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/update_data_table_row.php new file mode 100644 index 000000000000..a3b430d80898 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/update_data_table_row.php @@ -0,0 +1,74 @@ +setValues($dataTableRowValues); + $request = (new UpdateDataTableRowRequest()) + ->setDataTableRow($dataTableRow); + + // Call the API and handle any network failures. + try { + /** @var DataTableRow $response */ + $response = $dataTableServiceClient->updateDataTableRow($request); + 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 +{ + $dataTableRowValuesElement = '[VALUES]'; + + update_data_table_row_sample($dataTableRowValuesElement); +} +// [END chronicle_v1_generated_DataTableService_UpdateDataTableRow_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/EntityServiceClient/create_watchlist.php b/owl-bot-staging/Chronicle/v1/samples/V1/EntityServiceClient/create_watchlist.php new file mode 100644 index 000000000000..fc91d0f75173 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/samples/V1/EntityServiceClient/create_watchlist.php @@ -0,0 +1,83 @@ +setDisplayName($watchlistDisplayName) + ->setEntityPopulationMechanism($watchlistEntityPopulationMechanism); + $request = (new CreateWatchlistRequest()) + ->setParent($formattedParent) + ->setWatchlist($watchlist); + + // Call the API and handle any network failures. + try { + /** @var Watchlist $response */ + $response = $entityServiceClient->createWatchlist($request); + 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 = EntityServiceClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $watchlistDisplayName = '[DISPLAY_NAME]'; + + create_watchlist_sample($formattedParent, $watchlistDisplayName); +} +// [END chronicle_v1_generated_EntityService_CreateWatchlist_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/EntityServiceClient/delete_watchlist.php b/owl-bot-staging/Chronicle/v1/samples/V1/EntityServiceClient/delete_watchlist.php new file mode 100644 index 000000000000..a4f794c71488 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/samples/V1/EntityServiceClient/delete_watchlist.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $entityServiceClient->deleteWatchlist($request); + 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 = EntityServiceClient::watchlistName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]', + '[WATCHLIST]' + ); + + delete_watchlist_sample($formattedName); +} +// [END chronicle_v1_generated_EntityService_DeleteWatchlist_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/EntityServiceClient/get_watchlist.php b/owl-bot-staging/Chronicle/v1/samples/V1/EntityServiceClient/get_watchlist.php new file mode 100644 index 000000000000..f2c0679734af --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/samples/V1/EntityServiceClient/get_watchlist.php @@ -0,0 +1,79 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Watchlist $response */ + $response = $entityServiceClient->getWatchlist($request); + 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 = EntityServiceClient::watchlistName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]', + '[WATCHLIST]' + ); + + get_watchlist_sample($formattedName); +} +// [END chronicle_v1_generated_EntityService_GetWatchlist_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/EntityServiceClient/list_watchlists.php b/owl-bot-staging/Chronicle/v1/samples/V1/EntityServiceClient/list_watchlists.php new file mode 100644 index 000000000000..b3db33e4e1d2 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/samples/V1/EntityServiceClient/list_watchlists.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $entityServiceClient->listWatchlists($request); + + /** @var Watchlist $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 = EntityServiceClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + + list_watchlists_sample($formattedParent); +} +// [END chronicle_v1_generated_EntityService_ListWatchlists_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/EntityServiceClient/update_watchlist.php b/owl-bot-staging/Chronicle/v1/samples/V1/EntityServiceClient/update_watchlist.php new file mode 100644 index 000000000000..193fe9ee02c9 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/samples/V1/EntityServiceClient/update_watchlist.php @@ -0,0 +1,77 @@ +setDisplayName($watchlistDisplayName) + ->setEntityPopulationMechanism($watchlistEntityPopulationMechanism); + $request = (new UpdateWatchlistRequest()) + ->setWatchlist($watchlist); + + // Call the API and handle any network failures. + try { + /** @var Watchlist $response */ + $response = $entityServiceClient->updateWatchlist($request); + 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 +{ + $watchlistDisplayName = '[DISPLAY_NAME]'; + + update_watchlist_sample($watchlistDisplayName); +} +// [END chronicle_v1_generated_EntityService_UpdateWatchlist_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/InstanceServiceClient/get_instance.php b/owl-bot-staging/Chronicle/v1/samples/V1/InstanceServiceClient/get_instance.php new file mode 100644 index 000000000000..3f58906ea662 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/samples/V1/InstanceServiceClient/get_instance.php @@ -0,0 +1,73 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Instance $response */ + $response = $instanceServiceClient->getInstance($request); + 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 = InstanceServiceClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + + get_instance_sample($formattedName); +} +// [END chronicle_v1_generated_InstanceService_GetInstance_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/ReferenceListServiceClient/create_reference_list.php b/owl-bot-staging/Chronicle/v1/samples/V1/ReferenceListServiceClient/create_reference_list.php new file mode 100644 index 000000000000..064b32ca29d0 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/samples/V1/ReferenceListServiceClient/create_reference_list.php @@ -0,0 +1,111 @@ +setValue($referenceListEntriesValue); + $referenceListEntries = [$referenceListEntry,]; + $referenceList = (new ReferenceList()) + ->setDescription($referenceListDescription) + ->setEntries($referenceListEntries) + ->setSyntaxType($referenceListSyntaxType); + $request = (new CreateReferenceListRequest()) + ->setParent($formattedParent) + ->setReferenceList($referenceList) + ->setReferenceListId($referenceListId); + + // Call the API and handle any network failures. + try { + /** @var ReferenceList $response */ + $response = $referenceListServiceClient->createReferenceList($request); + 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 = ReferenceListServiceClient::instanceName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]' + ); + $referenceListDescription = '[DESCRIPTION]'; + $referenceListEntriesValue = '[VALUE]'; + $referenceListSyntaxType = ReferenceListSyntaxType::REFERENCE_LIST_SYNTAX_TYPE_UNSPECIFIED; + $referenceListId = '[REFERENCE_LIST_ID]'; + + create_reference_list_sample( + $formattedParent, + $referenceListDescription, + $referenceListEntriesValue, + $referenceListSyntaxType, + $referenceListId + ); +} +// [END chronicle_v1_generated_ReferenceListService_CreateReferenceList_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/ReferenceListServiceClient/get_reference_list.php b/owl-bot-staging/Chronicle/v1/samples/V1/ReferenceListServiceClient/get_reference_list.php new file mode 100644 index 000000000000..5e6d4986fbfb --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/samples/V1/ReferenceListServiceClient/get_reference_list.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var ReferenceList $response */ + $response = $referenceListServiceClient->getReferenceList($request); + 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 = ReferenceListServiceClient::referenceListName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]', + '[REFERENCE_LIST]' + ); + + get_reference_list_sample($formattedName); +} +// [END chronicle_v1_generated_ReferenceListService_GetReferenceList_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/ReferenceListServiceClient/list_reference_lists.php b/owl-bot-staging/Chronicle/v1/samples/V1/ReferenceListServiceClient/list_reference_lists.php new file mode 100644 index 000000000000..5fef5d03cbeb --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/samples/V1/ReferenceListServiceClient/list_reference_lists.php @@ -0,0 +1,82 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $referenceListServiceClient->listReferenceLists($request); + + /** @var ReferenceList $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 = ReferenceListServiceClient::instanceName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]' + ); + + list_reference_lists_sample($formattedParent); +} +// [END chronicle_v1_generated_ReferenceListService_ListReferenceLists_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/ReferenceListServiceClient/update_reference_list.php b/owl-bot-staging/Chronicle/v1/samples/V1/ReferenceListServiceClient/update_reference_list.php new file mode 100644 index 000000000000..2ea81ccc24e2 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/samples/V1/ReferenceListServiceClient/update_reference_list.php @@ -0,0 +1,90 @@ +setValue($referenceListEntriesValue); + $referenceListEntries = [$referenceListEntry,]; + $referenceList = (new ReferenceList()) + ->setDescription($referenceListDescription) + ->setEntries($referenceListEntries) + ->setSyntaxType($referenceListSyntaxType); + $request = (new UpdateReferenceListRequest()) + ->setReferenceList($referenceList); + + // Call the API and handle any network failures. + try { + /** @var ReferenceList $response */ + $response = $referenceListServiceClient->updateReferenceList($request); + 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 +{ + $referenceListDescription = '[DESCRIPTION]'; + $referenceListEntriesValue = '[VALUE]'; + $referenceListSyntaxType = ReferenceListSyntaxType::REFERENCE_LIST_SYNTAX_TYPE_UNSPECIFIED; + + update_reference_list_sample( + $referenceListDescription, + $referenceListEntriesValue, + $referenceListSyntaxType + ); +} +// [END chronicle_v1_generated_ReferenceListService_UpdateReferenceList_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/create_retrohunt.php b/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/create_retrohunt.php new file mode 100644 index 000000000000..72fe02a04c79 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/create_retrohunt.php @@ -0,0 +1,90 @@ +setProcessInterval($retrohuntProcessInterval); + $request = (new CreateRetrohuntRequest()) + ->setParent($formattedParent) + ->setRetrohunt($retrohunt); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $ruleServiceClient->createRetrohunt($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Retrohunt $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 = RuleServiceClient::ruleName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[RULE]'); + + create_retrohunt_sample($formattedParent); +} +// [END chronicle_v1_generated_RuleService_CreateRetrohunt_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/create_rule.php b/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/create_rule.php new file mode 100644 index 000000000000..4e49df99d1e9 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/create_rule.php @@ -0,0 +1,74 @@ +setParent($formattedParent) + ->setRule($rule); + + // Call the API and handle any network failures. + try { + /** @var Rule $response */ + $response = $ruleServiceClient->createRule($request); + 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 = RuleServiceClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + + create_rule_sample($formattedParent); +} +// [END chronicle_v1_generated_RuleService_CreateRule_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/delete_rule.php b/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/delete_rule.php new file mode 100644 index 000000000000..229fd626bf85 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/delete_rule.php @@ -0,0 +1,73 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $ruleServiceClient->deleteRule($request); + 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 = RuleServiceClient::ruleName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[RULE]'); + + delete_rule_sample($formattedName); +} +// [END chronicle_v1_generated_RuleService_DeleteRule_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/get_retrohunt.php b/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/get_retrohunt.php new file mode 100644 index 000000000000..9a17dfe2f0fc --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/get_retrohunt.php @@ -0,0 +1,79 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Retrohunt $response */ + $response = $ruleServiceClient->getRetrohunt($request); + 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 = RuleServiceClient::retrohuntName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]', + '[RULE]', + '[RETROHUNT]' + ); + + get_retrohunt_sample($formattedName); +} +// [END chronicle_v1_generated_RuleService_GetRetrohunt_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/get_rule.php b/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/get_rule.php new file mode 100644 index 000000000000..9b7b735b3cbb --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/get_rule.php @@ -0,0 +1,73 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Rule $response */ + $response = $ruleServiceClient->getRule($request); + 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 = RuleServiceClient::ruleName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[RULE]'); + + get_rule_sample($formattedName); +} +// [END chronicle_v1_generated_RuleService_GetRule_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/get_rule_deployment.php b/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/get_rule_deployment.php new file mode 100644 index 000000000000..16ac2aee8b32 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/get_rule_deployment.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var RuleDeployment $response */ + $response = $ruleServiceClient->getRuleDeployment($request); + 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 = RuleServiceClient::ruleDeploymentName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]', + '[RULE]' + ); + + get_rule_deployment_sample($formattedName); +} +// [END chronicle_v1_generated_RuleService_GetRuleDeployment_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/list_retrohunts.php b/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/list_retrohunts.php new file mode 100644 index 000000000000..c20092aee588 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/list_retrohunts.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $ruleServiceClient->listRetrohunts($request); + + /** @var Retrohunt $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 = RuleServiceClient::ruleName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[RULE]'); + + list_retrohunts_sample($formattedParent); +} +// [END chronicle_v1_generated_RuleService_ListRetrohunts_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/list_rule_deployments.php b/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/list_rule_deployments.php new file mode 100644 index 000000000000..0a63256b173c --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/list_rule_deployments.php @@ -0,0 +1,79 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $ruleServiceClient->listRuleDeployments($request); + + /** @var RuleDeployment $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 = RuleServiceClient::ruleName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[RULE]'); + + list_rule_deployments_sample($formattedParent); +} +// [END chronicle_v1_generated_RuleService_ListRuleDeployments_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/list_rule_revisions.php b/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/list_rule_revisions.php new file mode 100644 index 000000000000..44ffc527c875 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/list_rule_revisions.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $ruleServiceClient->listRuleRevisions($request); + + /** @var Rule $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 +{ + $formattedName = RuleServiceClient::ruleName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[RULE]'); + + list_rule_revisions_sample($formattedName); +} +// [END chronicle_v1_generated_RuleService_ListRuleRevisions_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/list_rules.php b/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/list_rules.php new file mode 100644 index 000000000000..aa9cb76ebdd3 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/list_rules.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $ruleServiceClient->listRules($request); + + /** @var Rule $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 = RuleServiceClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + + list_rules_sample($formattedParent); +} +// [END chronicle_v1_generated_RuleService_ListRules_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/update_rule.php b/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/update_rule.php new file mode 100644 index 000000000000..5462edfd5766 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/update_rule.php @@ -0,0 +1,59 @@ +setRule($rule); + + // Call the API and handle any network failures. + try { + /** @var Rule $response */ + $response = $ruleServiceClient->updateRule($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END chronicle_v1_generated_RuleService_UpdateRule_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/update_rule_deployment.php b/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/update_rule_deployment.php new file mode 100644 index 000000000000..8d9d5600aec3 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/update_rule_deployment.php @@ -0,0 +1,83 @@ +setName($ruleDeploymentName); + $updateMask = new FieldMask(); + $request = (new UpdateRuleDeploymentRequest()) + ->setRuleDeployment($ruleDeployment) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var RuleDeployment $response */ + $response = $ruleServiceClient->updateRuleDeployment($request); + 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 +{ + $ruleDeploymentName = '[NAME]'; + + update_rule_deployment_sample($ruleDeploymentName); +} +// [END chronicle_v1_generated_RuleService_UpdateRuleDeployment_sync] diff --git a/owl-bot-staging/Chronicle/v1/src/V1/Client/DataAccessControlServiceClient.php b/owl-bot-staging/Chronicle/v1/src/V1/Client/DataAccessControlServiceClient.php new file mode 100644 index 000000000000..11a4d52eccf8 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/src/V1/Client/DataAccessControlServiceClient.php @@ -0,0 +1,572 @@ + createDataAccessLabelAsync(CreateDataAccessLabelRequest $request, array $optionalArgs = []) + * @method PromiseInterface createDataAccessScopeAsync(CreateDataAccessScopeRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteDataAccessLabelAsync(DeleteDataAccessLabelRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteDataAccessScopeAsync(DeleteDataAccessScopeRequest $request, array $optionalArgs = []) + * @method PromiseInterface getDataAccessLabelAsync(GetDataAccessLabelRequest $request, array $optionalArgs = []) + * @method PromiseInterface getDataAccessScopeAsync(GetDataAccessScopeRequest $request, array $optionalArgs = []) + * @method PromiseInterface listDataAccessLabelsAsync(ListDataAccessLabelsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listDataAccessScopesAsync(ListDataAccessScopesRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateDataAccessLabelAsync(UpdateDataAccessLabelRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateDataAccessScopeAsync(UpdateDataAccessScopeRequest $request, array $optionalArgs = []) + */ +final class DataAccessControlServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.chronicle.v1.DataAccessControlService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'chronicle.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'chronicle.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/data_access_control_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/data_access_control_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/data_access_control_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/data_access_control_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * data_access_label resource. + * + * @param string $project + * @param string $location + * @param string $instance + * @param string $dataAccessLabel + * + * @return string The formatted data_access_label resource. + */ + public static function dataAccessLabelName(string $project, string $location, string $instance, string $dataAccessLabel): string + { + return self::getPathTemplate('dataAccessLabel')->render([ + 'project' => $project, + 'location' => $location, + 'instance' => $instance, + 'data_access_label' => $dataAccessLabel, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * data_access_scope resource. + * + * @param string $project + * @param string $location + * @param string $instance + * @param string $dataAccessScope + * + * @return string The formatted data_access_scope resource. + */ + public static function dataAccessScopeName(string $project, string $location, string $instance, string $dataAccessScope): string + { + return self::getPathTemplate('dataAccessScope')->render([ + 'project' => $project, + 'location' => $location, + 'instance' => $instance, + 'data_access_scope' => $dataAccessScope, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a instance + * resource. + * + * @param string $project + * @param string $location + * @param string $instance + * + * @return string The formatted instance resource. + */ + public static function instanceName(string $project, string $location, string $instance): string + { + return self::getPathTemplate('instance')->render([ + 'project' => $project, + 'location' => $location, + 'instance' => $instance, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - dataAccessLabel: projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label} + * - dataAccessScope: projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope} + * - instance: projects/{project}/locations/{location}/instances/{instance} + * + * 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|ClientOptions $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 'chronicle.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\Chronicle\V1\DataAccessControlServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new DataAccessControlServiceClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @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. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $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 data access label. + * Data access labels are applied to incoming event data and selected in data + * access scopes (another resource), and only users with scopes containing the + * label can see data with that label. Currently, the data access label + * resource only includes custom labels, which are labels that correspond + * to UDM queries over event data. + * + * The async variant is + * {@see DataAccessControlServiceClient::createDataAccessLabelAsync()} . + * + * @example samples/V1/DataAccessControlServiceClient/create_data_access_label.php + * + * @param CreateDataAccessLabelRequest $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 DataAccessLabel + * + * @throws ApiException Thrown if the API call fails. + */ + public function createDataAccessLabel(CreateDataAccessLabelRequest $request, array $callOptions = []): DataAccessLabel + { + return $this->startApiCall('CreateDataAccessLabel', $request, $callOptions)->wait(); + } + + /** + * Creates a data access scope. + * Data access scope is a combination of allowed and denied labels attached + * to a permission group. If a scope has allowed labels A and B and denied + * labels C and D, then the group of people attached to the scope + * will have permissions to see all events labeled with A or B (or both) and + * not labeled with either C or D. + * + * The async variant is + * {@see DataAccessControlServiceClient::createDataAccessScopeAsync()} . + * + * @example samples/V1/DataAccessControlServiceClient/create_data_access_scope.php + * + * @param CreateDataAccessScopeRequest $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 DataAccessScope + * + * @throws ApiException Thrown if the API call fails. + */ + public function createDataAccessScope(CreateDataAccessScopeRequest $request, array $callOptions = []): DataAccessScope + { + return $this->startApiCall('CreateDataAccessScope', $request, $callOptions)->wait(); + } + + /** + * Deletes a data access label. When a label is deleted, new + * data that enters in the system will not receive the label, but the label + * will not be removed from old data that still refers to it. + * + * The async variant is + * {@see DataAccessControlServiceClient::deleteDataAccessLabelAsync()} . + * + * @example samples/V1/DataAccessControlServiceClient/delete_data_access_label.php + * + * @param DeleteDataAccessLabelRequest $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 deleteDataAccessLabel(DeleteDataAccessLabelRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteDataAccessLabel', $request, $callOptions)->wait(); + } + + /** + * Deletes a data access scope. + * + * The async variant is + * {@see DataAccessControlServiceClient::deleteDataAccessScopeAsync()} . + * + * @example samples/V1/DataAccessControlServiceClient/delete_data_access_scope.php + * + * @param DeleteDataAccessScopeRequest $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 deleteDataAccessScope(DeleteDataAccessScopeRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteDataAccessScope', $request, $callOptions)->wait(); + } + + /** + * Gets a data access label. + * + * The async variant is + * {@see DataAccessControlServiceClient::getDataAccessLabelAsync()} . + * + * @example samples/V1/DataAccessControlServiceClient/get_data_access_label.php + * + * @param GetDataAccessLabelRequest $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 DataAccessLabel + * + * @throws ApiException Thrown if the API call fails. + */ + public function getDataAccessLabel(GetDataAccessLabelRequest $request, array $callOptions = []): DataAccessLabel + { + return $this->startApiCall('GetDataAccessLabel', $request, $callOptions)->wait(); + } + + /** + * Retrieves an existing data access scope. + * + * The async variant is + * {@see DataAccessControlServiceClient::getDataAccessScopeAsync()} . + * + * @example samples/V1/DataAccessControlServiceClient/get_data_access_scope.php + * + * @param GetDataAccessScopeRequest $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 DataAccessScope + * + * @throws ApiException Thrown if the API call fails. + */ + public function getDataAccessScope(GetDataAccessScopeRequest $request, array $callOptions = []): DataAccessScope + { + return $this->startApiCall('GetDataAccessScope', $request, $callOptions)->wait(); + } + + /** + * Lists all data access labels for the customer. + * + * The async variant is + * {@see DataAccessControlServiceClient::listDataAccessLabelsAsync()} . + * + * @example samples/V1/DataAccessControlServiceClient/list_data_access_labels.php + * + * @param ListDataAccessLabelsRequest $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 listDataAccessLabels(ListDataAccessLabelsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListDataAccessLabels', $request, $callOptions); + } + + /** + * Lists all existing data access scopes for the customer. + * + * The async variant is + * {@see DataAccessControlServiceClient::listDataAccessScopesAsync()} . + * + * @example samples/V1/DataAccessControlServiceClient/list_data_access_scopes.php + * + * @param ListDataAccessScopesRequest $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 listDataAccessScopes(ListDataAccessScopesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListDataAccessScopes', $request, $callOptions); + } + + /** + * Updates a data access label. + * + * The async variant is + * {@see DataAccessControlServiceClient::updateDataAccessLabelAsync()} . + * + * @example samples/V1/DataAccessControlServiceClient/update_data_access_label.php + * + * @param UpdateDataAccessLabelRequest $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 DataAccessLabel + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateDataAccessLabel(UpdateDataAccessLabelRequest $request, array $callOptions = []): DataAccessLabel + { + return $this->startApiCall('UpdateDataAccessLabel', $request, $callOptions)->wait(); + } + + /** + * Updates a data access scope. + * + * The async variant is + * {@see DataAccessControlServiceClient::updateDataAccessScopeAsync()} . + * + * @example samples/V1/DataAccessControlServiceClient/update_data_access_scope.php + * + * @param UpdateDataAccessScopeRequest $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 DataAccessScope + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateDataAccessScope(UpdateDataAccessScopeRequest $request, array $callOptions = []): DataAccessScope + { + return $this->startApiCall('UpdateDataAccessScope', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Chronicle/v1/src/V1/Client/DataTableServiceClient.php b/owl-bot-staging/Chronicle/v1/src/V1/Client/DataTableServiceClient.php new file mode 100644 index 000000000000..3a2425a3b967 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/src/V1/Client/DataTableServiceClient.php @@ -0,0 +1,747 @@ + bulkCreateDataTableRowsAsync(BulkCreateDataTableRowsRequest $request, array $optionalArgs = []) + * @method PromiseInterface bulkGetDataTableRowsAsync(BulkGetDataTableRowsRequest $request, array $optionalArgs = []) + * @method PromiseInterface bulkReplaceDataTableRowsAsync(BulkReplaceDataTableRowsRequest $request, array $optionalArgs = []) + * @method PromiseInterface bulkUpdateDataTableRowsAsync(BulkUpdateDataTableRowsRequest $request, array $optionalArgs = []) + * @method PromiseInterface createDataTableAsync(CreateDataTableRequest $request, array $optionalArgs = []) + * @method PromiseInterface createDataTableRowAsync(CreateDataTableRowRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteDataTableAsync(DeleteDataTableRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteDataTableRowAsync(DeleteDataTableRowRequest $request, array $optionalArgs = []) + * @method PromiseInterface getDataTableAsync(GetDataTableRequest $request, array $optionalArgs = []) + * @method PromiseInterface getDataTableOperationErrorsAsync(GetDataTableOperationErrorsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getDataTableRowAsync(GetDataTableRowRequest $request, array $optionalArgs = []) + * @method PromiseInterface listDataTableRowsAsync(ListDataTableRowsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listDataTablesAsync(ListDataTablesRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateDataTableAsync(UpdateDataTableRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateDataTableRowAsync(UpdateDataTableRowRequest $request, array $optionalArgs = []) + */ +final class DataTableServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.chronicle.v1.DataTableService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'chronicle.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'chronicle.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/chronicle', + 'https://www.googleapis.com/auth/chronicle.readonly', + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/data_table_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/data_table_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/data_table_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/data_table_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * data_access_scope resource. + * + * @param string $project + * @param string $location + * @param string $instance + * @param string $dataAccessScope + * + * @return string The formatted data_access_scope resource. + */ + public static function dataAccessScopeName(string $project, string $location, string $instance, string $dataAccessScope): string + { + return self::getPathTemplate('dataAccessScope')->render([ + 'project' => $project, + 'location' => $location, + 'instance' => $instance, + 'data_access_scope' => $dataAccessScope, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a data_table + * resource. + * + * @param string $project + * @param string $location + * @param string $instance + * @param string $dataTable + * + * @return string The formatted data_table resource. + */ + public static function dataTableName(string $project, string $location, string $instance, string $dataTable): string + { + return self::getPathTemplate('dataTable')->render([ + 'project' => $project, + 'location' => $location, + 'instance' => $instance, + 'data_table' => $dataTable, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * data_table_operation_errors resource. + * + * @param string $project + * @param string $location + * @param string $instance + * @param string $dataTableOperationErrors + * + * @return string The formatted data_table_operation_errors resource. + */ + public static function dataTableOperationErrorsName(string $project, string $location, string $instance, string $dataTableOperationErrors): string + { + return self::getPathTemplate('dataTableOperationErrors')->render([ + 'project' => $project, + 'location' => $location, + 'instance' => $instance, + 'data_table_operation_errors' => $dataTableOperationErrors, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * data_table_row resource. + * + * @param string $project + * @param string $location + * @param string $instance + * @param string $dataTable + * @param string $dataTableRow + * + * @return string The formatted data_table_row resource. + */ + public static function dataTableRowName(string $project, string $location, string $instance, string $dataTable, string $dataTableRow): string + { + return self::getPathTemplate('dataTableRow')->render([ + 'project' => $project, + 'location' => $location, + 'instance' => $instance, + 'data_table' => $dataTable, + 'data_table_row' => $dataTableRow, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a instance + * resource. + * + * @param string $project + * @param string $location + * @param string $instance + * + * @return string The formatted instance resource. + */ + public static function instanceName(string $project, string $location, string $instance): string + { + return self::getPathTemplate('instance')->render([ + 'project' => $project, + 'location' => $location, + 'instance' => $instance, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - dataAccessScope: projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope} + * - dataTable: projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table} + * - dataTableOperationErrors: projects/{project}/locations/{location}/instances/{instance}/dataTableOperationErrors/{data_table_operation_errors} + * - dataTableRow: projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}/dataTableRows/{data_table_row} + * - instance: projects/{project}/locations/{location}/instances/{instance} + * + * 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|ClientOptions $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 'chronicle.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\Chronicle\V1\DataTableServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new DataTableServiceClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @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. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $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); + } + + /** + * Create data table rows in bulk. + * + * The async variant is + * {@see DataTableServiceClient::bulkCreateDataTableRowsAsync()} . + * + * @example samples/V1/DataTableServiceClient/bulk_create_data_table_rows.php + * + * @param BulkCreateDataTableRowsRequest $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 BulkCreateDataTableRowsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function bulkCreateDataTableRows(BulkCreateDataTableRowsRequest $request, array $callOptions = []): BulkCreateDataTableRowsResponse + { + return $this->startApiCall('BulkCreateDataTableRows', $request, $callOptions)->wait(); + } + + /** + * Get data table rows in bulk. + * + * The async variant is {@see DataTableServiceClient::bulkGetDataTableRowsAsync()} + * . + * + * @example samples/V1/DataTableServiceClient/bulk_get_data_table_rows.php + * + * @param BulkGetDataTableRowsRequest $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 BulkGetDataTableRowsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function bulkGetDataTableRows(BulkGetDataTableRowsRequest $request, array $callOptions = []): BulkGetDataTableRowsResponse + { + return $this->startApiCall('BulkGetDataTableRows', $request, $callOptions)->wait(); + } + + /** + * Replace all existing data table rows with new data table rows. + * + * The async variant is + * {@see DataTableServiceClient::bulkReplaceDataTableRowsAsync()} . + * + * @example samples/V1/DataTableServiceClient/bulk_replace_data_table_rows.php + * + * @param BulkReplaceDataTableRowsRequest $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 BulkReplaceDataTableRowsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function bulkReplaceDataTableRows(BulkReplaceDataTableRowsRequest $request, array $callOptions = []): BulkReplaceDataTableRowsResponse + { + return $this->startApiCall('BulkReplaceDataTableRows', $request, $callOptions)->wait(); + } + + /** + * Update data table rows in bulk. + * + * The async variant is + * {@see DataTableServiceClient::bulkUpdateDataTableRowsAsync()} . + * + * @example samples/V1/DataTableServiceClient/bulk_update_data_table_rows.php + * + * @param BulkUpdateDataTableRowsRequest $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 BulkUpdateDataTableRowsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function bulkUpdateDataTableRows(BulkUpdateDataTableRowsRequest $request, array $callOptions = []): BulkUpdateDataTableRowsResponse + { + return $this->startApiCall('BulkUpdateDataTableRows', $request, $callOptions)->wait(); + } + + /** + * Create a new data table. + * + * The async variant is {@see DataTableServiceClient::createDataTableAsync()} . + * + * @example samples/V1/DataTableServiceClient/create_data_table.php + * + * @param CreateDataTableRequest $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 DataTable + * + * @throws ApiException Thrown if the API call fails. + */ + public function createDataTable(CreateDataTableRequest $request, array $callOptions = []): DataTable + { + return $this->startApiCall('CreateDataTable', $request, $callOptions)->wait(); + } + + /** + * Create a new data table row. + * + * The async variant is {@see DataTableServiceClient::createDataTableRowAsync()} . + * + * @example samples/V1/DataTableServiceClient/create_data_table_row.php + * + * @param CreateDataTableRowRequest $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 DataTableRow + * + * @throws ApiException Thrown if the API call fails. + */ + public function createDataTableRow(CreateDataTableRowRequest $request, array $callOptions = []): DataTableRow + { + return $this->startApiCall('CreateDataTableRow', $request, $callOptions)->wait(); + } + + /** + * Delete data table. + * + * The async variant is {@see DataTableServiceClient::deleteDataTableAsync()} . + * + * @example samples/V1/DataTableServiceClient/delete_data_table.php + * + * @param DeleteDataTableRequest $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 deleteDataTable(DeleteDataTableRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteDataTable', $request, $callOptions)->wait(); + } + + /** + * Delete data table row. + * + * The async variant is {@see DataTableServiceClient::deleteDataTableRowAsync()} . + * + * @example samples/V1/DataTableServiceClient/delete_data_table_row.php + * + * @param DeleteDataTableRowRequest $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 deleteDataTableRow(DeleteDataTableRowRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteDataTableRow', $request, $callOptions)->wait(); + } + + /** + * Get data table info. + * + * The async variant is {@see DataTableServiceClient::getDataTableAsync()} . + * + * @example samples/V1/DataTableServiceClient/get_data_table.php + * + * @param GetDataTableRequest $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 DataTable + * + * @throws ApiException Thrown if the API call fails. + */ + public function getDataTable(GetDataTableRequest $request, array $callOptions = []): DataTable + { + return $this->startApiCall('GetDataTable', $request, $callOptions)->wait(); + } + + /** + * Get the error for a data table operation. + * + * The async variant is + * {@see DataTableServiceClient::getDataTableOperationErrorsAsync()} . + * + * @example samples/V1/DataTableServiceClient/get_data_table_operation_errors.php + * + * @param GetDataTableOperationErrorsRequest $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 DataTableOperationErrors + * + * @throws ApiException Thrown if the API call fails. + */ + public function getDataTableOperationErrors(GetDataTableOperationErrorsRequest $request, array $callOptions = []): DataTableOperationErrors + { + return $this->startApiCall('GetDataTableOperationErrors', $request, $callOptions)->wait(); + } + + /** + * Get data table row + * + * The async variant is {@see DataTableServiceClient::getDataTableRowAsync()} . + * + * @example samples/V1/DataTableServiceClient/get_data_table_row.php + * + * @param GetDataTableRowRequest $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 DataTableRow + * + * @throws ApiException Thrown if the API call fails. + */ + public function getDataTableRow(GetDataTableRowRequest $request, array $callOptions = []): DataTableRow + { + return $this->startApiCall('GetDataTableRow', $request, $callOptions)->wait(); + } + + /** + * List data table rows. + * + * The async variant is {@see DataTableServiceClient::listDataTableRowsAsync()} . + * + * @example samples/V1/DataTableServiceClient/list_data_table_rows.php + * + * @param ListDataTableRowsRequest $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 listDataTableRows(ListDataTableRowsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListDataTableRows', $request, $callOptions); + } + + /** + * List data tables. + * + * The async variant is {@see DataTableServiceClient::listDataTablesAsync()} . + * + * @example samples/V1/DataTableServiceClient/list_data_tables.php + * + * @param ListDataTablesRequest $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 listDataTables(ListDataTablesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListDataTables', $request, $callOptions); + } + + /** + * Update data table. + * + * The async variant is {@see DataTableServiceClient::updateDataTableAsync()} . + * + * @example samples/V1/DataTableServiceClient/update_data_table.php + * + * @param UpdateDataTableRequest $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 DataTable + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateDataTable(UpdateDataTableRequest $request, array $callOptions = []): DataTable + { + return $this->startApiCall('UpdateDataTable', $request, $callOptions)->wait(); + } + + /** + * Update data table row + * + * The async variant is {@see DataTableServiceClient::updateDataTableRowAsync()} . + * + * @example samples/V1/DataTableServiceClient/update_data_table_row.php + * + * @param UpdateDataTableRowRequest $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 DataTableRow + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateDataTableRow(UpdateDataTableRowRequest $request, array $callOptions = []): DataTableRow + { + return $this->startApiCall('UpdateDataTableRow', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Chronicle/v1/src/V1/Client/EntityServiceClient.php b/owl-bot-staging/Chronicle/v1/src/V1/Client/EntityServiceClient.php new file mode 100644 index 000000000000..0e4473f59298 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/src/V1/Client/EntityServiceClient.php @@ -0,0 +1,389 @@ + createWatchlistAsync(CreateWatchlistRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteWatchlistAsync(DeleteWatchlistRequest $request, array $optionalArgs = []) + * @method PromiseInterface getWatchlistAsync(GetWatchlistRequest $request, array $optionalArgs = []) + * @method PromiseInterface listWatchlistsAsync(ListWatchlistsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateWatchlistAsync(UpdateWatchlistRequest $request, array $optionalArgs = []) + */ +final class EntityServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.chronicle.v1.EntityService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'chronicle.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'chronicle.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/entity_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/entity_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/entity_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/entity_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a instance + * resource. + * + * @param string $project + * @param string $location + * @param string $instance + * + * @return string The formatted instance resource. + */ + public static function instanceName(string $project, string $location, string $instance): string + { + return self::getPathTemplate('instance')->render([ + 'project' => $project, + 'location' => $location, + 'instance' => $instance, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a watchlist + * resource. + * + * @param string $project + * @param string $location + * @param string $instance + * @param string $watchlist + * + * @return string The formatted watchlist resource. + */ + public static function watchlistName(string $project, string $location, string $instance, string $watchlist): string + { + return self::getPathTemplate('watchlist')->render([ + 'project' => $project, + 'location' => $location, + 'instance' => $instance, + 'watchlist' => $watchlist, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - instance: projects/{project}/locations/{location}/instances/{instance} + * - watchlist: projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist} + * + * 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|ClientOptions $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 'chronicle.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\Chronicle\V1\EntityServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new EntityServiceClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @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. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $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 watchlist for the given instance. + * Note that there can be at most 200 watchlists per instance. + * + * The async variant is {@see EntityServiceClient::createWatchlistAsync()} . + * + * @example samples/V1/EntityServiceClient/create_watchlist.php + * + * @param CreateWatchlistRequest $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 Watchlist + * + * @throws ApiException Thrown if the API call fails. + */ + public function createWatchlist(CreateWatchlistRequest $request, array $callOptions = []): Watchlist + { + return $this->startApiCall('CreateWatchlist', $request, $callOptions)->wait(); + } + + /** + * Deletes the watchlist for the given instance. + * + * The async variant is {@see EntityServiceClient::deleteWatchlistAsync()} . + * + * @example samples/V1/EntityServiceClient/delete_watchlist.php + * + * @param DeleteWatchlistRequest $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 deleteWatchlist(DeleteWatchlistRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteWatchlist', $request, $callOptions)->wait(); + } + + /** + * Gets watchlist details for the given watchlist ID. + * + * The async variant is {@see EntityServiceClient::getWatchlistAsync()} . + * + * @example samples/V1/EntityServiceClient/get_watchlist.php + * + * @param GetWatchlistRequest $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 Watchlist + * + * @throws ApiException Thrown if the API call fails. + */ + public function getWatchlist(GetWatchlistRequest $request, array $callOptions = []): Watchlist + { + return $this->startApiCall('GetWatchlist', $request, $callOptions)->wait(); + } + + /** + * Lists all watchlists for the given instance. + * + * The async variant is {@see EntityServiceClient::listWatchlistsAsync()} . + * + * @example samples/V1/EntityServiceClient/list_watchlists.php + * + * @param ListWatchlistsRequest $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 listWatchlists(ListWatchlistsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListWatchlists', $request, $callOptions); + } + + /** + * Updates the watchlist for the given instance. + * + * The async variant is {@see EntityServiceClient::updateWatchlistAsync()} . + * + * @example samples/V1/EntityServiceClient/update_watchlist.php + * + * @param UpdateWatchlistRequest $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 Watchlist + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateWatchlist(UpdateWatchlistRequest $request, array $callOptions = []): Watchlist + { + return $this->startApiCall('UpdateWatchlist', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Chronicle/v1/src/V1/Client/InstanceServiceClient.php b/owl-bot-staging/Chronicle/v1/src/V1/Client/InstanceServiceClient.php new file mode 100644 index 000000000000..da3746e28c93 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/src/V1/Client/InstanceServiceClient.php @@ -0,0 +1,255 @@ + getInstanceAsync(GetInstanceRequest $request, array $optionalArgs = []) + */ +final class InstanceServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.chronicle.v1.InstanceService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'chronicle.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'chronicle.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/instance_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/instance_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/instance_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/instance_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a instance + * resource. + * + * @param string $project + * @param string $location + * @param string $instance + * + * @return string The formatted instance resource. + */ + public static function instanceName(string $project, string $location, string $instance): string + { + return self::getPathTemplate('instance')->render([ + 'project' => $project, + 'location' => $location, + 'instance' => $instance, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - instance: projects/{project}/locations/{location}/instances/{instance} + * + * 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|ClientOptions $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 'chronicle.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\Chronicle\V1\InstanceServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new InstanceServiceClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @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. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $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); + } + + /** + * Gets a Instance. + * + * The async variant is {@see InstanceServiceClient::getInstanceAsync()} . + * + * @example samples/V1/InstanceServiceClient/get_instance.php + * + * @param GetInstanceRequest $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 Instance + * + * @throws ApiException Thrown if the API call fails. + */ + public function getInstance(GetInstanceRequest $request, array $callOptions = []): Instance + { + return $this->startApiCall('GetInstance', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Chronicle/v1/src/V1/Client/ReferenceListServiceClient.php b/owl-bot-staging/Chronicle/v1/src/V1/Client/ReferenceListServiceClient.php new file mode 100644 index 000000000000..3f922d8c579f --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/src/V1/Client/ReferenceListServiceClient.php @@ -0,0 +1,366 @@ + createReferenceListAsync(CreateReferenceListRequest $request, array $optionalArgs = []) + * @method PromiseInterface getReferenceListAsync(GetReferenceListRequest $request, array $optionalArgs = []) + * @method PromiseInterface listReferenceListsAsync(ListReferenceListsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateReferenceListAsync(UpdateReferenceListRequest $request, array $optionalArgs = []) + */ +final class ReferenceListServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.chronicle.v1.ReferenceListService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'chronicle.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'chronicle.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/reference_list_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/reference_list_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/reference_list_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/reference_list_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a instance + * resource. + * + * @param string $project + * @param string $location + * @param string $instance + * + * @return string The formatted instance resource. + */ + public static function instanceName(string $project, string $location, string $instance): string + { + return self::getPathTemplate('instance')->render([ + 'project' => $project, + 'location' => $location, + 'instance' => $instance, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * reference_list resource. + * + * @param string $project + * @param string $location + * @param string $instance + * @param string $referenceList + * + * @return string The formatted reference_list resource. + */ + public static function referenceListName(string $project, string $location, string $instance, string $referenceList): string + { + return self::getPathTemplate('referenceList')->render([ + 'project' => $project, + 'location' => $location, + 'instance' => $instance, + 'reference_list' => $referenceList, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - instance: projects/{project}/locations/{location}/instances/{instance} + * - referenceList: projects/{project}/locations/{location}/instances/{instance}/referenceLists/{reference_list} + * + * 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|ClientOptions $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 'chronicle.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\Chronicle\V1\ReferenceListServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new ReferenceListServiceClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @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. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $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 new reference list. + * + * The async variant is + * {@see ReferenceListServiceClient::createReferenceListAsync()} . + * + * @example samples/V1/ReferenceListServiceClient/create_reference_list.php + * + * @param CreateReferenceListRequest $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 ReferenceList + * + * @throws ApiException Thrown if the API call fails. + */ + public function createReferenceList(CreateReferenceListRequest $request, array $callOptions = []): ReferenceList + { + return $this->startApiCall('CreateReferenceList', $request, $callOptions)->wait(); + } + + /** + * Gets a single reference list. + * + * The async variant is {@see ReferenceListServiceClient::getReferenceListAsync()} + * . + * + * @example samples/V1/ReferenceListServiceClient/get_reference_list.php + * + * @param GetReferenceListRequest $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 ReferenceList + * + * @throws ApiException Thrown if the API call fails. + */ + public function getReferenceList(GetReferenceListRequest $request, array $callOptions = []): ReferenceList + { + return $this->startApiCall('GetReferenceList', $request, $callOptions)->wait(); + } + + /** + * Lists a collection of reference lists. + * + * The async variant is + * {@see ReferenceListServiceClient::listReferenceListsAsync()} . + * + * @example samples/V1/ReferenceListServiceClient/list_reference_lists.php + * + * @param ListReferenceListsRequest $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 listReferenceLists(ListReferenceListsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListReferenceLists', $request, $callOptions); + } + + /** + * Updates an existing reference list. + * + * The async variant is + * {@see ReferenceListServiceClient::updateReferenceListAsync()} . + * + * @example samples/V1/ReferenceListServiceClient/update_reference_list.php + * + * @param UpdateReferenceListRequest $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 ReferenceList + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateReferenceList(UpdateReferenceListRequest $request, array $callOptions = []): ReferenceList + { + return $this->startApiCall('UpdateReferenceList', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Chronicle/v1/src/V1/Client/RuleServiceClient.php b/owl-bot-staging/Chronicle/v1/src/V1/Client/RuleServiceClient.php new file mode 100644 index 000000000000..bdbeb342276e --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/src/V1/Client/RuleServiceClient.php @@ -0,0 +1,733 @@ + createRetrohuntAsync(CreateRetrohuntRequest $request, array $optionalArgs = []) + * @method PromiseInterface createRuleAsync(CreateRuleRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteRuleAsync(DeleteRuleRequest $request, array $optionalArgs = []) + * @method PromiseInterface getRetrohuntAsync(GetRetrohuntRequest $request, array $optionalArgs = []) + * @method PromiseInterface getRuleAsync(GetRuleRequest $request, array $optionalArgs = []) + * @method PromiseInterface getRuleDeploymentAsync(GetRuleDeploymentRequest $request, array $optionalArgs = []) + * @method PromiseInterface listRetrohuntsAsync(ListRetrohuntsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listRuleDeploymentsAsync(ListRuleDeploymentsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listRuleRevisionsAsync(ListRuleRevisionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listRulesAsync(ListRulesRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateRuleAsync(UpdateRuleRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateRuleDeploymentAsync(UpdateRuleDeploymentRequest $request, array $optionalArgs = []) + */ +final class RuleServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.chronicle.v1.RuleService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'chronicle.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'chronicle.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/rule_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/rule_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/rule_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/rule_service_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 = $this->descriptors[$methodName]['longRunning'] ?? []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * data_access_scope resource. + * + * @param string $project + * @param string $location + * @param string $instance + * @param string $dataAccessScope + * + * @return string The formatted data_access_scope resource. + */ + public static function dataAccessScopeName(string $project, string $location, string $instance, string $dataAccessScope): string + { + return self::getPathTemplate('dataAccessScope')->render([ + 'project' => $project, + 'location' => $location, + 'instance' => $instance, + 'data_access_scope' => $dataAccessScope, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a instance + * resource. + * + * @param string $project + * @param string $location + * @param string $instance + * + * @return string The formatted instance resource. + */ + public static function instanceName(string $project, string $location, string $instance): string + { + return self::getPathTemplate('instance')->render([ + 'project' => $project, + 'location' => $location, + 'instance' => $instance, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * reference_list resource. + * + * @param string $project + * @param string $location + * @param string $instance + * @param string $referenceList + * + * @return string The formatted reference_list resource. + */ + public static function referenceListName(string $project, string $location, string $instance, string $referenceList): string + { + return self::getPathTemplate('referenceList')->render([ + 'project' => $project, + 'location' => $location, + 'instance' => $instance, + 'reference_list' => $referenceList, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a retrohunt + * resource. + * + * @param string $project + * @param string $location + * @param string $instance + * @param string $rule + * @param string $retrohunt + * + * @return string The formatted retrohunt resource. + */ + public static function retrohuntName(string $project, string $location, string $instance, string $rule, string $retrohunt): string + { + return self::getPathTemplate('retrohunt')->render([ + 'project' => $project, + 'location' => $location, + 'instance' => $instance, + 'rule' => $rule, + 'retrohunt' => $retrohunt, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a rule + * resource. + * + * @param string $project + * @param string $location + * @param string $instance + * @param string $rule + * + * @return string The formatted rule resource. + */ + public static function ruleName(string $project, string $location, string $instance, string $rule): string + { + return self::getPathTemplate('rule')->render([ + 'project' => $project, + 'location' => $location, + 'instance' => $instance, + 'rule' => $rule, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * rule_deployment resource. + * + * @param string $project + * @param string $location + * @param string $instance + * @param string $rule + * + * @return string The formatted rule_deployment resource. + */ + public static function ruleDeploymentName(string $project, string $location, string $instance, string $rule): string + { + return self::getPathTemplate('ruleDeployment')->render([ + 'project' => $project, + 'location' => $location, + 'instance' => $instance, + 'rule' => $rule, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - dataAccessScope: projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope} + * - instance: projects/{project}/locations/{location}/instances/{instance} + * - referenceList: projects/{project}/locations/{location}/instances/{instance}/referenceLists/{reference_list} + * - retrohunt: projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt} + * - rule: projects/{project}/locations/{location}/instances/{instance}/rules/{rule} + * - ruleDeployment: projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment + * + * 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|ClientOptions $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 'chronicle.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\Chronicle\V1\RuleServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new RuleServiceClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @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. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $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); + } + + /** + * Create a Retrohunt. + * + * The async variant is {@see RuleServiceClient::createRetrohuntAsync()} . + * + * @example samples/V1/RuleServiceClient/create_retrohunt.php + * + * @param CreateRetrohuntRequest $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 createRetrohunt(CreateRetrohuntRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateRetrohunt', $request, $callOptions)->wait(); + } + + /** + * Creates a new Rule. + * + * The async variant is {@see RuleServiceClient::createRuleAsync()} . + * + * @example samples/V1/RuleServiceClient/create_rule.php + * + * @param CreateRuleRequest $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 Rule + * + * @throws ApiException Thrown if the API call fails. + */ + public function createRule(CreateRuleRequest $request, array $callOptions = []): Rule + { + return $this->startApiCall('CreateRule', $request, $callOptions)->wait(); + } + + /** + * Deletes a Rule. + * + * The async variant is {@see RuleServiceClient::deleteRuleAsync()} . + * + * @example samples/V1/RuleServiceClient/delete_rule.php + * + * @param DeleteRuleRequest $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 deleteRule(DeleteRuleRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteRule', $request, $callOptions)->wait(); + } + + /** + * Get a Retrohunt. + * + * The async variant is {@see RuleServiceClient::getRetrohuntAsync()} . + * + * @example samples/V1/RuleServiceClient/get_retrohunt.php + * + * @param GetRetrohuntRequest $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 Retrohunt + * + * @throws ApiException Thrown if the API call fails. + */ + public function getRetrohunt(GetRetrohuntRequest $request, array $callOptions = []): Retrohunt + { + return $this->startApiCall('GetRetrohunt', $request, $callOptions)->wait(); + } + + /** + * Gets a Rule. + * + * The async variant is {@see RuleServiceClient::getRuleAsync()} . + * + * @example samples/V1/RuleServiceClient/get_rule.php + * + * @param GetRuleRequest $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 Rule + * + * @throws ApiException Thrown if the API call fails. + */ + public function getRule(GetRuleRequest $request, array $callOptions = []): Rule + { + return $this->startApiCall('GetRule', $request, $callOptions)->wait(); + } + + /** + * Gets a RuleDeployment. + * + * The async variant is {@see RuleServiceClient::getRuleDeploymentAsync()} . + * + * @example samples/V1/RuleServiceClient/get_rule_deployment.php + * + * @param GetRuleDeploymentRequest $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 RuleDeployment + * + * @throws ApiException Thrown if the API call fails. + */ + public function getRuleDeployment(GetRuleDeploymentRequest $request, array $callOptions = []): RuleDeployment + { + return $this->startApiCall('GetRuleDeployment', $request, $callOptions)->wait(); + } + + /** + * List Retrohunts. + * + * The async variant is {@see RuleServiceClient::listRetrohuntsAsync()} . + * + * @example samples/V1/RuleServiceClient/list_retrohunts.php + * + * @param ListRetrohuntsRequest $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 listRetrohunts(ListRetrohuntsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListRetrohunts', $request, $callOptions); + } + + /** + * Lists RuleDeployments across all Rules. + * + * The async variant is {@see RuleServiceClient::listRuleDeploymentsAsync()} . + * + * @example samples/V1/RuleServiceClient/list_rule_deployments.php + * + * @param ListRuleDeploymentsRequest $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 listRuleDeployments(ListRuleDeploymentsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListRuleDeployments', $request, $callOptions); + } + + /** + * Lists all revisions of the rule. + * + * The async variant is {@see RuleServiceClient::listRuleRevisionsAsync()} . + * + * @example samples/V1/RuleServiceClient/list_rule_revisions.php + * + * @param ListRuleRevisionsRequest $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 listRuleRevisions(ListRuleRevisionsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListRuleRevisions', $request, $callOptions); + } + + /** + * Lists Rules. + * + * The async variant is {@see RuleServiceClient::listRulesAsync()} . + * + * @example samples/V1/RuleServiceClient/list_rules.php + * + * @param ListRulesRequest $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 listRules(ListRulesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListRules', $request, $callOptions); + } + + /** + * Updates a Rule. + * + * The async variant is {@see RuleServiceClient::updateRuleAsync()} . + * + * @example samples/V1/RuleServiceClient/update_rule.php + * + * @param UpdateRuleRequest $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 Rule + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateRule(UpdateRuleRequest $request, array $callOptions = []): Rule + { + return $this->startApiCall('UpdateRule', $request, $callOptions)->wait(); + } + + /** + * Updates a RuleDeployment. + * Failures are not necessarily atomic. If there is a request to update + * multiple fields, and any update to a single field fails, an error will be + * returned, but other fields may remain successfully updated. + * + * The async variant is {@see RuleServiceClient::updateRuleDeploymentAsync()} . + * + * @example samples/V1/RuleServiceClient/update_rule_deployment.php + * + * @param UpdateRuleDeploymentRequest $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 RuleDeployment + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateRuleDeployment(UpdateRuleDeploymentRequest $request, array $callOptions = []): RuleDeployment + { + return $this->startApiCall('UpdateRuleDeployment', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Chronicle/v1/src/V1/gapic_metadata.json b/owl-bot-staging/Chronicle/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..7edd4a684d59 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/src/V1/gapic_metadata.json @@ -0,0 +1,298 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.chronicle.v1", + "libraryPackage": "Google\\Cloud\\Chronicle\\V1", + "services": { + "DataAccessControlService": { + "clients": { + "grpc": { + "libraryClient": "DataAccessControlServiceGapicClient", + "rpcs": { + "CreateDataAccessLabel": { + "methods": [ + "createDataAccessLabel" + ] + }, + "CreateDataAccessScope": { + "methods": [ + "createDataAccessScope" + ] + }, + "DeleteDataAccessLabel": { + "methods": [ + "deleteDataAccessLabel" + ] + }, + "DeleteDataAccessScope": { + "methods": [ + "deleteDataAccessScope" + ] + }, + "GetDataAccessLabel": { + "methods": [ + "getDataAccessLabel" + ] + }, + "GetDataAccessScope": { + "methods": [ + "getDataAccessScope" + ] + }, + "ListDataAccessLabels": { + "methods": [ + "listDataAccessLabels" + ] + }, + "ListDataAccessScopes": { + "methods": [ + "listDataAccessScopes" + ] + }, + "UpdateDataAccessLabel": { + "methods": [ + "updateDataAccessLabel" + ] + }, + "UpdateDataAccessScope": { + "methods": [ + "updateDataAccessScope" + ] + } + } + } + } + }, + "DataTableService": { + "clients": { + "grpc": { + "libraryClient": "DataTableServiceGapicClient", + "rpcs": { + "BulkCreateDataTableRows": { + "methods": [ + "bulkCreateDataTableRows" + ] + }, + "BulkGetDataTableRows": { + "methods": [ + "bulkGetDataTableRows" + ] + }, + "BulkReplaceDataTableRows": { + "methods": [ + "bulkReplaceDataTableRows" + ] + }, + "BulkUpdateDataTableRows": { + "methods": [ + "bulkUpdateDataTableRows" + ] + }, + "CreateDataTable": { + "methods": [ + "createDataTable" + ] + }, + "CreateDataTableRow": { + "methods": [ + "createDataTableRow" + ] + }, + "DeleteDataTable": { + "methods": [ + "deleteDataTable" + ] + }, + "DeleteDataTableRow": { + "methods": [ + "deleteDataTableRow" + ] + }, + "GetDataTable": { + "methods": [ + "getDataTable" + ] + }, + "GetDataTableOperationErrors": { + "methods": [ + "getDataTableOperationErrors" + ] + }, + "GetDataTableRow": { + "methods": [ + "getDataTableRow" + ] + }, + "ListDataTableRows": { + "methods": [ + "listDataTableRows" + ] + }, + "ListDataTables": { + "methods": [ + "listDataTables" + ] + }, + "UpdateDataTable": { + "methods": [ + "updateDataTable" + ] + }, + "UpdateDataTableRow": { + "methods": [ + "updateDataTableRow" + ] + } + } + } + } + }, + "EntityService": { + "clients": { + "grpc": { + "libraryClient": "EntityServiceGapicClient", + "rpcs": { + "CreateWatchlist": { + "methods": [ + "createWatchlist" + ] + }, + "DeleteWatchlist": { + "methods": [ + "deleteWatchlist" + ] + }, + "GetWatchlist": { + "methods": [ + "getWatchlist" + ] + }, + "ListWatchlists": { + "methods": [ + "listWatchlists" + ] + }, + "UpdateWatchlist": { + "methods": [ + "updateWatchlist" + ] + } + } + } + } + }, + "InstanceService": { + "clients": { + "grpc": { + "libraryClient": "InstanceServiceGapicClient", + "rpcs": { + "GetInstance": { + "methods": [ + "getInstance" + ] + } + } + } + } + }, + "ReferenceListService": { + "clients": { + "grpc": { + "libraryClient": "ReferenceListServiceGapicClient", + "rpcs": { + "CreateReferenceList": { + "methods": [ + "createReferenceList" + ] + }, + "GetReferenceList": { + "methods": [ + "getReferenceList" + ] + }, + "ListReferenceLists": { + "methods": [ + "listReferenceLists" + ] + }, + "UpdateReferenceList": { + "methods": [ + "updateReferenceList" + ] + } + } + } + } + }, + "RuleService": { + "clients": { + "grpc": { + "libraryClient": "RuleServiceGapicClient", + "rpcs": { + "CreateRetrohunt": { + "methods": [ + "createRetrohunt" + ] + }, + "CreateRule": { + "methods": [ + "createRule" + ] + }, + "DeleteRule": { + "methods": [ + "deleteRule" + ] + }, + "GetRetrohunt": { + "methods": [ + "getRetrohunt" + ] + }, + "GetRule": { + "methods": [ + "getRule" + ] + }, + "GetRuleDeployment": { + "methods": [ + "getRuleDeployment" + ] + }, + "ListRetrohunts": { + "methods": [ + "listRetrohunts" + ] + }, + "ListRuleDeployments": { + "methods": [ + "listRuleDeployments" + ] + }, + "ListRuleRevisions": { + "methods": [ + "listRuleRevisions" + ] + }, + "ListRules": { + "methods": [ + "listRules" + ] + }, + "UpdateRule": { + "methods": [ + "updateRule" + ] + }, + "UpdateRuleDeployment": { + "methods": [ + "updateRuleDeployment" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/Chronicle/v1/src/V1/resources/data_access_control_service_client_config.json b/owl-bot-staging/Chronicle/v1/src/V1/resources/data_access_control_service_client_config.json new file mode 100644 index 000000000000..e66f91bd3a6f --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/src/V1/resources/data_access_control_service_client_config.json @@ -0,0 +1,94 @@ +{ + "interfaces": { + "google.cloud.chronicle.v1.DataAccessControlService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "no_retry_1_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 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "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 + } + }, + "methods": { + "CreateDataAccessLabel": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateDataAccessScope": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteDataAccessLabel": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteDataAccessScope": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetDataAccessLabel": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetDataAccessScope": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListDataAccessLabels": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListDataAccessScopes": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateDataAccessLabel": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateDataAccessScope": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Chronicle/v1/src/V1/resources/data_access_control_service_descriptor_config.php b/owl-bot-staging/Chronicle/v1/src/V1/resources/data_access_control_service_descriptor_config.php new file mode 100644 index 000000000000..c8a4082ca4c9 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/src/V1/resources/data_access_control_service_descriptor_config.php @@ -0,0 +1,171 @@ + [ + 'google.cloud.chronicle.v1.DataAccessControlService' => [ + 'CreateDataAccessLabel' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\DataAccessLabel', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateDataAccessScope' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\DataAccessScope', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteDataAccessLabel' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteDataAccessScope' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetDataAccessLabel' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\DataAccessLabel', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetDataAccessScope' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\DataAccessScope', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListDataAccessLabels' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getDataAccessLabels', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\ListDataAccessLabelsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListDataAccessScopes' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getDataAccessScopes', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\ListDataAccessScopesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateDataAccessLabel' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\DataAccessLabel', + 'headerParams' => [ + [ + 'keyName' => 'data_access_label.name', + 'fieldAccessors' => [ + 'getDataAccessLabel', + 'getName', + ], + ], + ], + ], + 'UpdateDataAccessScope' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\DataAccessScope', + 'headerParams' => [ + [ + 'keyName' => 'data_access_scope.name', + 'fieldAccessors' => [ + 'getDataAccessScope', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'dataAccessLabel' => 'projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}', + 'dataAccessScope' => 'projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}', + 'instance' => 'projects/{project}/locations/{location}/instances/{instance}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Chronicle/v1/src/V1/resources/data_access_control_service_rest_client_config.php b/owl-bot-staging/Chronicle/v1/src/V1/resources/data_access_control_service_rest_client_config.php new file mode 100644 index 000000000000..5541511b522c --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/src/V1/resources/data_access_control_service_rest_client_config.php @@ -0,0 +1,198 @@ + [ + 'google.cloud.chronicle.v1.DataAccessControlService' => [ + 'CreateDataAccessLabel' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/instances/*}/dataAccessLabels', + 'body' => 'data_access_label', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'data_access_label_id', + ], + ], + 'CreateDataAccessScope' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/instances/*}/dataAccessScopes', + 'body' => 'data_access_scope', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'data_access_scope_id', + ], + ], + 'DeleteDataAccessLabel' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/dataAccessLabels/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteDataAccessScope' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/dataAccessScopes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetDataAccessLabel' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/dataAccessLabels/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetDataAccessScope' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/dataAccessScopes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListDataAccessLabels' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/instances/*}/dataAccessLabels', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListDataAccessScopes' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/instances/*}/dataAccessScopes', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateDataAccessLabel' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{data_access_label.name=projects/*/locations/*/instances/*/dataAccessLabels/*}', + 'body' => 'data_access_label', + 'placeholders' => [ + 'data_access_label.name' => [ + 'getters' => [ + 'getDataAccessLabel', + 'getName', + ], + ], + ], + ], + 'UpdateDataAccessScope' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{data_access_scope.name=projects/*/locations/*/instances/*/dataAccessScopes/*}', + 'body' => 'data_access_scope', + 'placeholders' => [ + 'data_access_scope.name' => [ + 'getters' => [ + 'getDataAccessScope', + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Chronicle/v1/src/V1/resources/data_table_service_client_config.json b/owl-bot-staging/Chronicle/v1/src/V1/resources/data_table_service_client_config.json new file mode 100644 index 000000000000..8977263a9e42 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/src/V1/resources/data_table_service_client_config.json @@ -0,0 +1,119 @@ +{ + "interfaces": { + "google.cloud.chronicle.v1.DataTableService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_4_codes": [ + "UNAVAILABLE" + ], + "no_retry_4_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 + }, + "retry_policy_4_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 600000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 600000, + "total_timeout_millis": 600000 + }, + "no_retry_4_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 600000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 600000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "BulkCreateDataTableRows": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_4_codes", + "retry_params_name": "no_retry_4_params" + }, + "BulkGetDataTableRows": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params" + }, + "BulkReplaceDataTableRows": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_4_codes", + "retry_params_name": "no_retry_4_params" + }, + "BulkUpdateDataTableRows": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_4_codes", + "retry_params_name": "no_retry_4_params" + }, + "CreateDataTable": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_4_codes", + "retry_params_name": "no_retry_4_params" + }, + "CreateDataTableRow": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_4_codes", + "retry_params_name": "no_retry_4_params" + }, + "DeleteDataTable": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_4_codes", + "retry_params_name": "no_retry_4_params" + }, + "DeleteDataTableRow": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_4_codes", + "retry_params_name": "no_retry_4_params" + }, + "GetDataTable": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params" + }, + "GetDataTableOperationErrors": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params" + }, + "GetDataTableRow": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params" + }, + "ListDataTableRows": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params" + }, + "ListDataTables": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params" + }, + "UpdateDataTable": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_4_codes", + "retry_params_name": "no_retry_4_params" + }, + "UpdateDataTableRow": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_4_codes", + "retry_params_name": "no_retry_4_params" + } + } + } + } +} diff --git a/owl-bot-staging/Chronicle/v1/src/V1/resources/data_table_service_descriptor_config.php b/owl-bot-staging/Chronicle/v1/src/V1/resources/data_table_service_descriptor_config.php new file mode 100644 index 000000000000..8e920d69d520 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/src/V1/resources/data_table_service_descriptor_config.php @@ -0,0 +1,233 @@ + [ + 'google.cloud.chronicle.v1.DataTableService' => [ + 'BulkCreateDataTableRows' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\BulkCreateDataTableRowsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'BulkGetDataTableRows' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\BulkGetDataTableRowsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'BulkReplaceDataTableRows' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\BulkReplaceDataTableRowsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'BulkUpdateDataTableRows' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\BulkUpdateDataTableRowsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateDataTable' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\DataTable', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateDataTableRow' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\DataTableRow', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteDataTable' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteDataTableRow' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetDataTable' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\DataTable', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetDataTableOperationErrors' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\DataTableOperationErrors', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetDataTableRow' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\DataTableRow', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListDataTableRows' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getDataTableRows', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\ListDataTableRowsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListDataTables' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getDataTables', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\ListDataTablesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateDataTable' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\DataTable', + 'headerParams' => [ + [ + 'keyName' => 'data_table.name', + 'fieldAccessors' => [ + 'getDataTable', + 'getName', + ], + ], + ], + ], + 'UpdateDataTableRow' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\DataTableRow', + 'headerParams' => [ + [ + 'keyName' => 'data_table_row.name', + 'fieldAccessors' => [ + 'getDataTableRow', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'dataAccessScope' => 'projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}', + 'dataTable' => 'projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}', + 'dataTableOperationErrors' => 'projects/{project}/locations/{location}/instances/{instance}/dataTableOperationErrors/{data_table_operation_errors}', + 'dataTableRow' => 'projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}/dataTableRows/{data_table_row}', + 'instance' => 'projects/{project}/locations/{location}/instances/{instance}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Chronicle/v1/src/V1/resources/data_table_service_rest_client_config.php b/owl-bot-staging/Chronicle/v1/src/V1/resources/data_table_service_rest_client_config.php new file mode 100644 index 000000000000..b16af4a2aa89 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/src/V1/resources/data_table_service_rest_client_config.php @@ -0,0 +1,254 @@ + [ + 'google.cloud.chronicle.v1.DataTableService' => [ + 'BulkCreateDataTableRows' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/instances/*/dataTables/*}/dataTableRows:bulkCreate', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BulkGetDataTableRows' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/instances/*/dataTables/*}/dataTableRows:bulkGet', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BulkReplaceDataTableRows' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/instances/*/dataTables/*}/dataTableRows:bulkReplace', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BulkUpdateDataTableRows' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/instances/*/dataTables/*}/dataTableRows:bulkUpdate', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateDataTable' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/instances/*}/dataTables', + 'body' => 'data_table', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'data_table_id', + ], + ], + 'CreateDataTableRow' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/instances/*/dataTables/*}/dataTableRows', + 'body' => 'data_table_row', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteDataTable' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/dataTables/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteDataTableRow' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/dataTables/*/dataTableRows/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetDataTable' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/dataTables/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetDataTableOperationErrors' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/dataTableOperationErrors/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetDataTableRow' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/dataTables/*/dataTableRows/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListDataTableRows' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/instances/*/dataTables/*}/dataTableRows', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListDataTables' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/instances/*}/dataTables', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateDataTable' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{data_table.name=projects/*/locations/*/instances/*/dataTables/*}', + 'body' => 'data_table', + 'placeholders' => [ + 'data_table.name' => [ + 'getters' => [ + 'getDataTable', + 'getName', + ], + ], + ], + ], + 'UpdateDataTableRow' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{data_table_row.name=projects/*/locations/*/instances/*/dataTables/*/dataTableRows/*}', + 'body' => 'data_table_row', + 'placeholders' => [ + 'data_table_row.name' => [ + 'getters' => [ + 'getDataTableRow', + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Chronicle/v1/src/V1/resources/entity_service_client_config.json b/owl-bot-staging/Chronicle/v1/src/V1/resources/entity_service_client_config.json new file mode 100644 index 000000000000..d044fe021d4f --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/src/V1/resources/entity_service_client_config.json @@ -0,0 +1,69 @@ +{ + "interfaces": { + "google.cloud.chronicle.v1.EntityService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_2_codes": [ + "UNAVAILABLE" + ], + "no_retry_3_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 + }, + "retry_policy_2_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 90000, + "initial_rpc_timeout_millis": 90000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 90000, + "total_timeout_millis": 90000 + }, + "no_retry_3_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 90000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 90000, + "total_timeout_millis": 90000 + } + }, + "methods": { + "CreateWatchlist": { + "timeout_millis": 90000, + "retry_codes_name": "no_retry_3_codes", + "retry_params_name": "no_retry_3_params" + }, + "DeleteWatchlist": { + "timeout_millis": 90000, + "retry_codes_name": "no_retry_3_codes", + "retry_params_name": "no_retry_3_params" + }, + "GetWatchlist": { + "timeout_millis": 90000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "ListWatchlists": { + "timeout_millis": 90000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "UpdateWatchlist": { + "timeout_millis": 90000, + "retry_codes_name": "no_retry_3_codes", + "retry_params_name": "no_retry_3_params" + } + } + } + } +} diff --git a/owl-bot-staging/Chronicle/v1/src/V1/resources/entity_service_descriptor_config.php b/owl-bot-staging/Chronicle/v1/src/V1/resources/entity_service_descriptor_config.php new file mode 100644 index 000000000000..3e621e9503b3 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/src/V1/resources/entity_service_descriptor_config.php @@ -0,0 +1,101 @@ + [ + 'google.cloud.chronicle.v1.EntityService' => [ + 'CreateWatchlist' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\Watchlist', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteWatchlist' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetWatchlist' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\Watchlist', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListWatchlists' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getWatchlists', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\ListWatchlistsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateWatchlist' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\Watchlist', + 'headerParams' => [ + [ + 'keyName' => 'watchlist.name', + 'fieldAccessors' => [ + 'getWatchlist', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'instance' => 'projects/{project}/locations/{location}/instances/{instance}', + 'watchlist' => 'projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Chronicle/v1/src/V1/resources/entity_service_rest_client_config.php b/owl-bot-staging/Chronicle/v1/src/V1/resources/entity_service_rest_client_config.php new file mode 100644 index 000000000000..eebd35bba736 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/src/V1/resources/entity_service_rest_client_config.php @@ -0,0 +1,134 @@ + [ + 'google.cloud.chronicle.v1.EntityService' => [ + 'CreateWatchlist' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/instances/*}/watchlists', + 'body' => 'watchlist', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteWatchlist' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/watchlists/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetWatchlist' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/watchlists/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListWatchlists' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/instances/*}/watchlists', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateWatchlist' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{watchlist.name=projects/*/locations/*/instances/*/watchlists/*}', + 'body' => 'watchlist', + 'placeholders' => [ + 'watchlist.name' => [ + 'getters' => [ + 'getWatchlist', + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Chronicle/v1/src/V1/resources/instance_service_client_config.json b/owl-bot-staging/Chronicle/v1/src/V1/resources/instance_service_client_config.json new file mode 100644 index 000000000000..5de3bac58b09 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/src/V1/resources/instance_service_client_config.json @@ -0,0 +1,39 @@ +{ + "interfaces": { + "google.cloud.chronicle.v1.InstanceService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ] + }, + "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 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "GetInstance": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Chronicle/v1/src/V1/resources/instance_service_descriptor_config.php b/owl-bot-staging/Chronicle/v1/src/V1/resources/instance_service_descriptor_config.php new file mode 100644 index 000000000000..7f7d60f75b19 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/src/V1/resources/instance_service_descriptor_config.php @@ -0,0 +1,43 @@ + [ + 'google.cloud.chronicle.v1.InstanceService' => [ + 'GetInstance' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\Instance', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'instance' => 'projects/{project}/locations/{location}/instances/{instance}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Chronicle/v1/src/V1/resources/instance_service_rest_client_config.php b/owl-bot-staging/Chronicle/v1/src/V1/resources/instance_service_rest_client_config.php new file mode 100644 index 000000000000..d4685582daa0 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/src/V1/resources/instance_service_rest_client_config.php @@ -0,0 +1,87 @@ + [ + 'google.cloud.chronicle.v1.InstanceService' => [ + 'GetInstance' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Chronicle/v1/src/V1/resources/reference_list_service_client_config.json b/owl-bot-staging/Chronicle/v1/src/V1/resources/reference_list_service_client_config.json new file mode 100644 index 000000000000..32f3e90972f9 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/src/V1/resources/reference_list_service_client_config.json @@ -0,0 +1,64 @@ +{ + "interfaces": { + "google.cloud.chronicle.v1.ReferenceListService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "no_retry_1_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 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "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 + } + }, + "methods": { + "CreateReferenceList": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetReferenceList": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListReferenceLists": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateReferenceList": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Chronicle/v1/src/V1/resources/reference_list_service_descriptor_config.php b/owl-bot-staging/Chronicle/v1/src/V1/resources/reference_list_service_descriptor_config.php new file mode 100644 index 000000000000..388793580afd --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/src/V1/resources/reference_list_service_descriptor_config.php @@ -0,0 +1,89 @@ + [ + 'google.cloud.chronicle.v1.ReferenceListService' => [ + 'CreateReferenceList' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\ReferenceList', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetReferenceList' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\ReferenceList', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListReferenceLists' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getReferenceLists', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\ListReferenceListsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateReferenceList' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\ReferenceList', + 'headerParams' => [ + [ + 'keyName' => 'reference_list.name', + 'fieldAccessors' => [ + 'getReferenceList', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'instance' => 'projects/{project}/locations/{location}/instances/{instance}', + 'referenceList' => 'projects/{project}/locations/{location}/instances/{instance}/referenceLists/{reference_list}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Chronicle/v1/src/V1/resources/reference_list_service_rest_client_config.php b/owl-bot-staging/Chronicle/v1/src/V1/resources/reference_list_service_rest_client_config.php new file mode 100644 index 000000000000..9763cbfd0f4d --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/src/V1/resources/reference_list_service_rest_client_config.php @@ -0,0 +1,126 @@ + [ + 'google.cloud.chronicle.v1.ReferenceListService' => [ + 'CreateReferenceList' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/instances/*}/referenceLists', + 'body' => 'reference_list', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'reference_list_id', + ], + ], + 'GetReferenceList' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/referenceLists/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListReferenceLists' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/instances/*}/referenceLists', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateReferenceList' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{reference_list.name=projects/*/locations/*/instances/*/referenceLists/*}', + 'body' => 'reference_list', + 'placeholders' => [ + 'reference_list.name' => [ + 'getters' => [ + 'getReferenceList', + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Chronicle/v1/src/V1/resources/rule_service_client_config.json b/owl-bot-staging/Chronicle/v1/src/V1/resources/rule_service_client_config.json new file mode 100644 index 000000000000..101a8c15dd99 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/src/V1/resources/rule_service_client_config.json @@ -0,0 +1,126 @@ +{ + "interfaces": { + "google.cloud.chronicle.v1.RuleService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "retry_policy_3_codes": [ + "UNAVAILABLE" + ], + "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 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "retry_policy_3_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 600000, + "initial_rpc_timeout_millis": 600000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 600000, + "total_timeout_millis": 600000 + }, + "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": 600000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 600000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "CreateRetrohunt": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "CreateRule": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteRule": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetRetrohunt": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetRule": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetRuleDeployment": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "ListRetrohunts": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListRuleDeployments": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "ListRuleRevisions": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "ListRules": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "UpdateRule": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "UpdateRuleDeployment": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + } + } + } + } +} diff --git a/owl-bot-staging/Chronicle/v1/src/V1/resources/rule_service_descriptor_config.php b/owl-bot-staging/Chronicle/v1/src/V1/resources/rule_service_descriptor_config.php new file mode 100644 index 000000000000..94e1a30f30f7 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/src/V1/resources/rule_service_descriptor_config.php @@ -0,0 +1,221 @@ + [ + 'google.cloud.chronicle.v1.RuleService' => [ + 'CreateRetrohunt' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Chronicle\V1\Retrohunt', + 'metadataReturnType' => '\Google\Cloud\Chronicle\V1\RetrohuntMetadata', + 'initialPollDelayMillis' => '1000', + 'pollDelayMultiplier' => '2.0', + 'maxPollDelayMillis' => '10000', + 'totalPollTimeoutMillis' => '900000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateRule' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\Rule', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteRule' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetRetrohunt' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\Retrohunt', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetRule' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\Rule', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetRuleDeployment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\RuleDeployment', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListRetrohunts' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getRetrohunts', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\ListRetrohuntsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListRuleDeployments' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getRuleDeployments', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\ListRuleDeploymentsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListRuleRevisions' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getRules', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\ListRuleRevisionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListRules' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getRules', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\ListRulesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateRule' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\Rule', + 'headerParams' => [ + [ + 'keyName' => 'rule.name', + 'fieldAccessors' => [ + 'getRule', + 'getName', + ], + ], + ], + ], + 'UpdateRuleDeployment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\RuleDeployment', + 'headerParams' => [ + [ + 'keyName' => 'rule_deployment.name', + 'fieldAccessors' => [ + 'getRuleDeployment', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'dataAccessScope' => 'projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}', + 'instance' => 'projects/{project}/locations/{location}/instances/{instance}', + 'referenceList' => 'projects/{project}/locations/{location}/instances/{instance}/referenceLists/{reference_list}', + 'retrohunt' => 'projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}', + 'rule' => 'projects/{project}/locations/{location}/instances/{instance}/rules/{rule}', + 'ruleDeployment' => 'projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment', + ], + ], + ], +]; diff --git a/owl-bot-staging/Chronicle/v1/src/V1/resources/rule_service_rest_client_config.php b/owl-bot-staging/Chronicle/v1/src/V1/resources/rule_service_rest_client_config.php new file mode 100644 index 000000000000..0da0c5c50559 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/src/V1/resources/rule_service_rest_client_config.php @@ -0,0 +1,217 @@ + [ + 'google.cloud.chronicle.v1.RuleService' => [ + 'CreateRetrohunt' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/instances/*/rules/*}/retrohunts', + 'body' => 'retrohunt', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateRule' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/instances/*}/rules', + 'body' => 'rule', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteRule' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/rules/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetRetrohunt' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/rules/*/retrohunts/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetRule' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/rules/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetRuleDeployment' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/rules/*/deployment}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListRetrohunts' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/instances/*/rules/*}/retrohunts', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListRuleDeployments' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/instances/*/rules/*}/deployments', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListRuleRevisions' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/rules/*}:listRevisions', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListRules' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/instances/*}/rules', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateRule' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{rule.name=projects/*/locations/*/instances/*/rules/*}', + 'body' => 'rule', + 'placeholders' => [ + 'rule.name' => [ + 'getters' => [ + 'getRule', + 'getName', + ], + ], + ], + ], + 'UpdateRuleDeployment' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{rule_deployment.name=projects/*/locations/*/instances/*/rules/*/deployment}', + 'body' => 'rule_deployment', + 'placeholders' => [ + 'rule_deployment.name' => [ + 'getters' => [ + 'getRuleDeployment', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Chronicle/v1/tests/Unit/V1/Client/DataAccessControlServiceClientTest.php b/owl-bot-staging/Chronicle/v1/tests/Unit/V1/Client/DataAccessControlServiceClientTest.php new file mode 100644 index 000000000000..bc7163b93a3f --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/tests/Unit/V1/Client/DataAccessControlServiceClientTest.php @@ -0,0 +1,866 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return DataAccessControlServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new DataAccessControlServiceClient($options); + } + + /** @test */ + public function createDataAccessLabelTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $udmQuery = 'udmQuery-2050033401'; + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $author = 'author-1406328437'; + $lastEditor = 'lastEditor1620154166'; + $description = 'description-1724546052'; + $expectedResponse = new DataAccessLabel(); + $expectedResponse->setUdmQuery($udmQuery); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setAuthor($author); + $expectedResponse->setLastEditor($lastEditor); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $dataAccessLabel = new DataAccessLabel(); + $dataAccessLabelId = 'dataAccessLabelId-1688134612'; + $request = (new CreateDataAccessLabelRequest()) + ->setParent($formattedParent) + ->setDataAccessLabel($dataAccessLabel) + ->setDataAccessLabelId($dataAccessLabelId); + $response = $gapicClient->createDataAccessLabel($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.chronicle.v1.DataAccessControlService/CreateDataAccessLabel', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getDataAccessLabel(); + $this->assertProtobufEquals($dataAccessLabel, $actualValue); + $actualValue = $actualRequestObject->getDataAccessLabelId(); + $this->assertProtobufEquals($dataAccessLabelId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createDataAccessLabelExceptionTest() + { + $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $dataAccessLabel = new DataAccessLabel(); + $dataAccessLabelId = 'dataAccessLabelId-1688134612'; + $request = (new CreateDataAccessLabelRequest()) + ->setParent($formattedParent) + ->setDataAccessLabel($dataAccessLabel) + ->setDataAccessLabelId($dataAccessLabelId); + try { + $gapicClient->createDataAccessLabel($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 createDataAccessScopeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $author = 'author-1406328437'; + $lastEditor = 'lastEditor1620154166'; + $description = 'description-1724546052'; + $allowAll = false; + $expectedResponse = new DataAccessScope(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setAuthor($author); + $expectedResponse->setLastEditor($lastEditor); + $expectedResponse->setDescription($description); + $expectedResponse->setAllowAll($allowAll); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $dataAccessScope = new DataAccessScope(); + $dataAccessScopeName = $gapicClient->dataAccessScopeName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_ACCESS_SCOPE]'); + $dataAccessScope->setName($dataAccessScopeName); + $dataAccessScopeId = 'dataAccessScopeId-216227636'; + $request = (new CreateDataAccessScopeRequest()) + ->setParent($formattedParent) + ->setDataAccessScope($dataAccessScope) + ->setDataAccessScopeId($dataAccessScopeId); + $response = $gapicClient->createDataAccessScope($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.chronicle.v1.DataAccessControlService/CreateDataAccessScope', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getDataAccessScope(); + $this->assertProtobufEquals($dataAccessScope, $actualValue); + $actualValue = $actualRequestObject->getDataAccessScopeId(); + $this->assertProtobufEquals($dataAccessScopeId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createDataAccessScopeExceptionTest() + { + $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $dataAccessScope = new DataAccessScope(); + $dataAccessScopeName = $gapicClient->dataAccessScopeName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_ACCESS_SCOPE]'); + $dataAccessScope->setName($dataAccessScopeName); + $dataAccessScopeId = 'dataAccessScopeId-216227636'; + $request = (new CreateDataAccessScopeRequest()) + ->setParent($formattedParent) + ->setDataAccessScope($dataAccessScope) + ->setDataAccessScopeId($dataAccessScopeId); + try { + $gapicClient->createDataAccessScope($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 deleteDataAccessLabelTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->dataAccessLabelName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_ACCESS_LABEL]'); + $request = (new DeleteDataAccessLabelRequest()) + ->setName($formattedName); + $gapicClient->deleteDataAccessLabel($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.chronicle.v1.DataAccessControlService/DeleteDataAccessLabel', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteDataAccessLabelExceptionTest() + { + $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->dataAccessLabelName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_ACCESS_LABEL]'); + $request = (new DeleteDataAccessLabelRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteDataAccessLabel($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 deleteDataAccessScopeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->dataAccessScopeName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_ACCESS_SCOPE]'); + $request = (new DeleteDataAccessScopeRequest()) + ->setName($formattedName); + $gapicClient->deleteDataAccessScope($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.chronicle.v1.DataAccessControlService/DeleteDataAccessScope', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteDataAccessScopeExceptionTest() + { + $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->dataAccessScopeName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_ACCESS_SCOPE]'); + $request = (new DeleteDataAccessScopeRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteDataAccessScope($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 getDataAccessLabelTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $udmQuery = 'udmQuery-2050033401'; + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $author = 'author-1406328437'; + $lastEditor = 'lastEditor1620154166'; + $description = 'description-1724546052'; + $expectedResponse = new DataAccessLabel(); + $expectedResponse->setUdmQuery($udmQuery); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setAuthor($author); + $expectedResponse->setLastEditor($lastEditor); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->dataAccessLabelName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_ACCESS_LABEL]'); + $request = (new GetDataAccessLabelRequest()) + ->setName($formattedName); + $response = $gapicClient->getDataAccessLabel($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.chronicle.v1.DataAccessControlService/GetDataAccessLabel', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDataAccessLabelExceptionTest() + { + $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->dataAccessLabelName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_ACCESS_LABEL]'); + $request = (new GetDataAccessLabelRequest()) + ->setName($formattedName); + try { + $gapicClient->getDataAccessLabel($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 getDataAccessScopeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $author = 'author-1406328437'; + $lastEditor = 'lastEditor1620154166'; + $description = 'description-1724546052'; + $allowAll = false; + $expectedResponse = new DataAccessScope(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setAuthor($author); + $expectedResponse->setLastEditor($lastEditor); + $expectedResponse->setDescription($description); + $expectedResponse->setAllowAll($allowAll); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->dataAccessScopeName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_ACCESS_SCOPE]'); + $request = (new GetDataAccessScopeRequest()) + ->setName($formattedName); + $response = $gapicClient->getDataAccessScope($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.chronicle.v1.DataAccessControlService/GetDataAccessScope', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDataAccessScopeExceptionTest() + { + $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->dataAccessScopeName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_ACCESS_SCOPE]'); + $request = (new GetDataAccessScopeRequest()) + ->setName($formattedName); + try { + $gapicClient->getDataAccessScope($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 listDataAccessLabelsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $dataAccessLabelsElement = new DataAccessLabel(); + $dataAccessLabels = [ + $dataAccessLabelsElement, + ]; + $expectedResponse = new ListDataAccessLabelsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setDataAccessLabels($dataAccessLabels); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new ListDataAccessLabelsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listDataAccessLabels($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getDataAccessLabels()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.chronicle.v1.DataAccessControlService/ListDataAccessLabels', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDataAccessLabelsExceptionTest() + { + $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new ListDataAccessLabelsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listDataAccessLabels($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 listDataAccessScopesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $globalDataAccessScopeGranted = true; + $nextPageToken = ''; + $dataAccessScopesElement = new DataAccessScope(); + $dataAccessScopes = [ + $dataAccessScopesElement, + ]; + $expectedResponse = new ListDataAccessScopesResponse(); + $expectedResponse->setGlobalDataAccessScopeGranted($globalDataAccessScopeGranted); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setDataAccessScopes($dataAccessScopes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new ListDataAccessScopesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listDataAccessScopes($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getDataAccessScopes()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.chronicle.v1.DataAccessControlService/ListDataAccessScopes', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDataAccessScopesExceptionTest() + { + $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new ListDataAccessScopesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listDataAccessScopes($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 updateDataAccessLabelTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $udmQuery = 'udmQuery-2050033401'; + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $author = 'author-1406328437'; + $lastEditor = 'lastEditor1620154166'; + $description = 'description-1724546052'; + $expectedResponse = new DataAccessLabel(); + $expectedResponse->setUdmQuery($udmQuery); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setAuthor($author); + $expectedResponse->setLastEditor($lastEditor); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $dataAccessLabel = new DataAccessLabel(); + $request = (new UpdateDataAccessLabelRequest()) + ->setDataAccessLabel($dataAccessLabel); + $response = $gapicClient->updateDataAccessLabel($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.chronicle.v1.DataAccessControlService/UpdateDataAccessLabel', $actualFuncCall); + $actualValue = $actualRequestObject->getDataAccessLabel(); + $this->assertProtobufEquals($dataAccessLabel, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateDataAccessLabelExceptionTest() + { + $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 + $dataAccessLabel = new DataAccessLabel(); + $request = (new UpdateDataAccessLabelRequest()) + ->setDataAccessLabel($dataAccessLabel); + try { + $gapicClient->updateDataAccessLabel($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 updateDataAccessScopeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $author = 'author-1406328437'; + $lastEditor = 'lastEditor1620154166'; + $description = 'description-1724546052'; + $allowAll = false; + $expectedResponse = new DataAccessScope(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setAuthor($author); + $expectedResponse->setLastEditor($lastEditor); + $expectedResponse->setDescription($description); + $expectedResponse->setAllowAll($allowAll); + $transport->addResponse($expectedResponse); + // Mock request + $dataAccessScope = new DataAccessScope(); + $dataAccessScopeName = $gapicClient->dataAccessScopeName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_ACCESS_SCOPE]'); + $dataAccessScope->setName($dataAccessScopeName); + $request = (new UpdateDataAccessScopeRequest()) + ->setDataAccessScope($dataAccessScope); + $response = $gapicClient->updateDataAccessScope($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.chronicle.v1.DataAccessControlService/UpdateDataAccessScope', $actualFuncCall); + $actualValue = $actualRequestObject->getDataAccessScope(); + $this->assertProtobufEquals($dataAccessScope, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateDataAccessScopeExceptionTest() + { + $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 + $dataAccessScope = new DataAccessScope(); + $dataAccessScopeName = $gapicClient->dataAccessScopeName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_ACCESS_SCOPE]'); + $dataAccessScope->setName($dataAccessScopeName); + $request = (new UpdateDataAccessScopeRequest()) + ->setDataAccessScope($dataAccessScope); + try { + $gapicClient->updateDataAccessScope($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 createDataAccessLabelAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $udmQuery = 'udmQuery-2050033401'; + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $author = 'author-1406328437'; + $lastEditor = 'lastEditor1620154166'; + $description = 'description-1724546052'; + $expectedResponse = new DataAccessLabel(); + $expectedResponse->setUdmQuery($udmQuery); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setAuthor($author); + $expectedResponse->setLastEditor($lastEditor); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $dataAccessLabel = new DataAccessLabel(); + $dataAccessLabelId = 'dataAccessLabelId-1688134612'; + $request = (new CreateDataAccessLabelRequest()) + ->setParent($formattedParent) + ->setDataAccessLabel($dataAccessLabel) + ->setDataAccessLabelId($dataAccessLabelId); + $response = $gapicClient->createDataAccessLabelAsync($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.chronicle.v1.DataAccessControlService/CreateDataAccessLabel', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getDataAccessLabel(); + $this->assertProtobufEquals($dataAccessLabel, $actualValue); + $actualValue = $actualRequestObject->getDataAccessLabelId(); + $this->assertProtobufEquals($dataAccessLabelId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Chronicle/v1/tests/Unit/V1/Client/DataTableServiceClientTest.php b/owl-bot-staging/Chronicle/v1/tests/Unit/V1/Client/DataTableServiceClientTest.php new file mode 100644 index 000000000000..125ba2f76d68 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/tests/Unit/V1/Client/DataTableServiceClientTest.php @@ -0,0 +1,1178 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return DataTableServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new DataTableServiceClient($options); + } + + /** @test */ + public function bulkCreateDataTableRowsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BulkCreateDataTableRowsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->dataTableName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_TABLE]'); + $requests = []; + $request = (new BulkCreateDataTableRowsRequest()) + ->setParent($formattedParent) + ->setRequests($requests); + $response = $gapicClient->bulkCreateDataTableRows($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.chronicle.v1.DataTableService/BulkCreateDataTableRows', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getRequests(); + $this->assertProtobufEquals($requests, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function bulkCreateDataTableRowsExceptionTest() + { + $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->dataTableName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_TABLE]'); + $requests = []; + $request = (new BulkCreateDataTableRowsRequest()) + ->setParent($formattedParent) + ->setRequests($requests); + try { + $gapicClient->bulkCreateDataTableRows($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 bulkGetDataTableRowsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BulkGetDataTableRowsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->dataTableName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_TABLE]'); + $requests = []; + $request = (new BulkGetDataTableRowsRequest()) + ->setParent($formattedParent) + ->setRequests($requests); + $response = $gapicClient->bulkGetDataTableRows($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.chronicle.v1.DataTableService/BulkGetDataTableRows', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getRequests(); + $this->assertProtobufEquals($requests, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function bulkGetDataTableRowsExceptionTest() + { + $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->dataTableName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_TABLE]'); + $requests = []; + $request = (new BulkGetDataTableRowsRequest()) + ->setParent($formattedParent) + ->setRequests($requests); + try { + $gapicClient->bulkGetDataTableRows($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 bulkReplaceDataTableRowsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BulkReplaceDataTableRowsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->dataTableName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_TABLE]'); + $requests = []; + $request = (new BulkReplaceDataTableRowsRequest()) + ->setParent($formattedParent) + ->setRequests($requests); + $response = $gapicClient->bulkReplaceDataTableRows($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.chronicle.v1.DataTableService/BulkReplaceDataTableRows', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getRequests(); + $this->assertProtobufEquals($requests, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function bulkReplaceDataTableRowsExceptionTest() + { + $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->dataTableName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_TABLE]'); + $requests = []; + $request = (new BulkReplaceDataTableRowsRequest()) + ->setParent($formattedParent) + ->setRequests($requests); + try { + $gapicClient->bulkReplaceDataTableRows($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 bulkUpdateDataTableRowsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BulkUpdateDataTableRowsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->dataTableName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_TABLE]'); + $requests = []; + $request = (new BulkUpdateDataTableRowsRequest()) + ->setParent($formattedParent) + ->setRequests($requests); + $response = $gapicClient->bulkUpdateDataTableRows($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.chronicle.v1.DataTableService/BulkUpdateDataTableRows', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getRequests(); + $this->assertProtobufEquals($requests, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function bulkUpdateDataTableRowsExceptionTest() + { + $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->dataTableName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_TABLE]'); + $requests = []; + $request = (new BulkUpdateDataTableRowsRequest()) + ->setParent($formattedParent) + ->setRequests($requests); + try { + $gapicClient->bulkUpdateDataTableRows($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 createDataTableTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $dataTableUuid = 'dataTableUuid-1818199743'; + $ruleAssociationsCount = 1522562875; + $rowTimeToLive = 'rowTimeToLive1109069571'; + $approximateRowCount = 297926913; + $expectedResponse = new DataTable(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setDataTableUuid($dataTableUuid); + $expectedResponse->setRuleAssociationsCount($ruleAssociationsCount); + $expectedResponse->setRowTimeToLive($rowTimeToLive); + $expectedResponse->setApproximateRowCount($approximateRowCount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $dataTable = new DataTable(); + $dataTableDescription = 'dataTableDescription924959512'; + $dataTable->setDescription($dataTableDescription); + $dataTableId = 'dataTableId-319210463'; + $request = (new CreateDataTableRequest()) + ->setParent($formattedParent) + ->setDataTable($dataTable) + ->setDataTableId($dataTableId); + $response = $gapicClient->createDataTable($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.chronicle.v1.DataTableService/CreateDataTable', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getDataTable(); + $this->assertProtobufEquals($dataTable, $actualValue); + $actualValue = $actualRequestObject->getDataTableId(); + $this->assertProtobufEquals($dataTableId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createDataTableExceptionTest() + { + $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $dataTable = new DataTable(); + $dataTableDescription = 'dataTableDescription924959512'; + $dataTable->setDescription($dataTableDescription); + $dataTableId = 'dataTableId-319210463'; + $request = (new CreateDataTableRequest()) + ->setParent($formattedParent) + ->setDataTable($dataTable) + ->setDataTableId($dataTableId); + try { + $gapicClient->createDataTable($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 createDataTableRowTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $rowTimeToLive = 'rowTimeToLive1109069571'; + $expectedResponse = new DataTableRow(); + $expectedResponse->setName($name); + $expectedResponse->setRowTimeToLive($rowTimeToLive); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->dataTableName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_TABLE]'); + $dataTableRow = new DataTableRow(); + $dataTableRowValues = []; + $dataTableRow->setValues($dataTableRowValues); + $request = (new CreateDataTableRowRequest()) + ->setParent($formattedParent) + ->setDataTableRow($dataTableRow); + $response = $gapicClient->createDataTableRow($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.chronicle.v1.DataTableService/CreateDataTableRow', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getDataTableRow(); + $this->assertProtobufEquals($dataTableRow, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createDataTableRowExceptionTest() + { + $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->dataTableName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_TABLE]'); + $dataTableRow = new DataTableRow(); + $dataTableRowValues = []; + $dataTableRow->setValues($dataTableRowValues); + $request = (new CreateDataTableRowRequest()) + ->setParent($formattedParent) + ->setDataTableRow($dataTableRow); + try { + $gapicClient->createDataTableRow($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 deleteDataTableTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->dataTableName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_TABLE]'); + $request = (new DeleteDataTableRequest()) + ->setName($formattedName); + $gapicClient->deleteDataTable($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.chronicle.v1.DataTableService/DeleteDataTable', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteDataTableExceptionTest() + { + $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->dataTableName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_TABLE]'); + $request = (new DeleteDataTableRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteDataTable($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 deleteDataTableRowTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->dataTableRowName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_TABLE]', '[DATA_TABLE_ROW]'); + $request = (new DeleteDataTableRowRequest()) + ->setName($formattedName); + $gapicClient->deleteDataTableRow($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.chronicle.v1.DataTableService/DeleteDataTableRow', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteDataTableRowExceptionTest() + { + $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->dataTableRowName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_TABLE]', '[DATA_TABLE_ROW]'); + $request = (new DeleteDataTableRowRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteDataTableRow($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 getDataTableTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $dataTableUuid = 'dataTableUuid-1818199743'; + $ruleAssociationsCount = 1522562875; + $rowTimeToLive = 'rowTimeToLive1109069571'; + $approximateRowCount = 297926913; + $expectedResponse = new DataTable(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setDataTableUuid($dataTableUuid); + $expectedResponse->setRuleAssociationsCount($ruleAssociationsCount); + $expectedResponse->setRowTimeToLive($rowTimeToLive); + $expectedResponse->setApproximateRowCount($approximateRowCount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->dataTableName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_TABLE]'); + $request = (new GetDataTableRequest()) + ->setName($formattedName); + $response = $gapicClient->getDataTable($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.chronicle.v1.DataTableService/GetDataTable', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDataTableExceptionTest() + { + $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->dataTableName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_TABLE]'); + $request = (new GetDataTableRequest()) + ->setName($formattedName); + try { + $gapicClient->getDataTable($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 getDataTableOperationErrorsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new DataTableOperationErrors(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->dataTableOperationErrorsName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_TABLE_OPERATION_ERRORS]'); + $request = (new GetDataTableOperationErrorsRequest()) + ->setName($formattedName); + $response = $gapicClient->getDataTableOperationErrors($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.chronicle.v1.DataTableService/GetDataTableOperationErrors', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDataTableOperationErrorsExceptionTest() + { + $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->dataTableOperationErrorsName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_TABLE_OPERATION_ERRORS]'); + $request = (new GetDataTableOperationErrorsRequest()) + ->setName($formattedName); + try { + $gapicClient->getDataTableOperationErrors($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 getDataTableRowTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $rowTimeToLive = 'rowTimeToLive1109069571'; + $expectedResponse = new DataTableRow(); + $expectedResponse->setName($name2); + $expectedResponse->setRowTimeToLive($rowTimeToLive); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->dataTableRowName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_TABLE]', '[DATA_TABLE_ROW]'); + $request = (new GetDataTableRowRequest()) + ->setName($formattedName); + $response = $gapicClient->getDataTableRow($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.chronicle.v1.DataTableService/GetDataTableRow', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDataTableRowExceptionTest() + { + $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->dataTableRowName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_TABLE]', '[DATA_TABLE_ROW]'); + $request = (new GetDataTableRowRequest()) + ->setName($formattedName); + try { + $gapicClient->getDataTableRow($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 listDataTableRowsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $dataTableRowsElement = new DataTableRow(); + $dataTableRows = [ + $dataTableRowsElement, + ]; + $expectedResponse = new ListDataTableRowsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setDataTableRows($dataTableRows); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->dataTableName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_TABLE]'); + $request = (new ListDataTableRowsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listDataTableRows($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getDataTableRows()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.chronicle.v1.DataTableService/ListDataTableRows', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDataTableRowsExceptionTest() + { + $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->dataTableName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_TABLE]'); + $request = (new ListDataTableRowsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listDataTableRows($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 listDataTablesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $dataTablesElement = new DataTable(); + $dataTables = [ + $dataTablesElement, + ]; + $expectedResponse = new ListDataTablesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setDataTables($dataTables); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new ListDataTablesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listDataTables($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getDataTables()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.chronicle.v1.DataTableService/ListDataTables', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDataTablesExceptionTest() + { + $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new ListDataTablesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listDataTables($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 updateDataTableTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $dataTableUuid = 'dataTableUuid-1818199743'; + $ruleAssociationsCount = 1522562875; + $rowTimeToLive = 'rowTimeToLive1109069571'; + $approximateRowCount = 297926913; + $expectedResponse = new DataTable(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setDataTableUuid($dataTableUuid); + $expectedResponse->setRuleAssociationsCount($ruleAssociationsCount); + $expectedResponse->setRowTimeToLive($rowTimeToLive); + $expectedResponse->setApproximateRowCount($approximateRowCount); + $transport->addResponse($expectedResponse); + // Mock request + $dataTable = new DataTable(); + $dataTableDescription = 'dataTableDescription924959512'; + $dataTable->setDescription($dataTableDescription); + $request = (new UpdateDataTableRequest()) + ->setDataTable($dataTable); + $response = $gapicClient->updateDataTable($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.chronicle.v1.DataTableService/UpdateDataTable', $actualFuncCall); + $actualValue = $actualRequestObject->getDataTable(); + $this->assertProtobufEquals($dataTable, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateDataTableExceptionTest() + { + $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 + $dataTable = new DataTable(); + $dataTableDescription = 'dataTableDescription924959512'; + $dataTable->setDescription($dataTableDescription); + $request = (new UpdateDataTableRequest()) + ->setDataTable($dataTable); + try { + $gapicClient->updateDataTable($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 updateDataTableRowTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $rowTimeToLive = 'rowTimeToLive1109069571'; + $expectedResponse = new DataTableRow(); + $expectedResponse->setName($name); + $expectedResponse->setRowTimeToLive($rowTimeToLive); + $transport->addResponse($expectedResponse); + // Mock request + $dataTableRow = new DataTableRow(); + $dataTableRowValues = []; + $dataTableRow->setValues($dataTableRowValues); + $request = (new UpdateDataTableRowRequest()) + ->setDataTableRow($dataTableRow); + $response = $gapicClient->updateDataTableRow($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.chronicle.v1.DataTableService/UpdateDataTableRow', $actualFuncCall); + $actualValue = $actualRequestObject->getDataTableRow(); + $this->assertProtobufEquals($dataTableRow, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateDataTableRowExceptionTest() + { + $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 + $dataTableRow = new DataTableRow(); + $dataTableRowValues = []; + $dataTableRow->setValues($dataTableRowValues); + $request = (new UpdateDataTableRowRequest()) + ->setDataTableRow($dataTableRow); + try { + $gapicClient->updateDataTableRow($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 bulkCreateDataTableRowsAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BulkCreateDataTableRowsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->dataTableName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_TABLE]'); + $requests = []; + $request = (new BulkCreateDataTableRowsRequest()) + ->setParent($formattedParent) + ->setRequests($requests); + $response = $gapicClient->bulkCreateDataTableRowsAsync($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.chronicle.v1.DataTableService/BulkCreateDataTableRows', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getRequests(); + $this->assertProtobufEquals($requests, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Chronicle/v1/tests/Unit/V1/Client/EntityServiceClientTest.php b/owl-bot-staging/Chronicle/v1/tests/Unit/V1/Client/EntityServiceClientTest.php new file mode 100644 index 000000000000..ae91a174beb0 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/tests/Unit/V1/Client/EntityServiceClientTest.php @@ -0,0 +1,477 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return EntityServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new EntityServiceClient($options); + } + + /** @test */ + public function createWatchlistTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $multiplyingFactor = 1981784; + $expectedResponse = new Watchlist(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setMultiplyingFactor($multiplyingFactor); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $watchlist = new Watchlist(); + $watchlistDisplayName = 'watchlistDisplayName2018509376'; + $watchlist->setDisplayName($watchlistDisplayName); + $watchlistEntityPopulationMechanism = new EntityPopulationMechanism(); + $watchlist->setEntityPopulationMechanism($watchlistEntityPopulationMechanism); + $request = (new CreateWatchlistRequest()) + ->setParent($formattedParent) + ->setWatchlist($watchlist); + $response = $gapicClient->createWatchlist($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.chronicle.v1.EntityService/CreateWatchlist', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getWatchlist(); + $this->assertProtobufEquals($watchlist, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createWatchlistExceptionTest() + { + $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $watchlist = new Watchlist(); + $watchlistDisplayName = 'watchlistDisplayName2018509376'; + $watchlist->setDisplayName($watchlistDisplayName); + $watchlistEntityPopulationMechanism = new EntityPopulationMechanism(); + $watchlist->setEntityPopulationMechanism($watchlistEntityPopulationMechanism); + $request = (new CreateWatchlistRequest()) + ->setParent($formattedParent) + ->setWatchlist($watchlist); + try { + $gapicClient->createWatchlist($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 deleteWatchlistTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->watchlistName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[WATCHLIST]'); + $request = (new DeleteWatchlistRequest()) + ->setName($formattedName); + $gapicClient->deleteWatchlist($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.chronicle.v1.EntityService/DeleteWatchlist', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteWatchlistExceptionTest() + { + $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->watchlistName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[WATCHLIST]'); + $request = (new DeleteWatchlistRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteWatchlist($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 getWatchlistTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $multiplyingFactor = 1981784; + $expectedResponse = new Watchlist(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setMultiplyingFactor($multiplyingFactor); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->watchlistName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[WATCHLIST]'); + $request = (new GetWatchlistRequest()) + ->setName($formattedName); + $response = $gapicClient->getWatchlist($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.chronicle.v1.EntityService/GetWatchlist', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getWatchlistExceptionTest() + { + $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->watchlistName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[WATCHLIST]'); + $request = (new GetWatchlistRequest()) + ->setName($formattedName); + try { + $gapicClient->getWatchlist($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 listWatchlistsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $watchlistsElement = new Watchlist(); + $watchlists = [ + $watchlistsElement, + ]; + $expectedResponse = new ListWatchlistsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setWatchlists($watchlists); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new ListWatchlistsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listWatchlists($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getWatchlists()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.chronicle.v1.EntityService/ListWatchlists', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listWatchlistsExceptionTest() + { + $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new ListWatchlistsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listWatchlists($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 updateWatchlistTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $multiplyingFactor = 1981784; + $expectedResponse = new Watchlist(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setMultiplyingFactor($multiplyingFactor); + $transport->addResponse($expectedResponse); + // Mock request + $watchlist = new Watchlist(); + $watchlistDisplayName = 'watchlistDisplayName2018509376'; + $watchlist->setDisplayName($watchlistDisplayName); + $watchlistEntityPopulationMechanism = new EntityPopulationMechanism(); + $watchlist->setEntityPopulationMechanism($watchlistEntityPopulationMechanism); + $request = (new UpdateWatchlistRequest()) + ->setWatchlist($watchlist); + $response = $gapicClient->updateWatchlist($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.chronicle.v1.EntityService/UpdateWatchlist', $actualFuncCall); + $actualValue = $actualRequestObject->getWatchlist(); + $this->assertProtobufEquals($watchlist, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateWatchlistExceptionTest() + { + $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 + $watchlist = new Watchlist(); + $watchlistDisplayName = 'watchlistDisplayName2018509376'; + $watchlist->setDisplayName($watchlistDisplayName); + $watchlistEntityPopulationMechanism = new EntityPopulationMechanism(); + $watchlist->setEntityPopulationMechanism($watchlistEntityPopulationMechanism); + $request = (new UpdateWatchlistRequest()) + ->setWatchlist($watchlist); + try { + $gapicClient->updateWatchlist($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 createWatchlistAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $multiplyingFactor = 1981784; + $expectedResponse = new Watchlist(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setMultiplyingFactor($multiplyingFactor); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $watchlist = new Watchlist(); + $watchlistDisplayName = 'watchlistDisplayName2018509376'; + $watchlist->setDisplayName($watchlistDisplayName); + $watchlistEntityPopulationMechanism = new EntityPopulationMechanism(); + $watchlist->setEntityPopulationMechanism($watchlistEntityPopulationMechanism); + $request = (new CreateWatchlistRequest()) + ->setParent($formattedParent) + ->setWatchlist($watchlist); + $response = $gapicClient->createWatchlistAsync($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.chronicle.v1.EntityService/CreateWatchlist', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getWatchlist(); + $this->assertProtobufEquals($watchlist, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Chronicle/v1/tests/Unit/V1/Client/InstanceServiceClientTest.php b/owl-bot-staging/Chronicle/v1/tests/Unit/V1/Client/InstanceServiceClientTest.php new file mode 100644 index 000000000000..24e45ff2e5ba --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/tests/Unit/V1/Client/InstanceServiceClientTest.php @@ -0,0 +1,155 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return InstanceServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new InstanceServiceClient($options); + } + + /** @test */ + public function getInstanceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new Instance(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new GetInstanceRequest()) + ->setName($formattedName); + $response = $gapicClient->getInstance($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.chronicle.v1.InstanceService/GetInstance', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getInstanceExceptionTest() + { + $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new GetInstanceRequest()) + ->setName($formattedName); + try { + $gapicClient->getInstance($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 getInstanceAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new Instance(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new GetInstanceRequest()) + ->setName($formattedName); + $response = $gapicClient->getInstanceAsync($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.chronicle.v1.InstanceService/GetInstance', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Chronicle/v1/tests/Unit/V1/Client/ReferenceListServiceClientTest.php b/owl-bot-staging/Chronicle/v1/tests/Unit/V1/Client/ReferenceListServiceClientTest.php new file mode 100644 index 000000000000..42584fb06abd --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/tests/Unit/V1/Client/ReferenceListServiceClientTest.php @@ -0,0 +1,434 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return ReferenceListServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ReferenceListServiceClient($options); + } + + /** @test */ + public function createReferenceListTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $ruleAssociationsCount = 1522562875; + $expectedResponse = new ReferenceList(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setRuleAssociationsCount($ruleAssociationsCount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $referenceList = new ReferenceList(); + $referenceListDescription = 'referenceListDescription-265280077'; + $referenceList->setDescription($referenceListDescription); + $referenceListEntries = []; + $referenceList->setEntries($referenceListEntries); + $referenceListSyntaxType = ReferenceListSyntaxType::REFERENCE_LIST_SYNTAX_TYPE_UNSPECIFIED; + $referenceList->setSyntaxType($referenceListSyntaxType); + $referenceListId = 'referenceListId-1667170456'; + $request = (new CreateReferenceListRequest()) + ->setParent($formattedParent) + ->setReferenceList($referenceList) + ->setReferenceListId($referenceListId); + $response = $gapicClient->createReferenceList($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.chronicle.v1.ReferenceListService/CreateReferenceList', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getReferenceList(); + $this->assertProtobufEquals($referenceList, $actualValue); + $actualValue = $actualRequestObject->getReferenceListId(); + $this->assertProtobufEquals($referenceListId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createReferenceListExceptionTest() + { + $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $referenceList = new ReferenceList(); + $referenceListDescription = 'referenceListDescription-265280077'; + $referenceList->setDescription($referenceListDescription); + $referenceListEntries = []; + $referenceList->setEntries($referenceListEntries); + $referenceListSyntaxType = ReferenceListSyntaxType::REFERENCE_LIST_SYNTAX_TYPE_UNSPECIFIED; + $referenceList->setSyntaxType($referenceListSyntaxType); + $referenceListId = 'referenceListId-1667170456'; + $request = (new CreateReferenceListRequest()) + ->setParent($formattedParent) + ->setReferenceList($referenceList) + ->setReferenceListId($referenceListId); + try { + $gapicClient->createReferenceList($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 getReferenceListTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $ruleAssociationsCount = 1522562875; + $expectedResponse = new ReferenceList(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setRuleAssociationsCount($ruleAssociationsCount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->referenceListName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[REFERENCE_LIST]'); + $request = (new GetReferenceListRequest()) + ->setName($formattedName); + $response = $gapicClient->getReferenceList($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.chronicle.v1.ReferenceListService/GetReferenceList', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getReferenceListExceptionTest() + { + $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->referenceListName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[REFERENCE_LIST]'); + $request = (new GetReferenceListRequest()) + ->setName($formattedName); + try { + $gapicClient->getReferenceList($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 listReferenceListsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $referenceListsElement = new ReferenceList(); + $referenceLists = [ + $referenceListsElement, + ]; + $expectedResponse = new ListReferenceListsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setReferenceLists($referenceLists); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new ListReferenceListsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listReferenceLists($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getReferenceLists()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.chronicle.v1.ReferenceListService/ListReferenceLists', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listReferenceListsExceptionTest() + { + $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new ListReferenceListsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listReferenceLists($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 updateReferenceListTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $ruleAssociationsCount = 1522562875; + $expectedResponse = new ReferenceList(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setRuleAssociationsCount($ruleAssociationsCount); + $transport->addResponse($expectedResponse); + // Mock request + $referenceList = new ReferenceList(); + $referenceListDescription = 'referenceListDescription-265280077'; + $referenceList->setDescription($referenceListDescription); + $referenceListEntries = []; + $referenceList->setEntries($referenceListEntries); + $referenceListSyntaxType = ReferenceListSyntaxType::REFERENCE_LIST_SYNTAX_TYPE_UNSPECIFIED; + $referenceList->setSyntaxType($referenceListSyntaxType); + $request = (new UpdateReferenceListRequest()) + ->setReferenceList($referenceList); + $response = $gapicClient->updateReferenceList($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.chronicle.v1.ReferenceListService/UpdateReferenceList', $actualFuncCall); + $actualValue = $actualRequestObject->getReferenceList(); + $this->assertProtobufEquals($referenceList, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateReferenceListExceptionTest() + { + $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 + $referenceList = new ReferenceList(); + $referenceListDescription = 'referenceListDescription-265280077'; + $referenceList->setDescription($referenceListDescription); + $referenceListEntries = []; + $referenceList->setEntries($referenceListEntries); + $referenceListSyntaxType = ReferenceListSyntaxType::REFERENCE_LIST_SYNTAX_TYPE_UNSPECIFIED; + $referenceList->setSyntaxType($referenceListSyntaxType); + $request = (new UpdateReferenceListRequest()) + ->setReferenceList($referenceList); + try { + $gapicClient->updateReferenceList($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 createReferenceListAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $ruleAssociationsCount = 1522562875; + $expectedResponse = new ReferenceList(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setRuleAssociationsCount($ruleAssociationsCount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $referenceList = new ReferenceList(); + $referenceListDescription = 'referenceListDescription-265280077'; + $referenceList->setDescription($referenceListDescription); + $referenceListEntries = []; + $referenceList->setEntries($referenceListEntries); + $referenceListSyntaxType = ReferenceListSyntaxType::REFERENCE_LIST_SYNTAX_TYPE_UNSPECIFIED; + $referenceList->setSyntaxType($referenceListSyntaxType); + $referenceListId = 'referenceListId-1667170456'; + $request = (new CreateReferenceListRequest()) + ->setParent($formattedParent) + ->setReferenceList($referenceList) + ->setReferenceListId($referenceListId); + $response = $gapicClient->createReferenceListAsync($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.chronicle.v1.ReferenceListService/CreateReferenceList', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getReferenceList(); + $this->assertProtobufEquals($referenceList, $actualValue); + $actualValue = $actualRequestObject->getReferenceListId(); + $this->assertProtobufEquals($referenceListId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Chronicle/v1/tests/Unit/V1/Client/RuleServiceClientTest.php b/owl-bot-staging/Chronicle/v1/tests/Unit/V1/Client/RuleServiceClientTest.php new file mode 100644 index 000000000000..157ee8fd1f14 --- /dev/null +++ b/owl-bot-staging/Chronicle/v1/tests/Unit/V1/Client/RuleServiceClientTest.php @@ -0,0 +1,1100 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return RuleServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new RuleServiceClient($options); + } + + /** @test */ + public function createRetrohuntTest() + { + $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/createRetrohuntTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $progressPercentage = 4432484; + $expectedResponse = new Retrohunt(); + $expectedResponse->setName($name); + $expectedResponse->setProgressPercentage($progressPercentage); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createRetrohuntTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->ruleName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[RULE]'); + $retrohunt = new Retrohunt(); + $retrohuntProcessInterval = new Interval(); + $retrohunt->setProcessInterval($retrohuntProcessInterval); + $request = (new CreateRetrohuntRequest()) + ->setParent($formattedParent) + ->setRetrohunt($retrohunt); + $response = $gapicClient->createRetrohunt($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.chronicle.v1.RuleService/CreateRetrohunt', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getRetrohunt(); + $this->assertProtobufEquals($retrohunt, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createRetrohuntTest'); + $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 createRetrohuntExceptionTest() + { + $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/createRetrohuntTest'); + $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->ruleName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[RULE]'); + $retrohunt = new Retrohunt(); + $retrohuntProcessInterval = new Interval(); + $retrohunt->setProcessInterval($retrohuntProcessInterval); + $request = (new CreateRetrohuntRequest()) + ->setParent($formattedParent) + ->setRetrohunt($retrohunt); + $response = $gapicClient->createRetrohunt($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createRetrohuntTest'); + 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 createRuleTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $revisionId = 'revisionId513861631'; + $displayName = 'displayName1615086568'; + $text = 'text3556653'; + $author = 'author-1406328437'; + $etag = 'etag3123477'; + $scope = 'scope109264468'; + $nearRealTimeLiveRuleEligible = false; + $expectedResponse = new Rule(); + $expectedResponse->setName($name); + $expectedResponse->setRevisionId($revisionId); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setText($text); + $expectedResponse->setAuthor($author); + $expectedResponse->setEtag($etag); + $expectedResponse->setScope($scope); + $expectedResponse->setNearRealTimeLiveRuleEligible($nearRealTimeLiveRuleEligible); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $rule = new Rule(); + $request = (new CreateRuleRequest()) + ->setParent($formattedParent) + ->setRule($rule); + $response = $gapicClient->createRule($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.chronicle.v1.RuleService/CreateRule', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getRule(); + $this->assertProtobufEquals($rule, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createRuleExceptionTest() + { + $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $rule = new Rule(); + $request = (new CreateRuleRequest()) + ->setParent($formattedParent) + ->setRule($rule); + try { + $gapicClient->createRule($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 deleteRuleTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->ruleName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[RULE]'); + $request = (new DeleteRuleRequest()) + ->setName($formattedName); + $gapicClient->deleteRule($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.chronicle.v1.RuleService/DeleteRule', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteRuleExceptionTest() + { + $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->ruleName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[RULE]'); + $request = (new DeleteRuleRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteRule($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 getRetrohuntTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $progressPercentage = 4432484; + $expectedResponse = new Retrohunt(); + $expectedResponse->setName($name2); + $expectedResponse->setProgressPercentage($progressPercentage); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->retrohuntName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[RULE]', '[RETROHUNT]'); + $request = (new GetRetrohuntRequest()) + ->setName($formattedName); + $response = $gapicClient->getRetrohunt($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.chronicle.v1.RuleService/GetRetrohunt', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getRetrohuntExceptionTest() + { + $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->retrohuntName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[RULE]', '[RETROHUNT]'); + $request = (new GetRetrohuntRequest()) + ->setName($formattedName); + try { + $gapicClient->getRetrohunt($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 getRuleTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $revisionId = 'revisionId513861631'; + $displayName = 'displayName1615086568'; + $text = 'text3556653'; + $author = 'author-1406328437'; + $etag = 'etag3123477'; + $scope = 'scope109264468'; + $nearRealTimeLiveRuleEligible = false; + $expectedResponse = new Rule(); + $expectedResponse->setName($name2); + $expectedResponse->setRevisionId($revisionId); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setText($text); + $expectedResponse->setAuthor($author); + $expectedResponse->setEtag($etag); + $expectedResponse->setScope($scope); + $expectedResponse->setNearRealTimeLiveRuleEligible($nearRealTimeLiveRuleEligible); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->ruleName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[RULE]'); + $request = (new GetRuleRequest()) + ->setName($formattedName); + $response = $gapicClient->getRule($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.chronicle.v1.RuleService/GetRule', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getRuleExceptionTest() + { + $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->ruleName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[RULE]'); + $request = (new GetRuleRequest()) + ->setName($formattedName); + try { + $gapicClient->getRule($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 getRuleDeploymentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $enabled = false; + $alerting = true; + $archived = true; + $expectedResponse = new RuleDeployment(); + $expectedResponse->setName($name2); + $expectedResponse->setEnabled($enabled); + $expectedResponse->setAlerting($alerting); + $expectedResponse->setArchived($archived); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->ruleDeploymentName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[RULE]'); + $request = (new GetRuleDeploymentRequest()) + ->setName($formattedName); + $response = $gapicClient->getRuleDeployment($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.chronicle.v1.RuleService/GetRuleDeployment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getRuleDeploymentExceptionTest() + { + $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->ruleDeploymentName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[RULE]'); + $request = (new GetRuleDeploymentRequest()) + ->setName($formattedName); + try { + $gapicClient->getRuleDeployment($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 listRetrohuntsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $retrohuntsElement = new Retrohunt(); + $retrohunts = [ + $retrohuntsElement, + ]; + $expectedResponse = new ListRetrohuntsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setRetrohunts($retrohunts); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->ruleName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[RULE]'); + $request = (new ListRetrohuntsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listRetrohunts($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getRetrohunts()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.chronicle.v1.RuleService/ListRetrohunts', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listRetrohuntsExceptionTest() + { + $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->ruleName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[RULE]'); + $request = (new ListRetrohuntsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listRetrohunts($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 listRuleDeploymentsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $ruleDeploymentsElement = new RuleDeployment(); + $ruleDeployments = [ + $ruleDeploymentsElement, + ]; + $expectedResponse = new ListRuleDeploymentsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setRuleDeployments($ruleDeployments); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->ruleName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[RULE]'); + $request = (new ListRuleDeploymentsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listRuleDeployments($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getRuleDeployments()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.chronicle.v1.RuleService/ListRuleDeployments', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listRuleDeploymentsExceptionTest() + { + $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->ruleName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[RULE]'); + $request = (new ListRuleDeploymentsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listRuleDeployments($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 listRuleRevisionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $rulesElement = new Rule(); + $rules = [ + $rulesElement, + ]; + $expectedResponse = new ListRuleRevisionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setRules($rules); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->ruleName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[RULE]'); + $request = (new ListRuleRevisionsRequest()) + ->setName($formattedName); + $response = $gapicClient->listRuleRevisions($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getRules()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.chronicle.v1.RuleService/ListRuleRevisions', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listRuleRevisionsExceptionTest() + { + $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->ruleName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[RULE]'); + $request = (new ListRuleRevisionsRequest()) + ->setName($formattedName); + try { + $gapicClient->listRuleRevisions($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 listRulesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $rulesElement = new Rule(); + $rules = [ + $rulesElement, + ]; + $expectedResponse = new ListRulesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setRules($rules); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new ListRulesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listRules($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getRules()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.chronicle.v1.RuleService/ListRules', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listRulesExceptionTest() + { + $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new ListRulesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listRules($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 updateRuleTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $revisionId = 'revisionId513861631'; + $displayName = 'displayName1615086568'; + $text = 'text3556653'; + $author = 'author-1406328437'; + $etag = 'etag3123477'; + $scope = 'scope109264468'; + $nearRealTimeLiveRuleEligible = false; + $expectedResponse = new Rule(); + $expectedResponse->setName($name); + $expectedResponse->setRevisionId($revisionId); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setText($text); + $expectedResponse->setAuthor($author); + $expectedResponse->setEtag($etag); + $expectedResponse->setScope($scope); + $expectedResponse->setNearRealTimeLiveRuleEligible($nearRealTimeLiveRuleEligible); + $transport->addResponse($expectedResponse); + // Mock request + $rule = new Rule(); + $request = (new UpdateRuleRequest()) + ->setRule($rule); + $response = $gapicClient->updateRule($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.chronicle.v1.RuleService/UpdateRule', $actualFuncCall); + $actualValue = $actualRequestObject->getRule(); + $this->assertProtobufEquals($rule, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateRuleExceptionTest() + { + $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 + $rule = new Rule(); + $request = (new UpdateRuleRequest()) + ->setRule($rule); + try { + $gapicClient->updateRule($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 updateRuleDeploymentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $enabled = false; + $alerting = true; + $archived = true; + $expectedResponse = new RuleDeployment(); + $expectedResponse->setName($name); + $expectedResponse->setEnabled($enabled); + $expectedResponse->setAlerting($alerting); + $expectedResponse->setArchived($archived); + $transport->addResponse($expectedResponse); + // Mock request + $ruleDeployment = new RuleDeployment(); + $ruleDeploymentName = 'ruleDeploymentName648362252'; + $ruleDeployment->setName($ruleDeploymentName); + $updateMask = new FieldMask(); + $request = (new UpdateRuleDeploymentRequest()) + ->setRuleDeployment($ruleDeployment) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateRuleDeployment($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.chronicle.v1.RuleService/UpdateRuleDeployment', $actualFuncCall); + $actualValue = $actualRequestObject->getRuleDeployment(); + $this->assertProtobufEquals($ruleDeployment, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateRuleDeploymentExceptionTest() + { + $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 + $ruleDeployment = new RuleDeployment(); + $ruleDeploymentName = 'ruleDeploymentName648362252'; + $ruleDeployment->setName($ruleDeploymentName); + $updateMask = new FieldMask(); + $request = (new UpdateRuleDeploymentRequest()) + ->setRuleDeployment($ruleDeployment) + ->setUpdateMask($updateMask); + try { + $gapicClient->updateRuleDeployment($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 createRetrohuntAsyncTest() + { + $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/createRetrohuntTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $progressPercentage = 4432484; + $expectedResponse = new Retrohunt(); + $expectedResponse->setName($name); + $expectedResponse->setProgressPercentage($progressPercentage); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createRetrohuntTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->ruleName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[RULE]'); + $retrohunt = new Retrohunt(); + $retrohuntProcessInterval = new Interval(); + $retrohunt->setProcessInterval($retrohuntProcessInterval); + $request = (new CreateRetrohuntRequest()) + ->setParent($formattedParent) + ->setRetrohunt($retrohunt); + $response = $gapicClient->createRetrohuntAsync($request)->wait(); + $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.chronicle.v1.RuleService/CreateRetrohunt', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getRetrohunt(); + $this->assertProtobufEquals($retrohunt, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createRetrohuntTest'); + $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()); + } +} From 9e1aeb87d130ddca3498eb59645ab441f0ca59b4 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Mon, 13 Apr 2026 08:13:27 +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 --- .../metadata}/V1/DataTable.php | 0 .../bulk_create_data_table_rows.php | 0 .../bulk_get_data_table_rows.php | 0 .../bulk_replace_data_table_rows.php | 0 .../bulk_update_data_table_rows.php | 0 .../create_data_table.php | 0 .../create_data_table_row.php | 0 .../delete_data_table.php | 0 .../delete_data_table_row.php | 0 .../DataTableServiceClient/get_data_table.php | 0 .../get_data_table_operation_errors.php | 0 .../get_data_table_row.php | 0 .../list_data_table_rows.php | 0 .../list_data_tables.php | 0 .../update_data_table.php | 0 .../update_data_table_row.php | 0 .../V1/BulkCreateDataTableRowsRequest.php | 0 .../V1/BulkCreateDataTableRowsResponse.php | 0 .../src}/V1/BulkGetDataTableRowsRequest.php | 0 .../src}/V1/BulkGetDataTableRowsResponse.php | 0 .../V1/BulkReplaceDataTableRowsRequest.php | 0 .../V1/BulkReplaceDataTableRowsResponse.php | 0 .../V1/BulkUpdateDataTableRowsRequest.php | 0 .../V1/BulkUpdateDataTableRowsResponse.php | 0 .../src/V1/Client/DataTableServiceClient.php | 55 +- .../src}/V1/CreateDataTableRequest.php | 0 .../src}/V1/CreateDataTableRowRequest.php | 0 .../src}/V1/DataTable.php | 0 .../src}/V1/DataTableColumnInfo.php | 0 .../DataTableColumnType.php | 0 .../src}/V1/DataTableOperationErrors.php | 0 .../src}/V1/DataTableRow.php | 0 .../src}/V1/DataTableScopeInfo.php | 0 .../src}/V1/DataTableUpdateSource.php | 0 .../src}/V1/DeleteDataTableRequest.php | 0 .../src}/V1/DeleteDataTableRowRequest.php | 0 .../V1/GetDataTableOperationErrorsRequest.php | 0 .../src}/V1/GetDataTableRequest.php | 0 .../src}/V1/GetDataTableRowRequest.php | 0 .../src}/V1/ListDataTableRowsRequest.php | 0 .../src}/V1/ListDataTableRowsResponse.php | 0 .../src}/V1/ListDataTablesRequest.php | 0 .../src}/V1/ListDataTablesResponse.php | 0 .../src}/V1/UpdateDataTableRequest.php | 0 .../src}/V1/UpdateDataTableRowRequest.php | 0 Chronicle/src/V1/gapic_metadata.json | 84 ++ .../data_table_service_client_config.json | 0 .../data_table_service_descriptor_config.php | 0 .../data_table_service_rest_client_config.php | 0 .../V1/Client/DataTableServiceClientTest.php | 381 +++--- .../Cloud/Chronicle/V1/DataAccessControl.php | 31 - .../Google/Cloud/Chronicle/V1/Entity.php | 31 - .../Google/Cloud/Chronicle/V1/Instance.php | 28 - .../Cloud/Chronicle/V1/ReferenceList.php | 30 - .../Google/Cloud/Chronicle/V1/Rule.php | 33 - .../Chronicle/V1/CompilationDiagnostic.php | 193 --- .../V1/CompilationDiagnostic/Severity.php | 61 - .../Chronicle/V1/CompilationPosition.php | 170 --- .../V1/CreateDataAccessLabelRequest.php | 183 --- .../V1/CreateDataAccessScopeRequest.php | 178 --- .../V1/CreateReferenceListRequest.php | 193 --- .../Chronicle/V1/CreateRetrohuntRequest.php | 137 -- .../Cloud/Chronicle/V1/CreateRuleRequest.php | 132 -- .../Chronicle/V1/CreateWatchlistRequest.php | 184 --- .../Cloud/Chronicle/V1/DataAccessLabel.php | 337 ----- .../Chronicle/V1/DataAccessLabelReference.php | 227 ---- .../Cloud/Chronicle/V1/DataAccessScope.php | 470 ------- .../V1/DeleteDataAccessLabelRequest.php | 91 -- .../V1/DeleteDataAccessScopeRequest.php | 91 -- .../Cloud/Chronicle/V1/DeleteRuleRequest.php | 151 --- .../Chronicle/V1/DeleteWatchlistRequest.php | 137 -- .../V1/GetDataAccessLabelRequest.php | 91 -- .../V1/GetDataAccessScopeRequest.php | 91 -- .../Cloud/Chronicle/V1/GetInstanceRequest.php | 91 -- .../Chronicle/V1/GetReferenceListRequest.php | 129 -- .../Chronicle/V1/GetRetrohuntRequest.php | 91 -- .../Chronicle/V1/GetRuleDeploymentRequest.php | 91 -- .../Cloud/Chronicle/V1/GetRuleRequest.php | 129 -- .../Chronicle/V1/GetWatchlistRequest.php | 96 -- .../Cloud/Chronicle/V1/IngestionLabel.php | 109 -- .../Google/Cloud/Chronicle/V1/InputsUsed.php | 137 -- .../Google/Cloud/Chronicle/V1/Instance.php | 71 -- .../V1/ListDataAccessLabelsRequest.php | 220 ---- .../V1/ListDataAccessLabelsResponse.php | 105 -- .../V1/ListDataAccessScopesRequest.php | 220 ---- .../V1/ListDataAccessScopesResponse.php | 149 --- .../V1/ListReferenceListsRequest.php | 221 ---- .../V1/ListReferenceListsResponse.php | 109 -- .../Chronicle/V1/ListRetrohuntsRequest.php | 225 ---- .../Chronicle/V1/ListRetrohuntsResponse.php | 105 -- .../V1/ListRuleDeploymentsRequest.php | 230 ---- .../V1/ListRuleDeploymentsResponse.php | 105 -- .../Chronicle/V1/ListRuleRevisionsRequest.php | 221 ---- .../V1/ListRuleRevisionsResponse.php | 105 -- .../Cloud/Chronicle/V1/ListRulesRequest.php | 263 ---- .../Cloud/Chronicle/V1/ListRulesResponse.php | 105 -- .../Chronicle/V1/ListWatchlistsRequest.php | 232 ---- .../Chronicle/V1/ListWatchlistsResponse.php | 105 -- .../Cloud/Chronicle/V1/ReferenceList.php | 409 ------ .../Cloud/Chronicle/V1/ReferenceListEntry.php | 67 - .../Cloud/Chronicle/V1/ReferenceListScope.php | 75 -- .../Chronicle/V1/ReferenceListSyntaxType.php | 68 - .../Cloud/Chronicle/V1/ReferenceListView.php | 67 - .../Google/Cloud/Chronicle/V1/Retrohunt.php | 255 ---- .../Cloud/Chronicle/V1/Retrohunt/State.php | 75 -- .../Cloud/Chronicle/V1/RetrohuntMetadata.php | 157 --- .../src/Google/Cloud/Chronicle/V1/Rule.php | 810 ------------ .../Chronicle/V1/Rule/CompilationState.php | 63 - .../Cloud/Chronicle/V1/RuleDeployment.php | 477 ------- .../V1/RuleDeployment/ExecutionState.php | 72 -- .../Google/Cloud/Chronicle/V1/RuleType.php | 62 - .../Google/Cloud/Chronicle/V1/RuleView.php | 77 -- .../Cloud/Chronicle/V1/RunFrequency.php | 69 -- .../Google/Cloud/Chronicle/V1/ScopeInfo.php | 81 -- .../Google/Cloud/Chronicle/V1/Severity.php | 71 -- .../V1/UpdateDataAccessLabelRequest.php | 167 --- .../V1/UpdateDataAccessScopeRequest.php | 172 --- .../V1/UpdateReferenceListRequest.php | 167 --- .../V1/UpdateRuleDeploymentRequest.php | 152 --- .../Cloud/Chronicle/V1/UpdateRuleRequest.php | 157 --- .../Chronicle/V1/UpdateWatchlistRequest.php | 152 --- .../Google/Cloud/Chronicle/V1/Watchlist.php | 414 ------- .../Chronicle/V1/Watchlist/EntityCount.php | 101 -- .../Watchlist/EntityPopulationMechanism.php | 75 -- .../EntityPopulationMechanism/Manual.php | 33 - .../Chronicle/V1/WatchlistUserPreferences.php | 67 - .../create_data_access_label.php | 89 -- .../create_data_access_scope.php | 105 -- .../delete_data_access_label.php | 78 -- .../delete_data_access_scope.php | 76 -- .../get_data_access_label.php | 78 -- .../get_data_access_scope.php | 78 -- .../list_data_access_labels.php | 81 -- .../list_data_access_scopes.php | 81 -- .../update_data_access_label.php | 59 - .../update_data_access_scope.php | 79 -- .../EntityServiceClient/create_watchlist.php | 83 -- .../EntityServiceClient/delete_watchlist.php | 76 -- .../V1/EntityServiceClient/get_watchlist.php | 79 -- .../EntityServiceClient/list_watchlists.php | 77 -- .../EntityServiceClient/update_watchlist.php | 77 -- .../V1/InstanceServiceClient/get_instance.php | 73 -- .../create_reference_list.php | 111 -- .../get_reference_list.php | 78 -- .../list_reference_lists.php | 82 -- .../update_reference_list.php | 90 -- .../V1/RuleServiceClient/create_retrohunt.php | 90 -- .../V1/RuleServiceClient/create_rule.php | 74 -- .../V1/RuleServiceClient/delete_rule.php | 73 -- .../V1/RuleServiceClient/get_retrohunt.php | 79 -- .../samples/V1/RuleServiceClient/get_rule.php | 73 -- .../RuleServiceClient/get_rule_deployment.php | 78 -- .../V1/RuleServiceClient/list_retrohunts.php | 78 -- .../list_rule_deployments.php | 79 -- .../RuleServiceClient/list_rule_revisions.php | 78 -- .../V1/RuleServiceClient/list_rules.php | 78 -- .../V1/RuleServiceClient/update_rule.php | 59 - .../update_rule_deployment.php | 83 -- .../Client/DataAccessControlServiceClient.php | 572 --------- .../v1/src/V1/Client/EntityServiceClient.php | 389 ------ .../src/V1/Client/InstanceServiceClient.php | 255 ---- .../V1/Client/ReferenceListServiceClient.php | 366 ------ .../v1/src/V1/Client/RuleServiceClient.php | 733 ----------- .../Chronicle/v1/src/V1/gapic_metadata.json | 298 ----- ..._access_control_service_client_config.json | 94 -- ...cess_control_service_descriptor_config.php | 171 --- ...ess_control_service_rest_client_config.php | 198 --- .../entity_service_client_config.json | 69 -- .../entity_service_descriptor_config.php | 101 -- .../entity_service_rest_client_config.php | 134 -- .../instance_service_client_config.json | 39 - .../instance_service_descriptor_config.php | 43 - .../instance_service_rest_client_config.php | 87 -- .../reference_list_service_client_config.json | 64 - ...ference_list_service_descriptor_config.php | 89 -- ...erence_list_service_rest_client_config.php | 126 -- .../resources/rule_service_client_config.json | 126 -- .../rule_service_descriptor_config.php | 221 ---- .../rule_service_rest_client_config.php | 217 ---- .../DataAccessControlServiceClientTest.php | 866 ------------- .../V1/Client/EntityServiceClientTest.php | 477 ------- .../V1/Client/InstanceServiceClientTest.php | 155 --- .../Client/ReferenceListServiceClientTest.php | 434 ------- .../Unit/V1/Client/RuleServiceClientTest.php | 1100 ----------------- 184 files changed, 332 insertions(+), 21710 deletions(-) rename {owl-bot-staging/Chronicle/v1/proto/src/GPBMetadata/Google/Cloud/Chronicle => Chronicle/metadata}/V1/DataTable.php (100%) rename {owl-bot-staging/Chronicle/v1 => Chronicle}/samples/V1/DataTableServiceClient/bulk_create_data_table_rows.php (100%) rename {owl-bot-staging/Chronicle/v1 => Chronicle}/samples/V1/DataTableServiceClient/bulk_get_data_table_rows.php (100%) rename {owl-bot-staging/Chronicle/v1 => Chronicle}/samples/V1/DataTableServiceClient/bulk_replace_data_table_rows.php (100%) rename {owl-bot-staging/Chronicle/v1 => Chronicle}/samples/V1/DataTableServiceClient/bulk_update_data_table_rows.php (100%) rename {owl-bot-staging/Chronicle/v1 => Chronicle}/samples/V1/DataTableServiceClient/create_data_table.php (100%) rename {owl-bot-staging/Chronicle/v1 => Chronicle}/samples/V1/DataTableServiceClient/create_data_table_row.php (100%) rename {owl-bot-staging/Chronicle/v1 => Chronicle}/samples/V1/DataTableServiceClient/delete_data_table.php (100%) rename {owl-bot-staging/Chronicle/v1 => Chronicle}/samples/V1/DataTableServiceClient/delete_data_table_row.php (100%) rename {owl-bot-staging/Chronicle/v1 => Chronicle}/samples/V1/DataTableServiceClient/get_data_table.php (100%) rename {owl-bot-staging/Chronicle/v1 => Chronicle}/samples/V1/DataTableServiceClient/get_data_table_operation_errors.php (100%) rename {owl-bot-staging/Chronicle/v1 => Chronicle}/samples/V1/DataTableServiceClient/get_data_table_row.php (100%) rename {owl-bot-staging/Chronicle/v1 => Chronicle}/samples/V1/DataTableServiceClient/list_data_table_rows.php (100%) rename {owl-bot-staging/Chronicle/v1 => Chronicle}/samples/V1/DataTableServiceClient/list_data_tables.php (100%) rename {owl-bot-staging/Chronicle/v1 => Chronicle}/samples/V1/DataTableServiceClient/update_data_table.php (100%) rename {owl-bot-staging/Chronicle/v1 => Chronicle}/samples/V1/DataTableServiceClient/update_data_table_row.php (100%) rename {owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle => Chronicle/src}/V1/BulkCreateDataTableRowsRequest.php (100%) rename {owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle => Chronicle/src}/V1/BulkCreateDataTableRowsResponse.php (100%) rename {owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle => Chronicle/src}/V1/BulkGetDataTableRowsRequest.php (100%) rename {owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle => Chronicle/src}/V1/BulkGetDataTableRowsResponse.php (100%) rename {owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle => Chronicle/src}/V1/BulkReplaceDataTableRowsRequest.php (100%) rename {owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle => Chronicle/src}/V1/BulkReplaceDataTableRowsResponse.php (100%) rename {owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle => Chronicle/src}/V1/BulkUpdateDataTableRowsRequest.php (100%) rename {owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle => Chronicle/src}/V1/BulkUpdateDataTableRowsResponse.php (100%) rename {owl-bot-staging/Chronicle/v1 => Chronicle}/src/V1/Client/DataTableServiceClient.php (95%) rename {owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle => Chronicle/src}/V1/CreateDataTableRequest.php (100%) rename {owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle => Chronicle/src}/V1/CreateDataTableRowRequest.php (100%) rename {owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle => Chronicle/src}/V1/DataTable.php (100%) rename {owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle => Chronicle/src}/V1/DataTableColumnInfo.php (100%) rename {owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle => Chronicle/src}/V1/DataTableColumnInfo/DataTableColumnType.php (100%) rename {owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle => Chronicle/src}/V1/DataTableOperationErrors.php (100%) rename {owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle => Chronicle/src}/V1/DataTableRow.php (100%) rename {owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle => Chronicle/src}/V1/DataTableScopeInfo.php (100%) rename {owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle => Chronicle/src}/V1/DataTableUpdateSource.php (100%) rename {owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle => Chronicle/src}/V1/DeleteDataTableRequest.php (100%) rename {owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle => Chronicle/src}/V1/DeleteDataTableRowRequest.php (100%) rename {owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle => Chronicle/src}/V1/GetDataTableOperationErrorsRequest.php (100%) rename {owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle => Chronicle/src}/V1/GetDataTableRequest.php (100%) rename {owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle => Chronicle/src}/V1/GetDataTableRowRequest.php (100%) rename {owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle => Chronicle/src}/V1/ListDataTableRowsRequest.php (100%) rename {owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle => Chronicle/src}/V1/ListDataTableRowsResponse.php (100%) rename {owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle => Chronicle/src}/V1/ListDataTablesRequest.php (100%) rename {owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle => Chronicle/src}/V1/ListDataTablesResponse.php (100%) rename {owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle => Chronicle/src}/V1/UpdateDataTableRequest.php (100%) rename {owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle => Chronicle/src}/V1/UpdateDataTableRowRequest.php (100%) rename {owl-bot-staging/Chronicle/v1 => Chronicle}/src/V1/resources/data_table_service_client_config.json (100%) rename {owl-bot-staging/Chronicle/v1 => Chronicle}/src/V1/resources/data_table_service_descriptor_config.php (100%) rename {owl-bot-staging/Chronicle/v1 => Chronicle}/src/V1/resources/data_table_service_rest_client_config.php (100%) rename {owl-bot-staging/Chronicle/v1 => Chronicle}/tests/Unit/V1/Client/DataTableServiceClientTest.php (84%) delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/GPBMetadata/Google/Cloud/Chronicle/V1/DataAccessControl.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/GPBMetadata/Google/Cloud/Chronicle/V1/Entity.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/GPBMetadata/Google/Cloud/Chronicle/V1/Instance.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/GPBMetadata/Google/Cloud/Chronicle/V1/ReferenceList.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/GPBMetadata/Google/Cloud/Chronicle/V1/Rule.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CompilationDiagnostic.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CompilationDiagnostic/Severity.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CompilationPosition.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateDataAccessLabelRequest.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateDataAccessScopeRequest.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateReferenceListRequest.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateRetrohuntRequest.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateRuleRequest.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateWatchlistRequest.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataAccessLabel.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataAccessLabelReference.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataAccessScope.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DeleteDataAccessLabelRequest.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DeleteDataAccessScopeRequest.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DeleteRuleRequest.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DeleteWatchlistRequest.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetDataAccessLabelRequest.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetDataAccessScopeRequest.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetInstanceRequest.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetReferenceListRequest.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetRetrohuntRequest.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetRuleDeploymentRequest.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetRuleRequest.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetWatchlistRequest.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/IngestionLabel.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/InputsUsed.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Instance.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListDataAccessLabelsRequest.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListDataAccessLabelsResponse.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListDataAccessScopesRequest.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListDataAccessScopesResponse.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListReferenceListsRequest.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListReferenceListsResponse.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRetrohuntsRequest.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRetrohuntsResponse.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRuleDeploymentsRequest.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRuleDeploymentsResponse.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRuleRevisionsRequest.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRuleRevisionsResponse.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRulesRequest.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRulesResponse.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListWatchlistsRequest.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListWatchlistsResponse.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ReferenceList.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ReferenceListEntry.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ReferenceListScope.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ReferenceListSyntaxType.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ReferenceListView.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Retrohunt.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Retrohunt/State.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/RetrohuntMetadata.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Rule.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Rule/CompilationState.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/RuleDeployment.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/RuleDeployment/ExecutionState.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/RuleType.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/RuleView.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/RunFrequency.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ScopeInfo.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Severity.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateDataAccessLabelRequest.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateDataAccessScopeRequest.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateReferenceListRequest.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateRuleDeploymentRequest.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateRuleRequest.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateWatchlistRequest.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Watchlist.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Watchlist/EntityCount.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Watchlist/EntityPopulationMechanism.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Watchlist/EntityPopulationMechanism/Manual.php delete mode 100644 owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/WatchlistUserPreferences.php delete mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/create_data_access_label.php delete mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/create_data_access_scope.php delete mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/delete_data_access_label.php delete mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/delete_data_access_scope.php delete mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/get_data_access_label.php delete mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/get_data_access_scope.php delete mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/list_data_access_labels.php delete mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/list_data_access_scopes.php delete mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/update_data_access_label.php delete mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/update_data_access_scope.php delete mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/EntityServiceClient/create_watchlist.php delete mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/EntityServiceClient/delete_watchlist.php delete mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/EntityServiceClient/get_watchlist.php delete mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/EntityServiceClient/list_watchlists.php delete mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/EntityServiceClient/update_watchlist.php delete mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/InstanceServiceClient/get_instance.php delete mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/ReferenceListServiceClient/create_reference_list.php delete mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/ReferenceListServiceClient/get_reference_list.php delete mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/ReferenceListServiceClient/list_reference_lists.php delete mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/ReferenceListServiceClient/update_reference_list.php delete mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/create_retrohunt.php delete mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/create_rule.php delete mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/delete_rule.php delete mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/get_retrohunt.php delete mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/get_rule.php delete mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/get_rule_deployment.php delete mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/list_retrohunts.php delete mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/list_rule_deployments.php delete mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/list_rule_revisions.php delete mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/list_rules.php delete mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/update_rule.php delete mode 100644 owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/update_rule_deployment.php delete mode 100644 owl-bot-staging/Chronicle/v1/src/V1/Client/DataAccessControlServiceClient.php delete mode 100644 owl-bot-staging/Chronicle/v1/src/V1/Client/EntityServiceClient.php delete mode 100644 owl-bot-staging/Chronicle/v1/src/V1/Client/InstanceServiceClient.php delete mode 100644 owl-bot-staging/Chronicle/v1/src/V1/Client/ReferenceListServiceClient.php delete mode 100644 owl-bot-staging/Chronicle/v1/src/V1/Client/RuleServiceClient.php delete mode 100644 owl-bot-staging/Chronicle/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/Chronicle/v1/src/V1/resources/data_access_control_service_client_config.json delete mode 100644 owl-bot-staging/Chronicle/v1/src/V1/resources/data_access_control_service_descriptor_config.php delete mode 100644 owl-bot-staging/Chronicle/v1/src/V1/resources/data_access_control_service_rest_client_config.php delete mode 100644 owl-bot-staging/Chronicle/v1/src/V1/resources/entity_service_client_config.json delete mode 100644 owl-bot-staging/Chronicle/v1/src/V1/resources/entity_service_descriptor_config.php delete mode 100644 owl-bot-staging/Chronicle/v1/src/V1/resources/entity_service_rest_client_config.php delete mode 100644 owl-bot-staging/Chronicle/v1/src/V1/resources/instance_service_client_config.json delete mode 100644 owl-bot-staging/Chronicle/v1/src/V1/resources/instance_service_descriptor_config.php delete mode 100644 owl-bot-staging/Chronicle/v1/src/V1/resources/instance_service_rest_client_config.php delete mode 100644 owl-bot-staging/Chronicle/v1/src/V1/resources/reference_list_service_client_config.json delete mode 100644 owl-bot-staging/Chronicle/v1/src/V1/resources/reference_list_service_descriptor_config.php delete mode 100644 owl-bot-staging/Chronicle/v1/src/V1/resources/reference_list_service_rest_client_config.php delete mode 100644 owl-bot-staging/Chronicle/v1/src/V1/resources/rule_service_client_config.json delete mode 100644 owl-bot-staging/Chronicle/v1/src/V1/resources/rule_service_descriptor_config.php delete mode 100644 owl-bot-staging/Chronicle/v1/src/V1/resources/rule_service_rest_client_config.php delete mode 100644 owl-bot-staging/Chronicle/v1/tests/Unit/V1/Client/DataAccessControlServiceClientTest.php delete mode 100644 owl-bot-staging/Chronicle/v1/tests/Unit/V1/Client/EntityServiceClientTest.php delete mode 100644 owl-bot-staging/Chronicle/v1/tests/Unit/V1/Client/InstanceServiceClientTest.php delete mode 100644 owl-bot-staging/Chronicle/v1/tests/Unit/V1/Client/ReferenceListServiceClientTest.php delete mode 100644 owl-bot-staging/Chronicle/v1/tests/Unit/V1/Client/RuleServiceClientTest.php diff --git a/owl-bot-staging/Chronicle/v1/proto/src/GPBMetadata/Google/Cloud/Chronicle/V1/DataTable.php b/Chronicle/metadata/V1/DataTable.php similarity index 100% rename from owl-bot-staging/Chronicle/v1/proto/src/GPBMetadata/Google/Cloud/Chronicle/V1/DataTable.php rename to Chronicle/metadata/V1/DataTable.php diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/bulk_create_data_table_rows.php b/Chronicle/samples/V1/DataTableServiceClient/bulk_create_data_table_rows.php similarity index 100% rename from owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/bulk_create_data_table_rows.php rename to Chronicle/samples/V1/DataTableServiceClient/bulk_create_data_table_rows.php diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/bulk_get_data_table_rows.php b/Chronicle/samples/V1/DataTableServiceClient/bulk_get_data_table_rows.php similarity index 100% rename from owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/bulk_get_data_table_rows.php rename to Chronicle/samples/V1/DataTableServiceClient/bulk_get_data_table_rows.php diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/bulk_replace_data_table_rows.php b/Chronicle/samples/V1/DataTableServiceClient/bulk_replace_data_table_rows.php similarity index 100% rename from owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/bulk_replace_data_table_rows.php rename to Chronicle/samples/V1/DataTableServiceClient/bulk_replace_data_table_rows.php diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/bulk_update_data_table_rows.php b/Chronicle/samples/V1/DataTableServiceClient/bulk_update_data_table_rows.php similarity index 100% rename from owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/bulk_update_data_table_rows.php rename to Chronicle/samples/V1/DataTableServiceClient/bulk_update_data_table_rows.php diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/create_data_table.php b/Chronicle/samples/V1/DataTableServiceClient/create_data_table.php similarity index 100% rename from owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/create_data_table.php rename to Chronicle/samples/V1/DataTableServiceClient/create_data_table.php diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/create_data_table_row.php b/Chronicle/samples/V1/DataTableServiceClient/create_data_table_row.php similarity index 100% rename from owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/create_data_table_row.php rename to Chronicle/samples/V1/DataTableServiceClient/create_data_table_row.php diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/delete_data_table.php b/Chronicle/samples/V1/DataTableServiceClient/delete_data_table.php similarity index 100% rename from owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/delete_data_table.php rename to Chronicle/samples/V1/DataTableServiceClient/delete_data_table.php diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/delete_data_table_row.php b/Chronicle/samples/V1/DataTableServiceClient/delete_data_table_row.php similarity index 100% rename from owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/delete_data_table_row.php rename to Chronicle/samples/V1/DataTableServiceClient/delete_data_table_row.php diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/get_data_table.php b/Chronicle/samples/V1/DataTableServiceClient/get_data_table.php similarity index 100% rename from owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/get_data_table.php rename to Chronicle/samples/V1/DataTableServiceClient/get_data_table.php diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/get_data_table_operation_errors.php b/Chronicle/samples/V1/DataTableServiceClient/get_data_table_operation_errors.php similarity index 100% rename from owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/get_data_table_operation_errors.php rename to Chronicle/samples/V1/DataTableServiceClient/get_data_table_operation_errors.php diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/get_data_table_row.php b/Chronicle/samples/V1/DataTableServiceClient/get_data_table_row.php similarity index 100% rename from owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/get_data_table_row.php rename to Chronicle/samples/V1/DataTableServiceClient/get_data_table_row.php diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/list_data_table_rows.php b/Chronicle/samples/V1/DataTableServiceClient/list_data_table_rows.php similarity index 100% rename from owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/list_data_table_rows.php rename to Chronicle/samples/V1/DataTableServiceClient/list_data_table_rows.php diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/list_data_tables.php b/Chronicle/samples/V1/DataTableServiceClient/list_data_tables.php similarity index 100% rename from owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/list_data_tables.php rename to Chronicle/samples/V1/DataTableServiceClient/list_data_tables.php diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/update_data_table.php b/Chronicle/samples/V1/DataTableServiceClient/update_data_table.php similarity index 100% rename from owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/update_data_table.php rename to Chronicle/samples/V1/DataTableServiceClient/update_data_table.php diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/update_data_table_row.php b/Chronicle/samples/V1/DataTableServiceClient/update_data_table_row.php similarity index 100% rename from owl-bot-staging/Chronicle/v1/samples/V1/DataTableServiceClient/update_data_table_row.php rename to Chronicle/samples/V1/DataTableServiceClient/update_data_table_row.php diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/BulkCreateDataTableRowsRequest.php b/Chronicle/src/V1/BulkCreateDataTableRowsRequest.php similarity index 100% rename from owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/BulkCreateDataTableRowsRequest.php rename to Chronicle/src/V1/BulkCreateDataTableRowsRequest.php diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/BulkCreateDataTableRowsResponse.php b/Chronicle/src/V1/BulkCreateDataTableRowsResponse.php similarity index 100% rename from owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/BulkCreateDataTableRowsResponse.php rename to Chronicle/src/V1/BulkCreateDataTableRowsResponse.php diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/BulkGetDataTableRowsRequest.php b/Chronicle/src/V1/BulkGetDataTableRowsRequest.php similarity index 100% rename from owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/BulkGetDataTableRowsRequest.php rename to Chronicle/src/V1/BulkGetDataTableRowsRequest.php diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/BulkGetDataTableRowsResponse.php b/Chronicle/src/V1/BulkGetDataTableRowsResponse.php similarity index 100% rename from owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/BulkGetDataTableRowsResponse.php rename to Chronicle/src/V1/BulkGetDataTableRowsResponse.php diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/BulkReplaceDataTableRowsRequest.php b/Chronicle/src/V1/BulkReplaceDataTableRowsRequest.php similarity index 100% rename from owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/BulkReplaceDataTableRowsRequest.php rename to Chronicle/src/V1/BulkReplaceDataTableRowsRequest.php diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/BulkReplaceDataTableRowsResponse.php b/Chronicle/src/V1/BulkReplaceDataTableRowsResponse.php similarity index 100% rename from owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/BulkReplaceDataTableRowsResponse.php rename to Chronicle/src/V1/BulkReplaceDataTableRowsResponse.php diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/BulkUpdateDataTableRowsRequest.php b/Chronicle/src/V1/BulkUpdateDataTableRowsRequest.php similarity index 100% rename from owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/BulkUpdateDataTableRowsRequest.php rename to Chronicle/src/V1/BulkUpdateDataTableRowsRequest.php diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/BulkUpdateDataTableRowsResponse.php b/Chronicle/src/V1/BulkUpdateDataTableRowsResponse.php similarity index 100% rename from owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/BulkUpdateDataTableRowsResponse.php rename to Chronicle/src/V1/BulkUpdateDataTableRowsResponse.php diff --git a/owl-bot-staging/Chronicle/v1/src/V1/Client/DataTableServiceClient.php b/Chronicle/src/V1/Client/DataTableServiceClient.php similarity index 95% rename from owl-bot-staging/Chronicle/v1/src/V1/Client/DataTableServiceClient.php rename to Chronicle/src/V1/Client/DataTableServiceClient.php index 3a2425a3b967..908ee7eecb3d 100644 --- a/owl-bot-staging/Chronicle/v1/src/V1/Client/DataTableServiceClient.php +++ b/Chronicle/src/V1/Client/DataTableServiceClient.php @@ -147,8 +147,12 @@ private static function getClientDefaults() * * @return string The formatted data_access_scope resource. */ - public static function dataAccessScopeName(string $project, string $location, string $instance, string $dataAccessScope): string - { + public static function dataAccessScopeName( + string $project, + string $location, + string $instance, + string $dataAccessScope + ): string { return self::getPathTemplate('dataAccessScope')->render([ 'project' => $project, 'location' => $location, @@ -189,8 +193,12 @@ public static function dataTableName(string $project, string $location, string $ * * @return string The formatted data_table_operation_errors resource. */ - public static function dataTableOperationErrorsName(string $project, string $location, string $instance, string $dataTableOperationErrors): string - { + public static function dataTableOperationErrorsName( + string $project, + string $location, + string $instance, + string $dataTableOperationErrors + ): string { return self::getPathTemplate('dataTableOperationErrors')->render([ 'project' => $project, 'location' => $location, @@ -211,8 +219,13 @@ public static function dataTableOperationErrorsName(string $project, string $loc * * @return string The formatted data_table_row resource. */ - public static function dataTableRowName(string $project, string $location, string $instance, string $dataTable, string $dataTableRow): string - { + public static function dataTableRowName( + string $project, + string $location, + string $instance, + string $dataTable, + string $dataTableRow + ): string { return self::getPathTemplate('dataTableRow')->render([ 'project' => $project, 'location' => $location, @@ -376,8 +389,10 @@ public function __call($method, $args) * * @throws ApiException Thrown if the API call fails. */ - public function bulkCreateDataTableRows(BulkCreateDataTableRowsRequest $request, array $callOptions = []): BulkCreateDataTableRowsResponse - { + public function bulkCreateDataTableRows( + BulkCreateDataTableRowsRequest $request, + array $callOptions = [] + ): BulkCreateDataTableRowsResponse { return $this->startApiCall('BulkCreateDataTableRows', $request, $callOptions)->wait(); } @@ -403,8 +418,10 @@ public function bulkCreateDataTableRows(BulkCreateDataTableRowsRequest $request, * * @throws ApiException Thrown if the API call fails. */ - public function bulkGetDataTableRows(BulkGetDataTableRowsRequest $request, array $callOptions = []): BulkGetDataTableRowsResponse - { + public function bulkGetDataTableRows( + BulkGetDataTableRowsRequest $request, + array $callOptions = [] + ): BulkGetDataTableRowsResponse { return $this->startApiCall('BulkGetDataTableRows', $request, $callOptions)->wait(); } @@ -430,8 +447,10 @@ public function bulkGetDataTableRows(BulkGetDataTableRowsRequest $request, array * * @throws ApiException Thrown if the API call fails. */ - public function bulkReplaceDataTableRows(BulkReplaceDataTableRowsRequest $request, array $callOptions = []): BulkReplaceDataTableRowsResponse - { + public function bulkReplaceDataTableRows( + BulkReplaceDataTableRowsRequest $request, + array $callOptions = [] + ): BulkReplaceDataTableRowsResponse { return $this->startApiCall('BulkReplaceDataTableRows', $request, $callOptions)->wait(); } @@ -457,8 +476,10 @@ public function bulkReplaceDataTableRows(BulkReplaceDataTableRowsRequest $reques * * @throws ApiException Thrown if the API call fails. */ - public function bulkUpdateDataTableRows(BulkUpdateDataTableRowsRequest $request, array $callOptions = []): BulkUpdateDataTableRowsResponse - { + public function bulkUpdateDataTableRows( + BulkUpdateDataTableRowsRequest $request, + array $callOptions = [] + ): BulkUpdateDataTableRowsResponse { return $this->startApiCall('BulkUpdateDataTableRows', $request, $callOptions)->wait(); } @@ -610,8 +631,10 @@ public function getDataTable(GetDataTableRequest $request, array $callOptions = * * @throws ApiException Thrown if the API call fails. */ - public function getDataTableOperationErrors(GetDataTableOperationErrorsRequest $request, array $callOptions = []): DataTableOperationErrors - { + public function getDataTableOperationErrors( + GetDataTableOperationErrorsRequest $request, + array $callOptions = [] + ): DataTableOperationErrors { return $this->startApiCall('GetDataTableOperationErrors', $request, $callOptions)->wait(); } diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateDataTableRequest.php b/Chronicle/src/V1/CreateDataTableRequest.php similarity index 100% rename from owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateDataTableRequest.php rename to Chronicle/src/V1/CreateDataTableRequest.php diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateDataTableRowRequest.php b/Chronicle/src/V1/CreateDataTableRowRequest.php similarity index 100% rename from owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateDataTableRowRequest.php rename to Chronicle/src/V1/CreateDataTableRowRequest.php diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataTable.php b/Chronicle/src/V1/DataTable.php similarity index 100% rename from owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataTable.php rename to Chronicle/src/V1/DataTable.php diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataTableColumnInfo.php b/Chronicle/src/V1/DataTableColumnInfo.php similarity index 100% rename from owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataTableColumnInfo.php rename to Chronicle/src/V1/DataTableColumnInfo.php diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataTableColumnInfo/DataTableColumnType.php b/Chronicle/src/V1/DataTableColumnInfo/DataTableColumnType.php similarity index 100% rename from owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataTableColumnInfo/DataTableColumnType.php rename to Chronicle/src/V1/DataTableColumnInfo/DataTableColumnType.php diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataTableOperationErrors.php b/Chronicle/src/V1/DataTableOperationErrors.php similarity index 100% rename from owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataTableOperationErrors.php rename to Chronicle/src/V1/DataTableOperationErrors.php diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataTableRow.php b/Chronicle/src/V1/DataTableRow.php similarity index 100% rename from owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataTableRow.php rename to Chronicle/src/V1/DataTableRow.php diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataTableScopeInfo.php b/Chronicle/src/V1/DataTableScopeInfo.php similarity index 100% rename from owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataTableScopeInfo.php rename to Chronicle/src/V1/DataTableScopeInfo.php diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataTableUpdateSource.php b/Chronicle/src/V1/DataTableUpdateSource.php similarity index 100% rename from owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataTableUpdateSource.php rename to Chronicle/src/V1/DataTableUpdateSource.php diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DeleteDataTableRequest.php b/Chronicle/src/V1/DeleteDataTableRequest.php similarity index 100% rename from owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DeleteDataTableRequest.php rename to Chronicle/src/V1/DeleteDataTableRequest.php diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DeleteDataTableRowRequest.php b/Chronicle/src/V1/DeleteDataTableRowRequest.php similarity index 100% rename from owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DeleteDataTableRowRequest.php rename to Chronicle/src/V1/DeleteDataTableRowRequest.php diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetDataTableOperationErrorsRequest.php b/Chronicle/src/V1/GetDataTableOperationErrorsRequest.php similarity index 100% rename from owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetDataTableOperationErrorsRequest.php rename to Chronicle/src/V1/GetDataTableOperationErrorsRequest.php diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetDataTableRequest.php b/Chronicle/src/V1/GetDataTableRequest.php similarity index 100% rename from owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetDataTableRequest.php rename to Chronicle/src/V1/GetDataTableRequest.php diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetDataTableRowRequest.php b/Chronicle/src/V1/GetDataTableRowRequest.php similarity index 100% rename from owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetDataTableRowRequest.php rename to Chronicle/src/V1/GetDataTableRowRequest.php diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListDataTableRowsRequest.php b/Chronicle/src/V1/ListDataTableRowsRequest.php similarity index 100% rename from owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListDataTableRowsRequest.php rename to Chronicle/src/V1/ListDataTableRowsRequest.php diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListDataTableRowsResponse.php b/Chronicle/src/V1/ListDataTableRowsResponse.php similarity index 100% rename from owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListDataTableRowsResponse.php rename to Chronicle/src/V1/ListDataTableRowsResponse.php diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListDataTablesRequest.php b/Chronicle/src/V1/ListDataTablesRequest.php similarity index 100% rename from owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListDataTablesRequest.php rename to Chronicle/src/V1/ListDataTablesRequest.php diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListDataTablesResponse.php b/Chronicle/src/V1/ListDataTablesResponse.php similarity index 100% rename from owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListDataTablesResponse.php rename to Chronicle/src/V1/ListDataTablesResponse.php diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateDataTableRequest.php b/Chronicle/src/V1/UpdateDataTableRequest.php similarity index 100% rename from owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateDataTableRequest.php rename to Chronicle/src/V1/UpdateDataTableRequest.php diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateDataTableRowRequest.php b/Chronicle/src/V1/UpdateDataTableRowRequest.php similarity index 100% rename from owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateDataTableRowRequest.php rename to Chronicle/src/V1/UpdateDataTableRowRequest.php diff --git a/Chronicle/src/V1/gapic_metadata.json b/Chronicle/src/V1/gapic_metadata.json index 2e97bb2c5145..7edd4a684d59 100644 --- a/Chronicle/src/V1/gapic_metadata.json +++ b/Chronicle/src/V1/gapic_metadata.json @@ -64,6 +64,90 @@ } } }, + "DataTableService": { + "clients": { + "grpc": { + "libraryClient": "DataTableServiceGapicClient", + "rpcs": { + "BulkCreateDataTableRows": { + "methods": [ + "bulkCreateDataTableRows" + ] + }, + "BulkGetDataTableRows": { + "methods": [ + "bulkGetDataTableRows" + ] + }, + "BulkReplaceDataTableRows": { + "methods": [ + "bulkReplaceDataTableRows" + ] + }, + "BulkUpdateDataTableRows": { + "methods": [ + "bulkUpdateDataTableRows" + ] + }, + "CreateDataTable": { + "methods": [ + "createDataTable" + ] + }, + "CreateDataTableRow": { + "methods": [ + "createDataTableRow" + ] + }, + "DeleteDataTable": { + "methods": [ + "deleteDataTable" + ] + }, + "DeleteDataTableRow": { + "methods": [ + "deleteDataTableRow" + ] + }, + "GetDataTable": { + "methods": [ + "getDataTable" + ] + }, + "GetDataTableOperationErrors": { + "methods": [ + "getDataTableOperationErrors" + ] + }, + "GetDataTableRow": { + "methods": [ + "getDataTableRow" + ] + }, + "ListDataTableRows": { + "methods": [ + "listDataTableRows" + ] + }, + "ListDataTables": { + "methods": [ + "listDataTables" + ] + }, + "UpdateDataTable": { + "methods": [ + "updateDataTable" + ] + }, + "UpdateDataTableRow": { + "methods": [ + "updateDataTableRow" + ] + } + } + } + } + }, "EntityService": { "clients": { "grpc": { diff --git a/owl-bot-staging/Chronicle/v1/src/V1/resources/data_table_service_client_config.json b/Chronicle/src/V1/resources/data_table_service_client_config.json similarity index 100% rename from owl-bot-staging/Chronicle/v1/src/V1/resources/data_table_service_client_config.json rename to Chronicle/src/V1/resources/data_table_service_client_config.json diff --git a/owl-bot-staging/Chronicle/v1/src/V1/resources/data_table_service_descriptor_config.php b/Chronicle/src/V1/resources/data_table_service_descriptor_config.php similarity index 100% rename from owl-bot-staging/Chronicle/v1/src/V1/resources/data_table_service_descriptor_config.php rename to Chronicle/src/V1/resources/data_table_service_descriptor_config.php diff --git a/owl-bot-staging/Chronicle/v1/src/V1/resources/data_table_service_rest_client_config.php b/Chronicle/src/V1/resources/data_table_service_rest_client_config.php similarity index 100% rename from owl-bot-staging/Chronicle/v1/src/V1/resources/data_table_service_rest_client_config.php rename to Chronicle/src/V1/resources/data_table_service_rest_client_config.php diff --git a/owl-bot-staging/Chronicle/v1/tests/Unit/V1/Client/DataTableServiceClientTest.php b/Chronicle/tests/Unit/V1/Client/DataTableServiceClientTest.php similarity index 84% rename from owl-bot-staging/Chronicle/v1/tests/Unit/V1/Client/DataTableServiceClientTest.php rename to Chronicle/tests/Unit/V1/Client/DataTableServiceClientTest.php index 125ba2f76d68..7c143e80fb8a 100644 --- a/owl-bot-staging/Chronicle/v1/tests/Unit/V1/Client/DataTableServiceClientTest.php +++ b/Chronicle/tests/Unit/V1/Client/DataTableServiceClientTest.php @@ -71,7 +71,9 @@ private function createTransport($deserialize = null) /** @return CredentialsWrapper */ private function createCredentials() { - return $this->getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + return $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); } /** @return DataTableServiceClient */ @@ -97,9 +99,7 @@ public function bulkCreateDataTableRowsTest() // Mock request $formattedParent = $gapicClient->dataTableName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_TABLE]'); $requests = []; - $request = (new BulkCreateDataTableRowsRequest()) - ->setParent($formattedParent) - ->setRequests($requests); + $request = (new BulkCreateDataTableRowsRequest())->setParent($formattedParent)->setRequests($requests); $response = $gapicClient->bulkCreateDataTableRows($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -125,19 +125,20 @@ public function bulkCreateDataTableRowsExceptionTest() $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); + $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->dataTableName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_TABLE]'); $requests = []; - $request = (new BulkCreateDataTableRowsRequest()) - ->setParent($formattedParent) - ->setRequests($requests); + $request = (new BulkCreateDataTableRowsRequest())->setParent($formattedParent)->setRequests($requests); try { $gapicClient->bulkCreateDataTableRows($request); // If the $gapicClient method call did not throw, fail the test @@ -165,9 +166,7 @@ public function bulkGetDataTableRowsTest() // Mock request $formattedParent = $gapicClient->dataTableName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_TABLE]'); $requests = []; - $request = (new BulkGetDataTableRowsRequest()) - ->setParent($formattedParent) - ->setRequests($requests); + $request = (new BulkGetDataTableRowsRequest())->setParent($formattedParent)->setRequests($requests); $response = $gapicClient->bulkGetDataTableRows($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -193,19 +192,20 @@ public function bulkGetDataTableRowsExceptionTest() $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); + $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->dataTableName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_TABLE]'); $requests = []; - $request = (new BulkGetDataTableRowsRequest()) - ->setParent($formattedParent) - ->setRequests($requests); + $request = (new BulkGetDataTableRowsRequest())->setParent($formattedParent)->setRequests($requests); try { $gapicClient->bulkGetDataTableRows($request); // If the $gapicClient method call did not throw, fail the test @@ -233,9 +233,7 @@ public function bulkReplaceDataTableRowsTest() // Mock request $formattedParent = $gapicClient->dataTableName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_TABLE]'); $requests = []; - $request = (new BulkReplaceDataTableRowsRequest()) - ->setParent($formattedParent) - ->setRequests($requests); + $request = (new BulkReplaceDataTableRowsRequest())->setParent($formattedParent)->setRequests($requests); $response = $gapicClient->bulkReplaceDataTableRows($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -261,19 +259,20 @@ public function bulkReplaceDataTableRowsExceptionTest() $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); + $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->dataTableName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_TABLE]'); $requests = []; - $request = (new BulkReplaceDataTableRowsRequest()) - ->setParent($formattedParent) - ->setRequests($requests); + $request = (new BulkReplaceDataTableRowsRequest())->setParent($formattedParent)->setRequests($requests); try { $gapicClient->bulkReplaceDataTableRows($request); // If the $gapicClient method call did not throw, fail the test @@ -301,9 +300,7 @@ public function bulkUpdateDataTableRowsTest() // Mock request $formattedParent = $gapicClient->dataTableName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_TABLE]'); $requests = []; - $request = (new BulkUpdateDataTableRowsRequest()) - ->setParent($formattedParent) - ->setRequests($requests); + $request = (new BulkUpdateDataTableRowsRequest())->setParent($formattedParent)->setRequests($requests); $response = $gapicClient->bulkUpdateDataTableRows($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -329,19 +326,20 @@ public function bulkUpdateDataTableRowsExceptionTest() $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); + $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->dataTableName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_TABLE]'); $requests = []; - $request = (new BulkUpdateDataTableRowsRequest()) - ->setParent($formattedParent) - ->setRequests($requests); + $request = (new BulkUpdateDataTableRowsRequest())->setParent($formattedParent)->setRequests($requests); try { $gapicClient->bulkUpdateDataTableRows($request); // If the $gapicClient method call did not throw, fail the test @@ -417,12 +415,15 @@ public function createDataTableExceptionTest() $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); + $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); @@ -467,9 +468,7 @@ public function createDataTableRowTest() $dataTableRow = new DataTableRow(); $dataTableRowValues = []; $dataTableRow->setValues($dataTableRowValues); - $request = (new CreateDataTableRowRequest()) - ->setParent($formattedParent) - ->setDataTableRow($dataTableRow); + $request = (new CreateDataTableRowRequest())->setParent($formattedParent)->setDataTableRow($dataTableRow); $response = $gapicClient->createDataTableRow($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -495,21 +494,22 @@ public function createDataTableRowExceptionTest() $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); + $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->dataTableName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_TABLE]'); $dataTableRow = new DataTableRow(); $dataTableRowValues = []; $dataTableRow->setValues($dataTableRowValues); - $request = (new CreateDataTableRowRequest()) - ->setParent($formattedParent) - ->setDataTableRow($dataTableRow); + $request = (new CreateDataTableRowRequest())->setParent($formattedParent)->setDataTableRow($dataTableRow); try { $gapicClient->createDataTableRow($request); // If the $gapicClient method call did not throw, fail the test @@ -536,8 +536,7 @@ public function deleteDataTableTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->dataTableName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_TABLE]'); - $request = (new DeleteDataTableRequest()) - ->setName($formattedName); + $request = (new DeleteDataTableRequest())->setName($formattedName); $gapicClient->deleteDataTable($request); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); @@ -560,17 +559,19 @@ public function deleteDataTableExceptionTest() $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); + $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->dataTableName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_TABLE]'); - $request = (new DeleteDataTableRequest()) - ->setName($formattedName); + $request = (new DeleteDataTableRequest())->setName($formattedName); try { $gapicClient->deleteDataTable($request); // If the $gapicClient method call did not throw, fail the test @@ -596,9 +597,14 @@ public function deleteDataTableRowTest() $expectedResponse = new GPBEmpty(); $transport->addResponse($expectedResponse); // Mock request - $formattedName = $gapicClient->dataTableRowName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_TABLE]', '[DATA_TABLE_ROW]'); - $request = (new DeleteDataTableRowRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->dataTableRowName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]', + '[DATA_TABLE]', + '[DATA_TABLE_ROW]' + ); + $request = (new DeleteDataTableRowRequest())->setName($formattedName); $gapicClient->deleteDataTableRow($request); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); @@ -621,17 +627,25 @@ public function deleteDataTableRowExceptionTest() $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); + $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->dataTableRowName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_TABLE]', '[DATA_TABLE_ROW]'); - $request = (new DeleteDataTableRowRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->dataTableRowName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]', + '[DATA_TABLE]', + '[DATA_TABLE_ROW]' + ); + $request = (new DeleteDataTableRowRequest())->setName($formattedName); try { $gapicClient->deleteDataTableRow($request); // If the $gapicClient method call did not throw, fail the test @@ -672,8 +686,7 @@ public function getDataTableTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->dataTableName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_TABLE]'); - $request = (new GetDataTableRequest()) - ->setName($formattedName); + $request = (new GetDataTableRequest())->setName($formattedName); $response = $gapicClient->getDataTable($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -697,17 +710,19 @@ public function getDataTableExceptionTest() $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); + $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->dataTableName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_TABLE]'); - $request = (new GetDataTableRequest()) - ->setName($formattedName); + $request = (new GetDataTableRequest())->setName($formattedName); try { $gapicClient->getDataTable($request); // If the $gapicClient method call did not throw, fail the test @@ -735,9 +750,13 @@ public function getDataTableOperationErrorsTest() $expectedResponse->setName($name2); $transport->addResponse($expectedResponse); // Mock request - $formattedName = $gapicClient->dataTableOperationErrorsName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_TABLE_OPERATION_ERRORS]'); - $request = (new GetDataTableOperationErrorsRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->dataTableOperationErrorsName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]', + '[DATA_TABLE_OPERATION_ERRORS]' + ); + $request = (new GetDataTableOperationErrorsRequest())->setName($formattedName); $response = $gapicClient->getDataTableOperationErrors($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -761,17 +780,24 @@ public function getDataTableOperationErrorsExceptionTest() $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); + $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->dataTableOperationErrorsName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_TABLE_OPERATION_ERRORS]'); - $request = (new GetDataTableOperationErrorsRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->dataTableOperationErrorsName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]', + '[DATA_TABLE_OPERATION_ERRORS]' + ); + $request = (new GetDataTableOperationErrorsRequest())->setName($formattedName); try { $gapicClient->getDataTableOperationErrors($request); // If the $gapicClient method call did not throw, fail the test @@ -801,9 +827,14 @@ public function getDataTableRowTest() $expectedResponse->setRowTimeToLive($rowTimeToLive); $transport->addResponse($expectedResponse); // Mock request - $formattedName = $gapicClient->dataTableRowName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_TABLE]', '[DATA_TABLE_ROW]'); - $request = (new GetDataTableRowRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->dataTableRowName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]', + '[DATA_TABLE]', + '[DATA_TABLE_ROW]' + ); + $request = (new GetDataTableRowRequest())->setName($formattedName); $response = $gapicClient->getDataTableRow($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -827,17 +858,25 @@ public function getDataTableRowExceptionTest() $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); + $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->dataTableRowName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_TABLE]', '[DATA_TABLE_ROW]'); - $request = (new GetDataTableRowRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->dataTableRowName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]', + '[DATA_TABLE]', + '[DATA_TABLE_ROW]' + ); + $request = (new GetDataTableRowRequest())->setName($formattedName); try { $gapicClient->getDataTableRow($request); // If the $gapicClient method call did not throw, fail the test @@ -862,17 +901,14 @@ public function listDataTableRowsTest() // Mock response $nextPageToken = ''; $dataTableRowsElement = new DataTableRow(); - $dataTableRows = [ - $dataTableRowsElement, - ]; + $dataTableRows = [$dataTableRowsElement]; $expectedResponse = new ListDataTableRowsResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setDataTableRows($dataTableRows); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->dataTableName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_TABLE]'); - $request = (new ListDataTableRowsRequest()) - ->setParent($formattedParent); + $request = (new ListDataTableRowsRequest())->setParent($formattedParent); $response = $gapicClient->listDataTableRows($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -899,17 +935,19 @@ public function listDataTableRowsExceptionTest() $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); + $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->dataTableName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_TABLE]'); - $request = (new ListDataTableRowsRequest()) - ->setParent($formattedParent); + $request = (new ListDataTableRowsRequest())->setParent($formattedParent); try { $gapicClient->listDataTableRows($request); // If the $gapicClient method call did not throw, fail the test @@ -934,17 +972,14 @@ public function listDataTablesTest() // Mock response $nextPageToken = ''; $dataTablesElement = new DataTable(); - $dataTables = [ - $dataTablesElement, - ]; + $dataTables = [$dataTablesElement]; $expectedResponse = new ListDataTablesResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setDataTables($dataTables); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new ListDataTablesRequest()) - ->setParent($formattedParent); + $request = (new ListDataTablesRequest())->setParent($formattedParent); $response = $gapicClient->listDataTables($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -971,17 +1006,19 @@ public function listDataTablesExceptionTest() $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); + $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new ListDataTablesRequest()) - ->setParent($formattedParent); + $request = (new ListDataTablesRequest())->setParent($formattedParent); try { $gapicClient->listDataTables($request); // If the $gapicClient method call did not throw, fail the test @@ -1024,8 +1061,7 @@ public function updateDataTableTest() $dataTable = new DataTable(); $dataTableDescription = 'dataTableDescription924959512'; $dataTable->setDescription($dataTableDescription); - $request = (new UpdateDataTableRequest()) - ->setDataTable($dataTable); + $request = (new UpdateDataTableRequest())->setDataTable($dataTable); $response = $gapicClient->updateDataTable($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -1049,19 +1085,21 @@ public function updateDataTableExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $dataTable = new DataTable(); $dataTableDescription = 'dataTableDescription924959512'; $dataTable->setDescription($dataTableDescription); - $request = (new UpdateDataTableRequest()) - ->setDataTable($dataTable); + $request = (new UpdateDataTableRequest())->setDataTable($dataTable); try { $gapicClient->updateDataTable($request); // If the $gapicClient method call did not throw, fail the test @@ -1094,8 +1132,7 @@ public function updateDataTableRowTest() $dataTableRow = new DataTableRow(); $dataTableRowValues = []; $dataTableRow->setValues($dataTableRowValues); - $request = (new UpdateDataTableRowRequest()) - ->setDataTableRow($dataTableRow); + $request = (new UpdateDataTableRowRequest())->setDataTableRow($dataTableRow); $response = $gapicClient->updateDataTableRow($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -1119,19 +1156,21 @@ public function updateDataTableRowExceptionTest() $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); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $dataTableRow = new DataTableRow(); $dataTableRowValues = []; $dataTableRow->setValues($dataTableRowValues); - $request = (new UpdateDataTableRowRequest()) - ->setDataTableRow($dataTableRow); + $request = (new UpdateDataTableRowRequest())->setDataTableRow($dataTableRow); try { $gapicClient->updateDataTableRow($request); // If the $gapicClient method call did not throw, fail the test @@ -1159,9 +1198,7 @@ public function bulkCreateDataTableRowsAsyncTest() // Mock request $formattedParent = $gapicClient->dataTableName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_TABLE]'); $requests = []; - $request = (new BulkCreateDataTableRowsRequest()) - ->setParent($formattedParent) - ->setRequests($requests); + $request = (new BulkCreateDataTableRowsRequest())->setParent($formattedParent)->setRequests($requests); $response = $gapicClient->bulkCreateDataTableRowsAsync($request)->wait(); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); diff --git a/owl-bot-staging/Chronicle/v1/proto/src/GPBMetadata/Google/Cloud/Chronicle/V1/DataAccessControl.php b/owl-bot-staging/Chronicle/v1/proto/src/GPBMetadata/Google/Cloud/Chronicle/V1/DataAccessControl.php deleted file mode 100644 index 211a4b8a9af5..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/GPBMetadata/Google/Cloud/Chronicle/V1/DataAccessControl.php +++ /dev/null @@ -1,31 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xBA/\x0A3google/cloud/chronicle/v1/data_access_control.proto\x12\x19google.cloud.chronicle.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xCF\x01\x0A\x1CCreateDataAccessLabelRequest\x12@\x0A\x06parent\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x12(chronicle.googleapis.com/DataAccessLabel\x12J\x0A\x11data_access_label\x18\x02 \x01(\x0B2*.google.cloud.chronicle.v1.DataAccessLabelB\x03\xE0A\x02\x12!\x0A\x14data_access_label_id\x18\x03 \x01(\x09B\x03\xE0A\x02\"[\x0A\x19GetDataAccessLabelRequest\x12>\x0A\x04name\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x0A(chronicle.googleapis.com/DataAccessLabel\"\x9B\x01\x0A\x1BListDataAccessLabelsRequest\x12@\x0A\x06parent\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x12(chronicle.googleapis.com/DataAccessLabel\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12\x13\x0A\x06filter\x18\x04 \x01(\x09B\x03\xE0A\x01\"\x7F\x0A\x1CListDataAccessLabelsResponse\x12F\x0A\x12data_access_labels\x18\x01 \x03(\x0B2*.google.cloud.chronicle.v1.DataAccessLabel\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\x9B\x01\x0A\x1CUpdateDataAccessLabelRequest\x12J\x0A\x11data_access_label\x18\x01 \x01(\x0B2*.google.cloud.chronicle.v1.DataAccessLabelB\x03\xE0A\x02\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\"^\x0A\x1CDeleteDataAccessLabelRequest\x12>\x0A\x04name\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x0A(chronicle.googleapis.com/DataAccessLabel\"\xCF\x01\x0A\x1CCreateDataAccessScopeRequest\x12@\x0A\x06parent\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x12(chronicle.googleapis.com/DataAccessScope\x12J\x0A\x11data_access_scope\x18\x02 \x01(\x0B2*.google.cloud.chronicle.v1.DataAccessScopeB\x03\xE0A\x02\x12!\x0A\x14data_access_scope_id\x18\x03 \x01(\x09B\x03\xE0A\x02\"[\x0A\x19GetDataAccessScopeRequest\x12>\x0A\x04name\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x0A(chronicle.googleapis.com/DataAccessScope\"\x9B\x01\x0A\x1BListDataAccessScopesRequest\x12@\x0A\x06parent\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x12(chronicle.googleapis.com/DataAccessScope\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12\x13\x0A\x06filter\x18\x04 \x01(\x09B\x03\xE0A\x01\"\xD3\x01\x0A\x1CListDataAccessScopesResponse\x12F\x0A\x12data_access_scopes\x18\x01 \x03(\x0B2*.google.cloud.chronicle.v1.DataAccessScope\x12-\x0A global_data_access_scope_granted\x18\x03 \x01(\x08H\x00\x88\x01\x01\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09B#\x0A!_global_data_access_scope_granted\"\x9B\x01\x0A\x1CUpdateDataAccessScopeRequest\x12J\x0A\x11data_access_scope\x18\x01 \x01(\x0B2*.google.cloud.chronicle.v1.DataAccessScopeB\x03\xE0A\x02\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\"^\x0A\x1CDeleteDataAccessScopeRequest\x12>\x0A\x04name\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x0A(chronicle.googleapis.com/DataAccessScope\"\xD5\x03\x0A\x0FDataAccessLabel\x12\x13\x0A\x09udm_query\x18\x03 \x01(\x09H\x00\x12;\x0A\x04name\x18\x01 \x01(\x09B-\xFAA*\x0A(chronicle.googleapis.com/DataAccessLabel\x12\x19\x0A\x0Cdisplay_name\x18\x08 \x01(\x09B\x03\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x05 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x13\x0A\x06author\x18\x06 \x01(\x09B\x03\xE0A\x03\x12\x18\x0A\x0Blast_editor\x18\x07 \x01(\x09B\x03\xE0A\x03\x12\x18\x0A\x0Bdescription\x18\x02 \x01(\x09B\x03\xE0A\x01:\x91\x01\xEAA\x8D\x01\x0A(chronicle.googleapis.com/DataAccessLabel\x12aprojects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}B\x0C\x0A\x0Adefinition\"\x88\x05\x0A\x0FDataAccessScope\x12>\x0A\x04name\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x0A(chronicle.googleapis.com/DataAccessScope\x12\\\x0A\x1Aallowed_data_access_labels\x18\x02 \x03(\x0B23.google.cloud.chronicle.v1.DataAccessLabelReferenceB\x03\xE0A\x01\x12[\x0A\x19denied_data_access_labels\x18\x03 \x03(\x0B23.google.cloud.chronicle.v1.DataAccessLabelReferenceB\x03\xE0A\x01\x12\x19\x0A\x0Cdisplay_name\x18\x04 \x01(\x09B\x03\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x05 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x06 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x13\x0A\x06author\x18\x07 \x01(\x09B\x03\xE0A\x03\x12\x18\x0A\x0Blast_editor\x18\x08 \x01(\x09B\x03\xE0A\x03\x12\x18\x0A\x0Bdescription\x18\x09 \x01(\x09B\x03\xE0A\x01\x12\x16\x0A\x09allow_all\x18\x0A \x01(\x08B\x03\xE0A\x01:\x91\x01\xEAA\x8D\x01\x0A(chronicle.googleapis.com/DataAccessScope\x12aprojects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}\"\xD0\x01\x0A\x18DataAccessLabelReference\x12\x1B\x0A\x11data_access_label\x18\x01 \x01(\x09H\x00\x12\x12\x0A\x08log_type\x18\x02 \x01(\x09H\x00\x12\x19\x0A\x0Fasset_namespace\x18\x03 \x01(\x09H\x00\x12D\x0A\x0Fingestion_label\x18\x04 \x01(\x0B2).google.cloud.chronicle.v1.IngestionLabelH\x00\x12\x19\x0A\x0Cdisplay_name\x18\x05 \x01(\x09B\x03\xE0A\x03B\x07\x0A\x05label\"V\x0A\x0EIngestionLabel\x12 \x0A\x13ingestion_label_key\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\"\x0A\x15ingestion_label_value\x18\x02 \x01(\x09B\x03\xE0A\x012\xE6\x12\x0A\x18DataAccessControlService\x12\x8A\x02\x0A\x15CreateDataAccessLabel\x127.google.cloud.chronicle.v1.CreateDataAccessLabelRequest\x1A*.google.cloud.chronicle.v1.DataAccessLabel\"\x8B\x01\xDAA-parent,data_access_label,data_access_label_id\x82\xD3\xE4\x93\x02U\"@/v1/{parent=projects/*/locations/*/instances/*}/dataAccessLabels:\x11data_access_label\x12\xC7\x01\x0A\x12GetDataAccessLabel\x124.google.cloud.chronicle.v1.GetDataAccessLabelRequest\x1A*.google.cloud.chronicle.v1.DataAccessLabel\"O\xDAA\x04name\x82\xD3\xE4\x93\x02B\x12@/v1/{name=projects/*/locations/*/instances/*/dataAccessLabels/*}\x12\xDA\x01\x0A\x14ListDataAccessLabels\x126.google.cloud.chronicle.v1.ListDataAccessLabelsRequest\x1A7.google.cloud.chronicle.v1.ListDataAccessLabelsResponse\"Q\xDAA\x06parent\x82\xD3\xE4\x93\x02B\x12@/v1/{parent=projects/*/locations/*/instances/*}/dataAccessLabels\x12\x8C\x02\x0A\x15UpdateDataAccessLabel\x127.google.cloud.chronicle.v1.UpdateDataAccessLabelRequest\x1A*.google.cloud.chronicle.v1.DataAccessLabel\"\x8D\x01\xDAA\x1Ddata_access_label,update_mask\x82\xD3\xE4\x93\x02g2R/v1/{data_access_label.name=projects/*/locations/*/instances/*/dataAccessLabels/*}:\x11data_access_label\x12\xB9\x01\x0A\x15DeleteDataAccessLabel\x127.google.cloud.chronicle.v1.DeleteDataAccessLabelRequest\x1A\x16.google.protobuf.Empty\"O\xDAA\x04name\x82\xD3\xE4\x93\x02B*@/v1/{name=projects/*/locations/*/instances/*/dataAccessLabels/*}\x12\x8A\x02\x0A\x15CreateDataAccessScope\x127.google.cloud.chronicle.v1.CreateDataAccessScopeRequest\x1A*.google.cloud.chronicle.v1.DataAccessScope\"\x8B\x01\xDAA-parent,data_access_scope,data_access_scope_id\x82\xD3\xE4\x93\x02U\"@/v1/{parent=projects/*/locations/*/instances/*}/dataAccessScopes:\x11data_access_scope\x12\xC7\x01\x0A\x12GetDataAccessScope\x124.google.cloud.chronicle.v1.GetDataAccessScopeRequest\x1A*.google.cloud.chronicle.v1.DataAccessScope\"O\xDAA\x04name\x82\xD3\xE4\x93\x02B\x12@/v1/{name=projects/*/locations/*/instances/*/dataAccessScopes/*}\x12\xDA\x01\x0A\x14ListDataAccessScopes\x126.google.cloud.chronicle.v1.ListDataAccessScopesRequest\x1A7.google.cloud.chronicle.v1.ListDataAccessScopesResponse\"Q\xDAA\x06parent\x82\xD3\xE4\x93\x02B\x12@/v1/{parent=projects/*/locations/*/instances/*}/dataAccessScopes\x12\x8C\x02\x0A\x15UpdateDataAccessScope\x127.google.cloud.chronicle.v1.UpdateDataAccessScopeRequest\x1A*.google.cloud.chronicle.v1.DataAccessScope\"\x8D\x01\xDAA\x1Ddata_access_scope,update_mask\x82\xD3\xE4\x93\x02g2R/v1/{data_access_scope.name=projects/*/locations/*/instances/*/dataAccessScopes/*}:\x11data_access_scope\x12\xB9\x01\x0A\x15DeleteDataAccessScope\x127.google.cloud.chronicle.v1.DeleteDataAccessScopeRequest\x1A\x16.google.protobuf.Empty\"O\xDAA\x04name\x82\xD3\xE4\x93\x02B*@/v1/{name=projects/*/locations/*/instances/*/dataAccessScopes/*}\x1AL\xCAA\x18chronicle.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xC6\x01\x0A\x1Dcom.google.cloud.chronicle.v1B\x0FDataAccessProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xAA\x02\x19Google.Cloud.Chronicle.V1\xCA\x02\x19Google\\Cloud\\Chronicle\\V1\xEA\x02\x1CGoogle::Cloud::Chronicle::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Chronicle/v1/proto/src/GPBMetadata/Google/Cloud/Chronicle/V1/Entity.php b/owl-bot-staging/Chronicle/v1/proto/src/GPBMetadata/Google/Cloud/Chronicle/V1/Entity.php deleted file mode 100644 index 45b8f91f3f08..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/GPBMetadata/Google/Cloud/Chronicle/V1/Entity.php +++ /dev/null @@ -1,31 +0,0 @@ -internalAddGeneratedFile( - "\x0A\x9A\x19\x0A&google/cloud/chronicle/v1/entity.proto\x12\x19google.cloud.chronicle.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xD5\x06\x0A\x09Watchlist\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12\x19\x0A\x0Cdisplay_name\x18\x02 \x01(\x09B\x03\xE0A\x02\x12\x18\x0A\x0Bdescription\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x1F\x0A\x12multiplying_factor\x18\x05 \x01(\x02B\x03\xE0A\x01\x12h\x0A\x1Bentity_population_mechanism\x18\x06 \x01(\x0B2>.google.cloud.chronicle.v1.Watchlist.EntityPopulationMechanismB\x03\xE0A\x02\x12K\x0A\x0Centity_count\x18\x07 \x01(\x0B20.google.cloud.chronicle.v1.Watchlist.EntityCountB\x03\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x08 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x09 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\\\x0A\x1Awatchlist_user_preferences\x18\x0A \x01(\x0B23.google.cloud.chronicle.v1.WatchlistUserPreferencesB\x03\xE0A\x01\x1A\x90\x01\x0A\x19EntityPopulationMechanism\x12\\\x0A\x06manual\x18\x01 \x01(\x0B2E.google.cloud.chronicle.v1.Watchlist.EntityPopulationMechanism.ManualB\x03\xE0A\x01H\x00\x1A\x08\x0A\x06ManualB\x0B\x0A\x09mechanism\x1A4\x0A\x0BEntityCount\x12\x11\x0A\x04user\x18\x01 \x01(\x05B\x03\xE0A\x03\x12\x12\x0A\x05asset\x18\x02 \x01(\x05B\x03\xE0A\x03:\x94\x01\xEAA\x90\x01\x0A\"chronicle.googleapis.com/Watchlist\x12Sprojects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}*\x0Awatchlists2\x09watchlist\"/\x0A\x18WatchlistUserPreferences\x12\x13\x0A\x06pinned\x18\x01 \x01(\x08B\x03\xE0A\x01\"O\x0A\x13GetWatchlistRequest\x128\x0A\x04name\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x0A\"chronicle.googleapis.com/Watchlist\"\x99\x01\x0A\x15ListWatchlistsRequest\x12:\x0A\x06parent\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x12\"chronicle.googleapis.com/Watchlist\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x13\x0A\x06filter\x18\x04 \x01(\x09B\x03\xE0A\x01\"u\x0A\x16ListWatchlistsResponse\x12=\x0A\x0Awatchlists\x18\x01 \x03(\x0B2\$.google.cloud.chronicle.v1.WatchlistB\x03\xE0A\x01\x12\x1C\x0A\x0Fnext_page_token\x18\x02 \x01(\x09B\x03\xE0A\x01\"\xAD\x01\x0A\x16CreateWatchlistRequest\x12:\x0A\x06parent\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x12\"chronicle.googleapis.com/Watchlist\x12\x19\x0A\x0Cwatchlist_id\x18\x02 \x01(\x09B\x03\xE0A\x01\x12<\x0A\x09watchlist\x18\x03 \x01(\x0B2\$.google.cloud.chronicle.v1.WatchlistB\x03\xE0A\x02\"\x8C\x01\x0A\x16UpdateWatchlistRequest\x12<\x0A\x09watchlist\x18\x01 \x01(\x0B2\$.google.cloud.chronicle.v1.WatchlistB\x03\xE0A\x02\x124\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\"f\x0A\x16DeleteWatchlistRequest\x128\x0A\x04name\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x0A\"chronicle.googleapis.com/Watchlist\x12\x12\x0A\x05force\x18\x02 \x01(\x08B\x03\xE0A\x012\xBE\x08\x0A\x0DEntityService\x12\xAF\x01\x0A\x0CGetWatchlist\x12..google.cloud.chronicle.v1.GetWatchlistRequest\x1A\$.google.cloud.chronicle.v1.Watchlist\"I\xDAA\x04name\x82\xD3\xE4\x93\x02<\x12:/v1/{name=projects/*/locations/*/instances/*/watchlists/*}\x12\xC2\x01\x0A\x0EListWatchlists\x120.google.cloud.chronicle.v1.ListWatchlistsRequest\x1A1.google.cloud.chronicle.v1.ListWatchlistsResponse\"K\xDAA\x06parent\x82\xD3\xE4\x93\x02<\x12:/v1/{parent=projects/*/locations/*/instances/*}/watchlists\x12\xD9\x01\x0A\x0FCreateWatchlist\x121.google.cloud.chronicle.v1.CreateWatchlistRequest\x1A\$.google.cloud.chronicle.v1.Watchlist\"m\xDAA\x1Dparent,watchlist,watchlist_id\x82\xD3\xE4\x93\x02G\":/v1/{parent=projects/*/locations/*/instances/*}/watchlists:\x09watchlist\x12\xDB\x01\x0A\x0FUpdateWatchlist\x121.google.cloud.chronicle.v1.UpdateWatchlistRequest\x1A\$.google.cloud.chronicle.v1.Watchlist\"o\xDAA\x15watchlist,update_mask\x82\xD3\xE4\x93\x02Q2D/v1/{watchlist.name=projects/*/locations/*/instances/*/watchlists/*}:\x09watchlist\x12\xAD\x01\x0A\x0FDeleteWatchlist\x121.google.cloud.chronicle.v1.DeleteWatchlistRequest\x1A\x16.google.protobuf.Empty\"O\xDAA\x0Aname,force\x82\xD3\xE4\x93\x02<*:/v1/{name=projects/*/locations/*/instances/*/watchlists/*}\x1AL\xCAA\x18chronicle.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xC2\x01\x0A\x1Dcom.google.cloud.chronicle.v1B\x0BEntityProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xAA\x02\x19Google.Cloud.Chronicle.V1\xCA\x02\x19Google\\Cloud\\Chronicle\\V1\xEA\x02\x1CGoogle::Cloud::Chronicle::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Chronicle/v1/proto/src/GPBMetadata/Google/Cloud/Chronicle/V1/Instance.php b/owl-bot-staging/Chronicle/v1/proto/src/GPBMetadata/Google/Cloud/Chronicle/V1/Instance.php deleted file mode 100644 index 35968a37f5c2..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/GPBMetadata/Google/Cloud/Chronicle/V1/Instance.php +++ /dev/null @@ -1,28 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xD7\x06\x0A(google/cloud/chronicle/v1/instance.proto\x12\x19google.cloud.chronicle.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\"\x98\x01\x0A\x08Instance\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08:y\xEAAv\x0A!chronicle.googleapis.com/Instance\x12internalAddGeneratedFile( - "\x0A\xFF\x19\x0A.google/cloud/chronicle/v1/reference_list.proto\x12\x19google.cloud.chronicle.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"]\x0A\x09ScopeInfo\x12P\x0A\x14reference_list_scope\x18\x02 \x01(\x0B2-.google.cloud.chronicle.v1.ReferenceListScopeB\x03\xE0A\x02\".\x0A\x12ReferenceListScope\x12\x18\x0A\x0Bscope_names\x18\x01 \x03(\x09B\x03\xE0A\x01\"\x93\x01\x0A\x17GetReferenceListRequest\x12<\x0A\x04name\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&chronicle.googleapis.com/ReferenceList\x12:\x0A\x04view\x18\x02 \x01(\x0E2,.google.cloud.chronicle.v1.ReferenceListView\"\xBE\x01\x0A\x19ListReferenceListsRequest\x12>\x0A\x06parent\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x12&chronicle.googleapis.com/ReferenceList\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12:\x0A\x04view\x18\x04 \x01(\x0E2,.google.cloud.chronicle.v1.ReferenceListView\"x\x0A\x1AListReferenceListsResponse\x12A\x0A\x0Freference_lists\x18\x01 \x03(\x0B2(.google.cloud.chronicle.v1.ReferenceList\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\xC3\x01\x0A\x1ACreateReferenceListRequest\x12>\x0A\x06parent\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x12&chronicle.googleapis.com/ReferenceList\x12E\x0A\x0Ereference_list\x18\x02 \x01(\x0B2(.google.cloud.chronicle.v1.ReferenceListB\x03\xE0A\x02\x12\x1E\x0A\x11reference_list_id\x18\x03 \x01(\x09B\x03\xE0A\x02\"\x94\x01\x0A\x1AUpdateReferenceListRequest\x12E\x0A\x0Ereference_list\x18\x01 \x01(\x0B2(.google.cloud.chronicle.v1.ReferenceListB\x03\xE0A\x02\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\"\xAA\x04\x0A\x0DReferenceList\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12\x19\x0A\x0Cdisplay_name\x18\x02 \x01(\x09B\x03\xE0A\x03\x12=\x0A\x14revision_create_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x18\x0A\x0Bdescription\x18\x04 \x01(\x09B\x03\xE0A\x02\x12C\x0A\x07entries\x18\x05 \x03(\x0B2-.google.cloud.chronicle.v1.ReferenceListEntryB\x03\xE0A\x02\x12\x12\x0A\x05rules\x18\x06 \x03(\x09B\x03\xE0A\x03\x12L\x0A\x0Bsyntax_type\x18\x08 \x01(\x0E22.google.cloud.chronicle.v1.ReferenceListSyntaxTypeB\x03\xE0A\x02\x12\$\x0A\x17rule_associations_count\x18\x09 \x01(\x05B\x03\xE0A\x03\x128\x0A\x0Ascope_info\x18\x0B \x01(\x0B2\$.google.cloud.chronicle.v1.ScopeInfo:\x8A\x01\xEAA\x86\x01\x0A&chronicle.googleapis.com/ReferenceList\x12\\projects/{project}/locations/{location}/instances/{instance}/referenceLists/{reference_list}\"(\x0A\x12ReferenceListEntry\x12\x12\x0A\x05value\x18\x01 \x01(\x09B\x03\xE0A\x02*\xC2\x01\x0A\x17ReferenceListSyntaxType\x12*\x0A&REFERENCE_LIST_SYNTAX_TYPE_UNSPECIFIED\x10\x00\x120\x0A,REFERENCE_LIST_SYNTAX_TYPE_PLAIN_TEXT_STRING\x10\x01\x12\$\x0A REFERENCE_LIST_SYNTAX_TYPE_REGEX\x10\x02\x12#\x0A\x1FREFERENCE_LIST_SYNTAX_TYPE_CIDR\x10\x03*u\x0A\x11ReferenceListView\x12#\x0A\x1FREFERENCE_LIST_VIEW_UNSPECIFIED\x10\x00\x12\x1D\x0A\x19REFERENCE_LIST_VIEW_BASIC\x10\x01\x12\x1C\x0A\x18REFERENCE_LIST_VIEW_FULL\x10\x022\xF5\x07\x0A\x14ReferenceListService\x12\xBF\x01\x0A\x10GetReferenceList\x122.google.cloud.chronicle.v1.GetReferenceListRequest\x1A(.google.cloud.chronicle.v1.ReferenceList\"M\xDAA\x04name\x82\xD3\xE4\x93\x02@\x12>/v1/{name=projects/*/locations/*/instances/*/referenceLists/*}\x12\xD2\x01\x0A\x12ListReferenceLists\x124.google.cloud.chronicle.v1.ListReferenceListsRequest\x1A5.google.cloud.chronicle.v1.ListReferenceListsResponse\"O\xDAA\x06parent\x82\xD3\xE4\x93\x02@\x12>/v1/{parent=projects/*/locations/*/instances/*}/referenceLists\x12\xF9\x01\x0A\x13CreateReferenceList\x125.google.cloud.chronicle.v1.CreateReferenceListRequest\x1A(.google.cloud.chronicle.v1.ReferenceList\"\x80\x01\xDAA'parent,reference_list,reference_list_id\x82\xD3\xE4\x93\x02P\">/v1/{parent=projects/*/locations/*/instances/*}/referenceLists:\x0Ereference_list\x12\xFB\x01\x0A\x13UpdateReferenceList\x125.google.cloud.chronicle.v1.UpdateReferenceListRequest\x1A(.google.cloud.chronicle.v1.ReferenceList\"\x82\x01\xDAA\x1Areference_list,update_mask\x82\xD3\xE4\x93\x02_2M/v1/{reference_list.name=projects/*/locations/*/instances/*/referenceLists/*}:\x0Ereference_list\x1AL\xCAA\x18chronicle.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xC9\x01\x0A\x1Dcom.google.cloud.chronicle.v1B\x12ReferenceListProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xAA\x02\x19Google.Cloud.Chronicle.V1\xCA\x02\x19Google\\Cloud\\Chronicle\\V1\xEA\x02\x1CGoogle::Cloud::Chronicle::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Chronicle/v1/proto/src/GPBMetadata/Google/Cloud/Chronicle/V1/Rule.php b/owl-bot-staging/Chronicle/v1/proto/src/GPBMetadata/Google/Cloud/Chronicle/V1/Rule.php deleted file mode 100644 index 752c16da4d3a..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/GPBMetadata/Google/Cloud/Chronicle/V1/Rule.php +++ /dev/null @@ -1,33 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xE2@\x0A\$google/cloud/chronicle/v1/rule.proto\x12\x19google.cloud.chronicle.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A#google/longrunning/operations.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x1Agoogle/type/interval.proto\"\x91\x09\x0A\x04Rule\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12\x18\x0A\x0Brevision_id\x18\x02 \x01(\x09B\x03\xE0A\x03\x12\x19\x0A\x0Cdisplay_name\x18\x03 \x01(\x09B\x03\xE0A\x03\x12\x0C\x0A\x04text\x18\x04 \x01(\x09\x12\x13\x0A\x06author\x18\x05 \x01(\x09B\x03\xE0A\x03\x12:\x0A\x08severity\x18\x06 \x01(\x0B2#.google.cloud.chronicle.v1.SeverityB\x03\xE0A\x03\x12D\x0A\x08metadata\x18\x07 \x03(\x0B2-.google.cloud.chronicle.v1.Rule.MetadataEntryB\x03\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x08 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12=\x0A\x14revision_create_time\x18\x09 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12P\x0A\x11compilation_state\x18\x0A \x01(\x0E20.google.cloud.chronicle.v1.Rule.CompilationStateB\x03\xE0A\x03\x126\x0A\x04type\x18\x0C \x01(\x0E2#.google.cloud.chronicle.v1.RuleTypeB\x03\xE0A\x03\x12G\x0A\x0Freference_lists\x18\x0D \x03(\x09B.\xE0A\x03\xFAA(\x0A&chronicle.googleapis.com/ReferenceList\x12M\x0A\x17allowed_run_frequencies\x18\x0E \x03(\x0E2'.google.cloud.chronicle.v1.RunFrequencyB\x03\xE0A\x03\x12\x0C\x0A\x04etag\x18\x0F \x01(\x09\x12<\x0A\x05scope\x18\x10 \x01(\x09B-\xFAA*\x0A(chronicle.googleapis.com/DataAccessScope\x12V\x0A\x17compilation_diagnostics\x18\x11 \x03(\x0B20.google.cloud.chronicle.v1.CompilationDiagnosticB\x03\xE0A\x03\x12.\x0A!near_real_time_live_rule_eligible\x18\x12 \x01(\x08B\x03\xE0A\x03\x12?\x0A\x0Binputs_used\x18\x14 \x01(\x0B2%.google.cloud.chronicle.v1.InputsUsedB\x03\xE0A\x03\x1A/\x0A\x0DMetadataEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"P\x0A\x10CompilationState\x12!\x0A\x1DCOMPILATION_STATE_UNSPECIFIED\x10\x00\x12\x0D\x0A\x09SUCCEEDED\x10\x01\x12\x0A\x0A\x06FAILED\x10\x02:m\xEAAj\x0A\x1Dchronicle.googleapis.com/Rule\x12Iprojects/{project}/locations/{location}/instances/{instance}/rules/{rule}\"\xCB\x05\x0A\x0ERuleDeployment\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x0F\x0A\x07enabled\x18\x02 \x01(\x08\x12\x10\x0A\x08alerting\x18\x03 \x01(\x08\x12\x10\x0A\x08archived\x18\x04 \x01(\x08\x125\x0A\x0Carchive_time\x18\x05 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12>\x0A\x0Drun_frequency\x18\x06 \x01(\x0E2'.google.cloud.chronicle.v1.RunFrequency\x12V\x0A\x0Fexecution_state\x18\x07 \x01(\x0E28.google.cloud.chronicle.v1.RuleDeployment.ExecutionStateB\x03\xE0A\x03\x12=\x0A\x0Eproducer_rules\x18\x08 \x03(\x09B%\xE0A\x03\xFAA\x1F\x12\x1Dchronicle.googleapis.com/Rule\x12=\x0A\x0Econsumer_rules\x18\x09 \x03(\x09B%\xE0A\x03\xFAA\x1F\x12\x1Dchronicle.googleapis.com/Rule\x12F\x0A\x1Dlast_alert_status_change_time\x18\x0A \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\"W\x0A\x0EExecutionState\x12\x1F\x0A\x1BEXECUTION_STATE_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07DEFAULT\x10\x01\x12\x0B\x0A\x07LIMITED\x10\x02\x12\x0A\x0A\x06PAUSED\x10\x03:\x82\x01\xEAA\x7F\x0A'chronicle.googleapis.com/RuleDeployment\x12Tprojects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment\"\xC8\x03\x0A\x09Retrohunt\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x124\x0A\x10process_interval\x18\x02 \x01(\x0B2\x15.google.type.IntervalB\x03\xE0A\x02\x126\x0A\x12execution_interval\x18\x03 \x01(\x0B2\x15.google.type.IntervalB\x03\xE0A\x03\x12>\x0A\x05state\x18\x04 \x01(\x0E2*.google.cloud.chronicle.v1.Retrohunt.StateB\x03\xE0A\x03\x12 \x0A\x13progress_percentage\x18\x05 \x01(\x02B\x03\xE0A\x03\"P\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07RUNNING\x10\x01\x12\x08\x0A\x04DONE\x10\x02\x12\x0D\x0A\x09CANCELLED\x10\x03\x12\x0A\x0A\x06FAILED\x10\x04:\x8A\x01\xEAA\x86\x01\x0A\"chronicle.googleapis.com/Retrohunt\x12`projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}\"~\x0A\x11CreateRuleRequest\x125\x0A\x06parent\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x12\x1Dchronicle.googleapis.com/Rule\x122\x0A\x04rule\x18\x02 \x01(\x0B2\x1F.google.cloud.chronicle.v1.RuleB\x03\xE0A\x02\"x\x0A\x0EGetRuleRequest\x123\x0A\x04name\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dchronicle.googleapis.com/Rule\x121\x0A\x04view\x18\x02 \x01(\x0E2#.google.cloud.chronicle.v1.RuleView\"\xB3\x01\x0A\x10ListRulesRequest\x125\x0A\x06parent\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x12\x1Dchronicle.googleapis.com/Rule\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x121\x0A\x04view\x18\x04 \x01(\x0E2#.google.cloud.chronicle.v1.RuleView\x12\x0E\x0A\x06filter\x18\x05 \x01(\x09\"\\\x0A\x11ListRulesResponse\x12.\x0A\x05rules\x18\x01 \x03(\x0B2\x1F.google.cloud.chronicle.v1.Rule\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"x\x0A\x11UpdateRuleRequest\x122\x0A\x04rule\x18\x01 \x01(\x0B2\x1F.google.cloud.chronicle.v1.RuleB\x03\xE0A\x02\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\"\\\x0A\x11DeleteRuleRequest\x123\x0A\x04name\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dchronicle.googleapis.com/Rule\x12\x12\x0A\x05force\x18\x02 \x01(\x08B\x03\xE0A\x01\"\xA9\x01\x0A\x18ListRuleRevisionsRequest\x123\x0A\x04name\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dchronicle.googleapis.com/Rule\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x121\x0A\x04view\x18\x04 \x01(\x0E2#.google.cloud.chronicle.v1.RuleView\"d\x0A\x19ListRuleRevisionsResponse\x12.\x0A\x05rules\x18\x01 \x03(\x0B2\x1F.google.cloud.chronicle.v1.Rule\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\x92\x01\x0A\x16CreateRetrohuntRequest\x12:\x0A\x06parent\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x12\"chronicle.googleapis.com/Retrohunt\x12<\x0A\x09retrohunt\x18\x02 \x01(\x0B2\$.google.cloud.chronicle.v1.RetrohuntB\x03\xE0A\x02\"O\x0A\x13GetRetrohuntRequest\x128\x0A\x04name\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x0A\"chronicle.googleapis.com/Retrohunt\"\x8A\x01\x0A\x15ListRetrohuntsRequest\x12:\x0A\x06parent\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x12\"chronicle.googleapis.com/Retrohunt\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12\x0E\x0A\x06filter\x18\x04 \x01(\x09\"k\x0A\x16ListRetrohuntsResponse\x128\x0A\x0Aretrohunts\x18\x01 \x03(\x0B2\$.google.cloud.chronicle.v1.Retrohunt\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"Y\x0A\x18GetRuleDeploymentRequest\x12=\x0A\x04name\x18\x01 \x01(\x09B/\xE0A\x02\xFAA)\x0A'chronicle.googleapis.com/RuleDeployment\"\x94\x01\x0A\x1AListRuleDeploymentsRequest\x12?\x0A\x06parent\x18\x01 \x01(\x09B/\xE0A\x02\xFAA)\x12'chronicle.googleapis.com/RuleDeployment\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12\x0E\x0A\x06filter\x18\x04 \x01(\x09\"{\x0A\x1BListRuleDeploymentsResponse\x12C\x0A\x10rule_deployments\x18\x01 \x03(\x0B2).google.cloud.chronicle.v1.RuleDeployment\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\x9C\x01\x0A\x1BUpdateRuleDeploymentRequest\x12G\x0A\x0Frule_deployment\x18\x01 \x01(\x0B2).google.cloud.chronicle.v1.RuleDeploymentB\x03\xE0A\x02\x124\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x02\"y\x0A\x13CompilationPosition\x12\x17\x0A\x0Astart_line\x18\x01 \x01(\x05B\x03\xE0A\x03\x12\x19\x0A\x0Cstart_column\x18\x02 \x01(\x05B\x03\xE0A\x03\x12\x15\x0A\x08end_line\x18\x03 \x01(\x05B\x03\xE0A\x03\x12\x17\x0A\x0Aend_column\x18\x04 \x01(\x05B\x03\xE0A\x03\"\x96\x02\x0A\x15CompilationDiagnostic\x12\x14\x0A\x07message\x18\x01 \x01(\x09B\x03\xE0A\x03\x12E\x0A\x08position\x18\x02 \x01(\x0B2..google.cloud.chronicle.v1.CompilationPositionB\x03\xE0A\x03\x12P\x0A\x08severity\x18\x03 \x01(\x0E29.google.cloud.chronicle.v1.CompilationDiagnostic.SeverityB\x03\xE0A\x03\x12\x10\x0A\x03uri\x18\x05 \x01(\x09B\x03\xE0A\x03\"<\x0A\x08Severity\x12\x18\x0A\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07WARNING\x10\x01\x12\x09\x0A\x05ERROR\x10\x02\" \x0A\x08Severity\x12\x14\x0A\x0Cdisplay_name\x18\x01 \x01(\x09\"\x9A\x01\x0A\x11RetrohuntMetadata\x125\x0A\x09retrohunt\x18\x01 \x01(\x09B\"\xFAA\x1F\x0A\x1Dchronicle.googleapis.com/Rule\x121\x0A\x12execution_interval\x18\x02 \x01(\x0B2\x15.google.type.Interval\x12\x1B\x0A\x13progress_percentage\x18\x03 \x01(\x02\"Z\x0A\x0AInputsUsed\x12\x15\x0A\x08uses_udm\x18\x01 \x01(\x08B\x03\xE0A\x01\x12\x18\x0A\x0Buses_entity\x18\x02 \x01(\x08B\x03\xE0A\x01\x12\x1B\x0A\x0Euses_detection\x18\x03 \x01(\x08B\x03\xE0A\x01*N\x0A\x0CRunFrequency\x12\x1D\x0A\x19RUN_FREQUENCY_UNSPECIFIED\x10\x00\x12\x08\x0A\x04LIVE\x10\x01\x12\x0A\x0A\x06HOURLY\x10\x02\x12\x09\x0A\x05DAILY\x10\x03*H\x0A\x08RuleType\x12\x19\x0A\x15RULE_TYPE_UNSPECIFIED\x10\x00\x12\x10\x0A\x0CSINGLE_EVENT\x10\x01\x12\x0F\x0A\x0BMULTI_EVENT\x10\x02*V\x0A\x08RuleView\x12\x19\x0A\x15RULE_VIEW_UNSPECIFIED\x10\x00\x12\x09\x0A\x05BASIC\x10\x01\x12\x08\x0A\x04FULL\x10\x02\x12\x1A\x0A\x16REVISION_METADATA_ONLY\x10\x032\xA9\x13\x0A\x0BRuleService\x12\xAE\x01\x0A\x0ACreateRule\x12,.google.cloud.chronicle.v1.CreateRuleRequest\x1A\x1F.google.cloud.chronicle.v1.Rule\"Q\xDAA\x0Bparent,rule\x82\xD3\xE4\x93\x02=\"5/v1/{parent=projects/*/locations/*/instances/*}/rules:\x04rule\x12\x9B\x01\x0A\x07GetRule\x12).google.cloud.chronicle.v1.GetRuleRequest\x1A\x1F.google.cloud.chronicle.v1.Rule\"D\xDAA\x04name\x82\xD3\xE4\x93\x027\x125/v1/{name=projects/*/locations/*/instances/*/rules/*}\x12\xAE\x01\x0A\x09ListRules\x12+.google.cloud.chronicle.v1.ListRulesRequest\x1A,.google.cloud.chronicle.v1.ListRulesResponse\"F\xDAA\x06parent\x82\xD3\xE4\x93\x027\x125/v1/{parent=projects/*/locations/*/instances/*}/rules\x12\xB8\x01\x0A\x0AUpdateRule\x12,.google.cloud.chronicle.v1.UpdateRuleRequest\x1A\x1F.google.cloud.chronicle.v1.Rule\"[\xDAA\x10rule,update_mask\x82\xD3\xE4\x93\x02B2:/v1/{rule.name=projects/*/locations/*/instances/*/rules/*}:\x04rule\x12\x98\x01\x0A\x0ADeleteRule\x12,.google.cloud.chronicle.v1.DeleteRuleRequest\x1A\x16.google.protobuf.Empty\"D\xDAA\x04name\x82\xD3\xE4\x93\x027*5/v1/{name=projects/*/locations/*/instances/*/rules/*}\x12\xD2\x01\x0A\x11ListRuleRevisions\x123.google.cloud.chronicle.v1.ListRuleRevisionsRequest\x1A4.google.cloud.chronicle.v1.ListRuleRevisionsResponse\"R\xDAA\x04name\x82\xD3\xE4\x93\x02E\x12C/v1/{name=projects/*/locations/*/instances/*/rules/*}:listRevisions\x12\xEF\x01\x0A\x0FCreateRetrohunt\x121.google.cloud.chronicle.v1.CreateRetrohuntRequest\x1A\x1D.google.longrunning.Operation\"\x89\x01\xCAA\x1E\x0A\x09Retrohunt\x12\x11RetrohuntMetadata\xDAA\x10parent,retrohunt\x82\xD3\xE4\x93\x02O\"B/v1/{parent=projects/*/locations/*/instances/*/rules/*}/retrohunts:\x09retrohunt\x12\xB7\x01\x0A\x0CGetRetrohunt\x12..google.cloud.chronicle.v1.GetRetrohuntRequest\x1A\$.google.cloud.chronicle.v1.Retrohunt\"Q\xDAA\x04name\x82\xD3\xE4\x93\x02D\x12B/v1/{name=projects/*/locations/*/instances/*/rules/*/retrohunts/*}\x12\xCA\x01\x0A\x0EListRetrohunts\x120.google.cloud.chronicle.v1.ListRetrohuntsRequest\x1A1.google.cloud.chronicle.v1.ListRetrohuntsResponse\"S\xDAA\x06parent\x82\xD3\xE4\x93\x02D\x12B/v1/{parent=projects/*/locations/*/instances/*/rules/*}/retrohunts\x12\xC4\x01\x0A\x11GetRuleDeployment\x123.google.cloud.chronicle.v1.GetRuleDeploymentRequest\x1A).google.cloud.chronicle.v1.RuleDeployment\"O\xDAA\x04name\x82\xD3\xE4\x93\x02B\x12@/v1/{name=projects/*/locations/*/instances/*/rules/*/deployment}\x12\xDA\x01\x0A\x13ListRuleDeployments\x125.google.cloud.chronicle.v1.ListRuleDeploymentsRequest\x1A6.google.cloud.chronicle.v1.ListRuleDeploymentsResponse\"T\xDAA\x06parent\x82\xD3\xE4\x93\x02E\x12C/v1/{parent=projects/*/locations/*/instances/*/rules/*}/deployments\x12\x83\x02\x0A\x14UpdateRuleDeployment\x126.google.cloud.chronicle.v1.UpdateRuleDeploymentRequest\x1A).google.cloud.chronicle.v1.RuleDeployment\"\x87\x01\xDAA\x1Brule_deployment,update_mask\x82\xD3\xE4\x93\x02c2P/v1/{rule_deployment.name=projects/*/locations/*/instances/*/rules/*/deployment}:\x0Frule_deployment\x1AL\xCAA\x18chronicle.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xC0\x01\x0A\x1Dcom.google.cloud.chronicle.v1B\x09RuleProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xAA\x02\x19Google.Cloud.Chronicle.V1\xCA\x02\x19Google\\Cloud\\Chronicle\\V1\xEA\x02\x1CGoogle::Cloud::Chronicle::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CompilationDiagnostic.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CompilationDiagnostic.php deleted file mode 100644 index 0bb762683f68..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CompilationDiagnostic.php +++ /dev/null @@ -1,193 +0,0 @@ -google.cloud.chronicle.v1.CompilationDiagnostic - */ -class CompilationDiagnostic extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The diagnostic message. - * - * Generated from protobuf field string message = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $message = ''; - /** - * Output only. The approximate position in the rule text associated with the - * compilation diagnostic. - * Compilation Position may be empty. - * - * Generated from protobuf field .google.cloud.chronicle.v1.CompilationPosition position = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $position = null; - /** - * Output only. The severity of a rule's compilation diagnostic. - * - * Generated from protobuf field .google.cloud.chronicle.v1.CompilationDiagnostic.Severity severity = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $severity = 0; - /** - * Output only. Link to documentation that describes a diagnostic in more - * detail. - * - * Generated from protobuf field string uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $message - * Output only. The diagnostic message. - * @type \Google\Cloud\Chronicle\V1\CompilationPosition $position - * Output only. The approximate position in the rule text associated with the - * compilation diagnostic. - * Compilation Position may be empty. - * @type int $severity - * Output only. The severity of a rule's compilation diagnostic. - * @type string $uri - * Output only. Link to documentation that describes a diagnostic in more - * detail. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\Rule::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The diagnostic message. - * - * Generated from protobuf field string message = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * Output only. The diagnostic message. - * - * Generated from protobuf field string message = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - - /** - * Output only. The approximate position in the rule text associated with the - * compilation diagnostic. - * Compilation Position may be empty. - * - * Generated from protobuf field .google.cloud.chronicle.v1.CompilationPosition position = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Chronicle\V1\CompilationPosition|null - */ - public function getPosition() - { - return $this->position; - } - - public function hasPosition() - { - return isset($this->position); - } - - public function clearPosition() - { - unset($this->position); - } - - /** - * Output only. The approximate position in the rule text associated with the - * compilation diagnostic. - * Compilation Position may be empty. - * - * Generated from protobuf field .google.cloud.chronicle.v1.CompilationPosition position = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Chronicle\V1\CompilationPosition $var - * @return $this - */ - public function setPosition($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\CompilationPosition::class); - $this->position = $var; - - return $this; - } - - /** - * Output only. The severity of a rule's compilation diagnostic. - * - * Generated from protobuf field .google.cloud.chronicle.v1.CompilationDiagnostic.Severity severity = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getSeverity() - { - return $this->severity; - } - - /** - * Output only. The severity of a rule's compilation diagnostic. - * - * Generated from protobuf field .google.cloud.chronicle.v1.CompilationDiagnostic.Severity severity = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setSeverity($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Chronicle\V1\CompilationDiagnostic\Severity::class); - $this->severity = $var; - - return $this; - } - - /** - * Output only. Link to documentation that describes a diagnostic in more - * detail. - * - * Generated from protobuf field string uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * Output only. Link to documentation that describes a diagnostic in more - * detail. - * - * Generated from protobuf field string uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CompilationDiagnostic/Severity.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CompilationDiagnostic/Severity.php deleted file mode 100644 index 09e4fc379326..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CompilationDiagnostic/Severity.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.chronicle.v1.CompilationDiagnostic.Severity - */ -class Severity -{ - /** - * An unspecified severity level. - * - * Generated from protobuf enum SEVERITY_UNSPECIFIED = 0; - */ - const SEVERITY_UNSPECIFIED = 0; - /** - * A compilation warning. - * - * Generated from protobuf enum WARNING = 1; - */ - const WARNING = 1; - /** - * A compilation error. - * - * Generated from protobuf enum ERROR = 2; - */ - const ERROR = 2; - - private static $valueToName = [ - self::SEVERITY_UNSPECIFIED => 'SEVERITY_UNSPECIFIED', - self::WARNING => 'WARNING', - self::ERROR => 'ERROR', - ]; - - 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CompilationPosition.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CompilationPosition.php deleted file mode 100644 index 2ab7cc676528..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CompilationPosition.php +++ /dev/null @@ -1,170 +0,0 @@ -google.cloud.chronicle.v1.CompilationPosition - */ -class CompilationPosition extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Start line number, beginning at 1. - * - * Generated from protobuf field int32 start_line = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $start_line = 0; - /** - * Output only. Start column number, beginning at 1. - * - * Generated from protobuf field int32 start_column = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $start_column = 0; - /** - * Output only. End line number, beginning at 1. - * - * Generated from protobuf field int32 end_line = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_line = 0; - /** - * Output only. End column number, beginning at 1. - * - * Generated from protobuf field int32 end_column = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_column = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $start_line - * Output only. Start line number, beginning at 1. - * @type int $start_column - * Output only. Start column number, beginning at 1. - * @type int $end_line - * Output only. End line number, beginning at 1. - * @type int $end_column - * Output only. End column number, beginning at 1. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\Rule::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Start line number, beginning at 1. - * - * Generated from protobuf field int32 start_line = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getStartLine() - { - return $this->start_line; - } - - /** - * Output only. Start line number, beginning at 1. - * - * Generated from protobuf field int32 start_line = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setStartLine($var) - { - GPBUtil::checkInt32($var); - $this->start_line = $var; - - return $this; - } - - /** - * Output only. Start column number, beginning at 1. - * - * Generated from protobuf field int32 start_column = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getStartColumn() - { - return $this->start_column; - } - - /** - * Output only. Start column number, beginning at 1. - * - * Generated from protobuf field int32 start_column = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setStartColumn($var) - { - GPBUtil::checkInt32($var); - $this->start_column = $var; - - return $this; - } - - /** - * Output only. End line number, beginning at 1. - * - * Generated from protobuf field int32 end_line = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getEndLine() - { - return $this->end_line; - } - - /** - * Output only. End line number, beginning at 1. - * - * Generated from protobuf field int32 end_line = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setEndLine($var) - { - GPBUtil::checkInt32($var); - $this->end_line = $var; - - return $this; - } - - /** - * Output only. End column number, beginning at 1. - * - * Generated from protobuf field int32 end_column = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getEndColumn() - { - return $this->end_column; - } - - /** - * Output only. End column number, beginning at 1. - * - * Generated from protobuf field int32 end_column = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setEndColumn($var) - { - GPBUtil::checkInt32($var); - $this->end_column = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateDataAccessLabelRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateDataAccessLabelRequest.php deleted file mode 100644 index 53319e2e95d3..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateDataAccessLabelRequest.php +++ /dev/null @@ -1,183 +0,0 @@ -google.cloud.chronicle.v1.CreateDataAccessLabelRequest - */ -class CreateDataAccessLabelRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource where this Data Access Label will be created. - * Format: `projects/{project}/locations/{location}/instances/{instance}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Data access label to create. - * - * Generated from protobuf field .google.cloud.chronicle.v1.DataAccessLabel data_access_label = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $data_access_label = null; - /** - * Required. The ID to use for the data access label, which will become the - * label's display name and the final component of the label's resource name. - * The maximum number of characters should be 63. Regex pattern is as per AIP: - * https://google.aip.dev/122#resource-id-segments - * - * Generated from protobuf field string data_access_label_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $data_access_label_id = ''; - - /** - * @param string $parent Required. The parent resource where this Data Access Label will be created. - * Format: `projects/{project}/locations/{location}/instances/{instance}` - * Please see {@see DataAccessControlServiceClient::instanceName()} for help formatting this field. - * @param \Google\Cloud\Chronicle\V1\DataAccessLabel $dataAccessLabel Required. Data access label to create. - * @param string $dataAccessLabelId Required. The ID to use for the data access label, which will become the - * label's display name and the final component of the label's resource name. - * The maximum number of characters should be 63. Regex pattern is as per AIP: - * https://google.aip.dev/122#resource-id-segments - * - * @return \Google\Cloud\Chronicle\V1\CreateDataAccessLabelRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Chronicle\V1\DataAccessLabel $dataAccessLabel, string $dataAccessLabelId): self - { - return (new self()) - ->setParent($parent) - ->setDataAccessLabel($dataAccessLabel) - ->setDataAccessLabelId($dataAccessLabelId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource where this Data Access Label will be created. - * Format: `projects/{project}/locations/{location}/instances/{instance}` - * @type \Google\Cloud\Chronicle\V1\DataAccessLabel $data_access_label - * Required. Data access label to create. - * @type string $data_access_label_id - * Required. The ID to use for the data access label, which will become the - * label's display name and the final component of the label's resource name. - * The maximum number of characters should be 63. Regex pattern is as per AIP: - * https://google.aip.dev/122#resource-id-segments - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\DataAccessControl::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource where this Data Access Label will be created. - * Format: `projects/{project}/locations/{location}/instances/{instance}` - * - * 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 parent resource where this Data Access Label will be created. - * Format: `projects/{project}/locations/{location}/instances/{instance}` - * - * 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. Data access label to create. - * - * Generated from protobuf field .google.cloud.chronicle.v1.DataAccessLabel data_access_label = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Chronicle\V1\DataAccessLabel|null - */ - public function getDataAccessLabel() - { - return $this->data_access_label; - } - - public function hasDataAccessLabel() - { - return isset($this->data_access_label); - } - - public function clearDataAccessLabel() - { - unset($this->data_access_label); - } - - /** - * Required. Data access label to create. - * - * Generated from protobuf field .google.cloud.chronicle.v1.DataAccessLabel data_access_label = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Chronicle\V1\DataAccessLabel $var - * @return $this - */ - public function setDataAccessLabel($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DataAccessLabel::class); - $this->data_access_label = $var; - - return $this; - } - - /** - * Required. The ID to use for the data access label, which will become the - * label's display name and the final component of the label's resource name. - * The maximum number of characters should be 63. Regex pattern is as per AIP: - * https://google.aip.dev/122#resource-id-segments - * - * Generated from protobuf field string data_access_label_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDataAccessLabelId() - { - return $this->data_access_label_id; - } - - /** - * Required. The ID to use for the data access label, which will become the - * label's display name and the final component of the label's resource name. - * The maximum number of characters should be 63. Regex pattern is as per AIP: - * https://google.aip.dev/122#resource-id-segments - * - * Generated from protobuf field string data_access_label_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDataAccessLabelId($var) - { - GPBUtil::checkString($var, True); - $this->data_access_label_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateDataAccessScopeRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateDataAccessScopeRequest.php deleted file mode 100644 index d4d59d290e1b..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateDataAccessScopeRequest.php +++ /dev/null @@ -1,178 +0,0 @@ -google.cloud.chronicle.v1.CreateDataAccessScopeRequest - */ -class CreateDataAccessScopeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource where this Data Access Scope will be created. - * Format: `projects/{project}/locations/{location}/instances/{instance}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Data access scope to create. - * - * Generated from protobuf field .google.cloud.chronicle.v1.DataAccessScope data_access_scope = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $data_access_scope = null; - /** - * Required. The user provided scope id which will become the last part of the - * name of the scope resource. Needs to be compliant with - * https://google.aip.dev/122 - * - * Generated from protobuf field string data_access_scope_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $data_access_scope_id = ''; - - /** - * @param string $parent Required. The parent resource where this Data Access Scope will be created. - * Format: `projects/{project}/locations/{location}/instances/{instance}` - * Please see {@see DataAccessControlServiceClient::instanceName()} for help formatting this field. - * @param \Google\Cloud\Chronicle\V1\DataAccessScope $dataAccessScope Required. Data access scope to create. - * @param string $dataAccessScopeId Required. The user provided scope id which will become the last part of the - * name of the scope resource. Needs to be compliant with - * https://google.aip.dev/122 - * - * @return \Google\Cloud\Chronicle\V1\CreateDataAccessScopeRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Chronicle\V1\DataAccessScope $dataAccessScope, string $dataAccessScopeId): self - { - return (new self()) - ->setParent($parent) - ->setDataAccessScope($dataAccessScope) - ->setDataAccessScopeId($dataAccessScopeId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource where this Data Access Scope will be created. - * Format: `projects/{project}/locations/{location}/instances/{instance}` - * @type \Google\Cloud\Chronicle\V1\DataAccessScope $data_access_scope - * Required. Data access scope to create. - * @type string $data_access_scope_id - * Required. The user provided scope id which will become the last part of the - * name of the scope resource. Needs to be compliant with - * https://google.aip.dev/122 - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\DataAccessControl::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource where this Data Access Scope will be created. - * Format: `projects/{project}/locations/{location}/instances/{instance}` - * - * 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 parent resource where this Data Access Scope will be created. - * Format: `projects/{project}/locations/{location}/instances/{instance}` - * - * 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. Data access scope to create. - * - * Generated from protobuf field .google.cloud.chronicle.v1.DataAccessScope data_access_scope = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Chronicle\V1\DataAccessScope|null - */ - public function getDataAccessScope() - { - return $this->data_access_scope; - } - - public function hasDataAccessScope() - { - return isset($this->data_access_scope); - } - - public function clearDataAccessScope() - { - unset($this->data_access_scope); - } - - /** - * Required. Data access scope to create. - * - * Generated from protobuf field .google.cloud.chronicle.v1.DataAccessScope data_access_scope = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Chronicle\V1\DataAccessScope $var - * @return $this - */ - public function setDataAccessScope($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DataAccessScope::class); - $this->data_access_scope = $var; - - return $this; - } - - /** - * Required. The user provided scope id which will become the last part of the - * name of the scope resource. Needs to be compliant with - * https://google.aip.dev/122 - * - * Generated from protobuf field string data_access_scope_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDataAccessScopeId() - { - return $this->data_access_scope_id; - } - - /** - * Required. The user provided scope id which will become the last part of the - * name of the scope resource. Needs to be compliant with - * https://google.aip.dev/122 - * - * Generated from protobuf field string data_access_scope_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDataAccessScopeId($var) - { - GPBUtil::checkString($var, True); - $this->data_access_scope_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateReferenceListRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateReferenceListRequest.php deleted file mode 100644 index dabeb7c2fc4b..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateReferenceListRequest.php +++ /dev/null @@ -1,193 +0,0 @@ -google.cloud.chronicle.v1.CreateReferenceListRequest - */ -class CreateReferenceListRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource where this reference list will be created. - * Format: `projects/{project}/locations/{location}/instances/{instance}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The reference list to create. - * - * Generated from protobuf field .google.cloud.chronicle.v1.ReferenceList reference_list = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $reference_list = null; - /** - * Required. The ID to use for the reference list. This is also the display - * name for the reference list. It must satisfy the following requirements: - * - Starts with letter. - * - Contains only letters, numbers and underscore. - * - Has length less than 256. - * - Must be unique. - * - * Generated from protobuf field string reference_list_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $reference_list_id = ''; - - /** - * @param string $parent Required. The parent resource where this reference list will be created. - * Format: `projects/{project}/locations/{location}/instances/{instance}` - * Please see {@see ReferenceListServiceClient::instanceName()} for help formatting this field. - * @param \Google\Cloud\Chronicle\V1\ReferenceList $referenceList Required. The reference list to create. - * @param string $referenceListId Required. The ID to use for the reference list. This is also the display - * name for the reference list. It must satisfy the following requirements: - * - Starts with letter. - * - Contains only letters, numbers and underscore. - * - Has length less than 256. - * - Must be unique. - * - * @return \Google\Cloud\Chronicle\V1\CreateReferenceListRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Chronicle\V1\ReferenceList $referenceList, string $referenceListId): self - { - return (new self()) - ->setParent($parent) - ->setReferenceList($referenceList) - ->setReferenceListId($referenceListId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource where this reference list will be created. - * Format: `projects/{project}/locations/{location}/instances/{instance}` - * @type \Google\Cloud\Chronicle\V1\ReferenceList $reference_list - * Required. The reference list to create. - * @type string $reference_list_id - * Required. The ID to use for the reference list. This is also the display - * name for the reference list. It must satisfy the following requirements: - * - Starts with letter. - * - Contains only letters, numbers and underscore. - * - Has length less than 256. - * - Must be unique. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\ReferenceList::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource where this reference list will be created. - * Format: `projects/{project}/locations/{location}/instances/{instance}` - * - * 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 parent resource where this reference list will be created. - * Format: `projects/{project}/locations/{location}/instances/{instance}` - * - * 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 reference list to create. - * - * Generated from protobuf field .google.cloud.chronicle.v1.ReferenceList reference_list = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Chronicle\V1\ReferenceList|null - */ - public function getReferenceList() - { - return $this->reference_list; - } - - public function hasReferenceList() - { - return isset($this->reference_list); - } - - public function clearReferenceList() - { - unset($this->reference_list); - } - - /** - * Required. The reference list to create. - * - * Generated from protobuf field .google.cloud.chronicle.v1.ReferenceList reference_list = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Chronicle\V1\ReferenceList $var - * @return $this - */ - public function setReferenceList($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\ReferenceList::class); - $this->reference_list = $var; - - return $this; - } - - /** - * Required. The ID to use for the reference list. This is also the display - * name for the reference list. It must satisfy the following requirements: - * - Starts with letter. - * - Contains only letters, numbers and underscore. - * - Has length less than 256. - * - Must be unique. - * - * Generated from protobuf field string reference_list_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getReferenceListId() - { - return $this->reference_list_id; - } - - /** - * Required. The ID to use for the reference list. This is also the display - * name for the reference list. It must satisfy the following requirements: - * - Starts with letter. - * - Contains only letters, numbers and underscore. - * - Has length less than 256. - * - Must be unique. - * - * Generated from protobuf field string reference_list_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setReferenceListId($var) - { - GPBUtil::checkString($var, True); - $this->reference_list_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateRetrohuntRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateRetrohuntRequest.php deleted file mode 100644 index 94af572d344c..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateRetrohuntRequest.php +++ /dev/null @@ -1,137 +0,0 @@ -google.cloud.chronicle.v1.CreateRetrohuntRequest - */ -class CreateRetrohuntRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent of retrohunt, which is a rule. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The retrohunt to create. - * - * Generated from protobuf field .google.cloud.chronicle.v1.Retrohunt retrohunt = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $retrohunt = null; - - /** - * @param string $parent Required. The parent of retrohunt, which is a rule. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - * Please see {@see RuleServiceClient::ruleName()} for help formatting this field. - * @param \Google\Cloud\Chronicle\V1\Retrohunt $retrohunt Required. The retrohunt to create. - * - * @return \Google\Cloud\Chronicle\V1\CreateRetrohuntRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Chronicle\V1\Retrohunt $retrohunt): self - { - return (new self()) - ->setParent($parent) - ->setRetrohunt($retrohunt); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent of retrohunt, which is a rule. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - * @type \Google\Cloud\Chronicle\V1\Retrohunt $retrohunt - * Required. The retrohunt to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\Rule::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent of retrohunt, which is a rule. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - * - * 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 parent of retrohunt, which is a rule. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - * - * 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 retrohunt to create. - * - * Generated from protobuf field .google.cloud.chronicle.v1.Retrohunt retrohunt = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Chronicle\V1\Retrohunt|null - */ - public function getRetrohunt() - { - return $this->retrohunt; - } - - public function hasRetrohunt() - { - return isset($this->retrohunt); - } - - public function clearRetrohunt() - { - unset($this->retrohunt); - } - - /** - * Required. The retrohunt to create. - * - * Generated from protobuf field .google.cloud.chronicle.v1.Retrohunt retrohunt = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Chronicle\V1\Retrohunt $var - * @return $this - */ - public function setRetrohunt($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\Retrohunt::class); - $this->retrohunt = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateRuleRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateRuleRequest.php deleted file mode 100644 index 883ebb114ef8..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateRuleRequest.php +++ /dev/null @@ -1,132 +0,0 @@ -google.cloud.chronicle.v1.CreateRuleRequest - */ -class CreateRuleRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource where this rule will be created. - * Format: `projects/{project}/locations/{location}/instances/{instance}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The rule to create. - * - * Generated from protobuf field .google.cloud.chronicle.v1.Rule rule = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $rule = null; - - /** - * @param string $parent Required. The parent resource where this rule will be created. - * Format: `projects/{project}/locations/{location}/instances/{instance}` - * Please see {@see RuleServiceClient::instanceName()} for help formatting this field. - * @param \Google\Cloud\Chronicle\V1\Rule $rule Required. The rule to create. - * - * @return \Google\Cloud\Chronicle\V1\CreateRuleRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Chronicle\V1\Rule $rule): self - { - return (new self()) - ->setParent($parent) - ->setRule($rule); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource where this rule will be created. - * Format: `projects/{project}/locations/{location}/instances/{instance}` - * @type \Google\Cloud\Chronicle\V1\Rule $rule - * Required. The rule to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\Rule::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource where this rule will be created. - * Format: `projects/{project}/locations/{location}/instances/{instance}` - * - * 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 parent resource where this rule will be created. - * Format: `projects/{project}/locations/{location}/instances/{instance}` - * - * 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 rule to create. - * - * Generated from protobuf field .google.cloud.chronicle.v1.Rule rule = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Chronicle\V1\Rule|null - */ - public function getRule() - { - return $this->rule; - } - - public function hasRule() - { - return isset($this->rule); - } - - public function clearRule() - { - unset($this->rule); - } - - /** - * Required. The rule to create. - * - * Generated from protobuf field .google.cloud.chronicle.v1.Rule rule = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Chronicle\V1\Rule $var - * @return $this - */ - public function setRule($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\Rule::class); - $this->rule = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateWatchlistRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateWatchlistRequest.php deleted file mode 100644 index 8909973322b9..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/CreateWatchlistRequest.php +++ /dev/null @@ -1,184 +0,0 @@ -google.cloud.chronicle.v1.CreateWatchlistRequest - */ -class CreateWatchlistRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource where this watchlist will be created. - * Format: `projects/{project}/locations/{location}/instances/{instance}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The ID to use for the watchlist, - * which will become the final component of the watchlist's resource name. - * This value should be 4-63 characters, and valid characters - * are /[a-z][0-9]-/. - * - * Generated from protobuf field string watchlist_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $watchlist_id = ''; - /** - * Required. The watchlist to create. - * - * Generated from protobuf field .google.cloud.chronicle.v1.Watchlist watchlist = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $watchlist = null; - - /** - * @param string $parent Required. The parent resource where this watchlist will be created. - * Format: `projects/{project}/locations/{location}/instances/{instance}` - * Please see {@see EntityServiceClient::instanceName()} for help formatting this field. - * @param \Google\Cloud\Chronicle\V1\Watchlist $watchlist Required. The watchlist to create. - * @param string $watchlistId Optional. The ID to use for the watchlist, - * which will become the final component of the watchlist's resource name. - * - * This value should be 4-63 characters, and valid characters - * are /[a-z][0-9]-/. - * - * @return \Google\Cloud\Chronicle\V1\CreateWatchlistRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Chronicle\V1\Watchlist $watchlist, string $watchlistId): self - { - return (new self()) - ->setParent($parent) - ->setWatchlist($watchlist) - ->setWatchlistId($watchlistId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource where this watchlist will be created. - * Format: `projects/{project}/locations/{location}/instances/{instance}` - * @type string $watchlist_id - * Optional. The ID to use for the watchlist, - * which will become the final component of the watchlist's resource name. - * This value should be 4-63 characters, and valid characters - * are /[a-z][0-9]-/. - * @type \Google\Cloud\Chronicle\V1\Watchlist $watchlist - * Required. The watchlist to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\Entity::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource where this watchlist will be created. - * Format: `projects/{project}/locations/{location}/instances/{instance}` - * - * 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 parent resource where this watchlist will be created. - * Format: `projects/{project}/locations/{location}/instances/{instance}` - * - * 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 ID to use for the watchlist, - * which will become the final component of the watchlist's resource name. - * This value should be 4-63 characters, and valid characters - * are /[a-z][0-9]-/. - * - * Generated from protobuf field string watchlist_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getWatchlistId() - { - return $this->watchlist_id; - } - - /** - * Optional. The ID to use for the watchlist, - * which will become the final component of the watchlist's resource name. - * This value should be 4-63 characters, and valid characters - * are /[a-z][0-9]-/. - * - * Generated from protobuf field string watchlist_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setWatchlistId($var) - { - GPBUtil::checkString($var, True); - $this->watchlist_id = $var; - - return $this; - } - - /** - * Required. The watchlist to create. - * - * Generated from protobuf field .google.cloud.chronicle.v1.Watchlist watchlist = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Chronicle\V1\Watchlist|null - */ - public function getWatchlist() - { - return $this->watchlist; - } - - public function hasWatchlist() - { - return isset($this->watchlist); - } - - public function clearWatchlist() - { - unset($this->watchlist); - } - - /** - * Required. The watchlist to create. - * - * Generated from protobuf field .google.cloud.chronicle.v1.Watchlist watchlist = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Chronicle\V1\Watchlist $var - * @return $this - */ - public function setWatchlist($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\Watchlist::class); - $this->watchlist = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataAccessLabel.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataAccessLabel.php deleted file mode 100644 index 9eb65ff6b99b..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataAccessLabel.php +++ /dev/null @@ -1,337 +0,0 @@ -google.cloud.chronicle.v1.DataAccessLabel - */ -class DataAccessLabel extends \Google\Protobuf\Internal\Message -{ - /** - * The unique resource name of the data access label. - * - * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Output only. The short name displayed for the label as it appears on event - * data. - * - * Generated from protobuf field string display_name = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $display_name = ''; - /** - * Output only. The time at which the data access label was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time at which the data access label was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. The user who created the data access label. - * - * Generated from protobuf field string author = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $author = ''; - /** - * Output only. The user who last updated the data access label. - * - * Generated from protobuf field string last_editor = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $last_editor = ''; - /** - * Optional. A description of the data access label for a human reader. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - protected $definition; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $udm_query - * A UDM query over event data. - * @type string $name - * The unique resource name of the data access label. - * @type string $display_name - * Output only. The short name displayed for the label as it appears on event - * data. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time at which the data access label was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time at which the data access label was last updated. - * @type string $author - * Output only. The user who created the data access label. - * @type string $last_editor - * Output only. The user who last updated the data access label. - * @type string $description - * Optional. A description of the data access label for a human reader. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\DataAccessControl::initOnce(); - parent::__construct($data); - } - - /** - * A UDM query over event data. - * - * Generated from protobuf field string udm_query = 3; - * @return string - */ - public function getUdmQuery() - { - return $this->readOneof(3); - } - - public function hasUdmQuery() - { - return $this->hasOneof(3); - } - - /** - * A UDM query over event data. - * - * Generated from protobuf field string udm_query = 3; - * @param string $var - * @return $this - */ - public function setUdmQuery($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * The unique resource name of the data access label. - * - * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The unique resource name of the data access label. - * - * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The short name displayed for the label as it appears on event - * data. - * - * Generated from protobuf field string display_name = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Output only. The short name displayed for the label as it appears on event - * data. - * - * Generated from protobuf field string display_name = 8 [(.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; - } - - /** - * Output only. The time at which the data access label was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @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); - } - - /** - * Output only. The time at which the data access label was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time at which the data access label was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @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); - } - - /** - * Output only. The time at which the data access label was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @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. The user who created the data access label. - * - * Generated from protobuf field string author = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getAuthor() - { - return $this->author; - } - - /** - * Output only. The user who created the data access label. - * - * Generated from protobuf field string author = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setAuthor($var) - { - GPBUtil::checkString($var, True); - $this->author = $var; - - return $this; - } - - /** - * Output only. The user who last updated the data access label. - * - * Generated from protobuf field string last_editor = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getLastEditor() - { - return $this->last_editor; - } - - /** - * Output only. The user who last updated the data access label. - * - * Generated from protobuf field string last_editor = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setLastEditor($var) - { - GPBUtil::checkString($var, True); - $this->last_editor = $var; - - return $this; - } - - /** - * Optional. A description of the data access label for a human reader. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. A description of the data access label for a human reader. - * - * 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; - } - - /** - * @return string - */ - public function getDefinition() - { - return $this->whichOneof("definition"); - } - -} - diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataAccessLabelReference.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataAccessLabelReference.php deleted file mode 100644 index 9f32f7c3f294..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataAccessLabelReference.php +++ /dev/null @@ -1,227 +0,0 @@ -google.cloud.chronicle.v1.DataAccessLabelReference - */ -class DataAccessLabelReference extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The display name of the label. - * Data access label and log types's name - * will match the display name of the resource. - * The asset namespace will match the namespace itself. - * The ingestion key value pair will match the key of the tuple. - * - * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $display_name = ''; - protected $label; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $data_access_label - * The name of the data access label. - * @type string $log_type - * The name of the log type. - * @type string $asset_namespace - * The asset namespace configured in the forwarder - * of the customer's events. - * @type \Google\Cloud\Chronicle\V1\IngestionLabel $ingestion_label - * The ingestion label configured in the forwarder of the customer's events. - * @type string $display_name - * Output only. The display name of the label. - * Data access label and log types's name - * will match the display name of the resource. - * The asset namespace will match the namespace itself. - * The ingestion key value pair will match the key of the tuple. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\DataAccessControl::initOnce(); - parent::__construct($data); - } - - /** - * The name of the data access label. - * - * Generated from protobuf field string data_access_label = 1; - * @return string - */ - public function getDataAccessLabel() - { - return $this->readOneof(1); - } - - public function hasDataAccessLabel() - { - return $this->hasOneof(1); - } - - /** - * The name of the data access label. - * - * Generated from protobuf field string data_access_label = 1; - * @param string $var - * @return $this - */ - public function setDataAccessLabel($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * The name of the log type. - * - * Generated from protobuf field string log_type = 2; - * @return string - */ - public function getLogType() - { - return $this->readOneof(2); - } - - public function hasLogType() - { - return $this->hasOneof(2); - } - - /** - * The name of the log type. - * - * Generated from protobuf field string log_type = 2; - * @param string $var - * @return $this - */ - public function setLogType($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The asset namespace configured in the forwarder - * of the customer's events. - * - * Generated from protobuf field string asset_namespace = 3; - * @return string - */ - public function getAssetNamespace() - { - return $this->readOneof(3); - } - - public function hasAssetNamespace() - { - return $this->hasOneof(3); - } - - /** - * The asset namespace configured in the forwarder - * of the customer's events. - * - * Generated from protobuf field string asset_namespace = 3; - * @param string $var - * @return $this - */ - public function setAssetNamespace($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * The ingestion label configured in the forwarder of the customer's events. - * - * Generated from protobuf field .google.cloud.chronicle.v1.IngestionLabel ingestion_label = 4; - * @return \Google\Cloud\Chronicle\V1\IngestionLabel|null - */ - public function getIngestionLabel() - { - return $this->readOneof(4); - } - - public function hasIngestionLabel() - { - return $this->hasOneof(4); - } - - /** - * The ingestion label configured in the forwarder of the customer's events. - * - * Generated from protobuf field .google.cloud.chronicle.v1.IngestionLabel ingestion_label = 4; - * @param \Google\Cloud\Chronicle\V1\IngestionLabel $var - * @return $this - */ - public function setIngestionLabel($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\IngestionLabel::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Output only. The display name of the label. - * Data access label and log types's name - * will match the display name of the resource. - * The asset namespace will match the namespace itself. - * The ingestion key value pair will match the key of the tuple. - * - * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Output only. The display name of the label. - * Data access label and log types's name - * will match the display name of the resource. - * The asset namespace will match the namespace itself. - * The ingestion key value pair will match the key of the tuple. - * - * Generated from protobuf field string display_name = 5 [(.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; - } - - /** - * @return string - */ - public function getLabel() - { - return $this->whichOneof("label"); - } - -} - diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataAccessScope.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataAccessScope.php deleted file mode 100644 index 687d809ead24..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DataAccessScope.php +++ /dev/null @@ -1,470 +0,0 @@ -google.cloud.chronicle.v1.DataAccessScope - */ -class DataAccessScope extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique full name of the data access scope. - * The name should comply with https://google.aip.dev/122 standards. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. The allowed labels for the scope. - * Either allow_all or allowed_data_access_labels needs to be provided. - * When provided, there has to be at least one label allowed for the scope to - * be valid. - * The logical operator for evaluation of the allowed labels is OR. - * E.g.: A customer with scope with allowed labels A and B will be able - * to see data with labeled with A or B or (A and B). - * - * Generated from protobuf field repeated .google.cloud.chronicle.v1.DataAccessLabelReference allowed_data_access_labels = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $allowed_data_access_labels; - /** - * Optional. The denied labels for the scope. - * The logical operator for evaluation of the denied labels is AND. - * E.g.: A customer with scope with denied labels A and B won't be able - * to see data labeled with A and data labeled with B - * and data with labels A and B. - * - * Generated from protobuf field repeated .google.cloud.chronicle.v1.DataAccessLabelReference denied_data_access_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $denied_data_access_labels; - /** - * Output only. The name to be used for display to customers of the data - * access scope. - * - * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $display_name = ''; - /** - * Output only. The time at which the data access scope was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time at which the data access scope was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. The user who created the data access scope. - * - * Generated from protobuf field string author = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $author = ''; - /** - * Output only. The user who last updated the data access scope. - * - * Generated from protobuf field string last_editor = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $last_editor = ''; - /** - * Optional. A description of the data access scope for a human reader. - * - * Generated from protobuf field string description = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Optional. Whether or not the scope allows all labels, allow_all and - * allowed_data_access_labels are mutually exclusive and one of them must be - * present. denied_data_access_labels can still be used along with allow_all. - * When combined with denied_data_access_labels, access will be granted to all - * data that doesn't have labels mentioned in denied_data_access_labels. E.g.: - * A customer with scope with denied labels A and B and allow_all will be able - * to see all data except data labeled with A and data labeled with B and data - * with labels A and B. - * - * Generated from protobuf field bool allow_all = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $allow_all = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The unique full name of the data access scope. - * The name should comply with https://google.aip.dev/122 standards. - * @type \Google\Cloud\Chronicle\V1\DataAccessLabelReference[] $allowed_data_access_labels - * Optional. The allowed labels for the scope. - * Either allow_all or allowed_data_access_labels needs to be provided. - * When provided, there has to be at least one label allowed for the scope to - * be valid. - * The logical operator for evaluation of the allowed labels is OR. - * E.g.: A customer with scope with allowed labels A and B will be able - * to see data with labeled with A or B or (A and B). - * @type \Google\Cloud\Chronicle\V1\DataAccessLabelReference[] $denied_data_access_labels - * Optional. The denied labels for the scope. - * The logical operator for evaluation of the denied labels is AND. - * E.g.: A customer with scope with denied labels A and B won't be able - * to see data labeled with A and data labeled with B - * and data with labels A and B. - * @type string $display_name - * Output only. The name to be used for display to customers of the data - * access scope. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time at which the data access scope was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time at which the data access scope was last updated. - * @type string $author - * Output only. The user who created the data access scope. - * @type string $last_editor - * Output only. The user who last updated the data access scope. - * @type string $description - * Optional. A description of the data access scope for a human reader. - * @type bool $allow_all - * Optional. Whether or not the scope allows all labels, allow_all and - * allowed_data_access_labels are mutually exclusive and one of them must be - * present. denied_data_access_labels can still be used along with allow_all. - * When combined with denied_data_access_labels, access will be granted to all - * data that doesn't have labels mentioned in denied_data_access_labels. E.g.: - * A customer with scope with denied labels A and B and allow_all will be able - * to see all data except data labeled with A and data labeled with B and data - * with labels A and B. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\DataAccessControl::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique full name of the data access scope. - * The name should comply with https://google.aip.dev/122 standards. - * - * 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 unique full name of the data access scope. - * The name should comply with https://google.aip.dev/122 standards. - * - * 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. The allowed labels for the scope. - * Either allow_all or allowed_data_access_labels needs to be provided. - * When provided, there has to be at least one label allowed for the scope to - * be valid. - * The logical operator for evaluation of the allowed labels is OR. - * E.g.: A customer with scope with allowed labels A and B will be able - * to see data with labeled with A or B or (A and B). - * - * Generated from protobuf field repeated .google.cloud.chronicle.v1.DataAccessLabelReference allowed_data_access_labels = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return RepeatedField<\Google\Cloud\Chronicle\V1\DataAccessLabelReference> - */ - public function getAllowedDataAccessLabels() - { - return $this->allowed_data_access_labels; - } - - /** - * Optional. The allowed labels for the scope. - * Either allow_all or allowed_data_access_labels needs to be provided. - * When provided, there has to be at least one label allowed for the scope to - * be valid. - * The logical operator for evaluation of the allowed labels is OR. - * E.g.: A customer with scope with allowed labels A and B will be able - * to see data with labeled with A or B or (A and B). - * - * Generated from protobuf field repeated .google.cloud.chronicle.v1.DataAccessLabelReference allowed_data_access_labels = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Chronicle\V1\DataAccessLabelReference[] $var - * @return $this - */ - public function setAllowedDataAccessLabels($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\DataAccessLabelReference::class); - $this->allowed_data_access_labels = $arr; - - return $this; - } - - /** - * Optional. The denied labels for the scope. - * The logical operator for evaluation of the denied labels is AND. - * E.g.: A customer with scope with denied labels A and B won't be able - * to see data labeled with A and data labeled with B - * and data with labels A and B. - * - * Generated from protobuf field repeated .google.cloud.chronicle.v1.DataAccessLabelReference denied_data_access_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return RepeatedField<\Google\Cloud\Chronicle\V1\DataAccessLabelReference> - */ - public function getDeniedDataAccessLabels() - { - return $this->denied_data_access_labels; - } - - /** - * Optional. The denied labels for the scope. - * The logical operator for evaluation of the denied labels is AND. - * E.g.: A customer with scope with denied labels A and B won't be able - * to see data labeled with A and data labeled with B - * and data with labels A and B. - * - * Generated from protobuf field repeated .google.cloud.chronicle.v1.DataAccessLabelReference denied_data_access_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Chronicle\V1\DataAccessLabelReference[] $var - * @return $this - */ - public function setDeniedDataAccessLabels($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\DataAccessLabelReference::class); - $this->denied_data_access_labels = $arr; - - return $this; - } - - /** - * Output only. The name to be used for display to customers of the data - * access scope. - * - * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Output only. The name to be used for display to customers of the data - * access scope. - * - * Generated from protobuf field string display_name = 4 [(.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; - } - - /** - * Output only. The time at which the data access scope was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @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); - } - - /** - * Output only. The time at which the data access scope was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time at which the data access scope was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @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); - } - - /** - * Output only. The time at which the data access scope was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @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. The user who created the data access scope. - * - * Generated from protobuf field string author = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getAuthor() - { - return $this->author; - } - - /** - * Output only. The user who created the data access scope. - * - * Generated from protobuf field string author = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setAuthor($var) - { - GPBUtil::checkString($var, True); - $this->author = $var; - - return $this; - } - - /** - * Output only. The user who last updated the data access scope. - * - * Generated from protobuf field string last_editor = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getLastEditor() - { - return $this->last_editor; - } - - /** - * Output only. The user who last updated the data access scope. - * - * Generated from protobuf field string last_editor = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setLastEditor($var) - { - GPBUtil::checkString($var, True); - $this->last_editor = $var; - - return $this; - } - - /** - * Optional. A description of the data access scope for a human reader. - * - * Generated from protobuf field string description = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. A description of the data access scope for a human reader. - * - * Generated from protobuf field string description = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Optional. Whether or not the scope allows all labels, allow_all and - * allowed_data_access_labels are mutually exclusive and one of them must be - * present. denied_data_access_labels can still be used along with allow_all. - * When combined with denied_data_access_labels, access will be granted to all - * data that doesn't have labels mentioned in denied_data_access_labels. E.g.: - * A customer with scope with denied labels A and B and allow_all will be able - * to see all data except data labeled with A and data labeled with B and data - * with labels A and B. - * - * Generated from protobuf field bool allow_all = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getAllowAll() - { - return $this->allow_all; - } - - /** - * Optional. Whether or not the scope allows all labels, allow_all and - * allowed_data_access_labels are mutually exclusive and one of them must be - * present. denied_data_access_labels can still be used along with allow_all. - * When combined with denied_data_access_labels, access will be granted to all - * data that doesn't have labels mentioned in denied_data_access_labels. E.g.: - * A customer with scope with denied labels A and B and allow_all will be able - * to see all data except data labeled with A and data labeled with B and data - * with labels A and B. - * - * Generated from protobuf field bool allow_all = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setAllowAll($var) - { - GPBUtil::checkBool($var); - $this->allow_all = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DeleteDataAccessLabelRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DeleteDataAccessLabelRequest.php deleted file mode 100644 index 31005e449a5e..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DeleteDataAccessLabelRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.chronicle.v1.DeleteDataAccessLabelRequest - */ -class DeleteDataAccessLabelRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The ID of the data access label to delete. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The ID of the data access label to delete. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` - * Please see {@see DataAccessControlServiceClient::dataAccessLabelName()} for help formatting this field. - * - * @return \Google\Cloud\Chronicle\V1\DeleteDataAccessLabelRequest - * - * @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 ID of the data access label to delete. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\DataAccessControl::initOnce(); - parent::__construct($data); - } - - /** - * Required. The ID of the data access label to delete. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` - * - * 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 ID of the data access label to delete. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` - * - * 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DeleteDataAccessScopeRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DeleteDataAccessScopeRequest.php deleted file mode 100644 index 5d5ef83446ba..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DeleteDataAccessScopeRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.chronicle.v1.DeleteDataAccessScopeRequest - */ -class DeleteDataAccessScopeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The ID of the data access scope to delete. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The ID of the data access scope to delete. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` - * Please see {@see DataAccessControlServiceClient::dataAccessScopeName()} for help formatting this field. - * - * @return \Google\Cloud\Chronicle\V1\DeleteDataAccessScopeRequest - * - * @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 ID of the data access scope to delete. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\DataAccessControl::initOnce(); - parent::__construct($data); - } - - /** - * Required. The ID of the data access scope to delete. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` - * - * 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 ID of the data access scope to delete. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` - * - * 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DeleteRuleRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DeleteRuleRequest.php deleted file mode 100644 index 65679e334596..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DeleteRuleRequest.php +++ /dev/null @@ -1,151 +0,0 @@ -google.cloud.chronicle.v1.DeleteRuleRequest - */ -class DeleteRuleRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the rule to delete. A rule revision timestamp cannot - * be specified as part of the name, as deleting specific revisions is not - * supported. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. If set to true, any retrohunts and any detections associated with - * the rule will also be deleted. If set to false, the call will only succeed - * if the rule has no associated retrohunts, including completed retrohunts, - * and no associated detections. Regardless of this field's value, the rule - * deployment associated with this rule will also be deleted. - * - * Generated from protobuf field bool force = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $force = false; - - /** - * @param string $name Required. The name of the rule to delete. A rule revision timestamp cannot - * be specified as part of the name, as deleting specific revisions is not - * supported. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - * Please see {@see RuleServiceClient::ruleName()} for help formatting this field. - * - * @return \Google\Cloud\Chronicle\V1\DeleteRuleRequest - * - * @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 rule to delete. A rule revision timestamp cannot - * be specified as part of the name, as deleting specific revisions is not - * supported. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - * @type bool $force - * Optional. If set to true, any retrohunts and any detections associated with - * the rule will also be deleted. If set to false, the call will only succeed - * if the rule has no associated retrohunts, including completed retrohunts, - * and no associated detections. Regardless of this field's value, the rule - * deployment associated with this rule will also be deleted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\Rule::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the rule to delete. A rule revision timestamp cannot - * be specified as part of the name, as deleting specific revisions is not - * supported. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - * - * 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 rule to delete. A rule revision timestamp cannot - * be specified as part of the name, as deleting specific revisions is not - * supported. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - * - * 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 set to true, any retrohunts and any detections associated with - * the rule will also be deleted. If set to false, the call will only succeed - * if the rule has no associated retrohunts, including completed retrohunts, - * and no associated detections. Regardless of this field's value, the rule - * deployment associated with this rule will also be deleted. - * - * Generated from protobuf field bool force = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getForce() - { - return $this->force; - } - - /** - * Optional. If set to true, any retrohunts and any detections associated with - * the rule will also be deleted. If set to false, the call will only succeed - * if the rule has no associated retrohunts, including completed retrohunts, - * and no associated detections. Regardless of this field's value, the rule - * deployment associated with this rule will also be deleted. - * - * 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DeleteWatchlistRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DeleteWatchlistRequest.php deleted file mode 100644 index d713acb98186..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/DeleteWatchlistRequest.php +++ /dev/null @@ -1,137 +0,0 @@ -google.cloud.chronicle.v1.DeleteWatchlistRequest - */ -class DeleteWatchlistRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the watchlist to delete. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. If set to true, any entities under this watchlist will also be - * deleted. (Otherwise, the request will only work if the watchlist has no - * entities.) - * - * Generated from protobuf field bool force = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $force = false; - - /** - * @param string $name Required. The name of the watchlist to delete. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` - * Please see {@see EntityServiceClient::watchlistName()} for help formatting this field. - * @param bool $force Optional. If set to true, any entities under this watchlist will also be - * deleted. (Otherwise, the request will only work if the watchlist has no - * entities.) - * - * @return \Google\Cloud\Chronicle\V1\DeleteWatchlistRequest - * - * @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 watchlist to delete. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` - * @type bool $force - * Optional. If set to true, any entities under this watchlist will also be - * deleted. (Otherwise, the request will only work if the watchlist has no - * entities.) - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\Entity::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the watchlist to delete. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` - * - * 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 watchlist to delete. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` - * - * 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 set to true, any entities under this watchlist will also be - * deleted. (Otherwise, the request will only work if the watchlist has no - * entities.) - * - * Generated from protobuf field bool force = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getForce() - { - return $this->force; - } - - /** - * Optional. If set to true, any entities under this watchlist will also be - * deleted. (Otherwise, the request will only work if the watchlist has no - * entities.) - * - * 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetDataAccessLabelRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetDataAccessLabelRequest.php deleted file mode 100644 index 74aead7733a7..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetDataAccessLabelRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.chronicle.v1.GetDataAccessLabelRequest - */ -class GetDataAccessLabelRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The ID of the data access label to retrieve. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The ID of the data access label to retrieve. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` - * Please see {@see DataAccessControlServiceClient::dataAccessLabelName()} for help formatting this field. - * - * @return \Google\Cloud\Chronicle\V1\GetDataAccessLabelRequest - * - * @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 ID of the data access label to retrieve. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\DataAccessControl::initOnce(); - parent::__construct($data); - } - - /** - * Required. The ID of the data access label to retrieve. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` - * - * 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 ID of the data access label to retrieve. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` - * - * 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetDataAccessScopeRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetDataAccessScopeRequest.php deleted file mode 100644 index 0ee76b341d49..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetDataAccessScopeRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.chronicle.v1.GetDataAccessScopeRequest - */ -class GetDataAccessScopeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The ID of the data access scope to retrieve. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The ID of the data access scope to retrieve. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` - * Please see {@see DataAccessControlServiceClient::dataAccessScopeName()} for help formatting this field. - * - * @return \Google\Cloud\Chronicle\V1\GetDataAccessScopeRequest - * - * @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 ID of the data access scope to retrieve. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\DataAccessControl::initOnce(); - parent::__construct($data); - } - - /** - * Required. The ID of the data access scope to retrieve. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` - * - * 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 ID of the data access scope to retrieve. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` - * - * 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetInstanceRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetInstanceRequest.php deleted file mode 100644 index f7f10e18fe26..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetInstanceRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.chronicle.v1.GetInstanceRequest - */ -class GetInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the instance to retrieve. - * Format: - * `projects/{project_id}/locations/{location}/instances/{instance}` - * - * 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 instance to retrieve. - * Format: - * `projects/{project_id}/locations/{location}/instances/{instance}` - * Please see {@see InstanceServiceClient::instanceName()} for help formatting this field. - * - * @return \Google\Cloud\Chronicle\V1\GetInstanceRequest - * - * @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 instance to retrieve. - * Format: - * `projects/{project_id}/locations/{location}/instances/{instance}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\Instance::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the instance to retrieve. - * Format: - * `projects/{project_id}/locations/{location}/instances/{instance}` - * - * 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 instance to retrieve. - * Format: - * `projects/{project_id}/locations/{location}/instances/{instance}` - * - * 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetReferenceListRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetReferenceListRequest.php deleted file mode 100644 index baf589cbd38c..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetReferenceListRequest.php +++ /dev/null @@ -1,129 +0,0 @@ -google.cloud.chronicle.v1.GetReferenceListRequest - */ -class GetReferenceListRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the reference list to retrieve. - * Format: - * `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * How much of the ReferenceList to view. Defaults to - * REFERENCE_LIST_VIEW_FULL. - * - * Generated from protobuf field .google.cloud.chronicle.v1.ReferenceListView view = 2; - */ - protected $view = 0; - - /** - * @param string $name Required. The resource name of the reference list to retrieve. - * Format: - * `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}` - * Please see {@see ReferenceListServiceClient::referenceListName()} for help formatting this field. - * - * @return \Google\Cloud\Chronicle\V1\GetReferenceListRequest - * - * @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 resource name of the reference list to retrieve. - * Format: - * `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}` - * @type int $view - * How much of the ReferenceList to view. Defaults to - * REFERENCE_LIST_VIEW_FULL. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\ReferenceList::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the reference list to retrieve. - * Format: - * `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}` - * - * 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 resource name of the reference list to retrieve. - * Format: - * `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}` - * - * 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; - } - - /** - * How much of the ReferenceList to view. Defaults to - * REFERENCE_LIST_VIEW_FULL. - * - * Generated from protobuf field .google.cloud.chronicle.v1.ReferenceListView view = 2; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * How much of the ReferenceList to view. Defaults to - * REFERENCE_LIST_VIEW_FULL. - * - * Generated from protobuf field .google.cloud.chronicle.v1.ReferenceListView view = 2; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Chronicle\V1\ReferenceListView::class); - $this->view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetRetrohuntRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetRetrohuntRequest.php deleted file mode 100644 index 2d46a2a1ae1f..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetRetrohuntRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.chronicle.v1.GetRetrohuntRequest - */ -class GetRetrohuntRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the retrohunt to retrieve. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` - * - * 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 retrohunt to retrieve. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` - * Please see {@see RuleServiceClient::retrohuntName()} for help formatting this field. - * - * @return \Google\Cloud\Chronicle\V1\GetRetrohuntRequest - * - * @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 retrohunt to retrieve. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\Rule::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the retrohunt to retrieve. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` - * - * 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 retrohunt to retrieve. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` - * - * 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetRuleDeploymentRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetRuleDeploymentRequest.php deleted file mode 100644 index c5defab4535b..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetRuleDeploymentRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.chronicle.v1.GetRuleDeploymentRequest - */ -class GetRuleDeploymentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the rule deployment to retrieve. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` - * - * 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 rule deployment to retrieve. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` - * Please see {@see RuleServiceClient::ruleDeploymentName()} for help formatting this field. - * - * @return \Google\Cloud\Chronicle\V1\GetRuleDeploymentRequest - * - * @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 rule deployment to retrieve. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\Rule::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the rule deployment to retrieve. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` - * - * 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 rule deployment to retrieve. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` - * - * 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetRuleRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetRuleRequest.php deleted file mode 100644 index d43e6dff3705..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetRuleRequest.php +++ /dev/null @@ -1,129 +0,0 @@ -google.cloud.chronicle.v1.GetRuleRequest - */ -class GetRuleRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the rule to retrieve. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The view field indicates the scope of fields to populate for the Rule being - * returned. If unspecified, defaults to FULL. - * - * Generated from protobuf field .google.cloud.chronicle.v1.RuleView view = 2; - */ - protected $view = 0; - - /** - * @param string $name Required. The name of the rule to retrieve. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - * Please see {@see RuleServiceClient::ruleName()} for help formatting this field. - * - * @return \Google\Cloud\Chronicle\V1\GetRuleRequest - * - * @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 rule to retrieve. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - * @type int $view - * The view field indicates the scope of fields to populate for the Rule being - * returned. If unspecified, defaults to FULL. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\Rule::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the rule to retrieve. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - * - * 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 rule to retrieve. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - * - * 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 view field indicates the scope of fields to populate for the Rule being - * returned. If unspecified, defaults to FULL. - * - * Generated from protobuf field .google.cloud.chronicle.v1.RuleView view = 2; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * The view field indicates the scope of fields to populate for the Rule being - * returned. If unspecified, defaults to FULL. - * - * Generated from protobuf field .google.cloud.chronicle.v1.RuleView view = 2; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Chronicle\V1\RuleView::class); - $this->view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetWatchlistRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetWatchlistRequest.php deleted file mode 100644 index 056e4ed0fcf8..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/GetWatchlistRequest.php +++ /dev/null @@ -1,96 +0,0 @@ -google.cloud.chronicle.v1.GetWatchlistRequest - */ -class GetWatchlistRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent, which owns this collection of watchlists. - * The name of the watchlist to retrieve. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The parent, which owns this collection of watchlists. - * The name of the watchlist to retrieve. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` - * Please see {@see EntityServiceClient::watchlistName()} for help formatting this field. - * - * @return \Google\Cloud\Chronicle\V1\GetWatchlistRequest - * - * @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 parent, which owns this collection of watchlists. - * The name of the watchlist to retrieve. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\Entity::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent, which owns this collection of watchlists. - * The name of the watchlist to retrieve. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` - * - * 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 parent, which owns this collection of watchlists. - * The name of the watchlist to retrieve. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` - * - * 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/IngestionLabel.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/IngestionLabel.php deleted file mode 100644 index de4fea8fbc81..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/IngestionLabel.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.chronicle.v1.IngestionLabel - */ -class IngestionLabel extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The key of the ingestion label. Always required. - * - * Generated from protobuf field string ingestion_label_key = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $ingestion_label_key = ''; - /** - * Optional. The value of the ingestion label. Optional. An object - * with no provided value and some key provided would match - * against the given key and ANY value. - * - * Generated from protobuf field string ingestion_label_value = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $ingestion_label_value = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $ingestion_label_key - * Required. The key of the ingestion label. Always required. - * @type string $ingestion_label_value - * Optional. The value of the ingestion label. Optional. An object - * with no provided value and some key provided would match - * against the given key and ANY value. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\DataAccessControl::initOnce(); - parent::__construct($data); - } - - /** - * Required. The key of the ingestion label. Always required. - * - * Generated from protobuf field string ingestion_label_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getIngestionLabelKey() - { - return $this->ingestion_label_key; - } - - /** - * Required. The key of the ingestion label. Always required. - * - * Generated from protobuf field string ingestion_label_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setIngestionLabelKey($var) - { - GPBUtil::checkString($var, True); - $this->ingestion_label_key = $var; - - return $this; - } - - /** - * Optional. The value of the ingestion label. Optional. An object - * with no provided value and some key provided would match - * against the given key and ANY value. - * - * Generated from protobuf field string ingestion_label_value = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getIngestionLabelValue() - { - return $this->ingestion_label_value; - } - - /** - * Optional. The value of the ingestion label. Optional. An object - * with no provided value and some key provided would match - * against the given key and ANY value. - * - * Generated from protobuf field string ingestion_label_value = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setIngestionLabelValue($var) - { - GPBUtil::checkString($var, True); - $this->ingestion_label_value = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/InputsUsed.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/InputsUsed.php deleted file mode 100644 index a8afa8fd340e..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/InputsUsed.php +++ /dev/null @@ -1,137 +0,0 @@ -google.cloud.chronicle.v1.InputsUsed - */ -class InputsUsed extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Whether the rule queries UDM events. - * - * Generated from protobuf field bool uses_udm = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $uses_udm = false; - /** - * Optional. Whether the rule queries entity events. - * - * Generated from protobuf field bool uses_entity = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $uses_entity = false; - /** - * Optional. Whether the rule queries detections. - * - * Generated from protobuf field bool uses_detection = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $uses_detection = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $uses_udm - * Optional. Whether the rule queries UDM events. - * @type bool $uses_entity - * Optional. Whether the rule queries entity events. - * @type bool $uses_detection - * Optional. Whether the rule queries detections. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\Rule::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Whether the rule queries UDM events. - * - * Generated from protobuf field bool uses_udm = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getUsesUdm() - { - return $this->uses_udm; - } - - /** - * Optional. Whether the rule queries UDM events. - * - * Generated from protobuf field bool uses_udm = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setUsesUdm($var) - { - GPBUtil::checkBool($var); - $this->uses_udm = $var; - - return $this; - } - - /** - * Optional. Whether the rule queries entity events. - * - * Generated from protobuf field bool uses_entity = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getUsesEntity() - { - return $this->uses_entity; - } - - /** - * Optional. Whether the rule queries entity events. - * - * Generated from protobuf field bool uses_entity = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setUsesEntity($var) - { - GPBUtil::checkBool($var); - $this->uses_entity = $var; - - return $this; - } - - /** - * Optional. Whether the rule queries detections. - * - * Generated from protobuf field bool uses_detection = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getUsesDetection() - { - return $this->uses_detection; - } - - /** - * Optional. Whether the rule queries detections. - * - * Generated from protobuf field bool uses_detection = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setUsesDetection($var) - { - GPBUtil::checkBool($var); - $this->uses_detection = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Instance.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Instance.php deleted file mode 100644 index 4f364828a412..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Instance.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.chronicle.v1.Instance - */ -class Instance extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The resource name of this instance. - * Format: `projects/{project}/locations/{location}/instances/{instance}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The resource name of this instance. - * Format: `projects/{project}/locations/{location}/instances/{instance}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\Instance::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The resource name of this instance. - * Format: `projects/{project}/locations/{location}/instances/{instance}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The resource name of this instance. - * Format: `projects/{project}/locations/{location}/instances/{instance}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListDataAccessLabelsRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListDataAccessLabelsRequest.php deleted file mode 100644 index 40f14437c42a..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListDataAccessLabelsRequest.php +++ /dev/null @@ -1,220 +0,0 @@ -google.cloud.chronicle.v1.ListDataAccessLabelsRequest - */ -class ListDataAccessLabelsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource where this data access label will be created. - * Format: `projects/{project}/locations/{location}/instances/{instance}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of data access labels to return. The service may return - * fewer than this value. If unspecified, at most 100 data access labels will - * be returned. The maximum value is 1000; values above 1000 will be coerced - * to 1000. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token, received from a previous `ListDataAccessLabelsRequest` call. - * Provide this to retrieve the subsequent page. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Optional. A filter which should follow the guidelines of AIP-160. - * Supports filtering on all fieds of DataAccessLabel and all operations as - * mentioned in https://google.aip.dev/160. - * example filter: "create_time greater than \"2023-04-21T11:30:00-04:00\" OR - * display_name:\"-21-1\"". - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - - /** - * @param string $parent Required. The parent resource where this data access label will be created. - * Format: `projects/{project}/locations/{location}/instances/{instance}` - * Please see {@see DataAccessControlServiceClient::instanceName()} for help formatting this field. - * - * @return \Google\Cloud\Chronicle\V1\ListDataAccessLabelsRequest - * - * @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 parent resource where this data access label will be created. - * Format: `projects/{project}/locations/{location}/instances/{instance}` - * @type int $page_size - * The maximum number of data access labels to return. The service may return - * fewer than this value. If unspecified, at most 100 data access labels will - * be returned. The maximum value is 1000; values above 1000 will be coerced - * to 1000. - * @type string $page_token - * A page token, received from a previous `ListDataAccessLabelsRequest` call. - * Provide this to retrieve the subsequent page. - * @type string $filter - * Optional. A filter which should follow the guidelines of AIP-160. - * Supports filtering on all fieds of DataAccessLabel and all operations as - * mentioned in https://google.aip.dev/160. - * example filter: "create_time greater than \"2023-04-21T11:30:00-04:00\" OR - * display_name:\"-21-1\"". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\DataAccessControl::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource where this data access label will be created. - * Format: `projects/{project}/locations/{location}/instances/{instance}` - * - * 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 parent resource where this data access label will be created. - * Format: `projects/{project}/locations/{location}/instances/{instance}` - * - * 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 data access labels to return. The service may return - * fewer than this value. If unspecified, at most 100 data access labels will - * be returned. The maximum value is 1000; values above 1000 will be coerced - * to 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of data access labels to return. The service may return - * fewer than this value. If unspecified, at most 100 data access labels will - * be returned. The maximum value is 1000; values above 1000 will be coerced - * to 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; - } - - /** - * A page token, received from a previous `ListDataAccessLabelsRequest` call. - * Provide this to retrieve the subsequent page. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token, received from a previous `ListDataAccessLabelsRequest` call. - * Provide this to retrieve the subsequent page. - * - * 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; - } - - /** - * Optional. A filter which should follow the guidelines of AIP-160. - * Supports filtering on all fieds of DataAccessLabel and all operations as - * mentioned in https://google.aip.dev/160. - * example filter: "create_time greater than \"2023-04-21T11:30:00-04:00\" OR - * display_name:\"-21-1\"". - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. A filter which should follow the guidelines of AIP-160. - * Supports filtering on all fieds of DataAccessLabel and all operations as - * mentioned in https://google.aip.dev/160. - * example filter: "create_time greater than \"2023-04-21T11:30:00-04:00\" OR - * display_name:\"-21-1\"". - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListDataAccessLabelsResponse.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListDataAccessLabelsResponse.php deleted file mode 100644 index 0fb2a491bf5d..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListDataAccessLabelsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.chronicle.v1.ListDataAccessLabelsResponse - */ -class ListDataAccessLabelsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of data access labels. - * - * Generated from protobuf field repeated .google.cloud.chronicle.v1.DataAccessLabel data_access_labels = 1; - */ - private $data_access_labels; - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * 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 \Google\Cloud\Chronicle\V1\DataAccessLabel[] $data_access_labels - * List of data access labels. - * @type string $next_page_token - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\DataAccessControl::initOnce(); - parent::__construct($data); - } - - /** - * List of data access labels. - * - * Generated from protobuf field repeated .google.cloud.chronicle.v1.DataAccessLabel data_access_labels = 1; - * @return RepeatedField<\Google\Cloud\Chronicle\V1\DataAccessLabel> - */ - public function getDataAccessLabels() - { - return $this->data_access_labels; - } - - /** - * List of data access labels. - * - * Generated from protobuf field repeated .google.cloud.chronicle.v1.DataAccessLabel data_access_labels = 1; - * @param \Google\Cloud\Chronicle\V1\DataAccessLabel[] $var - * @return $this - */ - public function setDataAccessLabels($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\DataAccessLabel::class); - $this->data_access_labels = $arr; - - return $this; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListDataAccessScopesRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListDataAccessScopesRequest.php deleted file mode 100644 index 54813ad9638e..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListDataAccessScopesRequest.php +++ /dev/null @@ -1,220 +0,0 @@ -google.cloud.chronicle.v1.ListDataAccessScopesRequest - */ -class ListDataAccessScopesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource where this data access scope will be created. - * Format: `projects/{project}/locations/{location}/instances/{instance}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of data access scopes to return. The service may return - * fewer than this value. If unspecified, at most 100 data access scopes will - * be returned. The maximum value is 1000; values above 1000 will be coerced - * to 1000. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token, received from a previous `ListDataAccessScopesRequest` call. - * Provide this to retrieve the subsequent page. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Optional. A filter which should follow the guidelines of AIP-160. - * Supports filtering on all fieds of DataAccessScope and all operations as - * mentioned in https://google.aip.dev/160. - * example filter: "create_time greater than \"2023-04-21T11:30:00-04:00\" OR - * display_name:\"-21-1\"". - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - - /** - * @param string $parent Required. The parent resource where this data access scope will be created. - * Format: `projects/{project}/locations/{location}/instances/{instance}` - * Please see {@see DataAccessControlServiceClient::instanceName()} for help formatting this field. - * - * @return \Google\Cloud\Chronicle\V1\ListDataAccessScopesRequest - * - * @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 parent resource where this data access scope will be created. - * Format: `projects/{project}/locations/{location}/instances/{instance}` - * @type int $page_size - * The maximum number of data access scopes to return. The service may return - * fewer than this value. If unspecified, at most 100 data access scopes will - * be returned. The maximum value is 1000; values above 1000 will be coerced - * to 1000. - * @type string $page_token - * A page token, received from a previous `ListDataAccessScopesRequest` call. - * Provide this to retrieve the subsequent page. - * @type string $filter - * Optional. A filter which should follow the guidelines of AIP-160. - * Supports filtering on all fieds of DataAccessScope and all operations as - * mentioned in https://google.aip.dev/160. - * example filter: "create_time greater than \"2023-04-21T11:30:00-04:00\" OR - * display_name:\"-21-1\"". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\DataAccessControl::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource where this data access scope will be created. - * Format: `projects/{project}/locations/{location}/instances/{instance}` - * - * 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 parent resource where this data access scope will be created. - * Format: `projects/{project}/locations/{location}/instances/{instance}` - * - * 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 data access scopes to return. The service may return - * fewer than this value. If unspecified, at most 100 data access scopes will - * be returned. The maximum value is 1000; values above 1000 will be coerced - * to 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of data access scopes to return. The service may return - * fewer than this value. If unspecified, at most 100 data access scopes will - * be returned. The maximum value is 1000; values above 1000 will be coerced - * to 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; - } - - /** - * A page token, received from a previous `ListDataAccessScopesRequest` call. - * Provide this to retrieve the subsequent page. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token, received from a previous `ListDataAccessScopesRequest` call. - * Provide this to retrieve the subsequent page. - * - * 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; - } - - /** - * Optional. A filter which should follow the guidelines of AIP-160. - * Supports filtering on all fieds of DataAccessScope and all operations as - * mentioned in https://google.aip.dev/160. - * example filter: "create_time greater than \"2023-04-21T11:30:00-04:00\" OR - * display_name:\"-21-1\"". - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. A filter which should follow the guidelines of AIP-160. - * Supports filtering on all fieds of DataAccessScope and all operations as - * mentioned in https://google.aip.dev/160. - * example filter: "create_time greater than \"2023-04-21T11:30:00-04:00\" OR - * display_name:\"-21-1\"". - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListDataAccessScopesResponse.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListDataAccessScopesResponse.php deleted file mode 100644 index fd1d5cd91bc8..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListDataAccessScopesResponse.php +++ /dev/null @@ -1,149 +0,0 @@ -google.cloud.chronicle.v1.ListDataAccessScopesResponse - */ -class ListDataAccessScopesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of data access scopes. - * - * Generated from protobuf field repeated .google.cloud.chronicle.v1.DataAccessScope data_access_scopes = 1; - */ - private $data_access_scopes; - /** - * Whether or not global scope is granted to the user. - * - * Generated from protobuf field optional bool global_data_access_scope_granted = 3; - */ - protected $global_data_access_scope_granted = null; - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * 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 \Google\Cloud\Chronicle\V1\DataAccessScope[] $data_access_scopes - * List of data access scopes. - * @type bool $global_data_access_scope_granted - * Whether or not global scope is granted to the user. - * @type string $next_page_token - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\DataAccessControl::initOnce(); - parent::__construct($data); - } - - /** - * List of data access scopes. - * - * Generated from protobuf field repeated .google.cloud.chronicle.v1.DataAccessScope data_access_scopes = 1; - * @return RepeatedField<\Google\Cloud\Chronicle\V1\DataAccessScope> - */ - public function getDataAccessScopes() - { - return $this->data_access_scopes; - } - - /** - * List of data access scopes. - * - * Generated from protobuf field repeated .google.cloud.chronicle.v1.DataAccessScope data_access_scopes = 1; - * @param \Google\Cloud\Chronicle\V1\DataAccessScope[] $var - * @return $this - */ - public function setDataAccessScopes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\DataAccessScope::class); - $this->data_access_scopes = $arr; - - return $this; - } - - /** - * Whether or not global scope is granted to the user. - * - * Generated from protobuf field optional bool global_data_access_scope_granted = 3; - * @return bool - */ - public function getGlobalDataAccessScopeGranted() - { - return isset($this->global_data_access_scope_granted) ? $this->global_data_access_scope_granted : false; - } - - public function hasGlobalDataAccessScopeGranted() - { - return isset($this->global_data_access_scope_granted); - } - - public function clearGlobalDataAccessScopeGranted() - { - unset($this->global_data_access_scope_granted); - } - - /** - * Whether or not global scope is granted to the user. - * - * Generated from protobuf field optional bool global_data_access_scope_granted = 3; - * @param bool $var - * @return $this - */ - public function setGlobalDataAccessScopeGranted($var) - { - GPBUtil::checkBool($var); - $this->global_data_access_scope_granted = $var; - - return $this; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListReferenceListsRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListReferenceListsRequest.php deleted file mode 100644 index f06a8a98b070..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListReferenceListsRequest.php +++ /dev/null @@ -1,221 +0,0 @@ -google.cloud.chronicle.v1.ListReferenceListsRequest - */ -class ListReferenceListsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent, which owns this collection of reference lists. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of reference lists to return. - * The service may return fewer than this value. - * If unspecified, at most 100 reference lists will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token, received from a previous `ListReferenceLists` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListReferenceLists` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * How much of each ReferenceList to view. Defaults to - * REFERENCE_LIST_VIEW_BASIC. - * - * Generated from protobuf field .google.cloud.chronicle.v1.ReferenceListView view = 4; - */ - protected $view = 0; - - /** - * @param string $parent Required. The parent, which owns this collection of reference lists. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}` - * Please see {@see ReferenceListServiceClient::instanceName()} for help formatting this field. - * - * @return \Google\Cloud\Chronicle\V1\ListReferenceListsRequest - * - * @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 parent, which owns this collection of reference lists. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}` - * @type int $page_size - * The maximum number of reference lists to return. - * The service may return fewer than this value. - * If unspecified, at most 100 reference lists will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * @type string $page_token - * A page token, received from a previous `ListReferenceLists` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListReferenceLists` must - * match the call that provided the page token. - * @type int $view - * How much of each ReferenceList to view. Defaults to - * REFERENCE_LIST_VIEW_BASIC. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\ReferenceList::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent, which owns this collection of reference lists. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}` - * - * 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 parent, which owns this collection of reference lists. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}` - * - * 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 reference lists to return. - * The service may return fewer than this value. - * If unspecified, at most 100 reference lists will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of reference lists to return. - * The service may return fewer than this value. - * If unspecified, at most 100 reference lists will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 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; - } - - /** - * A page token, received from a previous `ListReferenceLists` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListReferenceLists` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token, received from a previous `ListReferenceLists` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListReferenceLists` must - * match the call that provided the page token. - * - * 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; - } - - /** - * How much of each ReferenceList to view. Defaults to - * REFERENCE_LIST_VIEW_BASIC. - * - * Generated from protobuf field .google.cloud.chronicle.v1.ReferenceListView view = 4; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * How much of each ReferenceList to view. Defaults to - * REFERENCE_LIST_VIEW_BASIC. - * - * Generated from protobuf field .google.cloud.chronicle.v1.ReferenceListView view = 4; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Chronicle\V1\ReferenceListView::class); - $this->view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListReferenceListsResponse.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListReferenceListsResponse.php deleted file mode 100644 index 9c7b02ac252a..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListReferenceListsResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.chronicle.v1.ListReferenceListsResponse - */ -class ListReferenceListsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The reference lists. - * Ordered in ascending alphabetical order by name. - * - * Generated from protobuf field repeated .google.cloud.chronicle.v1.ReferenceList reference_lists = 1; - */ - private $reference_lists; - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * 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 \Google\Cloud\Chronicle\V1\ReferenceList[] $reference_lists - * The reference lists. - * Ordered in ascending alphabetical order by name. - * @type string $next_page_token - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\ReferenceList::initOnce(); - parent::__construct($data); - } - - /** - * The reference lists. - * Ordered in ascending alphabetical order by name. - * - * Generated from protobuf field repeated .google.cloud.chronicle.v1.ReferenceList reference_lists = 1; - * @return RepeatedField<\Google\Cloud\Chronicle\V1\ReferenceList> - */ - public function getReferenceLists() - { - return $this->reference_lists; - } - - /** - * The reference lists. - * Ordered in ascending alphabetical order by name. - * - * Generated from protobuf field repeated .google.cloud.chronicle.v1.ReferenceList reference_lists = 1; - * @param \Google\Cloud\Chronicle\V1\ReferenceList[] $var - * @return $this - */ - public function setReferenceLists($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\ReferenceList::class); - $this->reference_lists = $arr; - - return $this; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRetrohuntsRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRetrohuntsRequest.php deleted file mode 100644 index 0fb98bf934cf..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRetrohuntsRequest.php +++ /dev/null @@ -1,225 +0,0 @@ -google.cloud.chronicle.v1.ListRetrohuntsRequest - */ -class ListRetrohuntsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The rule that the retrohunts belong to. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of retrohunt to return. The service may return fewer - * than this value. If unspecified, at most 100 retrohunts will be returned. - * The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token, received from a previous `ListRetrohunts` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListRetrohunts` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * A filter that can be used to retrieve specific rule deployments. - * The following fields are filterable: - * state - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - - /** - * @param string $parent Required. The rule that the retrohunts belong to. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - * Please see {@see RuleServiceClient::ruleName()} for help formatting this field. - * - * @return \Google\Cloud\Chronicle\V1\ListRetrohuntsRequest - * - * @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 rule that the retrohunts belong to. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - * @type int $page_size - * The maximum number of retrohunt to return. The service may return fewer - * than this value. If unspecified, at most 100 retrohunts will be returned. - * The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * @type string $page_token - * A page token, received from a previous `ListRetrohunts` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListRetrohunts` must - * match the call that provided the page token. - * @type string $filter - * A filter that can be used to retrieve specific rule deployments. - * The following fields are filterable: - * state - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\Rule::initOnce(); - parent::__construct($data); - } - - /** - * Required. The rule that the retrohunts belong to. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - * - * 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 rule that the retrohunts belong to. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - * - * 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 retrohunt to return. The service may return fewer - * than this value. If unspecified, at most 100 retrohunts will be returned. - * The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of retrohunt to return. The service may return fewer - * than this value. If unspecified, at most 100 retrohunts will be returned. - * The maximum value is 1000; values above 1000 will be coerced to - * 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; - } - - /** - * A page token, received from a previous `ListRetrohunts` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListRetrohunts` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token, received from a previous `ListRetrohunts` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListRetrohunts` must - * match the call that provided the page token. - * - * 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; - } - - /** - * A filter that can be used to retrieve specific rule deployments. - * The following fields are filterable: - * state - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * A filter that can be used to retrieve specific rule deployments. - * The following fields are filterable: - * state - * - * 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRetrohuntsResponse.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRetrohuntsResponse.php deleted file mode 100644 index c4dc57d829af..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRetrohuntsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.chronicle.v1.ListRetrohuntsResponse - */ -class ListRetrohuntsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The retrohunts from the specified rule. - * - * Generated from protobuf field repeated .google.cloud.chronicle.v1.Retrohunt retrohunts = 1; - */ - private $retrohunts; - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * 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 \Google\Cloud\Chronicle\V1\Retrohunt[] $retrohunts - * The retrohunts from the specified rule. - * @type string $next_page_token - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\Rule::initOnce(); - parent::__construct($data); - } - - /** - * The retrohunts from the specified rule. - * - * Generated from protobuf field repeated .google.cloud.chronicle.v1.Retrohunt retrohunts = 1; - * @return RepeatedField<\Google\Cloud\Chronicle\V1\Retrohunt> - */ - public function getRetrohunts() - { - return $this->retrohunts; - } - - /** - * The retrohunts from the specified rule. - * - * Generated from protobuf field repeated .google.cloud.chronicle.v1.Retrohunt retrohunts = 1; - * @param \Google\Cloud\Chronicle\V1\Retrohunt[] $var - * @return $this - */ - public function setRetrohunts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\Retrohunt::class); - $this->retrohunts = $arr; - - return $this; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRuleDeploymentsRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRuleDeploymentsRequest.php deleted file mode 100644 index a9135574e7c7..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRuleDeploymentsRequest.php +++ /dev/null @@ -1,230 +0,0 @@ -google.cloud.chronicle.v1.ListRuleDeploymentsRequest - */ -class ListRuleDeploymentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The collection of all parents which own all rule deployments. The - * "-" wildcard token must be used as the rule identifier in the resource - * path. Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/-` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of rule deployments to return. The service may return - * fewer than this value. If unspecified, at most 100 rule deployments will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token, received from a previous `ListRuleDeployments` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListRuleDeployments` - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * A filter that can be used to retrieve specific rule deployments. - * The following fields are filterable: - * archived, name - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - - /** - * @param string $parent Required. The collection of all parents which own all rule deployments. The - * "-" wildcard token must be used as the rule identifier in the resource - * path. Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/-` - * Please see {@see RuleServiceClient::ruleName()} for help formatting this field. - * - * @return \Google\Cloud\Chronicle\V1\ListRuleDeploymentsRequest - * - * @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 collection of all parents which own all rule deployments. The - * "-" wildcard token must be used as the rule identifier in the resource - * path. Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/-` - * @type int $page_size - * The maximum number of rule deployments to return. The service may return - * fewer than this value. If unspecified, at most 100 rule deployments will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * @type string $page_token - * A page token, received from a previous `ListRuleDeployments` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListRuleDeployments` - * must match the call that provided the page token. - * @type string $filter - * A filter that can be used to retrieve specific rule deployments. - * The following fields are filterable: - * archived, name - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\Rule::initOnce(); - parent::__construct($data); - } - - /** - * Required. The collection of all parents which own all rule deployments. The - * "-" wildcard token must be used as the rule identifier in the resource - * path. Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/-` - * - * 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 collection of all parents which own all rule deployments. The - * "-" wildcard token must be used as the rule identifier in the resource - * path. Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/-` - * - * 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 rule deployments to return. The service may return - * fewer than this value. If unspecified, at most 100 rule deployments will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of rule deployments to return. The service may return - * fewer than this value. If unspecified, at most 100 rule deployments will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 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; - } - - /** - * A page token, received from a previous `ListRuleDeployments` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListRuleDeployments` - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token, received from a previous `ListRuleDeployments` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListRuleDeployments` - * must match the call that provided the page token. - * - * 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; - } - - /** - * A filter that can be used to retrieve specific rule deployments. - * The following fields are filterable: - * archived, name - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * A filter that can be used to retrieve specific rule deployments. - * The following fields are filterable: - * archived, name - * - * 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRuleDeploymentsResponse.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRuleDeploymentsResponse.php deleted file mode 100644 index b3057a270969..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRuleDeploymentsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.chronicle.v1.ListRuleDeploymentsResponse - */ -class ListRuleDeploymentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The rule deployments from all rules. - * - * Generated from protobuf field repeated .google.cloud.chronicle.v1.RuleDeployment rule_deployments = 1; - */ - private $rule_deployments; - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * 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 \Google\Cloud\Chronicle\V1\RuleDeployment[] $rule_deployments - * The rule deployments from all rules. - * @type string $next_page_token - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\Rule::initOnce(); - parent::__construct($data); - } - - /** - * The rule deployments from all rules. - * - * Generated from protobuf field repeated .google.cloud.chronicle.v1.RuleDeployment rule_deployments = 1; - * @return RepeatedField<\Google\Cloud\Chronicle\V1\RuleDeployment> - */ - public function getRuleDeployments() - { - return $this->rule_deployments; - } - - /** - * The rule deployments from all rules. - * - * Generated from protobuf field repeated .google.cloud.chronicle.v1.RuleDeployment rule_deployments = 1; - * @param \Google\Cloud\Chronicle\V1\RuleDeployment[] $var - * @return $this - */ - public function setRuleDeployments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\RuleDeployment::class); - $this->rule_deployments = $arr; - - return $this; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRuleRevisionsRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRuleRevisionsRequest.php deleted file mode 100644 index a22efe8c8aff..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRuleRevisionsRequest.php +++ /dev/null @@ -1,221 +0,0 @@ -google.cloud.chronicle.v1.ListRuleRevisionsRequest - */ -class ListRuleRevisionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the rule to list revisions for. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The maximum number of revisions to return per page. The service may return - * fewer than this value. If unspecified, at most 100 revisions will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The page token, received from a previous `ListRuleRevisions` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListRuleRevisions` - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * The view field indicates the scope of fields to populate for the revision - * being returned. If unspecified, defaults to BASIC. - * - * Generated from protobuf field .google.cloud.chronicle.v1.RuleView view = 4; - */ - protected $view = 0; - - /** - * @param string $name Required. The name of the rule to list revisions for. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - * Please see {@see RuleServiceClient::ruleName()} for help formatting this field. - * - * @return \Google\Cloud\Chronicle\V1\ListRuleRevisionsRequest - * - * @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 rule to list revisions for. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - * @type int $page_size - * The maximum number of revisions to return per page. The service may return - * fewer than this value. If unspecified, at most 100 revisions will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * @type string $page_token - * The page token, received from a previous `ListRuleRevisions` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListRuleRevisions` - * must match the call that provided the page token. - * @type int $view - * The view field indicates the scope of fields to populate for the revision - * being returned. If unspecified, defaults to BASIC. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\Rule::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the rule to list revisions for. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - * - * 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 rule to list revisions for. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - * - * 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 maximum number of revisions to return per page. The service may return - * fewer than this value. If unspecified, at most 100 revisions will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of revisions to return per page. The service may return - * fewer than this value. If unspecified, at most 100 revisions will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 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; - } - - /** - * The page token, received from a previous `ListRuleRevisions` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListRuleRevisions` - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The page token, received from a previous `ListRuleRevisions` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListRuleRevisions` - * must match the call that provided the page token. - * - * 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 view field indicates the scope of fields to populate for the revision - * being returned. If unspecified, defaults to BASIC. - * - * Generated from protobuf field .google.cloud.chronicle.v1.RuleView view = 4; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * The view field indicates the scope of fields to populate for the revision - * being returned. If unspecified, defaults to BASIC. - * - * Generated from protobuf field .google.cloud.chronicle.v1.RuleView view = 4; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Chronicle\V1\RuleView::class); - $this->view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRuleRevisionsResponse.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRuleRevisionsResponse.php deleted file mode 100644 index 9b6fb1ea283d..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRuleRevisionsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.chronicle.v1.ListRuleRevisionsResponse - */ -class ListRuleRevisionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The revisions of the rule. - * - * Generated from protobuf field repeated .google.cloud.chronicle.v1.Rule rules = 1; - */ - private $rules; - /** - * A token that can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * 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 \Google\Cloud\Chronicle\V1\Rule[] $rules - * The revisions of the rule. - * @type string $next_page_token - * A token that can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\Rule::initOnce(); - parent::__construct($data); - } - - /** - * The revisions of the rule. - * - * Generated from protobuf field repeated .google.cloud.chronicle.v1.Rule rules = 1; - * @return RepeatedField<\Google\Cloud\Chronicle\V1\Rule> - */ - public function getRules() - { - return $this->rules; - } - - /** - * The revisions of the rule. - * - * Generated from protobuf field repeated .google.cloud.chronicle.v1.Rule rules = 1; - * @param \Google\Cloud\Chronicle\V1\Rule[] $var - * @return $this - */ - public function setRules($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\Rule::class); - $this->rules = $arr; - - return $this; - } - - /** - * A token that can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token that can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRulesRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRulesRequest.php deleted file mode 100644 index 9a5c5ce2394c..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRulesRequest.php +++ /dev/null @@ -1,263 +0,0 @@ -google.cloud.chronicle.v1.ListRulesRequest - */ -class ListRulesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent, which owns this collection of rules. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of rules to return. The service may return fewer than - * this value. If unspecified, at most 100 rules will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token, received from a previous `ListRules` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListRules` - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * view indicates the scope of fields to populate for the Rule being returned. - * If unspecified, defaults to BASIC. - * - * Generated from protobuf field .google.cloud.chronicle.v1.RuleView view = 4; - */ - protected $view = 0; - /** - * Only the following filters are allowed: - * "reference_lists:{reference_list_name}" - * "data_tables:{data_table_name}" - * "display_name:{display_name}" - * - * Generated from protobuf field string filter = 5; - */ - protected $filter = ''; - - /** - * @param string $parent Required. The parent, which owns this collection of rules. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}` - * Please see {@see RuleServiceClient::instanceName()} for help formatting this field. - * - * @return \Google\Cloud\Chronicle\V1\ListRulesRequest - * - * @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 parent, which owns this collection of rules. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}` - * @type int $page_size - * The maximum number of rules to return. The service may return fewer than - * this value. If unspecified, at most 100 rules will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * @type string $page_token - * A page token, received from a previous `ListRules` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListRules` - * must match the call that provided the page token. - * @type int $view - * view indicates the scope of fields to populate for the Rule being returned. - * If unspecified, defaults to BASIC. - * @type string $filter - * Only the following filters are allowed: - * "reference_lists:{reference_list_name}" - * "data_tables:{data_table_name}" - * "display_name:{display_name}" - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\Rule::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent, which owns this collection of rules. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}` - * - * 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 parent, which owns this collection of rules. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}` - * - * 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 rules to return. The service may return fewer than - * this value. If unspecified, at most 100 rules will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of rules to return. The service may return fewer than - * this value. If unspecified, at most 100 rules will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 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; - } - - /** - * A page token, received from a previous `ListRules` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListRules` - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token, received from a previous `ListRules` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListRules` - * must match the call that provided the page token. - * - * 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; - } - - /** - * view indicates the scope of fields to populate for the Rule being returned. - * If unspecified, defaults to BASIC. - * - * Generated from protobuf field .google.cloud.chronicle.v1.RuleView view = 4; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * view indicates the scope of fields to populate for the Rule being returned. - * If unspecified, defaults to BASIC. - * - * Generated from protobuf field .google.cloud.chronicle.v1.RuleView view = 4; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Chronicle\V1\RuleView::class); - $this->view = $var; - - return $this; - } - - /** - * Only the following filters are allowed: - * "reference_lists:{reference_list_name}" - * "data_tables:{data_table_name}" - * "display_name:{display_name}" - * - * Generated from protobuf field string filter = 5; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Only the following filters are allowed: - * "reference_lists:{reference_list_name}" - * "data_tables:{data_table_name}" - * "display_name:{display_name}" - * - * Generated from protobuf field string filter = 5; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRulesResponse.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRulesResponse.php deleted file mode 100644 index acf552de7aac..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListRulesResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.chronicle.v1.ListRulesResponse - */ -class ListRulesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The rules from the specified instance. - * - * Generated from protobuf field repeated .google.cloud.chronicle.v1.Rule rules = 1; - */ - private $rules; - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * 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 \Google\Cloud\Chronicle\V1\Rule[] $rules - * The rules from the specified instance. - * @type string $next_page_token - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\Rule::initOnce(); - parent::__construct($data); - } - - /** - * The rules from the specified instance. - * - * Generated from protobuf field repeated .google.cloud.chronicle.v1.Rule rules = 1; - * @return RepeatedField<\Google\Cloud\Chronicle\V1\Rule> - */ - public function getRules() - { - return $this->rules; - } - - /** - * The rules from the specified instance. - * - * Generated from protobuf field repeated .google.cloud.chronicle.v1.Rule rules = 1; - * @param \Google\Cloud\Chronicle\V1\Rule[] $var - * @return $this - */ - public function setRules($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\Rule::class); - $this->rules = $arr; - - return $this; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListWatchlistsRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListWatchlistsRequest.php deleted file mode 100644 index 0fef99adc24d..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListWatchlistsRequest.php +++ /dev/null @@ -1,232 +0,0 @@ -google.cloud.chronicle.v1.ListWatchlistsRequest - */ -class ListWatchlistsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent, which owns this collection of watchlists. - * Format: `projects/{project}/locations/{location}/instances/{instance}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of watchlists to return. - * The service may return fewer than this value. - * If unspecified, at most 200 watchlists will be returned. - * The maximum value is 200; values above 200 will be coerced to 200. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A page token, received from a previous `ListWatchlists` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListWatchlists` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. Which watchlist to return in aip.dev/160 form. - * Currently, only the following filters are supported: - * - `watchlist_user_preferences.pinned=true` - * - `has_entity([ENTITY_INDICATOR],[ENTITY_TYPE])` - * - `has_entity([ENTITY_INDICATOR],[ENTITY_TYPE],[NAMESPACE])` - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - - /** - * @param string $parent Required. The parent, which owns this collection of watchlists. - * Format: `projects/{project}/locations/{location}/instances/{instance}` - * Please see {@see EntityServiceClient::instanceName()} for help formatting this field. - * - * @return \Google\Cloud\Chronicle\V1\ListWatchlistsRequest - * - * @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 parent, which owns this collection of watchlists. - * Format: `projects/{project}/locations/{location}/instances/{instance}` - * @type int $page_size - * Optional. The maximum number of watchlists to return. - * The service may return fewer than this value. - * If unspecified, at most 200 watchlists will be returned. - * The maximum value is 200; values above 200 will be coerced to 200. - * @type string $page_token - * Optional. A page token, received from a previous `ListWatchlists` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListWatchlists` must match the call that provided the page - * token. - * @type string $filter - * Optional. Which watchlist to return in aip.dev/160 form. - * Currently, only the following filters are supported: - * - `watchlist_user_preferences.pinned=true` - * - `has_entity([ENTITY_INDICATOR],[ENTITY_TYPE])` - * - `has_entity([ENTITY_INDICATOR],[ENTITY_TYPE],[NAMESPACE])` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\Entity::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent, which owns this collection of watchlists. - * Format: `projects/{project}/locations/{location}/instances/{instance}` - * - * 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 parent, which owns this collection of watchlists. - * Format: `projects/{project}/locations/{location}/instances/{instance}` - * - * 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 watchlists to return. - * The service may return fewer than this value. - * If unspecified, at most 200 watchlists will be returned. - * The maximum value is 200; values above 200 will be coerced to 200. - * - * 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 watchlists to return. - * The service may return fewer than this value. - * If unspecified, at most 200 watchlists will be returned. - * The maximum value is 200; values above 200 will be coerced to 200. - * - * 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. A page token, received from a previous `ListWatchlists` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListWatchlists` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A page token, received from a previous `ListWatchlists` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListWatchlists` must match the call that provided the page - * token. - * - * 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; - } - - /** - * Optional. Which watchlist to return in aip.dev/160 form. - * Currently, only the following filters are supported: - * - `watchlist_user_preferences.pinned=true` - * - `has_entity([ENTITY_INDICATOR],[ENTITY_TYPE])` - * - `has_entity([ENTITY_INDICATOR],[ENTITY_TYPE],[NAMESPACE])` - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Which watchlist to return in aip.dev/160 form. - * Currently, only the following filters are supported: - * - `watchlist_user_preferences.pinned=true` - * - `has_entity([ENTITY_INDICATOR],[ENTITY_TYPE])` - * - `has_entity([ENTITY_INDICATOR],[ENTITY_TYPE],[NAMESPACE])` - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListWatchlistsResponse.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListWatchlistsResponse.php deleted file mode 100644 index 7c89c05776a3..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ListWatchlistsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.chronicle.v1.ListWatchlistsResponse - */ -class ListWatchlistsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The watchlists from the specified instance. - * - * Generated from protobuf field repeated .google.cloud.chronicle.v1.Watchlist watchlists = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $watchlists; - /** - * Optional. A token, which can be sent as `page_token` to retrieve the next - * page. If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Chronicle\V1\Watchlist[] $watchlists - * Optional. The watchlists from the specified instance. - * @type string $next_page_token - * Optional. A token, which can be sent as `page_token` to retrieve the next - * page. If this field is omitted, there are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\Entity::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The watchlists from the specified instance. - * - * Generated from protobuf field repeated .google.cloud.chronicle.v1.Watchlist watchlists = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return RepeatedField<\Google\Cloud\Chronicle\V1\Watchlist> - */ - public function getWatchlists() - { - return $this->watchlists; - } - - /** - * Optional. The watchlists from the specified instance. - * - * Generated from protobuf field repeated .google.cloud.chronicle.v1.Watchlist watchlists = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Chronicle\V1\Watchlist[] $var - * @return $this - */ - public function setWatchlists($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\Watchlist::class); - $this->watchlists = $arr; - - return $this; - } - - /** - * Optional. A token, which can be sent as `page_token` to retrieve the next - * page. If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Optional. A token, which can be sent as `page_token` to retrieve the next - * page. If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ReferenceList.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ReferenceList.php deleted file mode 100644 index fa290dd6040a..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ReferenceList.php +++ /dev/null @@ -1,409 +0,0 @@ -google.cloud.chronicle.v1.ReferenceList - */ -class ReferenceList extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The resource name of the reference list. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/referenceLists/{reference_list}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Output only. The unique display name of the reference list. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $display_name = ''; - /** - * Output only. The timestamp when the reference list was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp revision_create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $revision_create_time = null; - /** - * Required. A user-provided description of the reference list. - * - * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $description = ''; - /** - * Required. The entries of the reference list. - * When listed, they are returned in the order that was specified at creation - * or update. The combined size of the values of the reference list may not - * exceed 6MB. - * This is returned only when the view is REFERENCE_LIST_VIEW_FULL. - * - * Generated from protobuf field repeated .google.cloud.chronicle.v1.ReferenceListEntry entries = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - private $entries; - /** - * Output only. The resource names for the associated self-authored Rules that - * use this reference list. This is returned only when the view is - * REFERENCE_LIST_VIEW_FULL. - * - * Generated from protobuf field repeated string rules = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $rules; - /** - * Required. The syntax type indicating how list entries should be validated. - * - * Generated from protobuf field .google.cloud.chronicle.v1.ReferenceListSyntaxType syntax_type = 8 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $syntax_type = 0; - /** - * Output only. The count of self-authored rules using the reference list. - * - * Generated from protobuf field int32 rule_associations_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $rule_associations_count = 0; - /** - * The scope info of the reference list. - * During reference list creation, if this field is not set, the reference - * list without scopes (an unscoped list) will be created for an unscoped - * user. For a scoped user, this field must be set. During reference list - * update, if scope_info is requested to be updated, this field must be set. - * - * Generated from protobuf field .google.cloud.chronicle.v1.ScopeInfo scope_info = 11; - */ - protected $scope_info = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The resource name of the reference list. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/referenceLists/{reference_list}` - * @type string $display_name - * Output only. The unique display name of the reference list. - * @type \Google\Protobuf\Timestamp $revision_create_time - * Output only. The timestamp when the reference list was last updated. - * @type string $description - * Required. A user-provided description of the reference list. - * @type \Google\Cloud\Chronicle\V1\ReferenceListEntry[] $entries - * Required. The entries of the reference list. - * When listed, they are returned in the order that was specified at creation - * or update. The combined size of the values of the reference list may not - * exceed 6MB. - * This is returned only when the view is REFERENCE_LIST_VIEW_FULL. - * @type string[] $rules - * Output only. The resource names for the associated self-authored Rules that - * use this reference list. This is returned only when the view is - * REFERENCE_LIST_VIEW_FULL. - * @type int $syntax_type - * Required. The syntax type indicating how list entries should be validated. - * @type int $rule_associations_count - * Output only. The count of self-authored rules using the reference list. - * @type \Google\Cloud\Chronicle\V1\ScopeInfo $scope_info - * The scope info of the reference list. - * During reference list creation, if this field is not set, the reference - * list without scopes (an unscoped list) will be created for an unscoped - * user. For a scoped user, this field must be set. During reference list - * update, if scope_info is requested to be updated, this field must be set. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\ReferenceList::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The resource name of the reference list. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/referenceLists/{reference_list}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The resource name of the reference list. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/referenceLists/{reference_list}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The unique display name of the reference list. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Output only. The unique display name of the reference list. - * - * Generated from protobuf field string display_name = 2 [(.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; - } - - /** - * Output only. The timestamp when the reference list was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp revision_create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getRevisionCreateTime() - { - return $this->revision_create_time; - } - - public function hasRevisionCreateTime() - { - return isset($this->revision_create_time); - } - - public function clearRevisionCreateTime() - { - unset($this->revision_create_time); - } - - /** - * Output only. The timestamp when the reference list was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp revision_create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setRevisionCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->revision_create_time = $var; - - return $this; - } - - /** - * Required. A user-provided description of the reference list. - * - * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Required. A user-provided description of the reference list. - * - * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Required. The entries of the reference list. - * When listed, they are returned in the order that was specified at creation - * or update. The combined size of the values of the reference list may not - * exceed 6MB. - * This is returned only when the view is REFERENCE_LIST_VIEW_FULL. - * - * Generated from protobuf field repeated .google.cloud.chronicle.v1.ReferenceListEntry entries = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return RepeatedField<\Google\Cloud\Chronicle\V1\ReferenceListEntry> - */ - public function getEntries() - { - return $this->entries; - } - - /** - * Required. The entries of the reference list. - * When listed, they are returned in the order that was specified at creation - * or update. The combined size of the values of the reference list may not - * exceed 6MB. - * This is returned only when the view is REFERENCE_LIST_VIEW_FULL. - * - * Generated from protobuf field repeated .google.cloud.chronicle.v1.ReferenceListEntry entries = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Chronicle\V1\ReferenceListEntry[] $var - * @return $this - */ - public function setEntries($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\ReferenceListEntry::class); - $this->entries = $arr; - - return $this; - } - - /** - * Output only. The resource names for the associated self-authored Rules that - * use this reference list. This is returned only when the view is - * REFERENCE_LIST_VIEW_FULL. - * - * Generated from protobuf field repeated string rules = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return RepeatedField - */ - public function getRules() - { - return $this->rules; - } - - /** - * Output only. The resource names for the associated self-authored Rules that - * use this reference list. This is returned only when the view is - * REFERENCE_LIST_VIEW_FULL. - * - * Generated from protobuf field repeated string rules = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string[] $var - * @return $this - */ - public function setRules($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->rules = $arr; - - return $this; - } - - /** - * Required. The syntax type indicating how list entries should be validated. - * - * Generated from protobuf field .google.cloud.chronicle.v1.ReferenceListSyntaxType syntax_type = 8 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getSyntaxType() - { - return $this->syntax_type; - } - - /** - * Required. The syntax type indicating how list entries should be validated. - * - * Generated from protobuf field .google.cloud.chronicle.v1.ReferenceListSyntaxType syntax_type = 8 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setSyntaxType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Chronicle\V1\ReferenceListSyntaxType::class); - $this->syntax_type = $var; - - return $this; - } - - /** - * Output only. The count of self-authored rules using the reference list. - * - * Generated from protobuf field int32 rule_associations_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getRuleAssociationsCount() - { - return $this->rule_associations_count; - } - - /** - * Output only. The count of self-authored rules using the reference list. - * - * Generated from protobuf field int32 rule_associations_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setRuleAssociationsCount($var) - { - GPBUtil::checkInt32($var); - $this->rule_associations_count = $var; - - return $this; - } - - /** - * The scope info of the reference list. - * During reference list creation, if this field is not set, the reference - * list without scopes (an unscoped list) will be created for an unscoped - * user. For a scoped user, this field must be set. During reference list - * update, if scope_info is requested to be updated, this field must be set. - * - * Generated from protobuf field .google.cloud.chronicle.v1.ScopeInfo scope_info = 11; - * @return \Google\Cloud\Chronicle\V1\ScopeInfo|null - */ - public function getScopeInfo() - { - return $this->scope_info; - } - - public function hasScopeInfo() - { - return isset($this->scope_info); - } - - public function clearScopeInfo() - { - unset($this->scope_info); - } - - /** - * The scope info of the reference list. - * During reference list creation, if this field is not set, the reference - * list without scopes (an unscoped list) will be created for an unscoped - * user. For a scoped user, this field must be set. During reference list - * update, if scope_info is requested to be updated, this field must be set. - * - * Generated from protobuf field .google.cloud.chronicle.v1.ScopeInfo scope_info = 11; - * @param \Google\Cloud\Chronicle\V1\ScopeInfo $var - * @return $this - */ - public function setScopeInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\ScopeInfo::class); - $this->scope_info = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ReferenceListEntry.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ReferenceListEntry.php deleted file mode 100644 index 09d9360018ce..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ReferenceListEntry.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.chronicle.v1.ReferenceListEntry - */ -class ReferenceListEntry extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The value of the entry. Maximum length is 512 characters. - * - * Generated from protobuf field string value = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $value = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $value - * Required. The value of the entry. Maximum length is 512 characters. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\ReferenceList::initOnce(); - parent::__construct($data); - } - - /** - * Required. The value of the entry. Maximum length is 512 characters. - * - * Generated from protobuf field string value = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * Required. The value of the entry. Maximum length is 512 characters. - * - * Generated from protobuf field string value = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkString($var, True); - $this->value = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ReferenceListScope.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ReferenceListScope.php deleted file mode 100644 index 56675595cb8a..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ReferenceListScope.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.chronicle.v1.ReferenceListScope - */ -class ReferenceListScope extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The list of scope names of the reference list. The scope names - * should be full resource names and should be of the format: - * `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{scope_name}`. - * - * Generated from protobuf field repeated string scope_names = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $scope_names; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string[] $scope_names - * Optional. The list of scope names of the reference list. The scope names - * should be full resource names and should be of the format: - * `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{scope_name}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\ReferenceList::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The list of scope names of the reference list. The scope names - * should be full resource names and should be of the format: - * `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{scope_name}`. - * - * Generated from protobuf field repeated string scope_names = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return RepeatedField - */ - public function getScopeNames() - { - return $this->scope_names; - } - - /** - * Optional. The list of scope names of the reference list. The scope names - * should be full resource names and should be of the format: - * `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{scope_name}`. - * - * Generated from protobuf field repeated string scope_names = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string[] $var - * @return $this - */ - public function setScopeNames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->scope_names = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ReferenceListSyntaxType.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ReferenceListSyntaxType.php deleted file mode 100644 index 1cc19918caec..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ReferenceListSyntaxType.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.chronicle.v1.ReferenceListSyntaxType - */ -class ReferenceListSyntaxType -{ - /** - * Defaults to REFERENCE_LIST_SYNTAX_TYPE_PLAIN_TEXT_STRING. - * - * Generated from protobuf enum REFERENCE_LIST_SYNTAX_TYPE_UNSPECIFIED = 0; - */ - const REFERENCE_LIST_SYNTAX_TYPE_UNSPECIFIED = 0; - /** - * List contains plain text patterns. - * - * Generated from protobuf enum REFERENCE_LIST_SYNTAX_TYPE_PLAIN_TEXT_STRING = 1; - */ - const REFERENCE_LIST_SYNTAX_TYPE_PLAIN_TEXT_STRING = 1; - /** - * List contains only Regular Expression patterns. - * - * Generated from protobuf enum REFERENCE_LIST_SYNTAX_TYPE_REGEX = 2; - */ - const REFERENCE_LIST_SYNTAX_TYPE_REGEX = 2; - /** - * List contains only CIDR patterns. - * - * Generated from protobuf enum REFERENCE_LIST_SYNTAX_TYPE_CIDR = 3; - */ - const REFERENCE_LIST_SYNTAX_TYPE_CIDR = 3; - - private static $valueToName = [ - self::REFERENCE_LIST_SYNTAX_TYPE_UNSPECIFIED => 'REFERENCE_LIST_SYNTAX_TYPE_UNSPECIFIED', - self::REFERENCE_LIST_SYNTAX_TYPE_PLAIN_TEXT_STRING => 'REFERENCE_LIST_SYNTAX_TYPE_PLAIN_TEXT_STRING', - self::REFERENCE_LIST_SYNTAX_TYPE_REGEX => 'REFERENCE_LIST_SYNTAX_TYPE_REGEX', - self::REFERENCE_LIST_SYNTAX_TYPE_CIDR => 'REFERENCE_LIST_SYNTAX_TYPE_CIDR', - ]; - - 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ReferenceListView.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ReferenceListView.php deleted file mode 100644 index 78d29ab7d594..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ReferenceListView.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.chronicle.v1.ReferenceListView - */ -class ReferenceListView -{ - /** - * The default / unset value. - * The API will default to the BASIC view for ListReferenceLists. - * The API will default to the FULL view for methods that return a single - * ReferenceList resource. - * - * Generated from protobuf enum REFERENCE_LIST_VIEW_UNSPECIFIED = 0; - */ - const REFERENCE_LIST_VIEW_UNSPECIFIED = 0; - /** - * Include metadata about the ReferenceList. - * This is the default view for ListReferenceLists. - * - * Generated from protobuf enum REFERENCE_LIST_VIEW_BASIC = 1; - */ - const REFERENCE_LIST_VIEW_BASIC = 1; - /** - * Include all details about the ReferenceList: metadata, content lines, - * associated rule counts. This is the default view for GetReferenceList. - * - * Generated from protobuf enum REFERENCE_LIST_VIEW_FULL = 2; - */ - const REFERENCE_LIST_VIEW_FULL = 2; - - private static $valueToName = [ - self::REFERENCE_LIST_VIEW_UNSPECIFIED => 'REFERENCE_LIST_VIEW_UNSPECIFIED', - self::REFERENCE_LIST_VIEW_BASIC => 'REFERENCE_LIST_VIEW_BASIC', - self::REFERENCE_LIST_VIEW_FULL => 'REFERENCE_LIST_VIEW_FULL', - ]; - - 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Retrohunt.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Retrohunt.php deleted file mode 100644 index 39703c9069fd..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Retrohunt.php +++ /dev/null @@ -1,255 +0,0 @@ -google.cloud.chronicle.v1.Retrohunt - */ -class Retrohunt extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the retrohunt. - * Retrohunt is the child of a rule revision. {rule} in the format below is - * structured as {rule_id\@revision_id}. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Required. The start and end time of the event time range this retrohunt - * processes. - * - * Generated from protobuf field .google.type.Interval process_interval = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $process_interval = null; - /** - * Output only. The start and end time of the retrohunt execution. If the - * retrohunt is not yet finished, the end time of the interval will not be - * populated. - * - * Generated from protobuf field .google.type.Interval execution_interval = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $execution_interval = null; - /** - * Output only. The state of the retrohunt. - * - * Generated from protobuf field .google.cloud.chronicle.v1.Retrohunt.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. Percent progress of the retrohunt towards completion, from - * 0.00 to 100.00. - * - * Generated from protobuf field float progress_percentage = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $progress_percentage = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the retrohunt. - * Retrohunt is the child of a rule revision. {rule} in the format below is - * structured as {rule_id\@revision_id}. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` - * @type \Google\Type\Interval $process_interval - * Required. The start and end time of the event time range this retrohunt - * processes. - * @type \Google\Type\Interval $execution_interval - * Output only. The start and end time of the retrohunt execution. If the - * retrohunt is not yet finished, the end time of the interval will not be - * populated. - * @type int $state - * Output only. The state of the retrohunt. - * @type float $progress_percentage - * Output only. Percent progress of the retrohunt towards completion, from - * 0.00 to 100.00. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\Rule::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the retrohunt. - * Retrohunt is the child of a rule revision. {rule} in the format below is - * structured as {rule_id\@revision_id}. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the retrohunt. - * Retrohunt is the child of a rule revision. {rule} in the format below is - * structured as {rule_id\@revision_id}. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` - * - * 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 start and end time of the event time range this retrohunt - * processes. - * - * Generated from protobuf field .google.type.Interval process_interval = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Type\Interval|null - */ - public function getProcessInterval() - { - return $this->process_interval; - } - - public function hasProcessInterval() - { - return isset($this->process_interval); - } - - public function clearProcessInterval() - { - unset($this->process_interval); - } - - /** - * Required. The start and end time of the event time range this retrohunt - * processes. - * - * Generated from protobuf field .google.type.Interval process_interval = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Type\Interval $var - * @return $this - */ - public function setProcessInterval($var) - { - GPBUtil::checkMessage($var, \Google\Type\Interval::class); - $this->process_interval = $var; - - return $this; - } - - /** - * Output only. The start and end time of the retrohunt execution. If the - * retrohunt is not yet finished, the end time of the interval will not be - * populated. - * - * Generated from protobuf field .google.type.Interval execution_interval = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Type\Interval|null - */ - public function getExecutionInterval() - { - return $this->execution_interval; - } - - public function hasExecutionInterval() - { - return isset($this->execution_interval); - } - - public function clearExecutionInterval() - { - unset($this->execution_interval); - } - - /** - * Output only. The start and end time of the retrohunt execution. If the - * retrohunt is not yet finished, the end time of the interval will not be - * populated. - * - * Generated from protobuf field .google.type.Interval execution_interval = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Type\Interval $var - * @return $this - */ - public function setExecutionInterval($var) - { - GPBUtil::checkMessage($var, \Google\Type\Interval::class); - $this->execution_interval = $var; - - return $this; - } - - /** - * Output only. The state of the retrohunt. - * - * Generated from protobuf field .google.cloud.chronicle.v1.Retrohunt.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The state of the retrohunt. - * - * Generated from protobuf field .google.cloud.chronicle.v1.Retrohunt.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Chronicle\V1\Retrohunt\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. Percent progress of the retrohunt towards completion, from - * 0.00 to 100.00. - * - * Generated from protobuf field float progress_percentage = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return float - */ - public function getProgressPercentage() - { - return $this->progress_percentage; - } - - /** - * Output only. Percent progress of the retrohunt towards completion, from - * 0.00 to 100.00. - * - * Generated from protobuf field float progress_percentage = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param float $var - * @return $this - */ - public function setProgressPercentage($var) - { - GPBUtil::checkFloat($var); - $this->progress_percentage = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Retrohunt/State.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Retrohunt/State.php deleted file mode 100644 index 0c54a8ff495c..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Retrohunt/State.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.chronicle.v1.Retrohunt.State - */ -class State -{ - /** - * Unspecified or unknown retrohunt state. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Running state. - * - * Generated from protobuf enum RUNNING = 1; - */ - const RUNNING = 1; - /** - * Done state. - * - * Generated from protobuf enum DONE = 2; - */ - const DONE = 2; - /** - * Cancelled state. - * - * Generated from protobuf enum CANCELLED = 3; - */ - const CANCELLED = 3; - /** - * Failed state. - * - * Generated from protobuf enum FAILED = 4; - */ - const FAILED = 4; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::RUNNING => 'RUNNING', - self::DONE => 'DONE', - self::CANCELLED => 'CANCELLED', - self::FAILED => 'FAILED', - ]; - - 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/RetrohuntMetadata.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/RetrohuntMetadata.php deleted file mode 100644 index 87deefb9bb2e..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/RetrohuntMetadata.php +++ /dev/null @@ -1,157 +0,0 @@ -google.cloud.chronicle.v1.RetrohuntMetadata - */ -class RetrohuntMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the retrohunt. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` - * - * Generated from protobuf field string retrohunt = 1 [(.google.api.resource_reference) = { - */ - protected $retrohunt = ''; - /** - * The start and end time of the retrohunt execution. If the retrohunt is not - * yet finished, the end time of the interval will not be filled. - * - * Generated from protobuf field .google.type.Interval execution_interval = 2; - */ - protected $execution_interval = null; - /** - * Percent progress of the retrohunt towards completion, from 0.00 to 100.00. - * - * Generated from protobuf field float progress_percentage = 3; - */ - protected $progress_percentage = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $retrohunt - * The name of the retrohunt. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` - * @type \Google\Type\Interval $execution_interval - * The start and end time of the retrohunt execution. If the retrohunt is not - * yet finished, the end time of the interval will not be filled. - * @type float $progress_percentage - * Percent progress of the retrohunt towards completion, from 0.00 to 100.00. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\Rule::initOnce(); - parent::__construct($data); - } - - /** - * The name of the retrohunt. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` - * - * Generated from protobuf field string retrohunt = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getRetrohunt() - { - return $this->retrohunt; - } - - /** - * The name of the retrohunt. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` - * - * Generated from protobuf field string retrohunt = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setRetrohunt($var) - { - GPBUtil::checkString($var, True); - $this->retrohunt = $var; - - return $this; - } - - /** - * The start and end time of the retrohunt execution. If the retrohunt is not - * yet finished, the end time of the interval will not be filled. - * - * Generated from protobuf field .google.type.Interval execution_interval = 2; - * @return \Google\Type\Interval|null - */ - public function getExecutionInterval() - { - return $this->execution_interval; - } - - public function hasExecutionInterval() - { - return isset($this->execution_interval); - } - - public function clearExecutionInterval() - { - unset($this->execution_interval); - } - - /** - * The start and end time of the retrohunt execution. If the retrohunt is not - * yet finished, the end time of the interval will not be filled. - * - * Generated from protobuf field .google.type.Interval execution_interval = 2; - * @param \Google\Type\Interval $var - * @return $this - */ - public function setExecutionInterval($var) - { - GPBUtil::checkMessage($var, \Google\Type\Interval::class); - $this->execution_interval = $var; - - return $this; - } - - /** - * Percent progress of the retrohunt towards completion, from 0.00 to 100.00. - * - * Generated from protobuf field float progress_percentage = 3; - * @return float - */ - public function getProgressPercentage() - { - return $this->progress_percentage; - } - - /** - * Percent progress of the retrohunt towards completion, from 0.00 to 100.00. - * - * Generated from protobuf field float progress_percentage = 3; - * @param float $var - * @return $this - */ - public function setProgressPercentage($var) - { - GPBUtil::checkFloat($var); - $this->progress_percentage = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Rule.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Rule.php deleted file mode 100644 index d1fced9182be..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Rule.php +++ /dev/null @@ -1,810 +0,0 @@ -google.cloud.chronicle.v1.Rule - */ -class Rule extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. Full resource name for the rule. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Output only. The revision ID of the rule. - * A new revision is created whenever the rule text is changed in any way. - * Format: `v_{10 digits}_{9 digits}` - * Populated in REVISION_METADATA_ONLY view and FULL view. - * - * Generated from protobuf field string revision_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $revision_id = ''; - /** - * Output only. Display name of the rule. - * Populated in BASIC view and FULL view. - * - * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $display_name = ''; - /** - * The YARA-L content of the rule. - * Populated in FULL view. - * - * Generated from protobuf field string text = 4; - */ - protected $text = ''; - /** - * Output only. The author of the rule. Extracted from the meta section of - * text. Populated in BASIC view and FULL view. - * - * Generated from protobuf field string author = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $author = ''; - /** - * Output only. The severity of the rule as specified in the meta section of - * text. Populated in BASIC view and FULL view. - * - * Generated from protobuf field .google.cloud.chronicle.v1.Severity severity = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $severity = null; - /** - * Output only. Additional metadata specified in the meta section of text. - * Populated in FULL view. - * - * Generated from protobuf field map metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $metadata; - /** - * Output only. The timestamp of when the rule was created. - * Populated in FULL view. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The timestamp of when the rule revision was created. - * Populated in FULL, REVISION_METADATA_ONLY views. - * - * Generated from protobuf field .google.protobuf.Timestamp revision_create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $revision_create_time = null; - /** - * Output only. The current compilation state of the rule. - * Populated in FULL view. - * - * Generated from protobuf field .google.cloud.chronicle.v1.Rule.CompilationState compilation_state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $compilation_state = 0; - /** - * Output only. User-facing type of the rule. Extracted from the events - * section of rule text. Populated in BASIC view and FULL view. - * - * Generated from protobuf field .google.cloud.chronicle.v1.RuleType type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $type = 0; - /** - * Output only. Resource names of the reference lists used in this rule. - * Populated in FULL view. - * - * Generated from protobuf field repeated string reference_lists = 13 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - private $reference_lists; - /** - * Output only. The run frequencies that are allowed for the rule. - * Populated in BASIC view and FULL view. - * - * Generated from protobuf field repeated .google.cloud.chronicle.v1.RunFrequency allowed_run_frequencies = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $allowed_run_frequencies; - /** - * The etag for this rule. - * If this is provided on update, the request will succeed if and only if it - * matches the server-computed value, and will fail with an ABORTED error - * otherwise. - * Populated in BASIC view and FULL view. - * - * Generated from protobuf field string etag = 15; - */ - protected $etag = ''; - /** - * Resource name of the DataAccessScope bound to this rule. - * Populated in BASIC view and FULL view. - * If reference lists are used in the rule, validations will be performed - * against this scope to ensure that the reference lists are compatible with - * both the user's and the rule's scopes. - * The scope should be in the format: - * `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{scope}`. - * - * Generated from protobuf field string scope = 16 [(.google.api.resource_reference) = { - */ - protected $scope = ''; - /** - * Output only. A list of a rule's corresponding compilation diagnostic - * messages such as compilation errors and compilation warnings. Populated in - * FULL view. - * - * Generated from protobuf field repeated .google.cloud.chronicle.v1.CompilationDiagnostic compilation_diagnostics = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $compilation_diagnostics; - /** - * Output only. Indicate the rule can run in near real time live rule. - * If this is true, the rule uses the near real time live rule when the run - * frequency is set to LIVE. - * - * Generated from protobuf field bool near_real_time_live_rule_eligible = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $near_real_time_live_rule_eligible = false; - /** - * Output only. The set of inputs used in the rule. For example, if the rule - * uses $e.principal.hostname, then the uses_udm field will be true. - * - * Generated from protobuf field .google.cloud.chronicle.v1.InputsUsed inputs_used = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $inputs_used = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. Full resource name for the rule. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - * @type string $revision_id - * Output only. The revision ID of the rule. - * A new revision is created whenever the rule text is changed in any way. - * Format: `v_{10 digits}_{9 digits}` - * Populated in REVISION_METADATA_ONLY view and FULL view. - * @type string $display_name - * Output only. Display name of the rule. - * Populated in BASIC view and FULL view. - * @type string $text - * The YARA-L content of the rule. - * Populated in FULL view. - * @type string $author - * Output only. The author of the rule. Extracted from the meta section of - * text. Populated in BASIC view and FULL view. - * @type \Google\Cloud\Chronicle\V1\Severity $severity - * Output only. The severity of the rule as specified in the meta section of - * text. Populated in BASIC view and FULL view. - * @type array|\Google\Protobuf\Internal\MapField $metadata - * Output only. Additional metadata specified in the meta section of text. - * Populated in FULL view. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The timestamp of when the rule was created. - * Populated in FULL view. - * @type \Google\Protobuf\Timestamp $revision_create_time - * Output only. The timestamp of when the rule revision was created. - * Populated in FULL, REVISION_METADATA_ONLY views. - * @type int $compilation_state - * Output only. The current compilation state of the rule. - * Populated in FULL view. - * @type int $type - * Output only. User-facing type of the rule. Extracted from the events - * section of rule text. Populated in BASIC view and FULL view. - * @type string[] $reference_lists - * Output only. Resource names of the reference lists used in this rule. - * Populated in FULL view. - * @type int[] $allowed_run_frequencies - * Output only. The run frequencies that are allowed for the rule. - * Populated in BASIC view and FULL view. - * @type string $etag - * The etag for this rule. - * If this is provided on update, the request will succeed if and only if it - * matches the server-computed value, and will fail with an ABORTED error - * otherwise. - * Populated in BASIC view and FULL view. - * @type string $scope - * Resource name of the DataAccessScope bound to this rule. - * Populated in BASIC view and FULL view. - * If reference lists are used in the rule, validations will be performed - * against this scope to ensure that the reference lists are compatible with - * both the user's and the rule's scopes. - * The scope should be in the format: - * `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{scope}`. - * @type \Google\Cloud\Chronicle\V1\CompilationDiagnostic[] $compilation_diagnostics - * Output only. A list of a rule's corresponding compilation diagnostic - * messages such as compilation errors and compilation warnings. Populated in - * FULL view. - * @type bool $near_real_time_live_rule_eligible - * Output only. Indicate the rule can run in near real time live rule. - * If this is true, the rule uses the near real time live rule when the run - * frequency is set to LIVE. - * @type \Google\Cloud\Chronicle\V1\InputsUsed $inputs_used - * Output only. The set of inputs used in the rule. For example, if the rule - * uses $e.principal.hostname, then the uses_udm field will be true. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\Rule::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. Full resource name for the rule. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. Full resource name for the rule. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The revision ID of the rule. - * A new revision is created whenever the rule text is changed in any way. - * Format: `v_{10 digits}_{9 digits}` - * Populated in REVISION_METADATA_ONLY view and FULL view. - * - * Generated from protobuf field string revision_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getRevisionId() - { - return $this->revision_id; - } - - /** - * Output only. The revision ID of the rule. - * A new revision is created whenever the rule text is changed in any way. - * Format: `v_{10 digits}_{9 digits}` - * Populated in REVISION_METADATA_ONLY view and FULL view. - * - * Generated from protobuf field string revision_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setRevisionId($var) - { - GPBUtil::checkString($var, True); - $this->revision_id = $var; - - return $this; - } - - /** - * Output only. Display name of the rule. - * Populated in BASIC view and FULL view. - * - * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Output only. Display name of the rule. - * Populated in BASIC view and FULL view. - * - * Generated from protobuf field string display_name = 3 [(.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 YARA-L content of the rule. - * Populated in FULL view. - * - * Generated from protobuf field string text = 4; - * @return string - */ - public function getText() - { - return $this->text; - } - - /** - * The YARA-L content of the rule. - * Populated in FULL view. - * - * Generated from protobuf field string text = 4; - * @param string $var - * @return $this - */ - public function setText($var) - { - GPBUtil::checkString($var, True); - $this->text = $var; - - return $this; - } - - /** - * Output only. The author of the rule. Extracted from the meta section of - * text. Populated in BASIC view and FULL view. - * - * Generated from protobuf field string author = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getAuthor() - { - return $this->author; - } - - /** - * Output only. The author of the rule. Extracted from the meta section of - * text. Populated in BASIC view and FULL view. - * - * Generated from protobuf field string author = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setAuthor($var) - { - GPBUtil::checkString($var, True); - $this->author = $var; - - return $this; - } - - /** - * Output only. The severity of the rule as specified in the meta section of - * text. Populated in BASIC view and FULL view. - * - * Generated from protobuf field .google.cloud.chronicle.v1.Severity severity = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Chronicle\V1\Severity|null - */ - public function getSeverity() - { - return $this->severity; - } - - public function hasSeverity() - { - return isset($this->severity); - } - - public function clearSeverity() - { - unset($this->severity); - } - - /** - * Output only. The severity of the rule as specified in the meta section of - * text. Populated in BASIC view and FULL view. - * - * Generated from protobuf field .google.cloud.chronicle.v1.Severity severity = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Chronicle\V1\Severity $var - * @return $this - */ - public function setSeverity($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\Severity::class); - $this->severity = $var; - - return $this; - } - - /** - * Output only. Additional metadata specified in the meta section of text. - * Populated in FULL view. - * - * Generated from protobuf field map metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getMetadata() - { - return $this->metadata; - } - - /** - * Output only. Additional metadata specified in the meta section of text. - * Populated in FULL view. - * - * Generated from protobuf field map metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setMetadata($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->metadata = $arr; - - return $this; - } - - /** - * Output only. The timestamp of when the rule was created. - * Populated in FULL view. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @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); - } - - /** - * Output only. The timestamp of when the rule was created. - * Populated in FULL view. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The timestamp of when the rule revision was created. - * Populated in FULL, REVISION_METADATA_ONLY views. - * - * Generated from protobuf field .google.protobuf.Timestamp revision_create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getRevisionCreateTime() - { - return $this->revision_create_time; - } - - public function hasRevisionCreateTime() - { - return isset($this->revision_create_time); - } - - public function clearRevisionCreateTime() - { - unset($this->revision_create_time); - } - - /** - * Output only. The timestamp of when the rule revision was created. - * Populated in FULL, REVISION_METADATA_ONLY views. - * - * Generated from protobuf field .google.protobuf.Timestamp revision_create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setRevisionCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->revision_create_time = $var; - - return $this; - } - - /** - * Output only. The current compilation state of the rule. - * Populated in FULL view. - * - * Generated from protobuf field .google.cloud.chronicle.v1.Rule.CompilationState compilation_state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getCompilationState() - { - return $this->compilation_state; - } - - /** - * Output only. The current compilation state of the rule. - * Populated in FULL view. - * - * Generated from protobuf field .google.cloud.chronicle.v1.Rule.CompilationState compilation_state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setCompilationState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Chronicle\V1\Rule\CompilationState::class); - $this->compilation_state = $var; - - return $this; - } - - /** - * Output only. User-facing type of the rule. Extracted from the events - * section of rule text. Populated in BASIC view and FULL view. - * - * Generated from protobuf field .google.cloud.chronicle.v1.RuleType type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Output only. User-facing type of the rule. Extracted from the events - * section of rule text. Populated in BASIC view and FULL view. - * - * Generated from protobuf field .google.cloud.chronicle.v1.RuleType type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Chronicle\V1\RuleType::class); - $this->type = $var; - - return $this; - } - - /** - * Output only. Resource names of the reference lists used in this rule. - * Populated in FULL view. - * - * Generated from protobuf field repeated string reference_lists = 13 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return RepeatedField - */ - public function getReferenceLists() - { - return $this->reference_lists; - } - - /** - * Output only. Resource names of the reference lists used in this rule. - * Populated in FULL view. - * - * Generated from protobuf field repeated string reference_lists = 13 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string[] $var - * @return $this - */ - public function setReferenceLists($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->reference_lists = $arr; - - return $this; - } - - /** - * Output only. The run frequencies that are allowed for the rule. - * Populated in BASIC view and FULL view. - * - * Generated from protobuf field repeated .google.cloud.chronicle.v1.RunFrequency allowed_run_frequencies = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return RepeatedField - */ - public function getAllowedRunFrequencies() - { - return $this->allowed_run_frequencies; - } - - /** - * Output only. The run frequencies that are allowed for the rule. - * Populated in BASIC view and FULL view. - * - * Generated from protobuf field repeated .google.cloud.chronicle.v1.RunFrequency allowed_run_frequencies = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int[] $var - * @return $this - */ - public function setAllowedRunFrequencies($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Chronicle\V1\RunFrequency::class); - $this->allowed_run_frequencies = $arr; - - return $this; - } - - /** - * The etag for this rule. - * If this is provided on update, the request will succeed if and only if it - * matches the server-computed value, and will fail with an ABORTED error - * otherwise. - * Populated in BASIC view and FULL view. - * - * Generated from protobuf field string etag = 15; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * The etag for this rule. - * If this is provided on update, the request will succeed if and only if it - * matches the server-computed value, and will fail with an ABORTED error - * otherwise. - * Populated in BASIC view and FULL view. - * - * Generated from protobuf field string etag = 15; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * Resource name of the DataAccessScope bound to this rule. - * Populated in BASIC view and FULL view. - * If reference lists are used in the rule, validations will be performed - * against this scope to ensure that the reference lists are compatible with - * both the user's and the rule's scopes. - * The scope should be in the format: - * `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{scope}`. - * - * Generated from protobuf field string scope = 16 [(.google.api.resource_reference) = { - * @return string - */ - public function getScope() - { - return $this->scope; - } - - /** - * Resource name of the DataAccessScope bound to this rule. - * Populated in BASIC view and FULL view. - * If reference lists are used in the rule, validations will be performed - * against this scope to ensure that the reference lists are compatible with - * both the user's and the rule's scopes. - * The scope should be in the format: - * `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{scope}`. - * - * Generated from protobuf field string scope = 16 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setScope($var) - { - GPBUtil::checkString($var, True); - $this->scope = $var; - - return $this; - } - - /** - * Output only. A list of a rule's corresponding compilation diagnostic - * messages such as compilation errors and compilation warnings. Populated in - * FULL view. - * - * Generated from protobuf field repeated .google.cloud.chronicle.v1.CompilationDiagnostic compilation_diagnostics = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return RepeatedField<\Google\Cloud\Chronicle\V1\CompilationDiagnostic> - */ - public function getCompilationDiagnostics() - { - return $this->compilation_diagnostics; - } - - /** - * Output only. A list of a rule's corresponding compilation diagnostic - * messages such as compilation errors and compilation warnings. Populated in - * FULL view. - * - * Generated from protobuf field repeated .google.cloud.chronicle.v1.CompilationDiagnostic compilation_diagnostics = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Chronicle\V1\CompilationDiagnostic[] $var - * @return $this - */ - public function setCompilationDiagnostics($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\CompilationDiagnostic::class); - $this->compilation_diagnostics = $arr; - - return $this; - } - - /** - * Output only. Indicate the rule can run in near real time live rule. - * If this is true, the rule uses the near real time live rule when the run - * frequency is set to LIVE. - * - * Generated from protobuf field bool near_real_time_live_rule_eligible = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getNearRealTimeLiveRuleEligible() - { - return $this->near_real_time_live_rule_eligible; - } - - /** - * Output only. Indicate the rule can run in near real time live rule. - * If this is true, the rule uses the near real time live rule when the run - * frequency is set to LIVE. - * - * Generated from protobuf field bool near_real_time_live_rule_eligible = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setNearRealTimeLiveRuleEligible($var) - { - GPBUtil::checkBool($var); - $this->near_real_time_live_rule_eligible = $var; - - return $this; - } - - /** - * Output only. The set of inputs used in the rule. For example, if the rule - * uses $e.principal.hostname, then the uses_udm field will be true. - * - * Generated from protobuf field .google.cloud.chronicle.v1.InputsUsed inputs_used = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Chronicle\V1\InputsUsed|null - */ - public function getInputsUsed() - { - return $this->inputs_used; - } - - public function hasInputsUsed() - { - return isset($this->inputs_used); - } - - public function clearInputsUsed() - { - unset($this->inputs_used); - } - - /** - * Output only. The set of inputs used in the rule. For example, if the rule - * uses $e.principal.hostname, then the uses_udm field will be true. - * - * Generated from protobuf field .google.cloud.chronicle.v1.InputsUsed inputs_used = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Chronicle\V1\InputsUsed $var - * @return $this - */ - public function setInputsUsed($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\InputsUsed::class); - $this->inputs_used = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Rule/CompilationState.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Rule/CompilationState.php deleted file mode 100644 index fde2594a8645..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Rule/CompilationState.php +++ /dev/null @@ -1,63 +0,0 @@ -google.cloud.chronicle.v1.Rule.CompilationState - */ -class CompilationState -{ - /** - * The compilation state is unspecified/unknown. - * - * Generated from protobuf enum COMPILATION_STATE_UNSPECIFIED = 0; - */ - const COMPILATION_STATE_UNSPECIFIED = 0; - /** - * The Rule can successfully compile. - * - * Generated from protobuf enum SUCCEEDED = 1; - */ - const SUCCEEDED = 1; - /** - * The Rule cannot successfully compile. - * This is possible if a backwards-incompatible change was made to the - * compiler. - * - * Generated from protobuf enum FAILED = 2; - */ - const FAILED = 2; - - private static $valueToName = [ - self::COMPILATION_STATE_UNSPECIFIED => 'COMPILATION_STATE_UNSPECIFIED', - self::SUCCEEDED => 'SUCCEEDED', - self::FAILED => 'FAILED', - ]; - - 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/RuleDeployment.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/RuleDeployment.php deleted file mode 100644 index 59c5d3f3033c..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/RuleDeployment.php +++ /dev/null @@ -1,477 +0,0 @@ -google.cloud.chronicle.v1.RuleDeployment - */ -class RuleDeployment extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the rule deployment. - * Note that RuleDeployment is a child of the overall Rule, not any individual - * revision, so the resource ID segment for the Rule resource must not - * reference a specific revision. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Whether the rule is currently deployed continuously against incoming data. - * - * Generated from protobuf field bool enabled = 2; - */ - protected $enabled = false; - /** - * Whether detections resulting from this deployment should be considered - * alerts. - * - * Generated from protobuf field bool alerting = 3; - */ - protected $alerting = false; - /** - * The archive state of the rule deployment. - * Cannot be set to true unless enabled is set to false. - * If set to true, alerting will automatically be set to false. - * If currently set to true, enabled, alerting, and run_frequency cannot be - * updated. - * - * Generated from protobuf field bool archived = 4; - */ - protected $archived = false; - /** - * Output only. The timestamp when the rule deployment archive state was last - * set to true. If the rule deployment's current archive state is not set to - * true, the field will be empty. - * - * Generated from protobuf field .google.protobuf.Timestamp archive_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $archive_time = null; - /** - * The run frequency of the rule deployment. - * - * Generated from protobuf field .google.cloud.chronicle.v1.RunFrequency run_frequency = 6; - */ - protected $run_frequency = 0; - /** - * Output only. The execution state of the rule deployment. - * - * Generated from protobuf field .google.cloud.chronicle.v1.RuleDeployment.ExecutionState execution_state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $execution_state = 0; - /** - * Output only. The names of the associated/chained producer rules. Rules are - * considered producers for this rule if this rule explicitly filters on their - * ruleid. Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - * - * Generated from protobuf field repeated string producer_rules = 8 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - private $producer_rules; - /** - * Output only. The names of the associated/chained consumer rules. Rules are - * considered consumers of this rule if their rule text explicitly filters on - * this rule's ruleid. Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - * - * Generated from protobuf field repeated string consumer_rules = 9 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - private $consumer_rules; - /** - * Output only. The timestamp when the rule deployment alert state was lastly - * changed. This is filled regardless of the current alert state. E.g. if the - * current alert status is false, this timestamp will be the timestamp when - * the alert status was changed to false. - * - * Generated from protobuf field .google.protobuf.Timestamp last_alert_status_change_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $last_alert_status_change_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the rule deployment. - * Note that RuleDeployment is a child of the overall Rule, not any individual - * revision, so the resource ID segment for the Rule resource must not - * reference a specific revision. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` - * @type bool $enabled - * Whether the rule is currently deployed continuously against incoming data. - * @type bool $alerting - * Whether detections resulting from this deployment should be considered - * alerts. - * @type bool $archived - * The archive state of the rule deployment. - * Cannot be set to true unless enabled is set to false. - * If set to true, alerting will automatically be set to false. - * If currently set to true, enabled, alerting, and run_frequency cannot be - * updated. - * @type \Google\Protobuf\Timestamp $archive_time - * Output only. The timestamp when the rule deployment archive state was last - * set to true. If the rule deployment's current archive state is not set to - * true, the field will be empty. - * @type int $run_frequency - * The run frequency of the rule deployment. - * @type int $execution_state - * Output only. The execution state of the rule deployment. - * @type string[] $producer_rules - * Output only. The names of the associated/chained producer rules. Rules are - * considered producers for this rule if this rule explicitly filters on their - * ruleid. Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - * @type string[] $consumer_rules - * Output only. The names of the associated/chained consumer rules. Rules are - * considered consumers of this rule if their rule text explicitly filters on - * this rule's ruleid. Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - * @type \Google\Protobuf\Timestamp $last_alert_status_change_time - * Output only. The timestamp when the rule deployment alert state was lastly - * changed. This is filled regardless of the current alert state. E.g. if the - * current alert status is false, this timestamp will be the timestamp when - * the alert status was changed to false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\Rule::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the rule deployment. - * Note that RuleDeployment is a child of the overall Rule, not any individual - * revision, so the resource ID segment for the Rule resource must not - * reference a specific revision. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the rule deployment. - * Note that RuleDeployment is a child of the overall Rule, not any individual - * revision, so the resource ID segment for the Rule resource must not - * reference a specific revision. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Whether the rule is currently deployed continuously against incoming data. - * - * Generated from protobuf field bool enabled = 2; - * @return bool - */ - public function getEnabled() - { - return $this->enabled; - } - - /** - * Whether the rule is currently deployed continuously against incoming data. - * - * Generated from protobuf field bool enabled = 2; - * @param bool $var - * @return $this - */ - public function setEnabled($var) - { - GPBUtil::checkBool($var); - $this->enabled = $var; - - return $this; - } - - /** - * Whether detections resulting from this deployment should be considered - * alerts. - * - * Generated from protobuf field bool alerting = 3; - * @return bool - */ - public function getAlerting() - { - return $this->alerting; - } - - /** - * Whether detections resulting from this deployment should be considered - * alerts. - * - * Generated from protobuf field bool alerting = 3; - * @param bool $var - * @return $this - */ - public function setAlerting($var) - { - GPBUtil::checkBool($var); - $this->alerting = $var; - - return $this; - } - - /** - * The archive state of the rule deployment. - * Cannot be set to true unless enabled is set to false. - * If set to true, alerting will automatically be set to false. - * If currently set to true, enabled, alerting, and run_frequency cannot be - * updated. - * - * Generated from protobuf field bool archived = 4; - * @return bool - */ - public function getArchived() - { - return $this->archived; - } - - /** - * The archive state of the rule deployment. - * Cannot be set to true unless enabled is set to false. - * If set to true, alerting will automatically be set to false. - * If currently set to true, enabled, alerting, and run_frequency cannot be - * updated. - * - * Generated from protobuf field bool archived = 4; - * @param bool $var - * @return $this - */ - public function setArchived($var) - { - GPBUtil::checkBool($var); - $this->archived = $var; - - return $this; - } - - /** - * Output only. The timestamp when the rule deployment archive state was last - * set to true. If the rule deployment's current archive state is not set to - * true, the field will be empty. - * - * Generated from protobuf field .google.protobuf.Timestamp archive_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getArchiveTime() - { - return $this->archive_time; - } - - public function hasArchiveTime() - { - return isset($this->archive_time); - } - - public function clearArchiveTime() - { - unset($this->archive_time); - } - - /** - * Output only. The timestamp when the rule deployment archive state was last - * set to true. If the rule deployment's current archive state is not set to - * true, the field will be empty. - * - * Generated from protobuf field .google.protobuf.Timestamp archive_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setArchiveTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->archive_time = $var; - - return $this; - } - - /** - * The run frequency of the rule deployment. - * - * Generated from protobuf field .google.cloud.chronicle.v1.RunFrequency run_frequency = 6; - * @return int - */ - public function getRunFrequency() - { - return $this->run_frequency; - } - - /** - * The run frequency of the rule deployment. - * - * Generated from protobuf field .google.cloud.chronicle.v1.RunFrequency run_frequency = 6; - * @param int $var - * @return $this - */ - public function setRunFrequency($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Chronicle\V1\RunFrequency::class); - $this->run_frequency = $var; - - return $this; - } - - /** - * Output only. The execution state of the rule deployment. - * - * Generated from protobuf field .google.cloud.chronicle.v1.RuleDeployment.ExecutionState execution_state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getExecutionState() - { - return $this->execution_state; - } - - /** - * Output only. The execution state of the rule deployment. - * - * Generated from protobuf field .google.cloud.chronicle.v1.RuleDeployment.ExecutionState execution_state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setExecutionState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Chronicle\V1\RuleDeployment\ExecutionState::class); - $this->execution_state = $var; - - return $this; - } - - /** - * Output only. The names of the associated/chained producer rules. Rules are - * considered producers for this rule if this rule explicitly filters on their - * ruleid. Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - * - * Generated from protobuf field repeated string producer_rules = 8 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return RepeatedField - */ - public function getProducerRules() - { - return $this->producer_rules; - } - - /** - * Output only. The names of the associated/chained producer rules. Rules are - * considered producers for this rule if this rule explicitly filters on their - * ruleid. Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - * - * Generated from protobuf field repeated string producer_rules = 8 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string[] $var - * @return $this - */ - public function setProducerRules($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->producer_rules = $arr; - - return $this; - } - - /** - * Output only. The names of the associated/chained consumer rules. Rules are - * considered consumers of this rule if their rule text explicitly filters on - * this rule's ruleid. Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - * - * Generated from protobuf field repeated string consumer_rules = 9 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return RepeatedField - */ - public function getConsumerRules() - { - return $this->consumer_rules; - } - - /** - * Output only. The names of the associated/chained consumer rules. Rules are - * considered consumers of this rule if their rule text explicitly filters on - * this rule's ruleid. Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - * - * Generated from protobuf field repeated string consumer_rules = 9 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string[] $var - * @return $this - */ - public function setConsumerRules($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->consumer_rules = $arr; - - return $this; - } - - /** - * Output only. The timestamp when the rule deployment alert state was lastly - * changed. This is filled regardless of the current alert state. E.g. if the - * current alert status is false, this timestamp will be the timestamp when - * the alert status was changed to false. - * - * Generated from protobuf field .google.protobuf.Timestamp last_alert_status_change_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastAlertStatusChangeTime() - { - return $this->last_alert_status_change_time; - } - - public function hasLastAlertStatusChangeTime() - { - return isset($this->last_alert_status_change_time); - } - - public function clearLastAlertStatusChangeTime() - { - unset($this->last_alert_status_change_time); - } - - /** - * Output only. The timestamp when the rule deployment alert state was lastly - * changed. This is filled regardless of the current alert state. E.g. if the - * current alert status is false, this timestamp will be the timestamp when - * the alert status was changed to false. - * - * Generated from protobuf field .google.protobuf.Timestamp last_alert_status_change_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastAlertStatusChangeTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_alert_status_change_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/RuleDeployment/ExecutionState.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/RuleDeployment/ExecutionState.php deleted file mode 100644 index c942861abbcc..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/RuleDeployment/ExecutionState.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.chronicle.v1.RuleDeployment.ExecutionState - */ -class ExecutionState -{ - /** - * Unspecified or unknown execution state. - * - * Generated from protobuf enum EXECUTION_STATE_UNSPECIFIED = 0; - */ - const EXECUTION_STATE_UNSPECIFIED = 0; - /** - * Default execution state. - * - * Generated from protobuf enum DEFAULT = 1; - */ - const PBDEFAULT = 1; - /** - * Rules in limited state may not have their executions guaranteed. - * - * Generated from protobuf enum LIMITED = 2; - */ - const LIMITED = 2; - /** - * Paused rules are not executed at all. - * - * Generated from protobuf enum PAUSED = 3; - */ - const PAUSED = 3; - - private static $valueToName = [ - self::EXECUTION_STATE_UNSPECIFIED => 'EXECUTION_STATE_UNSPECIFIED', - self::PBDEFAULT => 'DEFAULT', - self::LIMITED => 'LIMITED', - self::PAUSED => 'PAUSED', - ]; - - 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)) { - $pbconst = __CLASS__. '::PB' . strtoupper($name); - if (!defined($pbconst)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($pbconst); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/RuleType.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/RuleType.php deleted file mode 100644 index fd4d0dbae098..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/RuleType.php +++ /dev/null @@ -1,62 +0,0 @@ -google.cloud.chronicle.v1.RuleType - */ -class RuleType -{ - /** - * The rule type is unspecified/unknown. - * - * Generated from protobuf enum RULE_TYPE_UNSPECIFIED = 0; - */ - const RULE_TYPE_UNSPECIFIED = 0; - /** - * Rule checks for the existence of a single event. - * - * Generated from protobuf enum SINGLE_EVENT = 1; - */ - const SINGLE_EVENT = 1; - /** - * Rule checks for correlation between multiple events - * - * Generated from protobuf enum MULTI_EVENT = 2; - */ - const MULTI_EVENT = 2; - - private static $valueToName = [ - self::RULE_TYPE_UNSPECIFIED => 'RULE_TYPE_UNSPECIFIED', - self::SINGLE_EVENT => 'SINGLE_EVENT', - self::MULTI_EVENT => 'MULTI_EVENT', - ]; - - 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/RuleView.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/RuleView.php deleted file mode 100644 index a79782aed652..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/RuleView.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.chronicle.v1.RuleView - */ -class RuleView -{ - /** - * The default/unset value. - * The API will default to the BASIC view for ListRules/ListRuleRevisions. - * The API will default to the FULL view for GetRule. - * - * Generated from protobuf enum RULE_VIEW_UNSPECIFIED = 0; - */ - const RULE_VIEW_UNSPECIFIED = 0; - /** - * Include basic metadata about the rule, but not the full contents. - * Returned fields include: revision_id, revision_create_time, display_name, - * author, severity, type, allowed_run_frequency, - * near_real_time_live_rule_eligible, etag, and scope. - * This is the default value for ListRules and ListRuleRevisions. - * - * Generated from protobuf enum BASIC = 1; - */ - const BASIC = 1; - /** - * Include all fields. - * This is the default value for GetRule. - * - * Generated from protobuf enum FULL = 2; - */ - const FULL = 2; - /** - * Include basic metadata about the rule's revision only. - * Returned fields include: revision_id and revision_create_time. - * - * Generated from protobuf enum REVISION_METADATA_ONLY = 3; - */ - const REVISION_METADATA_ONLY = 3; - - private static $valueToName = [ - self::RULE_VIEW_UNSPECIFIED => 'RULE_VIEW_UNSPECIFIED', - self::BASIC => 'BASIC', - self::FULL => 'FULL', - self::REVISION_METADATA_ONLY => 'REVISION_METADATA_ONLY', - ]; - - 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/RunFrequency.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/RunFrequency.php deleted file mode 100644 index 0540b9c3cfd8..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/RunFrequency.php +++ /dev/null @@ -1,69 +0,0 @@ -google.cloud.chronicle.v1.RunFrequency - */ -class RunFrequency -{ - /** - * The run frequency is unspecified/unknown. - * - * Generated from protobuf enum RUN_FREQUENCY_UNSPECIFIED = 0; - */ - const RUN_FREQUENCY_UNSPECIFIED = 0; - /** - * Executes in real time. - * - * Generated from protobuf enum LIVE = 1; - */ - const LIVE = 1; - /** - * Executes once per hour. - * - * Generated from protobuf enum HOURLY = 2; - */ - const HOURLY = 2; - /** - * Executes once per day. - * - * Generated from protobuf enum DAILY = 3; - */ - const DAILY = 3; - - private static $valueToName = [ - self::RUN_FREQUENCY_UNSPECIFIED => 'RUN_FREQUENCY_UNSPECIFIED', - self::LIVE => 'LIVE', - self::HOURLY => 'HOURLY', - self::DAILY => 'DAILY', - ]; - - 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ScopeInfo.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ScopeInfo.php deleted file mode 100644 index 69d47b86337b..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/ScopeInfo.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.chronicle.v1.ScopeInfo - */ -class ScopeInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The list of scope names of the reference list, if the list is - * empty the reference list is treated as unscoped. - * - * Generated from protobuf field .google.cloud.chronicle.v1.ReferenceListScope reference_list_scope = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $reference_list_scope = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Chronicle\V1\ReferenceListScope $reference_list_scope - * Required. The list of scope names of the reference list, if the list is - * empty the reference list is treated as unscoped. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\ReferenceList::initOnce(); - parent::__construct($data); - } - - /** - * Required. The list of scope names of the reference list, if the list is - * empty the reference list is treated as unscoped. - * - * Generated from protobuf field .google.cloud.chronicle.v1.ReferenceListScope reference_list_scope = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Chronicle\V1\ReferenceListScope|null - */ - public function getReferenceListScope() - { - return $this->reference_list_scope; - } - - public function hasReferenceListScope() - { - return isset($this->reference_list_scope); - } - - public function clearReferenceListScope() - { - unset($this->reference_list_scope); - } - - /** - * Required. The list of scope names of the reference list, if the list is - * empty the reference list is treated as unscoped. - * - * Generated from protobuf field .google.cloud.chronicle.v1.ReferenceListScope reference_list_scope = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Chronicle\V1\ReferenceListScope $var - * @return $this - */ - public function setReferenceListScope($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\ReferenceListScope::class); - $this->reference_list_scope = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Severity.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Severity.php deleted file mode 100644 index 8d2c048917ac..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Severity.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.chronicle.v1.Severity - */ -class Severity extends \Google\Protobuf\Internal\Message -{ - /** - * The display name of the severity level. Extracted from the meta section of - * the rule text. - * - * 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 severity level. Extracted from the meta section of - * the rule text. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\Rule::initOnce(); - parent::__construct($data); - } - - /** - * The display name of the severity level. Extracted from the meta section of - * the rule text. - * - * Generated from protobuf field string display_name = 1; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The display name of the severity level. Extracted from the meta section of - * the rule text. - * - * 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; - } - -} - diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateDataAccessLabelRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateDataAccessLabelRequest.php deleted file mode 100644 index 6830fde1824e..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateDataAccessLabelRequest.php +++ /dev/null @@ -1,167 +0,0 @@ -google.cloud.chronicle.v1.UpdateDataAccessLabelRequest - */ -class UpdateDataAccessLabelRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The data access label to update. - * The label's `name` field is used to identify the label to update. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` - * - * Generated from protobuf field .google.cloud.chronicle.v1.DataAccessLabel data_access_label = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $data_access_label = null; - /** - * The list of fields to update. If not included, all fields with a non-empty - * value will be overwritten. Currently, only the description and definition - * fields are supported for update; an update call that attempts to update any - * other fields will return INVALID_ARGUMENT. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Chronicle\V1\DataAccessLabel $dataAccessLabel Required. The data access label to update. - * - * The label's `name` field is used to identify the label to update. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` - * @param \Google\Protobuf\FieldMask $updateMask The list of fields to update. If not included, all fields with a non-empty - * value will be overwritten. Currently, only the description and definition - * fields are supported for update; an update call that attempts to update any - * other fields will return INVALID_ARGUMENT. - * - * @return \Google\Cloud\Chronicle\V1\UpdateDataAccessLabelRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Chronicle\V1\DataAccessLabel $dataAccessLabel, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setDataAccessLabel($dataAccessLabel) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Chronicle\V1\DataAccessLabel $data_access_label - * Required. The data access label to update. - * The label's `name` field is used to identify the label to update. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` - * @type \Google\Protobuf\FieldMask $update_mask - * The list of fields to update. If not included, all fields with a non-empty - * value will be overwritten. Currently, only the description and definition - * fields are supported for update; an update call that attempts to update any - * other fields will return INVALID_ARGUMENT. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\DataAccessControl::initOnce(); - parent::__construct($data); - } - - /** - * Required. The data access label to update. - * The label's `name` field is used to identify the label to update. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` - * - * Generated from protobuf field .google.cloud.chronicle.v1.DataAccessLabel data_access_label = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Chronicle\V1\DataAccessLabel|null - */ - public function getDataAccessLabel() - { - return $this->data_access_label; - } - - public function hasDataAccessLabel() - { - return isset($this->data_access_label); - } - - public function clearDataAccessLabel() - { - unset($this->data_access_label); - } - - /** - * Required. The data access label to update. - * The label's `name` field is used to identify the label to update. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` - * - * Generated from protobuf field .google.cloud.chronicle.v1.DataAccessLabel data_access_label = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Chronicle\V1\DataAccessLabel $var - * @return $this - */ - public function setDataAccessLabel($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DataAccessLabel::class); - $this->data_access_label = $var; - - return $this; - } - - /** - * The list of fields to update. If not included, all fields with a non-empty - * value will be overwritten. Currently, only the description and definition - * fields are supported for update; an update call that attempts to update any - * other fields will return INVALID_ARGUMENT. - * - * 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); - } - - /** - * The list of fields to update. If not included, all fields with a non-empty - * value will be overwritten. Currently, only the description and definition - * fields are supported for update; an update call that attempts to update any - * other fields will return INVALID_ARGUMENT. - * - * 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateDataAccessScopeRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateDataAccessScopeRequest.php deleted file mode 100644 index b332994c240e..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateDataAccessScopeRequest.php +++ /dev/null @@ -1,172 +0,0 @@ -google.cloud.chronicle.v1.UpdateDataAccessScopeRequest - */ -class UpdateDataAccessScopeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The data access scope to update. - * The scope's `name` field is used to identify the scope to update. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` - * - * Generated from protobuf field .google.cloud.chronicle.v1.DataAccessScope data_access_scope = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $data_access_scope = null; - /** - * The list of fields to update. If not included, all fields with a non-empty - * value will be overwritten. Currently, only the description, the allowed - * and denied labels list fields are supported for update; - * an update call that attempts to update any - * other fields will return INVALID_ARGUMENT. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Chronicle\V1\DataAccessScope $dataAccessScope Required. The data access scope to update. - * - * The scope's `name` field is used to identify the scope to update. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` - * @param \Google\Protobuf\FieldMask $updateMask The list of fields to update. If not included, all fields with a non-empty - * value will be overwritten. Currently, only the description, the allowed - * and denied labels list fields are supported for update; - * an update call that attempts to update any - * other fields will return INVALID_ARGUMENT. - * - * @return \Google\Cloud\Chronicle\V1\UpdateDataAccessScopeRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Chronicle\V1\DataAccessScope $dataAccessScope, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setDataAccessScope($dataAccessScope) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Chronicle\V1\DataAccessScope $data_access_scope - * Required. The data access scope to update. - * The scope's `name` field is used to identify the scope to update. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` - * @type \Google\Protobuf\FieldMask $update_mask - * The list of fields to update. If not included, all fields with a non-empty - * value will be overwritten. Currently, only the description, the allowed - * and denied labels list fields are supported for update; - * an update call that attempts to update any - * other fields will return INVALID_ARGUMENT. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\DataAccessControl::initOnce(); - parent::__construct($data); - } - - /** - * Required. The data access scope to update. - * The scope's `name` field is used to identify the scope to update. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` - * - * Generated from protobuf field .google.cloud.chronicle.v1.DataAccessScope data_access_scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Chronicle\V1\DataAccessScope|null - */ - public function getDataAccessScope() - { - return $this->data_access_scope; - } - - public function hasDataAccessScope() - { - return isset($this->data_access_scope); - } - - public function clearDataAccessScope() - { - unset($this->data_access_scope); - } - - /** - * Required. The data access scope to update. - * The scope's `name` field is used to identify the scope to update. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` - * - * Generated from protobuf field .google.cloud.chronicle.v1.DataAccessScope data_access_scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Chronicle\V1\DataAccessScope $var - * @return $this - */ - public function setDataAccessScope($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DataAccessScope::class); - $this->data_access_scope = $var; - - return $this; - } - - /** - * The list of fields to update. If not included, all fields with a non-empty - * value will be overwritten. Currently, only the description, the allowed - * and denied labels list fields are supported for update; - * an update call that attempts to update any - * other fields will return INVALID_ARGUMENT. - * - * 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); - } - - /** - * The list of fields to update. If not included, all fields with a non-empty - * value will be overwritten. Currently, only the description, the allowed - * and denied labels list fields are supported for update; - * an update call that attempts to update any - * other fields will return INVALID_ARGUMENT. - * - * 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateReferenceListRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateReferenceListRequest.php deleted file mode 100644 index f38d1db1fad1..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateReferenceListRequest.php +++ /dev/null @@ -1,167 +0,0 @@ -google.cloud.chronicle.v1.UpdateReferenceListRequest - */ -class UpdateReferenceListRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The reference list to update. - * The reference list's `name` field is used to identify the reference list to - * update. - * Format: - * `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}` - * - * Generated from protobuf field .google.cloud.chronicle.v1.ReferenceList reference_list = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $reference_list = null; - /** - * The list of fields to update. - * When no field mask is supplied, all non-empty fields will be updated. - * A field mask of "*" will update all fields, whether empty or not. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Chronicle\V1\ReferenceList $referenceList Required. The reference list to update. - * - * The reference list's `name` field is used to identify the reference list to - * update. - * Format: - * `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}` - * @param \Google\Protobuf\FieldMask $updateMask The list of fields to update. - * When no field mask is supplied, all non-empty fields will be updated. - * A field mask of "*" will update all fields, whether empty or not. - * - * @return \Google\Cloud\Chronicle\V1\UpdateReferenceListRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Chronicle\V1\ReferenceList $referenceList, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setReferenceList($referenceList) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Chronicle\V1\ReferenceList $reference_list - * Required. The reference list to update. - * The reference list's `name` field is used to identify the reference list to - * update. - * Format: - * `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}` - * @type \Google\Protobuf\FieldMask $update_mask - * The list of fields to update. - * When no field mask is supplied, all non-empty fields will be updated. - * A field mask of "*" will update all fields, whether empty or not. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\ReferenceList::initOnce(); - parent::__construct($data); - } - - /** - * Required. The reference list to update. - * The reference list's `name` field is used to identify the reference list to - * update. - * Format: - * `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}` - * - * Generated from protobuf field .google.cloud.chronicle.v1.ReferenceList reference_list = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Chronicle\V1\ReferenceList|null - */ - public function getReferenceList() - { - return $this->reference_list; - } - - public function hasReferenceList() - { - return isset($this->reference_list); - } - - public function clearReferenceList() - { - unset($this->reference_list); - } - - /** - * Required. The reference list to update. - * The reference list's `name` field is used to identify the reference list to - * update. - * Format: - * `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}` - * - * Generated from protobuf field .google.cloud.chronicle.v1.ReferenceList reference_list = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Chronicle\V1\ReferenceList $var - * @return $this - */ - public function setReferenceList($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\ReferenceList::class); - $this->reference_list = $var; - - return $this; - } - - /** - * The list of fields to update. - * When no field mask is supplied, all non-empty fields will be updated. - * A field mask of "*" will update all fields, whether empty or not. - * - * 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); - } - - /** - * The list of fields to update. - * When no field mask is supplied, all non-empty fields will be updated. - * A field mask of "*" will update all fields, whether empty or not. - * - * 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateRuleDeploymentRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateRuleDeploymentRequest.php deleted file mode 100644 index b6628f53c50e..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateRuleDeploymentRequest.php +++ /dev/null @@ -1,152 +0,0 @@ -google.cloud.chronicle.v1.UpdateRuleDeploymentRequest - */ -class UpdateRuleDeploymentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The rule deployment to update. - * The rule deployment's `name` field is used to identify the rule deployment - * to update. Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` - * - * Generated from protobuf field .google.cloud.chronicle.v1.RuleDeployment rule_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $rule_deployment = null; - /** - * Required. The list of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Chronicle\V1\RuleDeployment $ruleDeployment Required. The rule deployment to update. - * - * The rule deployment's `name` field is used to identify the rule deployment - * to update. Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` - * @param \Google\Protobuf\FieldMask $updateMask Required. The list of fields to update. - * - * @return \Google\Cloud\Chronicle\V1\UpdateRuleDeploymentRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Chronicle\V1\RuleDeployment $ruleDeployment, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setRuleDeployment($ruleDeployment) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Chronicle\V1\RuleDeployment $rule_deployment - * Required. The rule deployment to update. - * The rule deployment's `name` field is used to identify the rule deployment - * to update. Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The list of fields to update. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\Rule::initOnce(); - parent::__construct($data); - } - - /** - * Required. The rule deployment to update. - * The rule deployment's `name` field is used to identify the rule deployment - * to update. Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` - * - * Generated from protobuf field .google.cloud.chronicle.v1.RuleDeployment rule_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Chronicle\V1\RuleDeployment|null - */ - public function getRuleDeployment() - { - return $this->rule_deployment; - } - - public function hasRuleDeployment() - { - return isset($this->rule_deployment); - } - - public function clearRuleDeployment() - { - unset($this->rule_deployment); - } - - /** - * Required. The rule deployment to update. - * The rule deployment's `name` field is used to identify the rule deployment - * to update. Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` - * - * Generated from protobuf field .google.cloud.chronicle.v1.RuleDeployment rule_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Chronicle\V1\RuleDeployment $var - * @return $this - */ - public function setRuleDeployment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\RuleDeployment::class); - $this->rule_deployment = $var; - - return $this; - } - - /** - * Required. The list of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @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); - } - - /** - * Required. The list of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateRuleRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateRuleRequest.php deleted file mode 100644 index 4d51451d9e75..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateRuleRequest.php +++ /dev/null @@ -1,157 +0,0 @@ -google.cloud.chronicle.v1.UpdateRuleRequest - */ -class UpdateRuleRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The rule to update. - * The rule's `name` field is used to identify the rule to update. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - * - * Generated from protobuf field .google.cloud.chronicle.v1.Rule rule = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $rule = null; - /** - * The list of fields to update. If not included, all fields with a non-empty - * value will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Chronicle\V1\Rule $rule Required. The rule to update. - * - * The rule's `name` field is used to identify the rule to update. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - * @param \Google\Protobuf\FieldMask $updateMask The list of fields to update. If not included, all fields with a non-empty - * value will be overwritten. - * - * @return \Google\Cloud\Chronicle\V1\UpdateRuleRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Chronicle\V1\Rule $rule, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setRule($rule) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Chronicle\V1\Rule $rule - * Required. The rule to update. - * The rule's `name` field is used to identify the rule to update. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - * @type \Google\Protobuf\FieldMask $update_mask - * The list of fields to update. If not included, all fields with a non-empty - * value will be overwritten. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\Rule::initOnce(); - parent::__construct($data); - } - - /** - * Required. The rule to update. - * The rule's `name` field is used to identify the rule to update. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - * - * Generated from protobuf field .google.cloud.chronicle.v1.Rule rule = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Chronicle\V1\Rule|null - */ - public function getRule() - { - return $this->rule; - } - - public function hasRule() - { - return isset($this->rule); - } - - public function clearRule() - { - unset($this->rule); - } - - /** - * Required. The rule to update. - * The rule's `name` field is used to identify the rule to update. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - * - * Generated from protobuf field .google.cloud.chronicle.v1.Rule rule = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Chronicle\V1\Rule $var - * @return $this - */ - public function setRule($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\Rule::class); - $this->rule = $var; - - return $this; - } - - /** - * The list of fields to update. If not included, all fields with a non-empty - * value will be overwritten. - * - * 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); - } - - /** - * The list of fields to update. If not included, all fields with a non-empty - * value will be overwritten. - * - * 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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateWatchlistRequest.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateWatchlistRequest.php deleted file mode 100644 index 9afffa4ab421..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/UpdateWatchlistRequest.php +++ /dev/null @@ -1,152 +0,0 @@ -google.cloud.chronicle.v1.UpdateWatchlistRequest - */ -class UpdateWatchlistRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The watchlist to update. - * The watchlist's `name` field is used to identify the watchlist to update. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` - * - * Generated from protobuf field .google.cloud.chronicle.v1.Watchlist watchlist = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $watchlist = null; - /** - * Optional. The list of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Chronicle\V1\Watchlist $watchlist Required. The watchlist to update. - * - * The watchlist's `name` field is used to identify the watchlist to update. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` - * @param \Google\Protobuf\FieldMask $updateMask Optional. The list of fields to update. - * - * @return \Google\Cloud\Chronicle\V1\UpdateWatchlistRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Chronicle\V1\Watchlist $watchlist, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setWatchlist($watchlist) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Chronicle\V1\Watchlist $watchlist - * Required. The watchlist to update. - * The watchlist's `name` field is used to identify the watchlist to update. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. The list of fields to update. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\Entity::initOnce(); - parent::__construct($data); - } - - /** - * Required. The watchlist to update. - * The watchlist's `name` field is used to identify the watchlist to update. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` - * - * Generated from protobuf field .google.cloud.chronicle.v1.Watchlist watchlist = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Chronicle\V1\Watchlist|null - */ - public function getWatchlist() - { - return $this->watchlist; - } - - public function hasWatchlist() - { - return isset($this->watchlist); - } - - public function clearWatchlist() - { - unset($this->watchlist); - } - - /** - * Required. The watchlist to update. - * The watchlist's `name` field is used to identify the watchlist to update. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` - * - * Generated from protobuf field .google.cloud.chronicle.v1.Watchlist watchlist = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Chronicle\V1\Watchlist $var - * @return $this - */ - public function setWatchlist($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\Watchlist::class); - $this->watchlist = $var; - - return $this; - } - - /** - * Optional. The list of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.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. The list of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.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/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Watchlist.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Watchlist.php deleted file mode 100644 index 2c3553e82f3e..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Watchlist.php +++ /dev/null @@ -1,414 +0,0 @@ -google.cloud.chronicle.v1.Watchlist - */ -class Watchlist extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. Resource name of the watchlist. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Required. Display name of the watchlist. - * Note that it must be at least one character and less than 63 characters - * (https://google.aip.dev/148). - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $display_name = ''; - /** - * Optional. Description of the watchlist. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Optional. Weight applied to the risk score for entities - * in this watchlist. - * The default is 1.0 if it is not specified. - * - * Generated from protobuf field float multiplying_factor = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $multiplying_factor = 0.0; - /** - * Required. Mechanism to populate entities in the watchlist. - * - * Generated from protobuf field .google.cloud.chronicle.v1.Watchlist.EntityPopulationMechanism entity_population_mechanism = 6 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $entity_population_mechanism = null; - /** - * Output only. Entity count in the watchlist. - * - * Generated from protobuf field .google.cloud.chronicle.v1.Watchlist.EntityCount entity_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $entity_count = null; - /** - * Output only. Time the watchlist was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Time the watchlist was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. User preferences for watchlist configuration. - * - * Generated from protobuf field .google.cloud.chronicle.v1.WatchlistUserPreferences watchlist_user_preferences = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $watchlist_user_preferences = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. Resource name of the watchlist. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` - * @type string $display_name - * Required. Display name of the watchlist. - * Note that it must be at least one character and less than 63 characters - * (https://google.aip.dev/148). - * @type string $description - * Optional. Description of the watchlist. - * @type float $multiplying_factor - * Optional. Weight applied to the risk score for entities - * in this watchlist. - * The default is 1.0 if it is not specified. - * @type \Google\Cloud\Chronicle\V1\Watchlist\EntityPopulationMechanism $entity_population_mechanism - * Required. Mechanism to populate entities in the watchlist. - * @type \Google\Cloud\Chronicle\V1\Watchlist\EntityCount $entity_count - * Output only. Entity count in the watchlist. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Time the watchlist was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Time the watchlist was last updated. - * @type \Google\Cloud\Chronicle\V1\WatchlistUserPreferences $watchlist_user_preferences - * Optional. User preferences for watchlist configuration. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\Entity::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. Resource name of the watchlist. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. Resource name of the watchlist. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. Display name of the watchlist. - * Note that it must be at least one character and less than 63 characters - * (https://google.aip.dev/148). - * - * 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 watchlist. - * Note that it must be at least one character and less than 63 characters - * (https://google.aip.dev/148). - * - * 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 the watchlist. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. Description of the watchlist. - * - * 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; - } - - /** - * Optional. Weight applied to the risk score for entities - * in this watchlist. - * The default is 1.0 if it is not specified. - * - * Generated from protobuf field float multiplying_factor = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return float - */ - public function getMultiplyingFactor() - { - return $this->multiplying_factor; - } - - /** - * Optional. Weight applied to the risk score for entities - * in this watchlist. - * The default is 1.0 if it is not specified. - * - * Generated from protobuf field float multiplying_factor = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param float $var - * @return $this - */ - public function setMultiplyingFactor($var) - { - GPBUtil::checkFloat($var); - $this->multiplying_factor = $var; - - return $this; - } - - /** - * Required. Mechanism to populate entities in the watchlist. - * - * Generated from protobuf field .google.cloud.chronicle.v1.Watchlist.EntityPopulationMechanism entity_population_mechanism = 6 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Chronicle\V1\Watchlist\EntityPopulationMechanism|null - */ - public function getEntityPopulationMechanism() - { - return $this->entity_population_mechanism; - } - - public function hasEntityPopulationMechanism() - { - return isset($this->entity_population_mechanism); - } - - public function clearEntityPopulationMechanism() - { - unset($this->entity_population_mechanism); - } - - /** - * Required. Mechanism to populate entities in the watchlist. - * - * Generated from protobuf field .google.cloud.chronicle.v1.Watchlist.EntityPopulationMechanism entity_population_mechanism = 6 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Chronicle\V1\Watchlist\EntityPopulationMechanism $var - * @return $this - */ - public function setEntityPopulationMechanism($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\Watchlist\EntityPopulationMechanism::class); - $this->entity_population_mechanism = $var; - - return $this; - } - - /** - * Output only. Entity count in the watchlist. - * - * Generated from protobuf field .google.cloud.chronicle.v1.Watchlist.EntityCount entity_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Chronicle\V1\Watchlist\EntityCount|null - */ - public function getEntityCount() - { - return $this->entity_count; - } - - public function hasEntityCount() - { - return isset($this->entity_count); - } - - public function clearEntityCount() - { - unset($this->entity_count); - } - - /** - * Output only. Entity count in the watchlist. - * - * Generated from protobuf field .google.cloud.chronicle.v1.Watchlist.EntityCount entity_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Chronicle\V1\Watchlist\EntityCount $var - * @return $this - */ - public function setEntityCount($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\Watchlist\EntityCount::class); - $this->entity_count = $var; - - return $this; - } - - /** - * Output only. Time the watchlist was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @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); - } - - /** - * Output only. Time the watchlist was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. Time the watchlist was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @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); - } - - /** - * Output only. Time the watchlist was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Optional. User preferences for watchlist configuration. - * - * Generated from protobuf field .google.cloud.chronicle.v1.WatchlistUserPreferences watchlist_user_preferences = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Chronicle\V1\WatchlistUserPreferences|null - */ - public function getWatchlistUserPreferences() - { - return $this->watchlist_user_preferences; - } - - public function hasWatchlistUserPreferences() - { - return isset($this->watchlist_user_preferences); - } - - public function clearWatchlistUserPreferences() - { - unset($this->watchlist_user_preferences); - } - - /** - * Optional. User preferences for watchlist configuration. - * - * Generated from protobuf field .google.cloud.chronicle.v1.WatchlistUserPreferences watchlist_user_preferences = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Chronicle\V1\WatchlistUserPreferences $var - * @return $this - */ - public function setWatchlistUserPreferences($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\WatchlistUserPreferences::class); - $this->watchlist_user_preferences = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Watchlist/EntityCount.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Watchlist/EntityCount.php deleted file mode 100644 index 6ed43d57e34a..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Watchlist/EntityCount.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.chronicle.v1.Watchlist.EntityCount - */ -class EntityCount extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Count of user type entities in the watchlist. - * - * Generated from protobuf field int32 user = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $user = 0; - /** - * Output only. Count of asset type entities in the watchlist. - * - * Generated from protobuf field int32 asset = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $asset = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $user - * Output only. Count of user type entities in the watchlist. - * @type int $asset - * Output only. Count of asset type entities in the watchlist. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\Entity::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Count of user type entities in the watchlist. - * - * Generated from protobuf field int32 user = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getUser() - { - return $this->user; - } - - /** - * Output only. Count of user type entities in the watchlist. - * - * Generated from protobuf field int32 user = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setUser($var) - { - GPBUtil::checkInt32($var); - $this->user = $var; - - return $this; - } - - /** - * Output only. Count of asset type entities in the watchlist. - * - * Generated from protobuf field int32 asset = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getAsset() - { - return $this->asset; - } - - /** - * Output only. Count of asset type entities in the watchlist. - * - * Generated from protobuf field int32 asset = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setAsset($var) - { - GPBUtil::checkInt32($var); - $this->asset = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Watchlist/EntityPopulationMechanism.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Watchlist/EntityPopulationMechanism.php deleted file mode 100644 index 1d821fb12d88..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Watchlist/EntityPopulationMechanism.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.chronicle.v1.Watchlist.EntityPopulationMechanism - */ -class EntityPopulationMechanism extends \Google\Protobuf\Internal\Message -{ - protected $mechanism; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Chronicle\V1\Watchlist\EntityPopulationMechanism\Manual $manual - * Optional. Entities are added manually. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\Entity::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Entities are added manually. - * - * Generated from protobuf field .google.cloud.chronicle.v1.Watchlist.EntityPopulationMechanism.Manual manual = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Chronicle\V1\Watchlist\EntityPopulationMechanism\Manual|null - */ - public function getManual() - { - return $this->readOneof(1); - } - - public function hasManual() - { - return $this->hasOneof(1); - } - - /** - * Optional. Entities are added manually. - * - * Generated from protobuf field .google.cloud.chronicle.v1.Watchlist.EntityPopulationMechanism.Manual manual = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Chronicle\V1\Watchlist\EntityPopulationMechanism\Manual $var - * @return $this - */ - public function setManual($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\Watchlist\EntityPopulationMechanism\Manual::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * @return string - */ - public function getMechanism() - { - return $this->whichOneof("mechanism"); - } - -} - diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Watchlist/EntityPopulationMechanism/Manual.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Watchlist/EntityPopulationMechanism/Manual.php deleted file mode 100644 index 610033c25683..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/Watchlist/EntityPopulationMechanism/Manual.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.chronicle.v1.Watchlist.EntityPopulationMechanism.Manual - */ -class Manual extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\Entity::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/WatchlistUserPreferences.php b/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/WatchlistUserPreferences.php deleted file mode 100644 index 1e28b313f6fe..000000000000 --- a/owl-bot-staging/Chronicle/v1/proto/src/Google/Cloud/Chronicle/V1/WatchlistUserPreferences.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.chronicle.v1.WatchlistUserPreferences - */ -class WatchlistUserPreferences extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Whether the watchlist is pinned on the dashboard. - * - * Generated from protobuf field bool pinned = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $pinned = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $pinned - * Optional. Whether the watchlist is pinned on the dashboard. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Chronicle\V1\Entity::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Whether the watchlist is pinned on the dashboard. - * - * Generated from protobuf field bool pinned = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getPinned() - { - return $this->pinned; - } - - /** - * Optional. Whether the watchlist is pinned on the dashboard. - * - * Generated from protobuf field bool pinned = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setPinned($var) - { - GPBUtil::checkBool($var); - $this->pinned = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/create_data_access_label.php b/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/create_data_access_label.php deleted file mode 100644 index 0623874acf9e..000000000000 --- a/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/create_data_access_label.php +++ /dev/null @@ -1,89 +0,0 @@ -setParent($formattedParent) - ->setDataAccessLabel($dataAccessLabel) - ->setDataAccessLabelId($dataAccessLabelId); - - // Call the API and handle any network failures. - try { - /** @var DataAccessLabel $response */ - $response = $dataAccessControlServiceClient->createDataAccessLabel($request); - 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 = DataAccessControlServiceClient::instanceName( - '[PROJECT]', - '[LOCATION]', - '[INSTANCE]' - ); - $dataAccessLabelId = '[DATA_ACCESS_LABEL_ID]'; - - create_data_access_label_sample($formattedParent, $dataAccessLabelId); -} -// [END chronicle_v1_generated_DataAccessControlService_CreateDataAccessLabel_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/create_data_access_scope.php b/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/create_data_access_scope.php deleted file mode 100644 index 5219ceb6ae38..000000000000 --- a/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/create_data_access_scope.php +++ /dev/null @@ -1,105 +0,0 @@ -setName($formattedDataAccessScopeName); - $request = (new CreateDataAccessScopeRequest()) - ->setParent($formattedParent) - ->setDataAccessScope($dataAccessScope) - ->setDataAccessScopeId($dataAccessScopeId); - - // Call the API and handle any network failures. - try { - /** @var DataAccessScope $response */ - $response = $dataAccessControlServiceClient->createDataAccessScope($request); - 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 = DataAccessControlServiceClient::instanceName( - '[PROJECT]', - '[LOCATION]', - '[INSTANCE]' - ); - $formattedDataAccessScopeName = DataAccessControlServiceClient::dataAccessScopeName( - '[PROJECT]', - '[LOCATION]', - '[INSTANCE]', - '[DATA_ACCESS_SCOPE]' - ); - $dataAccessScopeId = '[DATA_ACCESS_SCOPE_ID]'; - - create_data_access_scope_sample( - $formattedParent, - $formattedDataAccessScopeName, - $dataAccessScopeId - ); -} -// [END chronicle_v1_generated_DataAccessControlService_CreateDataAccessScope_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/delete_data_access_label.php b/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/delete_data_access_label.php deleted file mode 100644 index 3c885880892f..000000000000 --- a/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/delete_data_access_label.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $dataAccessControlServiceClient->deleteDataAccessLabel($request); - 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 = DataAccessControlServiceClient::dataAccessLabelName( - '[PROJECT]', - '[LOCATION]', - '[INSTANCE]', - '[DATA_ACCESS_LABEL]' - ); - - delete_data_access_label_sample($formattedName); -} -// [END chronicle_v1_generated_DataAccessControlService_DeleteDataAccessLabel_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/delete_data_access_scope.php b/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/delete_data_access_scope.php deleted file mode 100644 index 41f166b0bf41..000000000000 --- a/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/delete_data_access_scope.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $dataAccessControlServiceClient->deleteDataAccessScope($request); - 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 = DataAccessControlServiceClient::dataAccessScopeName( - '[PROJECT]', - '[LOCATION]', - '[INSTANCE]', - '[DATA_ACCESS_SCOPE]' - ); - - delete_data_access_scope_sample($formattedName); -} -// [END chronicle_v1_generated_DataAccessControlService_DeleteDataAccessScope_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/get_data_access_label.php b/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/get_data_access_label.php deleted file mode 100644 index 7b8c83109598..000000000000 --- a/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/get_data_access_label.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var DataAccessLabel $response */ - $response = $dataAccessControlServiceClient->getDataAccessLabel($request); - 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 = DataAccessControlServiceClient::dataAccessLabelName( - '[PROJECT]', - '[LOCATION]', - '[INSTANCE]', - '[DATA_ACCESS_LABEL]' - ); - - get_data_access_label_sample($formattedName); -} -// [END chronicle_v1_generated_DataAccessControlService_GetDataAccessLabel_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/get_data_access_scope.php b/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/get_data_access_scope.php deleted file mode 100644 index e434c9be6db8..000000000000 --- a/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/get_data_access_scope.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var DataAccessScope $response */ - $response = $dataAccessControlServiceClient->getDataAccessScope($request); - 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 = DataAccessControlServiceClient::dataAccessScopeName( - '[PROJECT]', - '[LOCATION]', - '[INSTANCE]', - '[DATA_ACCESS_SCOPE]' - ); - - get_data_access_scope_sample($formattedName); -} -// [END chronicle_v1_generated_DataAccessControlService_GetDataAccessScope_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/list_data_access_labels.php b/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/list_data_access_labels.php deleted file mode 100644 index f831204ae17d..000000000000 --- a/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/list_data_access_labels.php +++ /dev/null @@ -1,81 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $dataAccessControlServiceClient->listDataAccessLabels($request); - - /** @var DataAccessLabel $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 = DataAccessControlServiceClient::instanceName( - '[PROJECT]', - '[LOCATION]', - '[INSTANCE]' - ); - - list_data_access_labels_sample($formattedParent); -} -// [END chronicle_v1_generated_DataAccessControlService_ListDataAccessLabels_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/list_data_access_scopes.php b/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/list_data_access_scopes.php deleted file mode 100644 index ac4cfa39ba9e..000000000000 --- a/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/list_data_access_scopes.php +++ /dev/null @@ -1,81 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $dataAccessControlServiceClient->listDataAccessScopes($request); - - /** @var DataAccessScope $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 = DataAccessControlServiceClient::instanceName( - '[PROJECT]', - '[LOCATION]', - '[INSTANCE]' - ); - - list_data_access_scopes_sample($formattedParent); -} -// [END chronicle_v1_generated_DataAccessControlService_ListDataAccessScopes_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/update_data_access_label.php b/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/update_data_access_label.php deleted file mode 100644 index e949373ca7f3..000000000000 --- a/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/update_data_access_label.php +++ /dev/null @@ -1,59 +0,0 @@ -setDataAccessLabel($dataAccessLabel); - - // Call the API and handle any network failures. - try { - /** @var DataAccessLabel $response */ - $response = $dataAccessControlServiceClient->updateDataAccessLabel($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END chronicle_v1_generated_DataAccessControlService_UpdateDataAccessLabel_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/update_data_access_scope.php b/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/update_data_access_scope.php deleted file mode 100644 index 33d0d8a4424b..000000000000 --- a/owl-bot-staging/Chronicle/v1/samples/V1/DataAccessControlServiceClient/update_data_access_scope.php +++ /dev/null @@ -1,79 +0,0 @@ -setName($formattedDataAccessScopeName); - $request = (new UpdateDataAccessScopeRequest()) - ->setDataAccessScope($dataAccessScope); - - // Call the API and handle any network failures. - try { - /** @var DataAccessScope $response */ - $response = $dataAccessControlServiceClient->updateDataAccessScope($request); - 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 -{ - $formattedDataAccessScopeName = DataAccessControlServiceClient::dataAccessScopeName( - '[PROJECT]', - '[LOCATION]', - '[INSTANCE]', - '[DATA_ACCESS_SCOPE]' - ); - - update_data_access_scope_sample($formattedDataAccessScopeName); -} -// [END chronicle_v1_generated_DataAccessControlService_UpdateDataAccessScope_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/EntityServiceClient/create_watchlist.php b/owl-bot-staging/Chronicle/v1/samples/V1/EntityServiceClient/create_watchlist.php deleted file mode 100644 index fc91d0f75173..000000000000 --- a/owl-bot-staging/Chronicle/v1/samples/V1/EntityServiceClient/create_watchlist.php +++ /dev/null @@ -1,83 +0,0 @@ -setDisplayName($watchlistDisplayName) - ->setEntityPopulationMechanism($watchlistEntityPopulationMechanism); - $request = (new CreateWatchlistRequest()) - ->setParent($formattedParent) - ->setWatchlist($watchlist); - - // Call the API and handle any network failures. - try { - /** @var Watchlist $response */ - $response = $entityServiceClient->createWatchlist($request); - 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 = EntityServiceClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $watchlistDisplayName = '[DISPLAY_NAME]'; - - create_watchlist_sample($formattedParent, $watchlistDisplayName); -} -// [END chronicle_v1_generated_EntityService_CreateWatchlist_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/EntityServiceClient/delete_watchlist.php b/owl-bot-staging/Chronicle/v1/samples/V1/EntityServiceClient/delete_watchlist.php deleted file mode 100644 index a4f794c71488..000000000000 --- a/owl-bot-staging/Chronicle/v1/samples/V1/EntityServiceClient/delete_watchlist.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $entityServiceClient->deleteWatchlist($request); - 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 = EntityServiceClient::watchlistName( - '[PROJECT]', - '[LOCATION]', - '[INSTANCE]', - '[WATCHLIST]' - ); - - delete_watchlist_sample($formattedName); -} -// [END chronicle_v1_generated_EntityService_DeleteWatchlist_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/EntityServiceClient/get_watchlist.php b/owl-bot-staging/Chronicle/v1/samples/V1/EntityServiceClient/get_watchlist.php deleted file mode 100644 index f2c0679734af..000000000000 --- a/owl-bot-staging/Chronicle/v1/samples/V1/EntityServiceClient/get_watchlist.php +++ /dev/null @@ -1,79 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Watchlist $response */ - $response = $entityServiceClient->getWatchlist($request); - 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 = EntityServiceClient::watchlistName( - '[PROJECT]', - '[LOCATION]', - '[INSTANCE]', - '[WATCHLIST]' - ); - - get_watchlist_sample($formattedName); -} -// [END chronicle_v1_generated_EntityService_GetWatchlist_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/EntityServiceClient/list_watchlists.php b/owl-bot-staging/Chronicle/v1/samples/V1/EntityServiceClient/list_watchlists.php deleted file mode 100644 index b3db33e4e1d2..000000000000 --- a/owl-bot-staging/Chronicle/v1/samples/V1/EntityServiceClient/list_watchlists.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $entityServiceClient->listWatchlists($request); - - /** @var Watchlist $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 = EntityServiceClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - - list_watchlists_sample($formattedParent); -} -// [END chronicle_v1_generated_EntityService_ListWatchlists_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/EntityServiceClient/update_watchlist.php b/owl-bot-staging/Chronicle/v1/samples/V1/EntityServiceClient/update_watchlist.php deleted file mode 100644 index 193fe9ee02c9..000000000000 --- a/owl-bot-staging/Chronicle/v1/samples/V1/EntityServiceClient/update_watchlist.php +++ /dev/null @@ -1,77 +0,0 @@ -setDisplayName($watchlistDisplayName) - ->setEntityPopulationMechanism($watchlistEntityPopulationMechanism); - $request = (new UpdateWatchlistRequest()) - ->setWatchlist($watchlist); - - // Call the API and handle any network failures. - try { - /** @var Watchlist $response */ - $response = $entityServiceClient->updateWatchlist($request); - 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 -{ - $watchlistDisplayName = '[DISPLAY_NAME]'; - - update_watchlist_sample($watchlistDisplayName); -} -// [END chronicle_v1_generated_EntityService_UpdateWatchlist_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/InstanceServiceClient/get_instance.php b/owl-bot-staging/Chronicle/v1/samples/V1/InstanceServiceClient/get_instance.php deleted file mode 100644 index 3f58906ea662..000000000000 --- a/owl-bot-staging/Chronicle/v1/samples/V1/InstanceServiceClient/get_instance.php +++ /dev/null @@ -1,73 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Instance $response */ - $response = $instanceServiceClient->getInstance($request); - 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 = InstanceServiceClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - - get_instance_sample($formattedName); -} -// [END chronicle_v1_generated_InstanceService_GetInstance_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/ReferenceListServiceClient/create_reference_list.php b/owl-bot-staging/Chronicle/v1/samples/V1/ReferenceListServiceClient/create_reference_list.php deleted file mode 100644 index 064b32ca29d0..000000000000 --- a/owl-bot-staging/Chronicle/v1/samples/V1/ReferenceListServiceClient/create_reference_list.php +++ /dev/null @@ -1,111 +0,0 @@ -setValue($referenceListEntriesValue); - $referenceListEntries = [$referenceListEntry,]; - $referenceList = (new ReferenceList()) - ->setDescription($referenceListDescription) - ->setEntries($referenceListEntries) - ->setSyntaxType($referenceListSyntaxType); - $request = (new CreateReferenceListRequest()) - ->setParent($formattedParent) - ->setReferenceList($referenceList) - ->setReferenceListId($referenceListId); - - // Call the API and handle any network failures. - try { - /** @var ReferenceList $response */ - $response = $referenceListServiceClient->createReferenceList($request); - 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 = ReferenceListServiceClient::instanceName( - '[PROJECT]', - '[LOCATION]', - '[INSTANCE]' - ); - $referenceListDescription = '[DESCRIPTION]'; - $referenceListEntriesValue = '[VALUE]'; - $referenceListSyntaxType = ReferenceListSyntaxType::REFERENCE_LIST_SYNTAX_TYPE_UNSPECIFIED; - $referenceListId = '[REFERENCE_LIST_ID]'; - - create_reference_list_sample( - $formattedParent, - $referenceListDescription, - $referenceListEntriesValue, - $referenceListSyntaxType, - $referenceListId - ); -} -// [END chronicle_v1_generated_ReferenceListService_CreateReferenceList_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/ReferenceListServiceClient/get_reference_list.php b/owl-bot-staging/Chronicle/v1/samples/V1/ReferenceListServiceClient/get_reference_list.php deleted file mode 100644 index 5e6d4986fbfb..000000000000 --- a/owl-bot-staging/Chronicle/v1/samples/V1/ReferenceListServiceClient/get_reference_list.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var ReferenceList $response */ - $response = $referenceListServiceClient->getReferenceList($request); - 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 = ReferenceListServiceClient::referenceListName( - '[PROJECT]', - '[LOCATION]', - '[INSTANCE]', - '[REFERENCE_LIST]' - ); - - get_reference_list_sample($formattedName); -} -// [END chronicle_v1_generated_ReferenceListService_GetReferenceList_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/ReferenceListServiceClient/list_reference_lists.php b/owl-bot-staging/Chronicle/v1/samples/V1/ReferenceListServiceClient/list_reference_lists.php deleted file mode 100644 index 5fef5d03cbeb..000000000000 --- a/owl-bot-staging/Chronicle/v1/samples/V1/ReferenceListServiceClient/list_reference_lists.php +++ /dev/null @@ -1,82 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $referenceListServiceClient->listReferenceLists($request); - - /** @var ReferenceList $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 = ReferenceListServiceClient::instanceName( - '[PROJECT]', - '[LOCATION]', - '[INSTANCE]' - ); - - list_reference_lists_sample($formattedParent); -} -// [END chronicle_v1_generated_ReferenceListService_ListReferenceLists_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/ReferenceListServiceClient/update_reference_list.php b/owl-bot-staging/Chronicle/v1/samples/V1/ReferenceListServiceClient/update_reference_list.php deleted file mode 100644 index 2ea81ccc24e2..000000000000 --- a/owl-bot-staging/Chronicle/v1/samples/V1/ReferenceListServiceClient/update_reference_list.php +++ /dev/null @@ -1,90 +0,0 @@ -setValue($referenceListEntriesValue); - $referenceListEntries = [$referenceListEntry,]; - $referenceList = (new ReferenceList()) - ->setDescription($referenceListDescription) - ->setEntries($referenceListEntries) - ->setSyntaxType($referenceListSyntaxType); - $request = (new UpdateReferenceListRequest()) - ->setReferenceList($referenceList); - - // Call the API and handle any network failures. - try { - /** @var ReferenceList $response */ - $response = $referenceListServiceClient->updateReferenceList($request); - 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 -{ - $referenceListDescription = '[DESCRIPTION]'; - $referenceListEntriesValue = '[VALUE]'; - $referenceListSyntaxType = ReferenceListSyntaxType::REFERENCE_LIST_SYNTAX_TYPE_UNSPECIFIED; - - update_reference_list_sample( - $referenceListDescription, - $referenceListEntriesValue, - $referenceListSyntaxType - ); -} -// [END chronicle_v1_generated_ReferenceListService_UpdateReferenceList_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/create_retrohunt.php b/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/create_retrohunt.php deleted file mode 100644 index 72fe02a04c79..000000000000 --- a/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/create_retrohunt.php +++ /dev/null @@ -1,90 +0,0 @@ -setProcessInterval($retrohuntProcessInterval); - $request = (new CreateRetrohuntRequest()) - ->setParent($formattedParent) - ->setRetrohunt($retrohunt); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $ruleServiceClient->createRetrohunt($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Retrohunt $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 = RuleServiceClient::ruleName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[RULE]'); - - create_retrohunt_sample($formattedParent); -} -// [END chronicle_v1_generated_RuleService_CreateRetrohunt_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/create_rule.php b/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/create_rule.php deleted file mode 100644 index 4e49df99d1e9..000000000000 --- a/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/create_rule.php +++ /dev/null @@ -1,74 +0,0 @@ -setParent($formattedParent) - ->setRule($rule); - - // Call the API and handle any network failures. - try { - /** @var Rule $response */ - $response = $ruleServiceClient->createRule($request); - 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 = RuleServiceClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - - create_rule_sample($formattedParent); -} -// [END chronicle_v1_generated_RuleService_CreateRule_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/delete_rule.php b/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/delete_rule.php deleted file mode 100644 index 229fd626bf85..000000000000 --- a/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/delete_rule.php +++ /dev/null @@ -1,73 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $ruleServiceClient->deleteRule($request); - 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 = RuleServiceClient::ruleName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[RULE]'); - - delete_rule_sample($formattedName); -} -// [END chronicle_v1_generated_RuleService_DeleteRule_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/get_retrohunt.php b/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/get_retrohunt.php deleted file mode 100644 index 9a17dfe2f0fc..000000000000 --- a/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/get_retrohunt.php +++ /dev/null @@ -1,79 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Retrohunt $response */ - $response = $ruleServiceClient->getRetrohunt($request); - 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 = RuleServiceClient::retrohuntName( - '[PROJECT]', - '[LOCATION]', - '[INSTANCE]', - '[RULE]', - '[RETROHUNT]' - ); - - get_retrohunt_sample($formattedName); -} -// [END chronicle_v1_generated_RuleService_GetRetrohunt_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/get_rule.php b/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/get_rule.php deleted file mode 100644 index 9b7b735b3cbb..000000000000 --- a/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/get_rule.php +++ /dev/null @@ -1,73 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Rule $response */ - $response = $ruleServiceClient->getRule($request); - 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 = RuleServiceClient::ruleName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[RULE]'); - - get_rule_sample($formattedName); -} -// [END chronicle_v1_generated_RuleService_GetRule_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/get_rule_deployment.php b/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/get_rule_deployment.php deleted file mode 100644 index 16ac2aee8b32..000000000000 --- a/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/get_rule_deployment.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var RuleDeployment $response */ - $response = $ruleServiceClient->getRuleDeployment($request); - 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 = RuleServiceClient::ruleDeploymentName( - '[PROJECT]', - '[LOCATION]', - '[INSTANCE]', - '[RULE]' - ); - - get_rule_deployment_sample($formattedName); -} -// [END chronicle_v1_generated_RuleService_GetRuleDeployment_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/list_retrohunts.php b/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/list_retrohunts.php deleted file mode 100644 index c20092aee588..000000000000 --- a/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/list_retrohunts.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $ruleServiceClient->listRetrohunts($request); - - /** @var Retrohunt $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 = RuleServiceClient::ruleName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[RULE]'); - - list_retrohunts_sample($formattedParent); -} -// [END chronicle_v1_generated_RuleService_ListRetrohunts_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/list_rule_deployments.php b/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/list_rule_deployments.php deleted file mode 100644 index 0a63256b173c..000000000000 --- a/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/list_rule_deployments.php +++ /dev/null @@ -1,79 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $ruleServiceClient->listRuleDeployments($request); - - /** @var RuleDeployment $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 = RuleServiceClient::ruleName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[RULE]'); - - list_rule_deployments_sample($formattedParent); -} -// [END chronicle_v1_generated_RuleService_ListRuleDeployments_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/list_rule_revisions.php b/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/list_rule_revisions.php deleted file mode 100644 index 44ffc527c875..000000000000 --- a/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/list_rule_revisions.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $ruleServiceClient->listRuleRevisions($request); - - /** @var Rule $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 -{ - $formattedName = RuleServiceClient::ruleName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[RULE]'); - - list_rule_revisions_sample($formattedName); -} -// [END chronicle_v1_generated_RuleService_ListRuleRevisions_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/list_rules.php b/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/list_rules.php deleted file mode 100644 index aa9cb76ebdd3..000000000000 --- a/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/list_rules.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $ruleServiceClient->listRules($request); - - /** @var Rule $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 = RuleServiceClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - - list_rules_sample($formattedParent); -} -// [END chronicle_v1_generated_RuleService_ListRules_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/update_rule.php b/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/update_rule.php deleted file mode 100644 index 5462edfd5766..000000000000 --- a/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/update_rule.php +++ /dev/null @@ -1,59 +0,0 @@ -setRule($rule); - - // Call the API and handle any network failures. - try { - /** @var Rule $response */ - $response = $ruleServiceClient->updateRule($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END chronicle_v1_generated_RuleService_UpdateRule_sync] diff --git a/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/update_rule_deployment.php b/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/update_rule_deployment.php deleted file mode 100644 index 8d9d5600aec3..000000000000 --- a/owl-bot-staging/Chronicle/v1/samples/V1/RuleServiceClient/update_rule_deployment.php +++ /dev/null @@ -1,83 +0,0 @@ -setName($ruleDeploymentName); - $updateMask = new FieldMask(); - $request = (new UpdateRuleDeploymentRequest()) - ->setRuleDeployment($ruleDeployment) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var RuleDeployment $response */ - $response = $ruleServiceClient->updateRuleDeployment($request); - 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 -{ - $ruleDeploymentName = '[NAME]'; - - update_rule_deployment_sample($ruleDeploymentName); -} -// [END chronicle_v1_generated_RuleService_UpdateRuleDeployment_sync] diff --git a/owl-bot-staging/Chronicle/v1/src/V1/Client/DataAccessControlServiceClient.php b/owl-bot-staging/Chronicle/v1/src/V1/Client/DataAccessControlServiceClient.php deleted file mode 100644 index 11a4d52eccf8..000000000000 --- a/owl-bot-staging/Chronicle/v1/src/V1/Client/DataAccessControlServiceClient.php +++ /dev/null @@ -1,572 +0,0 @@ - createDataAccessLabelAsync(CreateDataAccessLabelRequest $request, array $optionalArgs = []) - * @method PromiseInterface createDataAccessScopeAsync(CreateDataAccessScopeRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteDataAccessLabelAsync(DeleteDataAccessLabelRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteDataAccessScopeAsync(DeleteDataAccessScopeRequest $request, array $optionalArgs = []) - * @method PromiseInterface getDataAccessLabelAsync(GetDataAccessLabelRequest $request, array $optionalArgs = []) - * @method PromiseInterface getDataAccessScopeAsync(GetDataAccessScopeRequest $request, array $optionalArgs = []) - * @method PromiseInterface listDataAccessLabelsAsync(ListDataAccessLabelsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listDataAccessScopesAsync(ListDataAccessScopesRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateDataAccessLabelAsync(UpdateDataAccessLabelRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateDataAccessScopeAsync(UpdateDataAccessScopeRequest $request, array $optionalArgs = []) - */ -final class DataAccessControlServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.chronicle.v1.DataAccessControlService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'chronicle.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'chronicle.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/data_access_control_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/data_access_control_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/data_access_control_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/data_access_control_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * data_access_label resource. - * - * @param string $project - * @param string $location - * @param string $instance - * @param string $dataAccessLabel - * - * @return string The formatted data_access_label resource. - */ - public static function dataAccessLabelName(string $project, string $location, string $instance, string $dataAccessLabel): string - { - return self::getPathTemplate('dataAccessLabel')->render([ - 'project' => $project, - 'location' => $location, - 'instance' => $instance, - 'data_access_label' => $dataAccessLabel, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * data_access_scope resource. - * - * @param string $project - * @param string $location - * @param string $instance - * @param string $dataAccessScope - * - * @return string The formatted data_access_scope resource. - */ - public static function dataAccessScopeName(string $project, string $location, string $instance, string $dataAccessScope): string - { - return self::getPathTemplate('dataAccessScope')->render([ - 'project' => $project, - 'location' => $location, - 'instance' => $instance, - 'data_access_scope' => $dataAccessScope, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a instance - * resource. - * - * @param string $project - * @param string $location - * @param string $instance - * - * @return string The formatted instance resource. - */ - public static function instanceName(string $project, string $location, string $instance): string - { - return self::getPathTemplate('instance')->render([ - 'project' => $project, - 'location' => $location, - 'instance' => $instance, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - dataAccessLabel: projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label} - * - dataAccessScope: projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope} - * - instance: projects/{project}/locations/{location}/instances/{instance} - * - * 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|ClientOptions $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 'chronicle.googleapis.com:443'. - * @type FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\Chronicle\V1\DataAccessControlServiceClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new DataAccessControlServiceClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @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. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $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 data access label. - * Data access labels are applied to incoming event data and selected in data - * access scopes (another resource), and only users with scopes containing the - * label can see data with that label. Currently, the data access label - * resource only includes custom labels, which are labels that correspond - * to UDM queries over event data. - * - * The async variant is - * {@see DataAccessControlServiceClient::createDataAccessLabelAsync()} . - * - * @example samples/V1/DataAccessControlServiceClient/create_data_access_label.php - * - * @param CreateDataAccessLabelRequest $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 DataAccessLabel - * - * @throws ApiException Thrown if the API call fails. - */ - public function createDataAccessLabel(CreateDataAccessLabelRequest $request, array $callOptions = []): DataAccessLabel - { - return $this->startApiCall('CreateDataAccessLabel', $request, $callOptions)->wait(); - } - - /** - * Creates a data access scope. - * Data access scope is a combination of allowed and denied labels attached - * to a permission group. If a scope has allowed labels A and B and denied - * labels C and D, then the group of people attached to the scope - * will have permissions to see all events labeled with A or B (or both) and - * not labeled with either C or D. - * - * The async variant is - * {@see DataAccessControlServiceClient::createDataAccessScopeAsync()} . - * - * @example samples/V1/DataAccessControlServiceClient/create_data_access_scope.php - * - * @param CreateDataAccessScopeRequest $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 DataAccessScope - * - * @throws ApiException Thrown if the API call fails. - */ - public function createDataAccessScope(CreateDataAccessScopeRequest $request, array $callOptions = []): DataAccessScope - { - return $this->startApiCall('CreateDataAccessScope', $request, $callOptions)->wait(); - } - - /** - * Deletes a data access label. When a label is deleted, new - * data that enters in the system will not receive the label, but the label - * will not be removed from old data that still refers to it. - * - * The async variant is - * {@see DataAccessControlServiceClient::deleteDataAccessLabelAsync()} . - * - * @example samples/V1/DataAccessControlServiceClient/delete_data_access_label.php - * - * @param DeleteDataAccessLabelRequest $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 deleteDataAccessLabel(DeleteDataAccessLabelRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteDataAccessLabel', $request, $callOptions)->wait(); - } - - /** - * Deletes a data access scope. - * - * The async variant is - * {@see DataAccessControlServiceClient::deleteDataAccessScopeAsync()} . - * - * @example samples/V1/DataAccessControlServiceClient/delete_data_access_scope.php - * - * @param DeleteDataAccessScopeRequest $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 deleteDataAccessScope(DeleteDataAccessScopeRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteDataAccessScope', $request, $callOptions)->wait(); - } - - /** - * Gets a data access label. - * - * The async variant is - * {@see DataAccessControlServiceClient::getDataAccessLabelAsync()} . - * - * @example samples/V1/DataAccessControlServiceClient/get_data_access_label.php - * - * @param GetDataAccessLabelRequest $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 DataAccessLabel - * - * @throws ApiException Thrown if the API call fails. - */ - public function getDataAccessLabel(GetDataAccessLabelRequest $request, array $callOptions = []): DataAccessLabel - { - return $this->startApiCall('GetDataAccessLabel', $request, $callOptions)->wait(); - } - - /** - * Retrieves an existing data access scope. - * - * The async variant is - * {@see DataAccessControlServiceClient::getDataAccessScopeAsync()} . - * - * @example samples/V1/DataAccessControlServiceClient/get_data_access_scope.php - * - * @param GetDataAccessScopeRequest $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 DataAccessScope - * - * @throws ApiException Thrown if the API call fails. - */ - public function getDataAccessScope(GetDataAccessScopeRequest $request, array $callOptions = []): DataAccessScope - { - return $this->startApiCall('GetDataAccessScope', $request, $callOptions)->wait(); - } - - /** - * Lists all data access labels for the customer. - * - * The async variant is - * {@see DataAccessControlServiceClient::listDataAccessLabelsAsync()} . - * - * @example samples/V1/DataAccessControlServiceClient/list_data_access_labels.php - * - * @param ListDataAccessLabelsRequest $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 listDataAccessLabels(ListDataAccessLabelsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListDataAccessLabels', $request, $callOptions); - } - - /** - * Lists all existing data access scopes for the customer. - * - * The async variant is - * {@see DataAccessControlServiceClient::listDataAccessScopesAsync()} . - * - * @example samples/V1/DataAccessControlServiceClient/list_data_access_scopes.php - * - * @param ListDataAccessScopesRequest $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 listDataAccessScopes(ListDataAccessScopesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListDataAccessScopes', $request, $callOptions); - } - - /** - * Updates a data access label. - * - * The async variant is - * {@see DataAccessControlServiceClient::updateDataAccessLabelAsync()} . - * - * @example samples/V1/DataAccessControlServiceClient/update_data_access_label.php - * - * @param UpdateDataAccessLabelRequest $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 DataAccessLabel - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateDataAccessLabel(UpdateDataAccessLabelRequest $request, array $callOptions = []): DataAccessLabel - { - return $this->startApiCall('UpdateDataAccessLabel', $request, $callOptions)->wait(); - } - - /** - * Updates a data access scope. - * - * The async variant is - * {@see DataAccessControlServiceClient::updateDataAccessScopeAsync()} . - * - * @example samples/V1/DataAccessControlServiceClient/update_data_access_scope.php - * - * @param UpdateDataAccessScopeRequest $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 DataAccessScope - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateDataAccessScope(UpdateDataAccessScopeRequest $request, array $callOptions = []): DataAccessScope - { - return $this->startApiCall('UpdateDataAccessScope', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Chronicle/v1/src/V1/Client/EntityServiceClient.php b/owl-bot-staging/Chronicle/v1/src/V1/Client/EntityServiceClient.php deleted file mode 100644 index 0e4473f59298..000000000000 --- a/owl-bot-staging/Chronicle/v1/src/V1/Client/EntityServiceClient.php +++ /dev/null @@ -1,389 +0,0 @@ - createWatchlistAsync(CreateWatchlistRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteWatchlistAsync(DeleteWatchlistRequest $request, array $optionalArgs = []) - * @method PromiseInterface getWatchlistAsync(GetWatchlistRequest $request, array $optionalArgs = []) - * @method PromiseInterface listWatchlistsAsync(ListWatchlistsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateWatchlistAsync(UpdateWatchlistRequest $request, array $optionalArgs = []) - */ -final class EntityServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.chronicle.v1.EntityService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'chronicle.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'chronicle.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/entity_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/entity_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/entity_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/entity_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a instance - * resource. - * - * @param string $project - * @param string $location - * @param string $instance - * - * @return string The formatted instance resource. - */ - public static function instanceName(string $project, string $location, string $instance): string - { - return self::getPathTemplate('instance')->render([ - 'project' => $project, - 'location' => $location, - 'instance' => $instance, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a watchlist - * resource. - * - * @param string $project - * @param string $location - * @param string $instance - * @param string $watchlist - * - * @return string The formatted watchlist resource. - */ - public static function watchlistName(string $project, string $location, string $instance, string $watchlist): string - { - return self::getPathTemplate('watchlist')->render([ - 'project' => $project, - 'location' => $location, - 'instance' => $instance, - 'watchlist' => $watchlist, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - instance: projects/{project}/locations/{location}/instances/{instance} - * - watchlist: projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist} - * - * 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|ClientOptions $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 'chronicle.googleapis.com:443'. - * @type FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\Chronicle\V1\EntityServiceClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new EntityServiceClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @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. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $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 watchlist for the given instance. - * Note that there can be at most 200 watchlists per instance. - * - * The async variant is {@see EntityServiceClient::createWatchlistAsync()} . - * - * @example samples/V1/EntityServiceClient/create_watchlist.php - * - * @param CreateWatchlistRequest $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 Watchlist - * - * @throws ApiException Thrown if the API call fails. - */ - public function createWatchlist(CreateWatchlistRequest $request, array $callOptions = []): Watchlist - { - return $this->startApiCall('CreateWatchlist', $request, $callOptions)->wait(); - } - - /** - * Deletes the watchlist for the given instance. - * - * The async variant is {@see EntityServiceClient::deleteWatchlistAsync()} . - * - * @example samples/V1/EntityServiceClient/delete_watchlist.php - * - * @param DeleteWatchlistRequest $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 deleteWatchlist(DeleteWatchlistRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteWatchlist', $request, $callOptions)->wait(); - } - - /** - * Gets watchlist details for the given watchlist ID. - * - * The async variant is {@see EntityServiceClient::getWatchlistAsync()} . - * - * @example samples/V1/EntityServiceClient/get_watchlist.php - * - * @param GetWatchlistRequest $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 Watchlist - * - * @throws ApiException Thrown if the API call fails. - */ - public function getWatchlist(GetWatchlistRequest $request, array $callOptions = []): Watchlist - { - return $this->startApiCall('GetWatchlist', $request, $callOptions)->wait(); - } - - /** - * Lists all watchlists for the given instance. - * - * The async variant is {@see EntityServiceClient::listWatchlistsAsync()} . - * - * @example samples/V1/EntityServiceClient/list_watchlists.php - * - * @param ListWatchlistsRequest $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 listWatchlists(ListWatchlistsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListWatchlists', $request, $callOptions); - } - - /** - * Updates the watchlist for the given instance. - * - * The async variant is {@see EntityServiceClient::updateWatchlistAsync()} . - * - * @example samples/V1/EntityServiceClient/update_watchlist.php - * - * @param UpdateWatchlistRequest $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 Watchlist - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateWatchlist(UpdateWatchlistRequest $request, array $callOptions = []): Watchlist - { - return $this->startApiCall('UpdateWatchlist', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Chronicle/v1/src/V1/Client/InstanceServiceClient.php b/owl-bot-staging/Chronicle/v1/src/V1/Client/InstanceServiceClient.php deleted file mode 100644 index da3746e28c93..000000000000 --- a/owl-bot-staging/Chronicle/v1/src/V1/Client/InstanceServiceClient.php +++ /dev/null @@ -1,255 +0,0 @@ - getInstanceAsync(GetInstanceRequest $request, array $optionalArgs = []) - */ -final class InstanceServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.chronicle.v1.InstanceService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'chronicle.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'chronicle.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/instance_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/instance_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/instance_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/instance_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a instance - * resource. - * - * @param string $project - * @param string $location - * @param string $instance - * - * @return string The formatted instance resource. - */ - public static function instanceName(string $project, string $location, string $instance): string - { - return self::getPathTemplate('instance')->render([ - 'project' => $project, - 'location' => $location, - 'instance' => $instance, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - instance: projects/{project}/locations/{location}/instances/{instance} - * - * 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|ClientOptions $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 'chronicle.googleapis.com:443'. - * @type FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\Chronicle\V1\InstanceServiceClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new InstanceServiceClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @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. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $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); - } - - /** - * Gets a Instance. - * - * The async variant is {@see InstanceServiceClient::getInstanceAsync()} . - * - * @example samples/V1/InstanceServiceClient/get_instance.php - * - * @param GetInstanceRequest $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 Instance - * - * @throws ApiException Thrown if the API call fails. - */ - public function getInstance(GetInstanceRequest $request, array $callOptions = []): Instance - { - return $this->startApiCall('GetInstance', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Chronicle/v1/src/V1/Client/ReferenceListServiceClient.php b/owl-bot-staging/Chronicle/v1/src/V1/Client/ReferenceListServiceClient.php deleted file mode 100644 index 3f922d8c579f..000000000000 --- a/owl-bot-staging/Chronicle/v1/src/V1/Client/ReferenceListServiceClient.php +++ /dev/null @@ -1,366 +0,0 @@ - createReferenceListAsync(CreateReferenceListRequest $request, array $optionalArgs = []) - * @method PromiseInterface getReferenceListAsync(GetReferenceListRequest $request, array $optionalArgs = []) - * @method PromiseInterface listReferenceListsAsync(ListReferenceListsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateReferenceListAsync(UpdateReferenceListRequest $request, array $optionalArgs = []) - */ -final class ReferenceListServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.chronicle.v1.ReferenceListService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'chronicle.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'chronicle.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/reference_list_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/reference_list_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/reference_list_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/reference_list_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a instance - * resource. - * - * @param string $project - * @param string $location - * @param string $instance - * - * @return string The formatted instance resource. - */ - public static function instanceName(string $project, string $location, string $instance): string - { - return self::getPathTemplate('instance')->render([ - 'project' => $project, - 'location' => $location, - 'instance' => $instance, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * reference_list resource. - * - * @param string $project - * @param string $location - * @param string $instance - * @param string $referenceList - * - * @return string The formatted reference_list resource. - */ - public static function referenceListName(string $project, string $location, string $instance, string $referenceList): string - { - return self::getPathTemplate('referenceList')->render([ - 'project' => $project, - 'location' => $location, - 'instance' => $instance, - 'reference_list' => $referenceList, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - instance: projects/{project}/locations/{location}/instances/{instance} - * - referenceList: projects/{project}/locations/{location}/instances/{instance}/referenceLists/{reference_list} - * - * 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|ClientOptions $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 'chronicle.googleapis.com:443'. - * @type FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\Chronicle\V1\ReferenceListServiceClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new ReferenceListServiceClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @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. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $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 new reference list. - * - * The async variant is - * {@see ReferenceListServiceClient::createReferenceListAsync()} . - * - * @example samples/V1/ReferenceListServiceClient/create_reference_list.php - * - * @param CreateReferenceListRequest $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 ReferenceList - * - * @throws ApiException Thrown if the API call fails. - */ - public function createReferenceList(CreateReferenceListRequest $request, array $callOptions = []): ReferenceList - { - return $this->startApiCall('CreateReferenceList', $request, $callOptions)->wait(); - } - - /** - * Gets a single reference list. - * - * The async variant is {@see ReferenceListServiceClient::getReferenceListAsync()} - * . - * - * @example samples/V1/ReferenceListServiceClient/get_reference_list.php - * - * @param GetReferenceListRequest $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 ReferenceList - * - * @throws ApiException Thrown if the API call fails. - */ - public function getReferenceList(GetReferenceListRequest $request, array $callOptions = []): ReferenceList - { - return $this->startApiCall('GetReferenceList', $request, $callOptions)->wait(); - } - - /** - * Lists a collection of reference lists. - * - * The async variant is - * {@see ReferenceListServiceClient::listReferenceListsAsync()} . - * - * @example samples/V1/ReferenceListServiceClient/list_reference_lists.php - * - * @param ListReferenceListsRequest $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 listReferenceLists(ListReferenceListsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListReferenceLists', $request, $callOptions); - } - - /** - * Updates an existing reference list. - * - * The async variant is - * {@see ReferenceListServiceClient::updateReferenceListAsync()} . - * - * @example samples/V1/ReferenceListServiceClient/update_reference_list.php - * - * @param UpdateReferenceListRequest $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 ReferenceList - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateReferenceList(UpdateReferenceListRequest $request, array $callOptions = []): ReferenceList - { - return $this->startApiCall('UpdateReferenceList', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Chronicle/v1/src/V1/Client/RuleServiceClient.php b/owl-bot-staging/Chronicle/v1/src/V1/Client/RuleServiceClient.php deleted file mode 100644 index bdbeb342276e..000000000000 --- a/owl-bot-staging/Chronicle/v1/src/V1/Client/RuleServiceClient.php +++ /dev/null @@ -1,733 +0,0 @@ - createRetrohuntAsync(CreateRetrohuntRequest $request, array $optionalArgs = []) - * @method PromiseInterface createRuleAsync(CreateRuleRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteRuleAsync(DeleteRuleRequest $request, array $optionalArgs = []) - * @method PromiseInterface getRetrohuntAsync(GetRetrohuntRequest $request, array $optionalArgs = []) - * @method PromiseInterface getRuleAsync(GetRuleRequest $request, array $optionalArgs = []) - * @method PromiseInterface getRuleDeploymentAsync(GetRuleDeploymentRequest $request, array $optionalArgs = []) - * @method PromiseInterface listRetrohuntsAsync(ListRetrohuntsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listRuleDeploymentsAsync(ListRuleDeploymentsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listRuleRevisionsAsync(ListRuleRevisionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listRulesAsync(ListRulesRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateRuleAsync(UpdateRuleRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateRuleDeploymentAsync(UpdateRuleDeploymentRequest $request, array $optionalArgs = []) - */ -final class RuleServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.chronicle.v1.RuleService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'chronicle.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'chronicle.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/rule_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/rule_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/rule_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/rule_service_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 = $this->descriptors[$methodName]['longRunning'] ?? []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * data_access_scope resource. - * - * @param string $project - * @param string $location - * @param string $instance - * @param string $dataAccessScope - * - * @return string The formatted data_access_scope resource. - */ - public static function dataAccessScopeName(string $project, string $location, string $instance, string $dataAccessScope): string - { - return self::getPathTemplate('dataAccessScope')->render([ - 'project' => $project, - 'location' => $location, - 'instance' => $instance, - 'data_access_scope' => $dataAccessScope, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a instance - * resource. - * - * @param string $project - * @param string $location - * @param string $instance - * - * @return string The formatted instance resource. - */ - public static function instanceName(string $project, string $location, string $instance): string - { - return self::getPathTemplate('instance')->render([ - 'project' => $project, - 'location' => $location, - 'instance' => $instance, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * reference_list resource. - * - * @param string $project - * @param string $location - * @param string $instance - * @param string $referenceList - * - * @return string The formatted reference_list resource. - */ - public static function referenceListName(string $project, string $location, string $instance, string $referenceList): string - { - return self::getPathTemplate('referenceList')->render([ - 'project' => $project, - 'location' => $location, - 'instance' => $instance, - 'reference_list' => $referenceList, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a retrohunt - * resource. - * - * @param string $project - * @param string $location - * @param string $instance - * @param string $rule - * @param string $retrohunt - * - * @return string The formatted retrohunt resource. - */ - public static function retrohuntName(string $project, string $location, string $instance, string $rule, string $retrohunt): string - { - return self::getPathTemplate('retrohunt')->render([ - 'project' => $project, - 'location' => $location, - 'instance' => $instance, - 'rule' => $rule, - 'retrohunt' => $retrohunt, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a rule - * resource. - * - * @param string $project - * @param string $location - * @param string $instance - * @param string $rule - * - * @return string The formatted rule resource. - */ - public static function ruleName(string $project, string $location, string $instance, string $rule): string - { - return self::getPathTemplate('rule')->render([ - 'project' => $project, - 'location' => $location, - 'instance' => $instance, - 'rule' => $rule, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * rule_deployment resource. - * - * @param string $project - * @param string $location - * @param string $instance - * @param string $rule - * - * @return string The formatted rule_deployment resource. - */ - public static function ruleDeploymentName(string $project, string $location, string $instance, string $rule): string - { - return self::getPathTemplate('ruleDeployment')->render([ - 'project' => $project, - 'location' => $location, - 'instance' => $instance, - 'rule' => $rule, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - dataAccessScope: projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope} - * - instance: projects/{project}/locations/{location}/instances/{instance} - * - referenceList: projects/{project}/locations/{location}/instances/{instance}/referenceLists/{reference_list} - * - retrohunt: projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt} - * - rule: projects/{project}/locations/{location}/instances/{instance}/rules/{rule} - * - ruleDeployment: projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment - * - * 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|ClientOptions $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 'chronicle.googleapis.com:443'. - * @type FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\Chronicle\V1\RuleServiceClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new RuleServiceClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @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. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $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); - } - - /** - * Create a Retrohunt. - * - * The async variant is {@see RuleServiceClient::createRetrohuntAsync()} . - * - * @example samples/V1/RuleServiceClient/create_retrohunt.php - * - * @param CreateRetrohuntRequest $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 createRetrohunt(CreateRetrohuntRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateRetrohunt', $request, $callOptions)->wait(); - } - - /** - * Creates a new Rule. - * - * The async variant is {@see RuleServiceClient::createRuleAsync()} . - * - * @example samples/V1/RuleServiceClient/create_rule.php - * - * @param CreateRuleRequest $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 Rule - * - * @throws ApiException Thrown if the API call fails. - */ - public function createRule(CreateRuleRequest $request, array $callOptions = []): Rule - { - return $this->startApiCall('CreateRule', $request, $callOptions)->wait(); - } - - /** - * Deletes a Rule. - * - * The async variant is {@see RuleServiceClient::deleteRuleAsync()} . - * - * @example samples/V1/RuleServiceClient/delete_rule.php - * - * @param DeleteRuleRequest $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 deleteRule(DeleteRuleRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteRule', $request, $callOptions)->wait(); - } - - /** - * Get a Retrohunt. - * - * The async variant is {@see RuleServiceClient::getRetrohuntAsync()} . - * - * @example samples/V1/RuleServiceClient/get_retrohunt.php - * - * @param GetRetrohuntRequest $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 Retrohunt - * - * @throws ApiException Thrown if the API call fails. - */ - public function getRetrohunt(GetRetrohuntRequest $request, array $callOptions = []): Retrohunt - { - return $this->startApiCall('GetRetrohunt', $request, $callOptions)->wait(); - } - - /** - * Gets a Rule. - * - * The async variant is {@see RuleServiceClient::getRuleAsync()} . - * - * @example samples/V1/RuleServiceClient/get_rule.php - * - * @param GetRuleRequest $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 Rule - * - * @throws ApiException Thrown if the API call fails. - */ - public function getRule(GetRuleRequest $request, array $callOptions = []): Rule - { - return $this->startApiCall('GetRule', $request, $callOptions)->wait(); - } - - /** - * Gets a RuleDeployment. - * - * The async variant is {@see RuleServiceClient::getRuleDeploymentAsync()} . - * - * @example samples/V1/RuleServiceClient/get_rule_deployment.php - * - * @param GetRuleDeploymentRequest $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 RuleDeployment - * - * @throws ApiException Thrown if the API call fails. - */ - public function getRuleDeployment(GetRuleDeploymentRequest $request, array $callOptions = []): RuleDeployment - { - return $this->startApiCall('GetRuleDeployment', $request, $callOptions)->wait(); - } - - /** - * List Retrohunts. - * - * The async variant is {@see RuleServiceClient::listRetrohuntsAsync()} . - * - * @example samples/V1/RuleServiceClient/list_retrohunts.php - * - * @param ListRetrohuntsRequest $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 listRetrohunts(ListRetrohuntsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListRetrohunts', $request, $callOptions); - } - - /** - * Lists RuleDeployments across all Rules. - * - * The async variant is {@see RuleServiceClient::listRuleDeploymentsAsync()} . - * - * @example samples/V1/RuleServiceClient/list_rule_deployments.php - * - * @param ListRuleDeploymentsRequest $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 listRuleDeployments(ListRuleDeploymentsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListRuleDeployments', $request, $callOptions); - } - - /** - * Lists all revisions of the rule. - * - * The async variant is {@see RuleServiceClient::listRuleRevisionsAsync()} . - * - * @example samples/V1/RuleServiceClient/list_rule_revisions.php - * - * @param ListRuleRevisionsRequest $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 listRuleRevisions(ListRuleRevisionsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListRuleRevisions', $request, $callOptions); - } - - /** - * Lists Rules. - * - * The async variant is {@see RuleServiceClient::listRulesAsync()} . - * - * @example samples/V1/RuleServiceClient/list_rules.php - * - * @param ListRulesRequest $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 listRules(ListRulesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListRules', $request, $callOptions); - } - - /** - * Updates a Rule. - * - * The async variant is {@see RuleServiceClient::updateRuleAsync()} . - * - * @example samples/V1/RuleServiceClient/update_rule.php - * - * @param UpdateRuleRequest $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 Rule - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateRule(UpdateRuleRequest $request, array $callOptions = []): Rule - { - return $this->startApiCall('UpdateRule', $request, $callOptions)->wait(); - } - - /** - * Updates a RuleDeployment. - * Failures are not necessarily atomic. If there is a request to update - * multiple fields, and any update to a single field fails, an error will be - * returned, but other fields may remain successfully updated. - * - * The async variant is {@see RuleServiceClient::updateRuleDeploymentAsync()} . - * - * @example samples/V1/RuleServiceClient/update_rule_deployment.php - * - * @param UpdateRuleDeploymentRequest $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 RuleDeployment - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateRuleDeployment(UpdateRuleDeploymentRequest $request, array $callOptions = []): RuleDeployment - { - return $this->startApiCall('UpdateRuleDeployment', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Chronicle/v1/src/V1/gapic_metadata.json b/owl-bot-staging/Chronicle/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 7edd4a684d59..000000000000 --- a/owl-bot-staging/Chronicle/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,298 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.chronicle.v1", - "libraryPackage": "Google\\Cloud\\Chronicle\\V1", - "services": { - "DataAccessControlService": { - "clients": { - "grpc": { - "libraryClient": "DataAccessControlServiceGapicClient", - "rpcs": { - "CreateDataAccessLabel": { - "methods": [ - "createDataAccessLabel" - ] - }, - "CreateDataAccessScope": { - "methods": [ - "createDataAccessScope" - ] - }, - "DeleteDataAccessLabel": { - "methods": [ - "deleteDataAccessLabel" - ] - }, - "DeleteDataAccessScope": { - "methods": [ - "deleteDataAccessScope" - ] - }, - "GetDataAccessLabel": { - "methods": [ - "getDataAccessLabel" - ] - }, - "GetDataAccessScope": { - "methods": [ - "getDataAccessScope" - ] - }, - "ListDataAccessLabels": { - "methods": [ - "listDataAccessLabels" - ] - }, - "ListDataAccessScopes": { - "methods": [ - "listDataAccessScopes" - ] - }, - "UpdateDataAccessLabel": { - "methods": [ - "updateDataAccessLabel" - ] - }, - "UpdateDataAccessScope": { - "methods": [ - "updateDataAccessScope" - ] - } - } - } - } - }, - "DataTableService": { - "clients": { - "grpc": { - "libraryClient": "DataTableServiceGapicClient", - "rpcs": { - "BulkCreateDataTableRows": { - "methods": [ - "bulkCreateDataTableRows" - ] - }, - "BulkGetDataTableRows": { - "methods": [ - "bulkGetDataTableRows" - ] - }, - "BulkReplaceDataTableRows": { - "methods": [ - "bulkReplaceDataTableRows" - ] - }, - "BulkUpdateDataTableRows": { - "methods": [ - "bulkUpdateDataTableRows" - ] - }, - "CreateDataTable": { - "methods": [ - "createDataTable" - ] - }, - "CreateDataTableRow": { - "methods": [ - "createDataTableRow" - ] - }, - "DeleteDataTable": { - "methods": [ - "deleteDataTable" - ] - }, - "DeleteDataTableRow": { - "methods": [ - "deleteDataTableRow" - ] - }, - "GetDataTable": { - "methods": [ - "getDataTable" - ] - }, - "GetDataTableOperationErrors": { - "methods": [ - "getDataTableOperationErrors" - ] - }, - "GetDataTableRow": { - "methods": [ - "getDataTableRow" - ] - }, - "ListDataTableRows": { - "methods": [ - "listDataTableRows" - ] - }, - "ListDataTables": { - "methods": [ - "listDataTables" - ] - }, - "UpdateDataTable": { - "methods": [ - "updateDataTable" - ] - }, - "UpdateDataTableRow": { - "methods": [ - "updateDataTableRow" - ] - } - } - } - } - }, - "EntityService": { - "clients": { - "grpc": { - "libraryClient": "EntityServiceGapicClient", - "rpcs": { - "CreateWatchlist": { - "methods": [ - "createWatchlist" - ] - }, - "DeleteWatchlist": { - "methods": [ - "deleteWatchlist" - ] - }, - "GetWatchlist": { - "methods": [ - "getWatchlist" - ] - }, - "ListWatchlists": { - "methods": [ - "listWatchlists" - ] - }, - "UpdateWatchlist": { - "methods": [ - "updateWatchlist" - ] - } - } - } - } - }, - "InstanceService": { - "clients": { - "grpc": { - "libraryClient": "InstanceServiceGapicClient", - "rpcs": { - "GetInstance": { - "methods": [ - "getInstance" - ] - } - } - } - } - }, - "ReferenceListService": { - "clients": { - "grpc": { - "libraryClient": "ReferenceListServiceGapicClient", - "rpcs": { - "CreateReferenceList": { - "methods": [ - "createReferenceList" - ] - }, - "GetReferenceList": { - "methods": [ - "getReferenceList" - ] - }, - "ListReferenceLists": { - "methods": [ - "listReferenceLists" - ] - }, - "UpdateReferenceList": { - "methods": [ - "updateReferenceList" - ] - } - } - } - } - }, - "RuleService": { - "clients": { - "grpc": { - "libraryClient": "RuleServiceGapicClient", - "rpcs": { - "CreateRetrohunt": { - "methods": [ - "createRetrohunt" - ] - }, - "CreateRule": { - "methods": [ - "createRule" - ] - }, - "DeleteRule": { - "methods": [ - "deleteRule" - ] - }, - "GetRetrohunt": { - "methods": [ - "getRetrohunt" - ] - }, - "GetRule": { - "methods": [ - "getRule" - ] - }, - "GetRuleDeployment": { - "methods": [ - "getRuleDeployment" - ] - }, - "ListRetrohunts": { - "methods": [ - "listRetrohunts" - ] - }, - "ListRuleDeployments": { - "methods": [ - "listRuleDeployments" - ] - }, - "ListRuleRevisions": { - "methods": [ - "listRuleRevisions" - ] - }, - "ListRules": { - "methods": [ - "listRules" - ] - }, - "UpdateRule": { - "methods": [ - "updateRule" - ] - }, - "UpdateRuleDeployment": { - "methods": [ - "updateRuleDeployment" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/Chronicle/v1/src/V1/resources/data_access_control_service_client_config.json b/owl-bot-staging/Chronicle/v1/src/V1/resources/data_access_control_service_client_config.json deleted file mode 100644 index e66f91bd3a6f..000000000000 --- a/owl-bot-staging/Chronicle/v1/src/V1/resources/data_access_control_service_client_config.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "interfaces": { - "google.cloud.chronicle.v1.DataAccessControlService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "no_retry_1_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 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "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 - } - }, - "methods": { - "CreateDataAccessLabel": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateDataAccessScope": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteDataAccessLabel": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteDataAccessScope": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetDataAccessLabel": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetDataAccessScope": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListDataAccessLabels": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListDataAccessScopes": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateDataAccessLabel": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateDataAccessScope": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Chronicle/v1/src/V1/resources/data_access_control_service_descriptor_config.php b/owl-bot-staging/Chronicle/v1/src/V1/resources/data_access_control_service_descriptor_config.php deleted file mode 100644 index c8a4082ca4c9..000000000000 --- a/owl-bot-staging/Chronicle/v1/src/V1/resources/data_access_control_service_descriptor_config.php +++ /dev/null @@ -1,171 +0,0 @@ - [ - 'google.cloud.chronicle.v1.DataAccessControlService' => [ - 'CreateDataAccessLabel' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Chronicle\V1\DataAccessLabel', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateDataAccessScope' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Chronicle\V1\DataAccessScope', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteDataAccessLabel' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteDataAccessScope' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetDataAccessLabel' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Chronicle\V1\DataAccessLabel', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetDataAccessScope' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Chronicle\V1\DataAccessScope', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListDataAccessLabels' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getDataAccessLabels', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Chronicle\V1\ListDataAccessLabelsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListDataAccessScopes' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getDataAccessScopes', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Chronicle\V1\ListDataAccessScopesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateDataAccessLabel' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Chronicle\V1\DataAccessLabel', - 'headerParams' => [ - [ - 'keyName' => 'data_access_label.name', - 'fieldAccessors' => [ - 'getDataAccessLabel', - 'getName', - ], - ], - ], - ], - 'UpdateDataAccessScope' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Chronicle\V1\DataAccessScope', - 'headerParams' => [ - [ - 'keyName' => 'data_access_scope.name', - 'fieldAccessors' => [ - 'getDataAccessScope', - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'dataAccessLabel' => 'projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}', - 'dataAccessScope' => 'projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}', - 'instance' => 'projects/{project}/locations/{location}/instances/{instance}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Chronicle/v1/src/V1/resources/data_access_control_service_rest_client_config.php b/owl-bot-staging/Chronicle/v1/src/V1/resources/data_access_control_service_rest_client_config.php deleted file mode 100644 index 5541511b522c..000000000000 --- a/owl-bot-staging/Chronicle/v1/src/V1/resources/data_access_control_service_rest_client_config.php +++ /dev/null @@ -1,198 +0,0 @@ - [ - 'google.cloud.chronicle.v1.DataAccessControlService' => [ - 'CreateDataAccessLabel' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/instances/*}/dataAccessLabels', - 'body' => 'data_access_label', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'data_access_label_id', - ], - ], - 'CreateDataAccessScope' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/instances/*}/dataAccessScopes', - 'body' => 'data_access_scope', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'data_access_scope_id', - ], - ], - 'DeleteDataAccessLabel' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/dataAccessLabels/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteDataAccessScope' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/dataAccessScopes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetDataAccessLabel' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/dataAccessLabels/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetDataAccessScope' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/dataAccessScopes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListDataAccessLabels' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/instances/*}/dataAccessLabels', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListDataAccessScopes' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/instances/*}/dataAccessScopes', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateDataAccessLabel' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{data_access_label.name=projects/*/locations/*/instances/*/dataAccessLabels/*}', - 'body' => 'data_access_label', - 'placeholders' => [ - 'data_access_label.name' => [ - 'getters' => [ - 'getDataAccessLabel', - 'getName', - ], - ], - ], - ], - 'UpdateDataAccessScope' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{data_access_scope.name=projects/*/locations/*/instances/*/dataAccessScopes/*}', - 'body' => 'data_access_scope', - 'placeholders' => [ - 'data_access_scope.name' => [ - 'getters' => [ - 'getDataAccessScope', - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Chronicle/v1/src/V1/resources/entity_service_client_config.json b/owl-bot-staging/Chronicle/v1/src/V1/resources/entity_service_client_config.json deleted file mode 100644 index d044fe021d4f..000000000000 --- a/owl-bot-staging/Chronicle/v1/src/V1/resources/entity_service_client_config.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "interfaces": { - "google.cloud.chronicle.v1.EntityService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_2_codes": [ - "UNAVAILABLE" - ], - "no_retry_3_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 - }, - "retry_policy_2_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 90000, - "initial_rpc_timeout_millis": 90000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 90000, - "total_timeout_millis": 90000 - }, - "no_retry_3_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 90000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 90000, - "total_timeout_millis": 90000 - } - }, - "methods": { - "CreateWatchlist": { - "timeout_millis": 90000, - "retry_codes_name": "no_retry_3_codes", - "retry_params_name": "no_retry_3_params" - }, - "DeleteWatchlist": { - "timeout_millis": 90000, - "retry_codes_name": "no_retry_3_codes", - "retry_params_name": "no_retry_3_params" - }, - "GetWatchlist": { - "timeout_millis": 90000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "ListWatchlists": { - "timeout_millis": 90000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "UpdateWatchlist": { - "timeout_millis": 90000, - "retry_codes_name": "no_retry_3_codes", - "retry_params_name": "no_retry_3_params" - } - } - } - } -} diff --git a/owl-bot-staging/Chronicle/v1/src/V1/resources/entity_service_descriptor_config.php b/owl-bot-staging/Chronicle/v1/src/V1/resources/entity_service_descriptor_config.php deleted file mode 100644 index 3e621e9503b3..000000000000 --- a/owl-bot-staging/Chronicle/v1/src/V1/resources/entity_service_descriptor_config.php +++ /dev/null @@ -1,101 +0,0 @@ - [ - 'google.cloud.chronicle.v1.EntityService' => [ - 'CreateWatchlist' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Chronicle\V1\Watchlist', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteWatchlist' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetWatchlist' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Chronicle\V1\Watchlist', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListWatchlists' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getWatchlists', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Chronicle\V1\ListWatchlistsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateWatchlist' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Chronicle\V1\Watchlist', - 'headerParams' => [ - [ - 'keyName' => 'watchlist.name', - 'fieldAccessors' => [ - 'getWatchlist', - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'instance' => 'projects/{project}/locations/{location}/instances/{instance}', - 'watchlist' => 'projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Chronicle/v1/src/V1/resources/entity_service_rest_client_config.php b/owl-bot-staging/Chronicle/v1/src/V1/resources/entity_service_rest_client_config.php deleted file mode 100644 index eebd35bba736..000000000000 --- a/owl-bot-staging/Chronicle/v1/src/V1/resources/entity_service_rest_client_config.php +++ /dev/null @@ -1,134 +0,0 @@ - [ - 'google.cloud.chronicle.v1.EntityService' => [ - 'CreateWatchlist' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/instances/*}/watchlists', - 'body' => 'watchlist', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteWatchlist' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/watchlists/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetWatchlist' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/watchlists/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListWatchlists' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/instances/*}/watchlists', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateWatchlist' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{watchlist.name=projects/*/locations/*/instances/*/watchlists/*}', - 'body' => 'watchlist', - 'placeholders' => [ - 'watchlist.name' => [ - 'getters' => [ - 'getWatchlist', - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Chronicle/v1/src/V1/resources/instance_service_client_config.json b/owl-bot-staging/Chronicle/v1/src/V1/resources/instance_service_client_config.json deleted file mode 100644 index 5de3bac58b09..000000000000 --- a/owl-bot-staging/Chronicle/v1/src/V1/resources/instance_service_client_config.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "interfaces": { - "google.cloud.chronicle.v1.InstanceService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ] - }, - "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 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "GetInstance": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Chronicle/v1/src/V1/resources/instance_service_descriptor_config.php b/owl-bot-staging/Chronicle/v1/src/V1/resources/instance_service_descriptor_config.php deleted file mode 100644 index 7f7d60f75b19..000000000000 --- a/owl-bot-staging/Chronicle/v1/src/V1/resources/instance_service_descriptor_config.php +++ /dev/null @@ -1,43 +0,0 @@ - [ - 'google.cloud.chronicle.v1.InstanceService' => [ - 'GetInstance' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Chronicle\V1\Instance', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'instance' => 'projects/{project}/locations/{location}/instances/{instance}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Chronicle/v1/src/V1/resources/instance_service_rest_client_config.php b/owl-bot-staging/Chronicle/v1/src/V1/resources/instance_service_rest_client_config.php deleted file mode 100644 index d4685582daa0..000000000000 --- a/owl-bot-staging/Chronicle/v1/src/V1/resources/instance_service_rest_client_config.php +++ /dev/null @@ -1,87 +0,0 @@ - [ - 'google.cloud.chronicle.v1.InstanceService' => [ - 'GetInstance' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Chronicle/v1/src/V1/resources/reference_list_service_client_config.json b/owl-bot-staging/Chronicle/v1/src/V1/resources/reference_list_service_client_config.json deleted file mode 100644 index 32f3e90972f9..000000000000 --- a/owl-bot-staging/Chronicle/v1/src/V1/resources/reference_list_service_client_config.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "interfaces": { - "google.cloud.chronicle.v1.ReferenceListService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "no_retry_1_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 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "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 - } - }, - "methods": { - "CreateReferenceList": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetReferenceList": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListReferenceLists": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateReferenceList": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Chronicle/v1/src/V1/resources/reference_list_service_descriptor_config.php b/owl-bot-staging/Chronicle/v1/src/V1/resources/reference_list_service_descriptor_config.php deleted file mode 100644 index 388793580afd..000000000000 --- a/owl-bot-staging/Chronicle/v1/src/V1/resources/reference_list_service_descriptor_config.php +++ /dev/null @@ -1,89 +0,0 @@ - [ - 'google.cloud.chronicle.v1.ReferenceListService' => [ - 'CreateReferenceList' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Chronicle\V1\ReferenceList', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'GetReferenceList' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Chronicle\V1\ReferenceList', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListReferenceLists' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getReferenceLists', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Chronicle\V1\ListReferenceListsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateReferenceList' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Chronicle\V1\ReferenceList', - 'headerParams' => [ - [ - 'keyName' => 'reference_list.name', - 'fieldAccessors' => [ - 'getReferenceList', - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'instance' => 'projects/{project}/locations/{location}/instances/{instance}', - 'referenceList' => 'projects/{project}/locations/{location}/instances/{instance}/referenceLists/{reference_list}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Chronicle/v1/src/V1/resources/reference_list_service_rest_client_config.php b/owl-bot-staging/Chronicle/v1/src/V1/resources/reference_list_service_rest_client_config.php deleted file mode 100644 index 9763cbfd0f4d..000000000000 --- a/owl-bot-staging/Chronicle/v1/src/V1/resources/reference_list_service_rest_client_config.php +++ /dev/null @@ -1,126 +0,0 @@ - [ - 'google.cloud.chronicle.v1.ReferenceListService' => [ - 'CreateReferenceList' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/instances/*}/referenceLists', - 'body' => 'reference_list', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'reference_list_id', - ], - ], - 'GetReferenceList' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/referenceLists/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListReferenceLists' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/instances/*}/referenceLists', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateReferenceList' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{reference_list.name=projects/*/locations/*/instances/*/referenceLists/*}', - 'body' => 'reference_list', - 'placeholders' => [ - 'reference_list.name' => [ - 'getters' => [ - 'getReferenceList', - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Chronicle/v1/src/V1/resources/rule_service_client_config.json b/owl-bot-staging/Chronicle/v1/src/V1/resources/rule_service_client_config.json deleted file mode 100644 index 101a8c15dd99..000000000000 --- a/owl-bot-staging/Chronicle/v1/src/V1/resources/rule_service_client_config.json +++ /dev/null @@ -1,126 +0,0 @@ -{ - "interfaces": { - "google.cloud.chronicle.v1.RuleService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "retry_policy_3_codes": [ - "UNAVAILABLE" - ], - "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 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "retry_policy_3_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 600000, - "initial_rpc_timeout_millis": 600000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 600000, - "total_timeout_millis": 600000 - }, - "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": 600000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 600000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "CreateRetrohunt": { - "timeout_millis": 600000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "CreateRule": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteRule": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetRetrohunt": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetRule": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetRuleDeployment": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "ListRetrohunts": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListRuleDeployments": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "ListRuleRevisions": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "ListRules": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "UpdateRule": { - "timeout_millis": 600000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "UpdateRuleDeployment": { - "timeout_millis": 600000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - } - } - } - } -} diff --git a/owl-bot-staging/Chronicle/v1/src/V1/resources/rule_service_descriptor_config.php b/owl-bot-staging/Chronicle/v1/src/V1/resources/rule_service_descriptor_config.php deleted file mode 100644 index 94e1a30f30f7..000000000000 --- a/owl-bot-staging/Chronicle/v1/src/V1/resources/rule_service_descriptor_config.php +++ /dev/null @@ -1,221 +0,0 @@ - [ - 'google.cloud.chronicle.v1.RuleService' => [ - 'CreateRetrohunt' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Chronicle\V1\Retrohunt', - 'metadataReturnType' => '\Google\Cloud\Chronicle\V1\RetrohuntMetadata', - 'initialPollDelayMillis' => '1000', - 'pollDelayMultiplier' => '2.0', - 'maxPollDelayMillis' => '10000', - 'totalPollTimeoutMillis' => '900000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateRule' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Chronicle\V1\Rule', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteRule' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetRetrohunt' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Chronicle\V1\Retrohunt', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetRule' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Chronicle\V1\Rule', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetRuleDeployment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Chronicle\V1\RuleDeployment', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListRetrohunts' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getRetrohunts', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Chronicle\V1\ListRetrohuntsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListRuleDeployments' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getRuleDeployments', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Chronicle\V1\ListRuleDeploymentsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListRuleRevisions' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getRules', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Chronicle\V1\ListRuleRevisionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListRules' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getRules', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Chronicle\V1\ListRulesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateRule' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Chronicle\V1\Rule', - 'headerParams' => [ - [ - 'keyName' => 'rule.name', - 'fieldAccessors' => [ - 'getRule', - 'getName', - ], - ], - ], - ], - 'UpdateRuleDeployment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Chronicle\V1\RuleDeployment', - 'headerParams' => [ - [ - 'keyName' => 'rule_deployment.name', - 'fieldAccessors' => [ - 'getRuleDeployment', - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'dataAccessScope' => 'projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}', - 'instance' => 'projects/{project}/locations/{location}/instances/{instance}', - 'referenceList' => 'projects/{project}/locations/{location}/instances/{instance}/referenceLists/{reference_list}', - 'retrohunt' => 'projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}', - 'rule' => 'projects/{project}/locations/{location}/instances/{instance}/rules/{rule}', - 'ruleDeployment' => 'projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment', - ], - ], - ], -]; diff --git a/owl-bot-staging/Chronicle/v1/src/V1/resources/rule_service_rest_client_config.php b/owl-bot-staging/Chronicle/v1/src/V1/resources/rule_service_rest_client_config.php deleted file mode 100644 index 0da0c5c50559..000000000000 --- a/owl-bot-staging/Chronicle/v1/src/V1/resources/rule_service_rest_client_config.php +++ /dev/null @@ -1,217 +0,0 @@ - [ - 'google.cloud.chronicle.v1.RuleService' => [ - 'CreateRetrohunt' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/instances/*/rules/*}/retrohunts', - 'body' => 'retrohunt', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateRule' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/instances/*}/rules', - 'body' => 'rule', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteRule' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/rules/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetRetrohunt' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/rules/*/retrohunts/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetRule' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/rules/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetRuleDeployment' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/rules/*/deployment}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListRetrohunts' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/instances/*/rules/*}/retrohunts', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListRuleDeployments' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/instances/*/rules/*}/deployments', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListRuleRevisions' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/rules/*}:listRevisions', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListRules' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/instances/*}/rules', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateRule' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{rule.name=projects/*/locations/*/instances/*/rules/*}', - 'body' => 'rule', - 'placeholders' => [ - 'rule.name' => [ - 'getters' => [ - 'getRule', - 'getName', - ], - ], - ], - ], - 'UpdateRuleDeployment' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{rule_deployment.name=projects/*/locations/*/instances/*/rules/*/deployment}', - 'body' => 'rule_deployment', - 'placeholders' => [ - 'rule_deployment.name' => [ - 'getters' => [ - 'getRuleDeployment', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Chronicle/v1/tests/Unit/V1/Client/DataAccessControlServiceClientTest.php b/owl-bot-staging/Chronicle/v1/tests/Unit/V1/Client/DataAccessControlServiceClientTest.php deleted file mode 100644 index bc7163b93a3f..000000000000 --- a/owl-bot-staging/Chronicle/v1/tests/Unit/V1/Client/DataAccessControlServiceClientTest.php +++ /dev/null @@ -1,866 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return DataAccessControlServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new DataAccessControlServiceClient($options); - } - - /** @test */ - public function createDataAccessLabelTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $udmQuery = 'udmQuery-2050033401'; - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $author = 'author-1406328437'; - $lastEditor = 'lastEditor1620154166'; - $description = 'description-1724546052'; - $expectedResponse = new DataAccessLabel(); - $expectedResponse->setUdmQuery($udmQuery); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setAuthor($author); - $expectedResponse->setLastEditor($lastEditor); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $dataAccessLabel = new DataAccessLabel(); - $dataAccessLabelId = 'dataAccessLabelId-1688134612'; - $request = (new CreateDataAccessLabelRequest()) - ->setParent($formattedParent) - ->setDataAccessLabel($dataAccessLabel) - ->setDataAccessLabelId($dataAccessLabelId); - $response = $gapicClient->createDataAccessLabel($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.chronicle.v1.DataAccessControlService/CreateDataAccessLabel', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getDataAccessLabel(); - $this->assertProtobufEquals($dataAccessLabel, $actualValue); - $actualValue = $actualRequestObject->getDataAccessLabelId(); - $this->assertProtobufEquals($dataAccessLabelId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createDataAccessLabelExceptionTest() - { - $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $dataAccessLabel = new DataAccessLabel(); - $dataAccessLabelId = 'dataAccessLabelId-1688134612'; - $request = (new CreateDataAccessLabelRequest()) - ->setParent($formattedParent) - ->setDataAccessLabel($dataAccessLabel) - ->setDataAccessLabelId($dataAccessLabelId); - try { - $gapicClient->createDataAccessLabel($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 createDataAccessScopeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $author = 'author-1406328437'; - $lastEditor = 'lastEditor1620154166'; - $description = 'description-1724546052'; - $allowAll = false; - $expectedResponse = new DataAccessScope(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setAuthor($author); - $expectedResponse->setLastEditor($lastEditor); - $expectedResponse->setDescription($description); - $expectedResponse->setAllowAll($allowAll); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $dataAccessScope = new DataAccessScope(); - $dataAccessScopeName = $gapicClient->dataAccessScopeName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_ACCESS_SCOPE]'); - $dataAccessScope->setName($dataAccessScopeName); - $dataAccessScopeId = 'dataAccessScopeId-216227636'; - $request = (new CreateDataAccessScopeRequest()) - ->setParent($formattedParent) - ->setDataAccessScope($dataAccessScope) - ->setDataAccessScopeId($dataAccessScopeId); - $response = $gapicClient->createDataAccessScope($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.chronicle.v1.DataAccessControlService/CreateDataAccessScope', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getDataAccessScope(); - $this->assertProtobufEquals($dataAccessScope, $actualValue); - $actualValue = $actualRequestObject->getDataAccessScopeId(); - $this->assertProtobufEquals($dataAccessScopeId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createDataAccessScopeExceptionTest() - { - $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $dataAccessScope = new DataAccessScope(); - $dataAccessScopeName = $gapicClient->dataAccessScopeName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_ACCESS_SCOPE]'); - $dataAccessScope->setName($dataAccessScopeName); - $dataAccessScopeId = 'dataAccessScopeId-216227636'; - $request = (new CreateDataAccessScopeRequest()) - ->setParent($formattedParent) - ->setDataAccessScope($dataAccessScope) - ->setDataAccessScopeId($dataAccessScopeId); - try { - $gapicClient->createDataAccessScope($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 deleteDataAccessLabelTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->dataAccessLabelName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_ACCESS_LABEL]'); - $request = (new DeleteDataAccessLabelRequest()) - ->setName($formattedName); - $gapicClient->deleteDataAccessLabel($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.chronicle.v1.DataAccessControlService/DeleteDataAccessLabel', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteDataAccessLabelExceptionTest() - { - $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->dataAccessLabelName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_ACCESS_LABEL]'); - $request = (new DeleteDataAccessLabelRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteDataAccessLabel($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 deleteDataAccessScopeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->dataAccessScopeName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_ACCESS_SCOPE]'); - $request = (new DeleteDataAccessScopeRequest()) - ->setName($formattedName); - $gapicClient->deleteDataAccessScope($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.chronicle.v1.DataAccessControlService/DeleteDataAccessScope', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteDataAccessScopeExceptionTest() - { - $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->dataAccessScopeName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_ACCESS_SCOPE]'); - $request = (new DeleteDataAccessScopeRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteDataAccessScope($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 getDataAccessLabelTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $udmQuery = 'udmQuery-2050033401'; - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $author = 'author-1406328437'; - $lastEditor = 'lastEditor1620154166'; - $description = 'description-1724546052'; - $expectedResponse = new DataAccessLabel(); - $expectedResponse->setUdmQuery($udmQuery); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setAuthor($author); - $expectedResponse->setLastEditor($lastEditor); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->dataAccessLabelName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_ACCESS_LABEL]'); - $request = (new GetDataAccessLabelRequest()) - ->setName($formattedName); - $response = $gapicClient->getDataAccessLabel($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.chronicle.v1.DataAccessControlService/GetDataAccessLabel', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataAccessLabelExceptionTest() - { - $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->dataAccessLabelName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_ACCESS_LABEL]'); - $request = (new GetDataAccessLabelRequest()) - ->setName($formattedName); - try { - $gapicClient->getDataAccessLabel($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 getDataAccessScopeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $author = 'author-1406328437'; - $lastEditor = 'lastEditor1620154166'; - $description = 'description-1724546052'; - $allowAll = false; - $expectedResponse = new DataAccessScope(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setAuthor($author); - $expectedResponse->setLastEditor($lastEditor); - $expectedResponse->setDescription($description); - $expectedResponse->setAllowAll($allowAll); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->dataAccessScopeName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_ACCESS_SCOPE]'); - $request = (new GetDataAccessScopeRequest()) - ->setName($formattedName); - $response = $gapicClient->getDataAccessScope($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.chronicle.v1.DataAccessControlService/GetDataAccessScope', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataAccessScopeExceptionTest() - { - $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->dataAccessScopeName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_ACCESS_SCOPE]'); - $request = (new GetDataAccessScopeRequest()) - ->setName($formattedName); - try { - $gapicClient->getDataAccessScope($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 listDataAccessLabelsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $dataAccessLabelsElement = new DataAccessLabel(); - $dataAccessLabels = [ - $dataAccessLabelsElement, - ]; - $expectedResponse = new ListDataAccessLabelsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDataAccessLabels($dataAccessLabels); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new ListDataAccessLabelsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listDataAccessLabels($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDataAccessLabels()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.chronicle.v1.DataAccessControlService/ListDataAccessLabels', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDataAccessLabelsExceptionTest() - { - $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new ListDataAccessLabelsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listDataAccessLabels($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 listDataAccessScopesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $globalDataAccessScopeGranted = true; - $nextPageToken = ''; - $dataAccessScopesElement = new DataAccessScope(); - $dataAccessScopes = [ - $dataAccessScopesElement, - ]; - $expectedResponse = new ListDataAccessScopesResponse(); - $expectedResponse->setGlobalDataAccessScopeGranted($globalDataAccessScopeGranted); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDataAccessScopes($dataAccessScopes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new ListDataAccessScopesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listDataAccessScopes($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDataAccessScopes()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.chronicle.v1.DataAccessControlService/ListDataAccessScopes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDataAccessScopesExceptionTest() - { - $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new ListDataAccessScopesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listDataAccessScopes($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 updateDataAccessLabelTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $udmQuery = 'udmQuery-2050033401'; - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $author = 'author-1406328437'; - $lastEditor = 'lastEditor1620154166'; - $description = 'description-1724546052'; - $expectedResponse = new DataAccessLabel(); - $expectedResponse->setUdmQuery($udmQuery); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setAuthor($author); - $expectedResponse->setLastEditor($lastEditor); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $dataAccessLabel = new DataAccessLabel(); - $request = (new UpdateDataAccessLabelRequest()) - ->setDataAccessLabel($dataAccessLabel); - $response = $gapicClient->updateDataAccessLabel($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.chronicle.v1.DataAccessControlService/UpdateDataAccessLabel', $actualFuncCall); - $actualValue = $actualRequestObject->getDataAccessLabel(); - $this->assertProtobufEquals($dataAccessLabel, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateDataAccessLabelExceptionTest() - { - $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 - $dataAccessLabel = new DataAccessLabel(); - $request = (new UpdateDataAccessLabelRequest()) - ->setDataAccessLabel($dataAccessLabel); - try { - $gapicClient->updateDataAccessLabel($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 updateDataAccessScopeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $author = 'author-1406328437'; - $lastEditor = 'lastEditor1620154166'; - $description = 'description-1724546052'; - $allowAll = false; - $expectedResponse = new DataAccessScope(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setAuthor($author); - $expectedResponse->setLastEditor($lastEditor); - $expectedResponse->setDescription($description); - $expectedResponse->setAllowAll($allowAll); - $transport->addResponse($expectedResponse); - // Mock request - $dataAccessScope = new DataAccessScope(); - $dataAccessScopeName = $gapicClient->dataAccessScopeName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_ACCESS_SCOPE]'); - $dataAccessScope->setName($dataAccessScopeName); - $request = (new UpdateDataAccessScopeRequest()) - ->setDataAccessScope($dataAccessScope); - $response = $gapicClient->updateDataAccessScope($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.chronicle.v1.DataAccessControlService/UpdateDataAccessScope', $actualFuncCall); - $actualValue = $actualRequestObject->getDataAccessScope(); - $this->assertProtobufEquals($dataAccessScope, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateDataAccessScopeExceptionTest() - { - $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 - $dataAccessScope = new DataAccessScope(); - $dataAccessScopeName = $gapicClient->dataAccessScopeName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DATA_ACCESS_SCOPE]'); - $dataAccessScope->setName($dataAccessScopeName); - $request = (new UpdateDataAccessScopeRequest()) - ->setDataAccessScope($dataAccessScope); - try { - $gapicClient->updateDataAccessScope($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 createDataAccessLabelAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $udmQuery = 'udmQuery-2050033401'; - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $author = 'author-1406328437'; - $lastEditor = 'lastEditor1620154166'; - $description = 'description-1724546052'; - $expectedResponse = new DataAccessLabel(); - $expectedResponse->setUdmQuery($udmQuery); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setAuthor($author); - $expectedResponse->setLastEditor($lastEditor); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $dataAccessLabel = new DataAccessLabel(); - $dataAccessLabelId = 'dataAccessLabelId-1688134612'; - $request = (new CreateDataAccessLabelRequest()) - ->setParent($formattedParent) - ->setDataAccessLabel($dataAccessLabel) - ->setDataAccessLabelId($dataAccessLabelId); - $response = $gapicClient->createDataAccessLabelAsync($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.chronicle.v1.DataAccessControlService/CreateDataAccessLabel', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getDataAccessLabel(); - $this->assertProtobufEquals($dataAccessLabel, $actualValue); - $actualValue = $actualRequestObject->getDataAccessLabelId(); - $this->assertProtobufEquals($dataAccessLabelId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Chronicle/v1/tests/Unit/V1/Client/EntityServiceClientTest.php b/owl-bot-staging/Chronicle/v1/tests/Unit/V1/Client/EntityServiceClientTest.php deleted file mode 100644 index ae91a174beb0..000000000000 --- a/owl-bot-staging/Chronicle/v1/tests/Unit/V1/Client/EntityServiceClientTest.php +++ /dev/null @@ -1,477 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return EntityServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new EntityServiceClient($options); - } - - /** @test */ - public function createWatchlistTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $multiplyingFactor = 1981784; - $expectedResponse = new Watchlist(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setMultiplyingFactor($multiplyingFactor); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $watchlist = new Watchlist(); - $watchlistDisplayName = 'watchlistDisplayName2018509376'; - $watchlist->setDisplayName($watchlistDisplayName); - $watchlistEntityPopulationMechanism = new EntityPopulationMechanism(); - $watchlist->setEntityPopulationMechanism($watchlistEntityPopulationMechanism); - $request = (new CreateWatchlistRequest()) - ->setParent($formattedParent) - ->setWatchlist($watchlist); - $response = $gapicClient->createWatchlist($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.chronicle.v1.EntityService/CreateWatchlist', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getWatchlist(); - $this->assertProtobufEquals($watchlist, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createWatchlistExceptionTest() - { - $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $watchlist = new Watchlist(); - $watchlistDisplayName = 'watchlistDisplayName2018509376'; - $watchlist->setDisplayName($watchlistDisplayName); - $watchlistEntityPopulationMechanism = new EntityPopulationMechanism(); - $watchlist->setEntityPopulationMechanism($watchlistEntityPopulationMechanism); - $request = (new CreateWatchlistRequest()) - ->setParent($formattedParent) - ->setWatchlist($watchlist); - try { - $gapicClient->createWatchlist($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 deleteWatchlistTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->watchlistName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[WATCHLIST]'); - $request = (new DeleteWatchlistRequest()) - ->setName($formattedName); - $gapicClient->deleteWatchlist($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.chronicle.v1.EntityService/DeleteWatchlist', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteWatchlistExceptionTest() - { - $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->watchlistName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[WATCHLIST]'); - $request = (new DeleteWatchlistRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteWatchlist($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 getWatchlistTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $multiplyingFactor = 1981784; - $expectedResponse = new Watchlist(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setMultiplyingFactor($multiplyingFactor); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->watchlistName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[WATCHLIST]'); - $request = (new GetWatchlistRequest()) - ->setName($formattedName); - $response = $gapicClient->getWatchlist($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.chronicle.v1.EntityService/GetWatchlist', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getWatchlistExceptionTest() - { - $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->watchlistName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[WATCHLIST]'); - $request = (new GetWatchlistRequest()) - ->setName($formattedName); - try { - $gapicClient->getWatchlist($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 listWatchlistsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $watchlistsElement = new Watchlist(); - $watchlists = [ - $watchlistsElement, - ]; - $expectedResponse = new ListWatchlistsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setWatchlists($watchlists); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new ListWatchlistsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listWatchlists($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getWatchlists()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.chronicle.v1.EntityService/ListWatchlists', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listWatchlistsExceptionTest() - { - $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new ListWatchlistsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listWatchlists($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 updateWatchlistTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $multiplyingFactor = 1981784; - $expectedResponse = new Watchlist(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setMultiplyingFactor($multiplyingFactor); - $transport->addResponse($expectedResponse); - // Mock request - $watchlist = new Watchlist(); - $watchlistDisplayName = 'watchlistDisplayName2018509376'; - $watchlist->setDisplayName($watchlistDisplayName); - $watchlistEntityPopulationMechanism = new EntityPopulationMechanism(); - $watchlist->setEntityPopulationMechanism($watchlistEntityPopulationMechanism); - $request = (new UpdateWatchlistRequest()) - ->setWatchlist($watchlist); - $response = $gapicClient->updateWatchlist($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.chronicle.v1.EntityService/UpdateWatchlist', $actualFuncCall); - $actualValue = $actualRequestObject->getWatchlist(); - $this->assertProtobufEquals($watchlist, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateWatchlistExceptionTest() - { - $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 - $watchlist = new Watchlist(); - $watchlistDisplayName = 'watchlistDisplayName2018509376'; - $watchlist->setDisplayName($watchlistDisplayName); - $watchlistEntityPopulationMechanism = new EntityPopulationMechanism(); - $watchlist->setEntityPopulationMechanism($watchlistEntityPopulationMechanism); - $request = (new UpdateWatchlistRequest()) - ->setWatchlist($watchlist); - try { - $gapicClient->updateWatchlist($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 createWatchlistAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $multiplyingFactor = 1981784; - $expectedResponse = new Watchlist(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setMultiplyingFactor($multiplyingFactor); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $watchlist = new Watchlist(); - $watchlistDisplayName = 'watchlistDisplayName2018509376'; - $watchlist->setDisplayName($watchlistDisplayName); - $watchlistEntityPopulationMechanism = new EntityPopulationMechanism(); - $watchlist->setEntityPopulationMechanism($watchlistEntityPopulationMechanism); - $request = (new CreateWatchlistRequest()) - ->setParent($formattedParent) - ->setWatchlist($watchlist); - $response = $gapicClient->createWatchlistAsync($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.chronicle.v1.EntityService/CreateWatchlist', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getWatchlist(); - $this->assertProtobufEquals($watchlist, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Chronicle/v1/tests/Unit/V1/Client/InstanceServiceClientTest.php b/owl-bot-staging/Chronicle/v1/tests/Unit/V1/Client/InstanceServiceClientTest.php deleted file mode 100644 index 24e45ff2e5ba..000000000000 --- a/owl-bot-staging/Chronicle/v1/tests/Unit/V1/Client/InstanceServiceClientTest.php +++ /dev/null @@ -1,155 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return InstanceServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new InstanceServiceClient($options); - } - - /** @test */ - public function getInstanceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new Instance(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new GetInstanceRequest()) - ->setName($formattedName); - $response = $gapicClient->getInstance($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.chronicle.v1.InstanceService/GetInstance', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getInstanceExceptionTest() - { - $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new GetInstanceRequest()) - ->setName($formattedName); - try { - $gapicClient->getInstance($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 getInstanceAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new Instance(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new GetInstanceRequest()) - ->setName($formattedName); - $response = $gapicClient->getInstanceAsync($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.chronicle.v1.InstanceService/GetInstance', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Chronicle/v1/tests/Unit/V1/Client/ReferenceListServiceClientTest.php b/owl-bot-staging/Chronicle/v1/tests/Unit/V1/Client/ReferenceListServiceClientTest.php deleted file mode 100644 index 42584fb06abd..000000000000 --- a/owl-bot-staging/Chronicle/v1/tests/Unit/V1/Client/ReferenceListServiceClientTest.php +++ /dev/null @@ -1,434 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return ReferenceListServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ReferenceListServiceClient($options); - } - - /** @test */ - public function createReferenceListTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $ruleAssociationsCount = 1522562875; - $expectedResponse = new ReferenceList(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setRuleAssociationsCount($ruleAssociationsCount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $referenceList = new ReferenceList(); - $referenceListDescription = 'referenceListDescription-265280077'; - $referenceList->setDescription($referenceListDescription); - $referenceListEntries = []; - $referenceList->setEntries($referenceListEntries); - $referenceListSyntaxType = ReferenceListSyntaxType::REFERENCE_LIST_SYNTAX_TYPE_UNSPECIFIED; - $referenceList->setSyntaxType($referenceListSyntaxType); - $referenceListId = 'referenceListId-1667170456'; - $request = (new CreateReferenceListRequest()) - ->setParent($formattedParent) - ->setReferenceList($referenceList) - ->setReferenceListId($referenceListId); - $response = $gapicClient->createReferenceList($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.chronicle.v1.ReferenceListService/CreateReferenceList', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getReferenceList(); - $this->assertProtobufEquals($referenceList, $actualValue); - $actualValue = $actualRequestObject->getReferenceListId(); - $this->assertProtobufEquals($referenceListId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createReferenceListExceptionTest() - { - $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $referenceList = new ReferenceList(); - $referenceListDescription = 'referenceListDescription-265280077'; - $referenceList->setDescription($referenceListDescription); - $referenceListEntries = []; - $referenceList->setEntries($referenceListEntries); - $referenceListSyntaxType = ReferenceListSyntaxType::REFERENCE_LIST_SYNTAX_TYPE_UNSPECIFIED; - $referenceList->setSyntaxType($referenceListSyntaxType); - $referenceListId = 'referenceListId-1667170456'; - $request = (new CreateReferenceListRequest()) - ->setParent($formattedParent) - ->setReferenceList($referenceList) - ->setReferenceListId($referenceListId); - try { - $gapicClient->createReferenceList($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 getReferenceListTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $ruleAssociationsCount = 1522562875; - $expectedResponse = new ReferenceList(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setRuleAssociationsCount($ruleAssociationsCount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->referenceListName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[REFERENCE_LIST]'); - $request = (new GetReferenceListRequest()) - ->setName($formattedName); - $response = $gapicClient->getReferenceList($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.chronicle.v1.ReferenceListService/GetReferenceList', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getReferenceListExceptionTest() - { - $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->referenceListName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[REFERENCE_LIST]'); - $request = (new GetReferenceListRequest()) - ->setName($formattedName); - try { - $gapicClient->getReferenceList($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 listReferenceListsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $referenceListsElement = new ReferenceList(); - $referenceLists = [ - $referenceListsElement, - ]; - $expectedResponse = new ListReferenceListsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setReferenceLists($referenceLists); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new ListReferenceListsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listReferenceLists($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getReferenceLists()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.chronicle.v1.ReferenceListService/ListReferenceLists', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listReferenceListsExceptionTest() - { - $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new ListReferenceListsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listReferenceLists($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 updateReferenceListTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $ruleAssociationsCount = 1522562875; - $expectedResponse = new ReferenceList(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setRuleAssociationsCount($ruleAssociationsCount); - $transport->addResponse($expectedResponse); - // Mock request - $referenceList = new ReferenceList(); - $referenceListDescription = 'referenceListDescription-265280077'; - $referenceList->setDescription($referenceListDescription); - $referenceListEntries = []; - $referenceList->setEntries($referenceListEntries); - $referenceListSyntaxType = ReferenceListSyntaxType::REFERENCE_LIST_SYNTAX_TYPE_UNSPECIFIED; - $referenceList->setSyntaxType($referenceListSyntaxType); - $request = (new UpdateReferenceListRequest()) - ->setReferenceList($referenceList); - $response = $gapicClient->updateReferenceList($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.chronicle.v1.ReferenceListService/UpdateReferenceList', $actualFuncCall); - $actualValue = $actualRequestObject->getReferenceList(); - $this->assertProtobufEquals($referenceList, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateReferenceListExceptionTest() - { - $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 - $referenceList = new ReferenceList(); - $referenceListDescription = 'referenceListDescription-265280077'; - $referenceList->setDescription($referenceListDescription); - $referenceListEntries = []; - $referenceList->setEntries($referenceListEntries); - $referenceListSyntaxType = ReferenceListSyntaxType::REFERENCE_LIST_SYNTAX_TYPE_UNSPECIFIED; - $referenceList->setSyntaxType($referenceListSyntaxType); - $request = (new UpdateReferenceListRequest()) - ->setReferenceList($referenceList); - try { - $gapicClient->updateReferenceList($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 createReferenceListAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $ruleAssociationsCount = 1522562875; - $expectedResponse = new ReferenceList(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setRuleAssociationsCount($ruleAssociationsCount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $referenceList = new ReferenceList(); - $referenceListDescription = 'referenceListDescription-265280077'; - $referenceList->setDescription($referenceListDescription); - $referenceListEntries = []; - $referenceList->setEntries($referenceListEntries); - $referenceListSyntaxType = ReferenceListSyntaxType::REFERENCE_LIST_SYNTAX_TYPE_UNSPECIFIED; - $referenceList->setSyntaxType($referenceListSyntaxType); - $referenceListId = 'referenceListId-1667170456'; - $request = (new CreateReferenceListRequest()) - ->setParent($formattedParent) - ->setReferenceList($referenceList) - ->setReferenceListId($referenceListId); - $response = $gapicClient->createReferenceListAsync($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.chronicle.v1.ReferenceListService/CreateReferenceList', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getReferenceList(); - $this->assertProtobufEquals($referenceList, $actualValue); - $actualValue = $actualRequestObject->getReferenceListId(); - $this->assertProtobufEquals($referenceListId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Chronicle/v1/tests/Unit/V1/Client/RuleServiceClientTest.php b/owl-bot-staging/Chronicle/v1/tests/Unit/V1/Client/RuleServiceClientTest.php deleted file mode 100644 index 157ee8fd1f14..000000000000 --- a/owl-bot-staging/Chronicle/v1/tests/Unit/V1/Client/RuleServiceClientTest.php +++ /dev/null @@ -1,1100 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return RuleServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new RuleServiceClient($options); - } - - /** @test */ - public function createRetrohuntTest() - { - $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/createRetrohuntTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $progressPercentage = 4432484; - $expectedResponse = new Retrohunt(); - $expectedResponse->setName($name); - $expectedResponse->setProgressPercentage($progressPercentage); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createRetrohuntTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->ruleName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[RULE]'); - $retrohunt = new Retrohunt(); - $retrohuntProcessInterval = new Interval(); - $retrohunt->setProcessInterval($retrohuntProcessInterval); - $request = (new CreateRetrohuntRequest()) - ->setParent($formattedParent) - ->setRetrohunt($retrohunt); - $response = $gapicClient->createRetrohunt($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.chronicle.v1.RuleService/CreateRetrohunt', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getRetrohunt(); - $this->assertProtobufEquals($retrohunt, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createRetrohuntTest'); - $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 createRetrohuntExceptionTest() - { - $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/createRetrohuntTest'); - $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->ruleName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[RULE]'); - $retrohunt = new Retrohunt(); - $retrohuntProcessInterval = new Interval(); - $retrohunt->setProcessInterval($retrohuntProcessInterval); - $request = (new CreateRetrohuntRequest()) - ->setParent($formattedParent) - ->setRetrohunt($retrohunt); - $response = $gapicClient->createRetrohunt($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createRetrohuntTest'); - 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 createRuleTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $revisionId = 'revisionId513861631'; - $displayName = 'displayName1615086568'; - $text = 'text3556653'; - $author = 'author-1406328437'; - $etag = 'etag3123477'; - $scope = 'scope109264468'; - $nearRealTimeLiveRuleEligible = false; - $expectedResponse = new Rule(); - $expectedResponse->setName($name); - $expectedResponse->setRevisionId($revisionId); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setText($text); - $expectedResponse->setAuthor($author); - $expectedResponse->setEtag($etag); - $expectedResponse->setScope($scope); - $expectedResponse->setNearRealTimeLiveRuleEligible($nearRealTimeLiveRuleEligible); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $rule = new Rule(); - $request = (new CreateRuleRequest()) - ->setParent($formattedParent) - ->setRule($rule); - $response = $gapicClient->createRule($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.chronicle.v1.RuleService/CreateRule', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getRule(); - $this->assertProtobufEquals($rule, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createRuleExceptionTest() - { - $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $rule = new Rule(); - $request = (new CreateRuleRequest()) - ->setParent($formattedParent) - ->setRule($rule); - try { - $gapicClient->createRule($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 deleteRuleTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->ruleName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[RULE]'); - $request = (new DeleteRuleRequest()) - ->setName($formattedName); - $gapicClient->deleteRule($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.chronicle.v1.RuleService/DeleteRule', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteRuleExceptionTest() - { - $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->ruleName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[RULE]'); - $request = (new DeleteRuleRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteRule($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 getRetrohuntTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $progressPercentage = 4432484; - $expectedResponse = new Retrohunt(); - $expectedResponse->setName($name2); - $expectedResponse->setProgressPercentage($progressPercentage); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->retrohuntName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[RULE]', '[RETROHUNT]'); - $request = (new GetRetrohuntRequest()) - ->setName($formattedName); - $response = $gapicClient->getRetrohunt($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.chronicle.v1.RuleService/GetRetrohunt', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getRetrohuntExceptionTest() - { - $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->retrohuntName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[RULE]', '[RETROHUNT]'); - $request = (new GetRetrohuntRequest()) - ->setName($formattedName); - try { - $gapicClient->getRetrohunt($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 getRuleTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $revisionId = 'revisionId513861631'; - $displayName = 'displayName1615086568'; - $text = 'text3556653'; - $author = 'author-1406328437'; - $etag = 'etag3123477'; - $scope = 'scope109264468'; - $nearRealTimeLiveRuleEligible = false; - $expectedResponse = new Rule(); - $expectedResponse->setName($name2); - $expectedResponse->setRevisionId($revisionId); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setText($text); - $expectedResponse->setAuthor($author); - $expectedResponse->setEtag($etag); - $expectedResponse->setScope($scope); - $expectedResponse->setNearRealTimeLiveRuleEligible($nearRealTimeLiveRuleEligible); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->ruleName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[RULE]'); - $request = (new GetRuleRequest()) - ->setName($formattedName); - $response = $gapicClient->getRule($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.chronicle.v1.RuleService/GetRule', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getRuleExceptionTest() - { - $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->ruleName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[RULE]'); - $request = (new GetRuleRequest()) - ->setName($formattedName); - try { - $gapicClient->getRule($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 getRuleDeploymentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $enabled = false; - $alerting = true; - $archived = true; - $expectedResponse = new RuleDeployment(); - $expectedResponse->setName($name2); - $expectedResponse->setEnabled($enabled); - $expectedResponse->setAlerting($alerting); - $expectedResponse->setArchived($archived); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->ruleDeploymentName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[RULE]'); - $request = (new GetRuleDeploymentRequest()) - ->setName($formattedName); - $response = $gapicClient->getRuleDeployment($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.chronicle.v1.RuleService/GetRuleDeployment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getRuleDeploymentExceptionTest() - { - $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->ruleDeploymentName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[RULE]'); - $request = (new GetRuleDeploymentRequest()) - ->setName($formattedName); - try { - $gapicClient->getRuleDeployment($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 listRetrohuntsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $retrohuntsElement = new Retrohunt(); - $retrohunts = [ - $retrohuntsElement, - ]; - $expectedResponse = new ListRetrohuntsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setRetrohunts($retrohunts); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->ruleName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[RULE]'); - $request = (new ListRetrohuntsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listRetrohunts($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getRetrohunts()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.chronicle.v1.RuleService/ListRetrohunts', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listRetrohuntsExceptionTest() - { - $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->ruleName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[RULE]'); - $request = (new ListRetrohuntsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listRetrohunts($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 listRuleDeploymentsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $ruleDeploymentsElement = new RuleDeployment(); - $ruleDeployments = [ - $ruleDeploymentsElement, - ]; - $expectedResponse = new ListRuleDeploymentsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setRuleDeployments($ruleDeployments); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->ruleName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[RULE]'); - $request = (new ListRuleDeploymentsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listRuleDeployments($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getRuleDeployments()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.chronicle.v1.RuleService/ListRuleDeployments', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listRuleDeploymentsExceptionTest() - { - $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->ruleName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[RULE]'); - $request = (new ListRuleDeploymentsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listRuleDeployments($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 listRuleRevisionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $rulesElement = new Rule(); - $rules = [ - $rulesElement, - ]; - $expectedResponse = new ListRuleRevisionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setRules($rules); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->ruleName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[RULE]'); - $request = (new ListRuleRevisionsRequest()) - ->setName($formattedName); - $response = $gapicClient->listRuleRevisions($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getRules()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.chronicle.v1.RuleService/ListRuleRevisions', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listRuleRevisionsExceptionTest() - { - $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->ruleName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[RULE]'); - $request = (new ListRuleRevisionsRequest()) - ->setName($formattedName); - try { - $gapicClient->listRuleRevisions($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 listRulesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $rulesElement = new Rule(); - $rules = [ - $rulesElement, - ]; - $expectedResponse = new ListRulesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setRules($rules); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new ListRulesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listRules($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getRules()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.chronicle.v1.RuleService/ListRules', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listRulesExceptionTest() - { - $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new ListRulesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listRules($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 updateRuleTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $revisionId = 'revisionId513861631'; - $displayName = 'displayName1615086568'; - $text = 'text3556653'; - $author = 'author-1406328437'; - $etag = 'etag3123477'; - $scope = 'scope109264468'; - $nearRealTimeLiveRuleEligible = false; - $expectedResponse = new Rule(); - $expectedResponse->setName($name); - $expectedResponse->setRevisionId($revisionId); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setText($text); - $expectedResponse->setAuthor($author); - $expectedResponse->setEtag($etag); - $expectedResponse->setScope($scope); - $expectedResponse->setNearRealTimeLiveRuleEligible($nearRealTimeLiveRuleEligible); - $transport->addResponse($expectedResponse); - // Mock request - $rule = new Rule(); - $request = (new UpdateRuleRequest()) - ->setRule($rule); - $response = $gapicClient->updateRule($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.chronicle.v1.RuleService/UpdateRule', $actualFuncCall); - $actualValue = $actualRequestObject->getRule(); - $this->assertProtobufEquals($rule, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateRuleExceptionTest() - { - $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 - $rule = new Rule(); - $request = (new UpdateRuleRequest()) - ->setRule($rule); - try { - $gapicClient->updateRule($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 updateRuleDeploymentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $enabled = false; - $alerting = true; - $archived = true; - $expectedResponse = new RuleDeployment(); - $expectedResponse->setName($name); - $expectedResponse->setEnabled($enabled); - $expectedResponse->setAlerting($alerting); - $expectedResponse->setArchived($archived); - $transport->addResponse($expectedResponse); - // Mock request - $ruleDeployment = new RuleDeployment(); - $ruleDeploymentName = 'ruleDeploymentName648362252'; - $ruleDeployment->setName($ruleDeploymentName); - $updateMask = new FieldMask(); - $request = (new UpdateRuleDeploymentRequest()) - ->setRuleDeployment($ruleDeployment) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateRuleDeployment($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.chronicle.v1.RuleService/UpdateRuleDeployment', $actualFuncCall); - $actualValue = $actualRequestObject->getRuleDeployment(); - $this->assertProtobufEquals($ruleDeployment, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateRuleDeploymentExceptionTest() - { - $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 - $ruleDeployment = new RuleDeployment(); - $ruleDeploymentName = 'ruleDeploymentName648362252'; - $ruleDeployment->setName($ruleDeploymentName); - $updateMask = new FieldMask(); - $request = (new UpdateRuleDeploymentRequest()) - ->setRuleDeployment($ruleDeployment) - ->setUpdateMask($updateMask); - try { - $gapicClient->updateRuleDeployment($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 createRetrohuntAsyncTest() - { - $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/createRetrohuntTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $progressPercentage = 4432484; - $expectedResponse = new Retrohunt(); - $expectedResponse->setName($name); - $expectedResponse->setProgressPercentage($progressPercentage); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createRetrohuntTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->ruleName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[RULE]'); - $retrohunt = new Retrohunt(); - $retrohuntProcessInterval = new Interval(); - $retrohunt->setProcessInterval($retrohuntProcessInterval); - $request = (new CreateRetrohuntRequest()) - ->setParent($formattedParent) - ->setRetrohunt($retrohunt); - $response = $gapicClient->createRetrohuntAsync($request)->wait(); - $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.chronicle.v1.RuleService/CreateRetrohunt', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getRetrohunt(); - $this->assertProtobufEquals($retrohunt, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createRetrohuntTest'); - $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()); - } -}